Skip to content

Commit 553708b

Browse files
committed
VMF 4.0.0 release
1 parent c7cbd6f commit 553708b

File tree

2,151 files changed

+255618
-193278
lines changed

Some content is hidden

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

2,151 files changed

+255618
-193278
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*/VaderWin/.vs/*
1111
out/
1212
output/
13-
!vmf/src/coremodules/*/output/
13+
!vmf/src/modules/*/output/
1414
output_test/
1515
vmf_install
1616

.gitmodules

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,3 @@
1-
[submodule "LibAFL-legacy"]
2-
path = vmf/submodules/LibAFL-legacy
3-
url = https://github.com/AFLplusplus/LibAFL-legacy
4-
[submodule "external/projects/AFLplusplus"]
5-
path = vmf/submodules/AFLplusplus
6-
url = https://github.com/AFLplusplus/AFLplusplus
7-
[submodule "external/projects/googletest"]
8-
path = vmf/submodules/googletest
9-
url = https://github.com/google/googletest.git
10-
[submodule "submodules/yaml-cpp"]
11-
path = vmf/submodules/yaml-cpp
12-
url = https://github.com/jbeder/yaml-cpp
131
[submodule "submodules/klee"]
142
path = submodules/klee
153
url = https://github.com/klee/klee
16-
[submodule "submodules/plog"]
17-
path = vmf/submodules/plog
18-
url = https://github.com/SergiusTheBest/plog.git

CMakeLists.txt

Lines changed: 28 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#===============================================================================
22
# Vader Modular Fuzzer (VMF)
3-
# Copyright (c) 2021-2023 The Charles Stark Draper Laboratory, Inc.
4-
# <vader@draper.com>
3+
# Copyright (c) 2021-2024 The Charles Stark Draper Laboratory, Inc.
4+
# <vmf@draper.com>
55
#
66
# Effort sponsored by the U.S. Government under Other Transaction number
77
# W9124P-19-9-0001 between AMTC and the Government. The U.S. Government
@@ -47,49 +47,24 @@ set(CMAKE_CXX_COMPILER g++)
4747
#add_compile_options(-fsanitize=address)
4848
#add_link_options(-fsanitize=address)
4949

50-
#Added to prevent issues like this:
51-
#https://stackoverflow.com/questions/61278099/using-stdthread-in-shared-library-causes-sigsegv
52-
set(CMAKE_CXX_FLAGS -Wl,--no-as-needed)
50+
# Add debug info?
51+
#add_link_options(-g)
52+
#add_compile_options(-g)
5353

54-
project(Vader VERSION 3.2.0
55-
LANGUAGES CXX)
54+
# produce compile_commands.json for clangd support
55+
set(CMAKE_EXPORT_COMPILE_COMMANDS True)
5656

57-
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/vmf/cmake)
57+
#############################################################
58+
project(VMF VERSION 4.0.0
59+
LANGUAGES CXX )
60+
#############################################################
5861

5962
# Bring in VMF project wide variables and utility functions
60-
include(vmf/cmake/vmf.cmake)
61-
include(vmf/cmake/external_libs.cmake)
63+
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/vmf/cmake)
64+
include(vmf)
6265

6366
# Add in project directories
64-
add_subdirectory(${PROJECT_SOURCE_DIR}/vmf/src)
65-
66-
# Create VADER Executable and link in dependencies.
67-
# These dependencies are for the the VMF Framework
68-
# not for specific modules
69-
add_executable(vader ${PROJECT_SOURCE_DIR}/vmf/src/framework/main.cpp)
70-
target_link_libraries(vader
71-
PRIVATE
72-
yaml
73-
VMFFramework
74-
stdc++fs
75-
)
76-
target_include_directories(vader PRIVATE
77-
${PROJECT_SOURCE_DIR}/vmf/src/framework/baseclasses
78-
${PROJECT_SOURCE_DIR}/vmf/src/framework/app
79-
${PROJECT_SOURCE_DIR}/vmf/src/coremodules/common/formatter
80-
${PROJECT_SOURCE_DIR}/vmf/src/coremodules/common/initialization
81-
${PROJECT_SOURCE_DIR}/vmf/src/coremodules/common/inputgeneration
82-
${PROJECT_SOURCE_DIR}/vmf/src/coremodules/common/mutator
83-
${PROJECT_SOURCE_DIR}/vmf/src/coremodules/common/output
84-
${PROJECT_SOURCE_DIR}/vmf/src/coremodules/linux/executor
85-
${PROJECT_SOURCE_DIR}/vmf/src/coremodules/linux/feedback
86-
${PROJECT_SOURCE_DIR}/vmf/src/coremodules/linux/initialization
87-
${PROJECT_SOURCE_DIR}/vmf/src/coremodules/linux/mutator
88-
${PROJECT_SOURCE_DIR}/vmf/src/coremodules/linux/output
89-
)
90-
set_vmf_compile_options(vader)
91-
install(TARGETS vader
92-
RUNTIME DESTINATION ${VMF_INSTALL_BINDIR})
67+
add_subdirectory(vmf)
9368

9469
include(GoogleTest)
9570
enable_testing()
@@ -99,33 +74,16 @@ add_subdirectory(${PROJECT_SOURCE_DIR}/test)
9974
install(FILES "vmf/cmake/vmf.cmake" "vmf/cmake/vmf_imports.cmake"
10075
DESTINATION ${CMAKE_INSTALL_PREFIX}/cmake)
10176

102-
install(DIRECTORY ${EXTERNAL_LIBDIR}
103-
DESTINATION ${CMAKE_INSTALL_PREFIX}
104-
PATTERN "*.a" EXCLUDE
105-
)
106-
107-
#Install samples project
108-
install(DIRECTORY ${EXTERNAL_BINDIR}
109-
DESTINATION ${CMAKE_INSTALL_PREFIX}
110-
USE_SOURCE_PERMISSIONS
111-
)
112-
113-
#Copy pre-built python klee script into vmf_install
77+
#Copy support scripts into vmf_install
11478
install(DIRECTORY vmf/src/scripts/bin/
11579
DESTINATION ${VMF_INSTALL_BINDIR}
11680
USE_SOURCE_PERMISSIONS)
11781

118-
#Copy pre-built python klee script into local directory (for developers running directly from build)
119-
add_custom_command(TARGET vader POST_BUILD
120-
COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_SOURCE_DIR}/vmf/src/scripts/bin/* ${PROJECT_BINARY_DIR}/
121-
)
122-
12382
#Header files are needed for plog library
124-
install(DIRECTORY ${EXTERNAL_INCLUDEDIR}/plog
83+
install(DIRECTORY vmf/dependencies/plog/include/plog
12584
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/
12685
)
12786

128-
12987
install(DIRECTORY vmf/src/samples
13088
DESTINATION ${CMAKE_INSTALL_PREFIX}
13189
PATTERN "build" EXCLUDE)
@@ -136,6 +94,8 @@ INSTALL(DIRECTORY test DESTINATION
13694
PATTERN "*.cpp" EXCLUDE
13795
PATTERN "*.txt" EXCLUDE
13896
PATTERN "haystack" EXCLUDE
97+
PATTERN "magicbytes" EXCLUDE
98+
PATTERN "magicbytes_cmplog" EXCLUDE
13999
PATTERN "setup_jerryscript" EXCLUDE
140100
PATTERN "test_only" EXCLUDE
141101
PATTERN "test_only/*" EXCLUDE
@@ -151,3 +111,13 @@ INSTALL(DIRECTORY data DESTINATION
151111
file (COPY test/haystackSUT/haystack
152112
DESTINATION ${CMAKE_INSTALL_PREFIX}/test/haystackSUT
153113
USE_SOURCE_PERMISSIONS)
114+
115+
#install magicbytes executable
116+
file (COPY test/magicBytesSUT/magicbytes
117+
DESTINATION ${CMAKE_INSTALL_PREFIX}/test/magicBytesSUT
118+
USE_SOURCE_PERMISSIONS)
119+
120+
#install magicbytes_cmplog executable
121+
file (COPY test/magicBytesSUT/magicbytes_cmplog
122+
DESTINATION ${CMAKE_INSTALL_PREFIX}/test/magicBytesSUT/
123+
USE_SOURCE_PERMISSIONS)

Dockerfile

Lines changed: 0 additions & 40 deletions
This file was deleted.

Dockerfile.klee

Lines changed: 0 additions & 39 deletions
This file was deleted.

README.md

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,26 @@
99
* [Run VMF](#run-vmf)
1010
- [License](#license)
1111

12-
## Downloading & Initializing VMF
13-
14-
In the past, it was necessary to initialize submodules containing build dependencies. This is only
15-
necessary now if you need to build those dependencies. You can get started with VMF without this step,
16-
as long as you have a standard Ubuntu 18.04, 20.04, or 22.04 distribution of Linux.
17-
18-
See [external](external/README.md) and [submodules](submodules/README.md) for details. See
19-
[docs/external_projects.md/#klee](docs/external_projects.md/#klee) for more information on klee installation.
12+
### Upgrading from an Earlier Release of VMF?
13+
See [migration-4.0.0.md](docs/migration-4.0.0.md) for a list of the API changes in VMF 4.0.0.
2014

2115
### VMF Compatibility
2216

23-
As of now, VMF can be run on the Ubuntu 18.04, 20.04, and 22.04 distributions of Linux, or in Docker.
17+
As of now, VMF can be run in Docker and on the following distributions of Linux:
18+
19+
- CentOS 8 and 9
20+
- Kali
21+
- Oracle Linux 8 & 9
22+
- RedHat 8 & 9
23+
- Ubuntu 20.04, and 22.04
2424

25-
For more information about VMF's dependencies, and the included packages, see
25+
VMF depends on several open source projects, but uses a "batteries-included" philosophy to dependencies where practical.
26+
The sources of particular versions of these dependencies live inside of the VMF tree.
27+
For more information about VMF's included package, and other required dependencies, see
2628
[External Projects](docs/external_projects.md)
2729

28-
Either initialize Docker with [Dockerfile](Dockerfile) or run the equivalent commands within Ubuntu
29-
to install the VMF dependencies (these command can even be copied from the Dockerfile).
30+
Either initialize Docker with one of the dockerfiles in [dockerfiles](dockerfiles) or run the equivalent commands within your installation of linux
31+
to install the VMF dependencies (these command can even be copied from the corresponding Dockerfile).
3032

3133
## Detailed Documentation
3234
If you are new to fuzzing, read these documents:
@@ -48,16 +50,23 @@ If you want to extend VMF by adding new modules, read these documents:
4850

4951

5052
## Basic Build & Run Instructions
51-
To run VFM from a pre-build copy, skip the build and install instructions.
5253

5354
### Building VMF
5455

55-
VMF is build using CMake, see the [Build System Documentation](docs/build_system.md) for details.
56+
VMF is build using CMake, see the [Build System Documentation](docs/build_system.md) for details. The build depends on libcurl, which
57+
is often installed by default. You can install this on Debian-based systems (including Ubuntu and Kali) via
58+
```bash
59+
sudo apt install libcurl-dev
60+
```
61+
On CentOS, RHEL, or Fedora, try
62+
```bash
63+
sudo yum install libcurl-devel
64+
```
5665

5766
Execute the following commands to build VMF:
5867

5968
```bash
60-
# from /path/to/vader/ directory:
69+
# from /path/to/vmf/ directory:
6170
mkdir build
6271
cd build
6372
cmake .. && make
@@ -77,9 +86,9 @@ cmake -DCMAKE_INSTALL_PREFIX=<your install path here> ..
7786
make
7887
```
7988

80-
To install the VMF build, do this in the build directory:
89+
To install the VMF build, do this in the build directory (-j8 may be ommitted to build single threaded, but the build will be slower):
8190
```bash
82-
make install
91+
make install -j8
8392
```
8493

8594
The installed tree is position independent, and can be copied anywhere.
@@ -107,18 +116,14 @@ To run VMF in distributed mode:
107116

108117
```bash
109118
cd vmf_install
110-
./vader -d test/config/serverconfig.yaml
119+
./bin/vader -d test/config/serverconfig.yaml
111120
```
112121

113122
### Samples
114123

115124
The samples directory contains samples of how to build a VMF module outside of the full VMF tree.
116125
This directory is installed with the VMF binaries in a distribution install.
117126

118-
#### Supplemental Installs
119-
120-
In order to build VMF, the packages mentioned in the `Installed Packages` section of [External Projects](docs/external_projects.md) need to be installed.
121-
122127
## License
123128

124129
VMF is licensed under GNU General Public License Version 2

0 commit comments

Comments
 (0)