Skip to content

Commit c7cbd6f

Browse files
committed
VMF 3.2.0 release
1 parent ec43271 commit c7cbd6f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+1235
-245
lines changed

.gitignore

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,34 @@
55
*.obj
66
*.*~
77
*.exe
8+
9+
# Vader
810
*/VaderWin/.vs/*
911
out/
1012
output/
1113
!vmf/src/coremodules/*/output/
1214
output_test/
15+
vmf_install
16+
1317
x64/
1418
classes/
1519
*/classes/
1620
build/
1721
targets/
18-
.vscode/
22+
23+
#VS Code
24+
.vscode/
25+
*.code-workspace
26+
27+
# CMake
28+
CMakeLists.txt.user
29+
CMakeCache.txt
30+
CMakeFiles
31+
CMakeScripts
32+
Testing
33+
Makefile
34+
cmake_install.cmake
35+
install_manifest.txt
36+
compile_commands.json
37+
CTestTestfile.cmake
38+
_deps

CMakeLists.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,15 @@
2828
#===============================================================================
2929
cmake_minimum_required(VERSION 3.10.2)
3030

31-
set(CMAKE_VERBOSE_MAKEFILE ON)
31+
#set(CMAKE_VERBOSE_MAKEFILE ON)
3232

3333
# Specify project related variables.
34-
set(CMAKE_CXX_STANDARD 11)
34+
set(CMAKE_CXX_STANDARD 17)
3535
set(CMAKE_CXX_STANDARD_REQUIRED True)
36+
37+
#Clang or g++ are supported
3638
set(CMAKE_CXX_COMPILER g++)
39+
#set(CMAKE_CXX_COMPILER clang++)
3740

3841
# This is not an option that we want to enable. Think twice about re-enabling it.
3942
# Three times, maybe. And then don't do it. If some legacy code needs it, put it there
@@ -48,7 +51,7 @@ set(CMAKE_CXX_COMPILER g++)
4851
#https://stackoverflow.com/questions/61278099/using-stdthread-in-shared-library-causes-sigsegv
4952
set(CMAKE_CXX_FLAGS -Wl,--no-as-needed)
5053

51-
project(Vader VERSION 3.1.0
54+
project(Vader VERSION 3.2.0
5255
LANGUAGES CXX)
5356

5457
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/vmf/cmake)

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ RUN apt-get update \
88
git \
99
gnupg \
1010
lsb-core \
11-
lsb-release
11+
lsb-release \
12+
zip
1213

1314
RUN lsb_release -a | grep -q "18.04" && ( \
1415
echo "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-12 main" >> /etc/apt/sources.list && \

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,12 @@ This will run VMF with a simple System Under Test (SUT) called haystack, providi
9999

100100
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.
101101

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:
103+
```bash
104+
sudo apt install zip
105+
```
106+
To run VMF in distributed mode:
107+
102108
```bash
103109
cd vmf_install
104110
./vader -d test/config/serverconfig.yaml

docs/build_system.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@ $ cmake -DCMAKE_BUILD_TYPE=Debug ..
1212
$ make
1313
```
1414

15+
## Alternate Compiler Support
16+
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+
1524
## Generate Doxygen Documentation
1625
To generate class level Doxygen documentation, run the following commands. (Doxygen must be installed first.)
1726
```bash

docs/configuration.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,3 +231,13 @@ Status: Optional
231231
Default value: 10000 (10s)
232232

233233
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.

docs/coremodules/core_modules_readme.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,10 @@ ServerCorpusInitialization:
316316
## ServerCorpusOutput
317317
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.
318318

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+
319323
## ServerCorpusMinOutput
320324
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.
321325

docs/distributed_fuzzing.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Now you will need to start up your VMF Fuzzers. You may run as many VMF Fuzzers
4848
When first configuring the system, we recommend starting with a single VMF in order to first resolve any configuration errors.
4949

5050
## 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.
5252

5353
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.
5454

@@ -63,6 +63,31 @@ vmfFramework:
6363
6464
See [docs/configuration.md](configuration.md) for more information on each of the optional configuration values.
6565
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+
6691
## Starting VMF Fuzzers
6792
To start each VMF fuzzer, use the following command, providing a server configuration file that contains the correct `serverURL`.
6893
```bash

docs/doxygen/Doxyfile.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PROJECT_NAME = "VMF"
3838
# could be handy for archiving the generated documentation or if some version
3939
# control system is used.
4040

41-
PROJECT_NUMBER = "3.1.0"
41+
PROJECT_NUMBER = "3.2.0"
4242

4343
# Using the PROJECT_BRIEF tag one can provide an optional one line description
4444
# for a project that appears at the top of each page and should give viewer a
@@ -238,7 +238,7 @@ TAB_SIZE = 4
238238
# "Side Effects:". You can put \n's in the value part of an alias to insert
239239
# newlines.
240240

241-
ALIASES =
241+
ALIASES = "license=@par License:\n"
242242

243243
# This tag can be used to specify a number of word-keyword mappings (TCL only).
244244
# A mapping has the form "name=value". For example adding "class=itcl::class"

docs/external_projects.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ Enumeration of these installations is for record keeping only:
7777
| build-essential | apt |
7878
| cmake | apt |
7979
| lief | pip |
80+
| zip | apt |
8081

8182
These packages need to be installed in order to build and run VMF.
8283

0 commit comments

Comments
 (0)