Skip to content

Commit 75967c7

Browse files
committed
Merge branch 'master' of https://github.com/WebFuzzing/EMB into develop
2 parents 7cd3434 + 4f82ce6 commit 75967c7

File tree

4 files changed

+1546
-18
lines changed

4 files changed

+1546
-18
lines changed

README.md

Lines changed: 32 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,24 @@ We collected several different systems running on the JVM, in different programm
1212
In this documentation, we will refer to these projects as System Under Test (SUT).
1313
Currently, the SUTs are either _REST_, _GraphQL_ or _RPC_ APIs.
1414

15-
This dataset was previously known as EMB. It was rebranded into WFD since version 4.0.0.
15+
> This dataset was previously known as EMB. It was rebranded into WFD since version 4.0.0.
1616
1717
This collection of SUTs was originally assembled for easing experimentation with the fuzzer called [EvoMaster](http://evomaster.org).
1818
However, finding this type of application is not trivial among open-source projects.
1919
Furthermore, it is not simple to sort out all the technical details on how to set these applications up and start them in a simple, uniform approach.
2020
Therefore, this repository provides the important contribution of providing all these necessary scripts for researchers that need this kind of case study.
2121

22-
__Black-box Testing__. For each SUT, we provide Docker Compose scripts to start the APIs with all their needed dependencies (e.g., databases). APIs are configured with mitmproxy and JaCoCo to collect information on the fuzzing results.
22+
__Black-box Testing__. For each SUT, we provide Docker Compose scripts (under the [dockerfiles](dockerfiles) folder) to start the APIs with all their needed dependencies (e.g., databases). APIs are configured with _mitmproxy_ and _JaCoCo_ to collect information on the fuzzing results.
2323

24-
__White-box Testing__. For each SUT, we implemented _driver_ classes, which can programmatically _start_, _stop_ and _reset_ the state of SUT (e.g., data in SQL databases).
24+
__White-box Testing__. For each SUT, we implemented _driver_ classes for _EvoMaster_ (currently the only existing white-box fuzzer for the JVM), which can programmatically _start_, _stop_ and _reset_ the state of SUT (e.g., data in SQL databases).
2525
As well as enable setting up different properties in a _uniform_ way, like choosing TCP port numbers for the HTTP servers.
2626
If a SUT uses any external services (e.g., a SQL database), these will be automatically started via Docker in these driver classes.
2727

28-
**NOTE**: version 1.6.1 was last one in which we still updated drivers for JavaScript and C\#. Those SUTs are not built anymore by default, and latest versions of *EvoMaster* might not work on those old drivers. Updating drivers for different programming languages (and re-implement white-box heuristics) is a massive amount of work, which unfortunately has little to no value for the scientific community (based on our experience). Those SUTs are still here in WFD to enable *black-box* experiments (and to be able to replicate old experiments), but unfortunately not for *white-box* testing with latest versions of *EvoMaster*.
28+
**NOTE**: version 1.6.1 was last one in which we still updated drivers for JavaScript and C\#. Those SUTs are not built anymore by default, and latest versions of *EvoMaster* might not work on those old drivers. Updating drivers for different programming languages (and re-implement white-box heuristics) is a massive amount of work, which unfortunately has little to no value for the scientific community (based on our experience). Those SUTs are still here in WFD to be able to replicate old experiments, but unfortunately not for *white-box* testing with latest versions of *EvoMaster*.
2929

3030

3131

32-
A video providing some high level overview of EMB can be found [here](https://youtu.be/wJs34ATgLEw).
32+
An old video (2023) providing some high level overview of EMB can be found [here](https://youtu.be/wJs34ATgLEw).
3333

3434
[![EMB YouTube Video](https://img.youtube.com/vi/wJs34ATgLEw/0.jpg)](https://www.youtube.com/watch?v=wJs34ATgLEw)
3535

@@ -58,6 +58,7 @@ In *IEEE International Conference on Software Testing, Validation and Verificati
5858
The projects were selected based on searches using keywords on GitHub APIs, using convenience sampling.
5959
Several SUTs were looked at, in which we discarded the ones that would not compile, would crash at startup, would use obscure/unpopular libraries with no documentation to get them started, are too trivial, student projects, etc.
6060
Where possible, we tried to prioritize/sort based on number of _stars_ on GitHub.
61+
When authors of other fuzzers used some other open-source JVM APIs in their studies, we included them here into WFD.
6162

6263

6364
Note that some of these open-source projects might be no longer supported, whereas others are still developed and updated.
@@ -73,6 +74,10 @@ For simplicity, all schemas are also available as JSON/YML files under the folde
7374

7475
> **IMPORTANT**: More details (e.g., #LOCs and used databases) on these APIs can be found [in this table](statistics/table_emb.md).
7576
77+
Real-world APIs require authentication.
78+
How to setup authentication information, based on the current content of the initialized databases, is expressed in [Web Fuzzing Commons (WFC)](https://github.com/WebFuzzing/Commons) format.
79+
Auth configuration files can found in the [auth](auth) folder.
80+
7681

7782
### REST: Java/Kotlin (36)
7883

@@ -238,14 +243,15 @@ To use WFD, you need to clone this repository:
238243
git clone https://github.com/WebFuzzing/Dataset.git
239244
```
240245

241-
There are 2 main use cases for WFD:
246+
There are at least 2 main use cases for WFD:
247+
248+
* Run experiments black-box fuzzers
242249

243-
* Run experiments with _EvoMaster_
250+
* Run experiments with white-box _EvoMaster_
244251

245-
* Run experiments with other tools
246252

247253
Everything can be setup by running the script `scripts/dist.py`.
248-
Note that you will need installed at least Maven, Gradle, JDK 8, JDK 11, JDK 17, NPM, as well as Docker.
254+
Note that you will need installed at least Maven, Gradle, JDK 8, JDK 11, JDK 17, JDK 21, NPM, as well as Docker.
249255
Also, you will need to setup environment variables like `JAVA_HOME_8`, `JAVA_HOME_11`, `JAVA_HOME_17` and `JAVA_HOME_21`.
250256
The script will issue error messages if any prerequisite is missing.
251257
Once the script is completed, all the SUTs will be available under the `dist` folder, and a `dist.zip` will be created as well (if `scripts/dist.py` is run with `True` as input).
@@ -301,14 +307,8 @@ In latest versions of Maven, you need to create an authorization token in GitHub
301307

302308

303309
In the built `dist` folder, the files will be organized as follows:
304-
`<name>-sut.jar` will be the non-instrumented SUTs, whereas their executable drivers will be called `<name>-evomaster-runner.jar`.
305-
Instrumentation can be done at runtime by attaching the `evomaster-agent.jar` JavaAgent. If you are running experiments with EvoMaster, this will be automatically attached when running experiments with `exp.py` (available in the EvoMaster's repository). Or it can be attached manually with JVM option `-Devomaster.instrumentation.jar.path=evomaster-agent.jar` when starting the driver.
306-
307-
308-
309-
For running experiments with EvoMaster, you can also "start" each driver directly from an IDE (e.g., IntelliJ).
310-
Each of these drivers has a "main" method that is running a REST API (binding on default port 40100), where each operation (like start/stop/reset the SUT) can be called via an HTTP message by EvoMaster.
311-
310+
`<name>-sut.jar` will be the non-instrumented SUTs, whereas their executable drivers for white-box testing will be called `<name>-evomaster-runner.jar`.
311+
Instrumentation can be done at runtime by attaching the `evomaster-agent.jar` JavaAgent. If you are running experiments with EvoMaster, this will be automatically attached when running experiments with experiment scripts (discussed in next section). Or it can be attached manually with JVM option `-Devomaster.instrumentation.jar.path=evomaster-agent.jar` when starting the driver.
312312

313313

314314
You can also build (and install) each module separately, based on needs.
@@ -325,11 +325,25 @@ For thr JVM, each module has 2 submodules, called `cs` (short for "Case Study")
325325
`cs` contains all the source code of the different SUTs, whereas `em` contains all the drivers.
326326
Note: building a top-module will build as well all of its internal submodules.
327327

328-
The driver classes for Java are called `EmbeddedEvoMasterController`.
328+
The _EvoMaster_ driver classes for Java are called `EmbeddedEvoMasterController`.
329329
Note that Java also has a different kind of driver called `ExternalEvoMasterController`.
330330
The difference is that in External the SUT is started on a separated process, and not running in the same JVM of the driver itself.
331331

332332

333+
### Running Experiments
334+
335+
To simplify the running of experiments, we provide different scripts under the [experiments](experiments) folder:
336+
337+
1) __bb-exp.py__: to set up black-box experiments, generating Bash scripts.
338+
2) __wb-exp.py__: to set up white-box experiments, generating Bash scripts.
339+
3) __schedule.py__: to enable running and scheduling Bash job scripts in parallel.
340+
341+
342+
343+
For debugging/experimenting with EvoMaster in white-box testing, you can also "start" each driver directly from an IDE (e.g., IntelliJ).
344+
Each of these drivers has a "main" method that is running a REST API (binding on default port 40100), where each operation (like start/stop/reset the SUT) can be called via an HTTP message by EvoMaster.
345+
346+
333347

334348
## Old Versions
335349

0 commit comments

Comments
 (0)