You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6
Original file line number
Diff line number
Diff line change
@@ -99,6 +99,12 @@ This will run VMF with a simple System Under Test (SUT) called haystack, providi
99
99
100
100
To run VMF in distributed mode, you must first install the Campaign Data Management Server (CDMS). See detailed directions in [docs/distributed_fuzzing.md](docs/distributed_fuzzing.md). Once the server is installed, each individual VMF instance is started using the -d option, to indicated distributed mode. A small configuration file is provided that contains the information needed to connect to the server.
101
101
102
+
Note: The linux zip utility is also required for distributed mode. If the command `which zip` does not return a path to the zip executable, you will need to first install zip on your system:
VMF uses g++ as the default compiler, but will also support building with clang++. Simply comment in the appropriate line in [vmf/src/CMakeLists.txt](../vmf/src/CMakeLists.txt)
17
+
18
+
```cmake
19
+
#Clang or g++ are supported
20
+
#set(CMAKE_CXX_COMPILER g++)
21
+
set(CMAKE_CXX_COMPILER clang++)
22
+
```
23
+
15
24
## Generate Doxygen Documentation
16
25
To generate class level Doxygen documentation, run the following commands. (Doxygen must be installed first.)
Copy file name to clipboardExpand all lines: docs/configuration.md
+10
Original file line number
Diff line number
Diff line change
@@ -231,3 +231,13 @@ Status: Optional
231
231
Default value: 10000 (10s)
232
232
233
233
Usage: This is the number of milliseconds that VMF will sleep between requests to the server for tasking. We recommend not setting this to a small number as this leads to bombarding the server when VMFs have not yet been tasked to do anything.
234
+
235
+
### `vmfDistributed.taskingInitialRandomDelayMax`
236
+
237
+
Value type: <int>
238
+
239
+
Status: Optional
240
+
241
+
Default value: -1 (disabled)
242
+
243
+
Usage: This parameter controls an initial random sleep for each VMF that occurs just after the VMF registers with the server, and before it asks the server for tasking. By default this is not enabled, but it is useful to enable for distributed fuzzing configurations that include a large number of VMFs, as it minimizes the concurrent requests to the CDMS server. Use a value of -1 to disable this feature.
Copy file name to clipboardExpand all lines: docs/coremodules/core_modules_readme.md
+4
Original file line number
Diff line number
Diff line change
@@ -316,6 +316,10 @@ ServerCorpusInitialization:
316
316
## ServerCorpusOutput
317
317
The ServerCorpusOutput modules sends new interesting test cases to the server. ***This module has to be present for a VMF Fuzzer to contribute test cases to the common corpus***. This module has no configuration options.
318
318
319
+
The `serverDelayTimeinSecs` parameter is used to control the minimum time that a VMF will wait between sending new test cases to the server. The default value is 30s.
320
+
321
+
The `serverDelayOverrideCount` parameter can be used to force a VMF to send data sooner than the `serverDelayTimeinSecs` parameter when a large number of test cases have accumulated (i.e. if the value is set to 500, then VMF will send data as soon as it has 500 test cases even if hasn't been 30s since it last sent data). This setting is disabled by default, but is useful if the size of the test case zip file is a problem for the server (particular in the initial phases of fuzzing, when there are a lot of findings).
322
+
319
323
## ServerCorpusMinOutput
320
324
The ServerCorpusMinOutput module is used to perform server based corpus minimization. This module is intended to be used with the RunOnceController. It is not currently implemented to support periodic minimization. This module requires a submodule that performs the actual minimization algorithm. Currently VMF Core Modules includes only one appropriate submodule, [CorpusMinimization](#corpusminimization). CorpusMinimization must be configured as follows to support ServerCorpusMinOutput. This allows ServerCorpusMinimization to control when CorpusMinimization runs.
Copy file name to clipboardExpand all lines: docs/distributed_fuzzing.md
+26-1
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,7 @@ Now you will need to start up your VMF Fuzzers. You may run as many VMF Fuzzers
48
48
When first configuring the system, we recommend starting with a single VMF in order to first resolve any configuration errors.
49
49
50
50
## Configuring VMF Fuzzers
51
-
Each VMF fuzzer must be configured to connect to CDMS. A small configuration file contains the connection information needed. VMF includes a sample configuration in [test/config/serverconfig.yaml](../test/config/serverconfig.yaml).
51
+
Each VMF fuzzer must be configured to connect to CDMS. A small configuration file contains the connection information needed. VMF includes two sample configurations: [test/config/serverconfig.yaml](../test/config/serverconfig.yaml), which is appropriate for smaller distributed fuzzing setups, and [test/config/largeserverconfig.yaml](../test/config/largeserverconfig.yaml), which is appropriate for larger fuzzing setups.
52
52
53
53
The only required parameter is the serverURL, which is the URL the VMF fuzzer should use in connecting to CDMS. This configuration file should contain any `vmfDistributed` or `vmfFramework` parameters. All other vmf parameters, such as the module to use, will be uploaded to CDMS using its user interface.
54
54
@@ -63,6 +63,31 @@ vmfFramework:
63
63
64
64
See [docs/configuration.md](configuration.md) for more information on each of the optional configuration values.
65
65
66
+
### Tuning for Large Distributed Applications
67
+
68
+
If you are configuring a large distributed fuzzing setup, you will likely need to set a few additional parameters.
69
+
70
+
First, there are a number of parameters in your Tomcat configuration that may need to be adjusted.
71
+
- *maxThreads*: This variable is in the tomcat installation directory, conf/server.xml. It specifies the maximum number of threads Tomcat can use.
72
+
- *heap size*: If you are seeing out of memory errors, the heap size for the Java Virtual Machine (JVM) that Tomcat is running in will need to be increased.
73
+
- If you installed Tomcat as a service, then update the CATALINA_OPTS environment variable in `tomcat.service` within `/etc/systemd/system/`.
74
+
- If you installed Tomcat as a standalone executable, then in the Tomcat installation directory, create a bin/setenv.sh script, and add the following parameter:
75
+
```bash
76
+
export CATALINA_OPTS=-Xms1024m -Xmx2048m;
77
+
```
78
+
- In either case, increase the memory allocation until the heap errors resolve. You may need a heap that is 2GB or even 4GB.
79
+
- The first parameter -Xms is the intial heap size (1024MB in this case)
80
+
- The second parameter -Xmx is the maximum heap size (2048MB in this case)
81
+
- Tomcat will need to be restarted for the increased heap size to take effect.
82
+
83
+
Secondly, there are a number of VMF configuration parameters that you may wish to adjust.
84
+
85
+
- *vmfDistributed.taskingInitialRandomDelayMax*: this is disabled (-1) by default, but for large applications should be enabled (the recommended value in our `largeserverconfig.yaml` is 60000 milliseconds)
86
+
- *ServerCorpusOutput.serverDelayTimeinSecs* - the default value is 30s. This parameter controls the minimum time that a VMF will wait between sending new test cases to the server.
87
+
- *ServerCorpusOutput.serverDelayOverrideCount* - this is disabled (-1) by default, but if enabled, this parameter can force the ServerCorpusOutput module to send data more quickly than the serverDelayTimeinSecs if a large number of test cases have accumulated already. This is useful if the size of the test case zip file is a problem for the server (particular in the initial phases of fuzzing, when there are a lot of findings).
88
+
89
+
See [docs/coremodules/core_modules_readme.md](coremodules/core_modules_readme.md) for more information on each of the optional configuration values for the distributed fuzzing modules.
90
+
66
91
## Starting VMF Fuzzers
67
92
To start each VMF fuzzer, use the following command, providing a server configuration file that contains the correct `serverURL`.
Copy file name to clipboardExpand all lines: docs/tomcat_install.md
+15
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,7 @@
16
16
+[Configuring CDMS Database and Storage Directory](#configuring-cdms-database-and-storage-directory)
17
17
+[Configuring a Different Data Directory](#configuring-a-different-data-directory)
18
18
+[Setting Up the CDMS Database](#setting-up-the-cdms-database)
19
+
+[Resetting the CDMS Database](#resetting-the-cdms-database)
19
20
20
21
21
22
@@ -259,3 +260,17 @@ Perform the following steps after deploying the .WAR file:
259
260
3. If you are running tomcat as a service, make sure that the tomcat user has permissions to read and write to both the data directory and cdms.db.
260
261
261
262
Restart tomcat, and go to http://127.0.0.1:8080/CDMS/, you should now see the CDMS UI.
263
+
264
+
### Resetting the CDMS Database
265
+
If you ever want to clear all of the contents of the CDMS database, or if you need to upgrade to a version of CDMS that requires a database schema change, use the following steps:
266
+
267
+
1. Undeploy CDMS.war file. See [Deploying the CDMS War File](#deploying-the-cdms-war-file) for directions on accessing the `Manager App`. The 'undeploy' button is used to undeploy the war file.
268
+
2. Clear the opt/cdms directory contents (or whatever location you are using for cdms data). If you wish to retain this data, you may relocate it rather than clearing it.
269
+
3. Put the emptycdms.db into opt/cdms (or your CMS data directory), and rename it to cdms.db
270
+
4. Change the permissions on cdms.db to the tomcat user and group
271
+
```bash
272
+
chown tomcat:tomcat cdmd.db
273
+
```
274
+
5. Redeploy CDMS.war using the `deploy` button in the `Manager App`
0 commit comments