Skip to content

Commit

Permalink
VMF 4.0.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
ebraunstein committed Jun 18, 2024
1 parent c7cbd6f commit 553708b
Show file tree
Hide file tree
Showing 2,151 changed files with 255,618 additions and 193,278 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/VaderWin/.vs/*
out/
output/
!vmf/src/coremodules/*/output/
!vmf/src/modules/*/output/
output_test/
vmf_install

Expand Down
15 changes: 0 additions & 15 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
[submodule "LibAFL-legacy"]
path = vmf/submodules/LibAFL-legacy
url = https://github.com/AFLplusplus/LibAFL-legacy
[submodule "external/projects/AFLplusplus"]
path = vmf/submodules/AFLplusplus
url = https://github.com/AFLplusplus/AFLplusplus
[submodule "external/projects/googletest"]
path = vmf/submodules/googletest
url = https://github.com/google/googletest.git
[submodule "submodules/yaml-cpp"]
path = vmf/submodules/yaml-cpp
url = https://github.com/jbeder/yaml-cpp
[submodule "submodules/klee"]
path = submodules/klee
url = https://github.com/klee/klee
[submodule "submodules/plog"]
path = vmf/submodules/plog
url = https://github.com/SergiusTheBest/plog.git
86 changes: 28 additions & 58 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#===============================================================================
# Vader Modular Fuzzer (VMF)
# Copyright (c) 2021-2023 The Charles Stark Draper Laboratory, Inc.
# <vader@draper.com>
# Copyright (c) 2021-2024 The Charles Stark Draper Laboratory, Inc.
# <vmf@draper.com>
#
# Effort sponsored by the U.S. Government under Other Transaction number
# W9124P-19-9-0001 between AMTC and the Government. The U.S. Government
Expand Down Expand Up @@ -47,49 +47,24 @@ set(CMAKE_CXX_COMPILER g++)
#add_compile_options(-fsanitize=address)
#add_link_options(-fsanitize=address)

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

project(Vader VERSION 3.2.0
LANGUAGES CXX)
# produce compile_commands.json for clangd support
set(CMAKE_EXPORT_COMPILE_COMMANDS True)

set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/vmf/cmake)
#############################################################
project(VMF VERSION 4.0.0
LANGUAGES CXX )
#############################################################

# Bring in VMF project wide variables and utility functions
include(vmf/cmake/vmf.cmake)
include(vmf/cmake/external_libs.cmake)
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/vmf/cmake)
include(vmf)

# Add in project directories
add_subdirectory(${PROJECT_SOURCE_DIR}/vmf/src)

# Create VADER Executable and link in dependencies.
# These dependencies are for the the VMF Framework
# not for specific modules
add_executable(vader ${PROJECT_SOURCE_DIR}/vmf/src/framework/main.cpp)
target_link_libraries(vader
PRIVATE
yaml
VMFFramework
stdc++fs
)
target_include_directories(vader PRIVATE
${PROJECT_SOURCE_DIR}/vmf/src/framework/baseclasses
${PROJECT_SOURCE_DIR}/vmf/src/framework/app
${PROJECT_SOURCE_DIR}/vmf/src/coremodules/common/formatter
${PROJECT_SOURCE_DIR}/vmf/src/coremodules/common/initialization
${PROJECT_SOURCE_DIR}/vmf/src/coremodules/common/inputgeneration
${PROJECT_SOURCE_DIR}/vmf/src/coremodules/common/mutator
${PROJECT_SOURCE_DIR}/vmf/src/coremodules/common/output
${PROJECT_SOURCE_DIR}/vmf/src/coremodules/linux/executor
${PROJECT_SOURCE_DIR}/vmf/src/coremodules/linux/feedback
${PROJECT_SOURCE_DIR}/vmf/src/coremodules/linux/initialization
${PROJECT_SOURCE_DIR}/vmf/src/coremodules/linux/mutator
${PROJECT_SOURCE_DIR}/vmf/src/coremodules/linux/output
)
set_vmf_compile_options(vader)
install(TARGETS vader
RUNTIME DESTINATION ${VMF_INSTALL_BINDIR})
add_subdirectory(vmf)

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

install(DIRECTORY ${EXTERNAL_LIBDIR}
DESTINATION ${CMAKE_INSTALL_PREFIX}
PATTERN "*.a" EXCLUDE
)

#Install samples project
install(DIRECTORY ${EXTERNAL_BINDIR}
DESTINATION ${CMAKE_INSTALL_PREFIX}
USE_SOURCE_PERMISSIONS
)

#Copy pre-built python klee script into vmf_install
#Copy support scripts into vmf_install
install(DIRECTORY vmf/src/scripts/bin/
DESTINATION ${VMF_INSTALL_BINDIR}
USE_SOURCE_PERMISSIONS)

#Copy pre-built python klee script into local directory (for developers running directly from build)
add_custom_command(TARGET vader POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_SOURCE_DIR}/vmf/src/scripts/bin/* ${PROJECT_BINARY_DIR}/
)

#Header files are needed for plog library
install(DIRECTORY ${EXTERNAL_INCLUDEDIR}/plog
install(DIRECTORY vmf/dependencies/plog/include/plog
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/
)


install(DIRECTORY vmf/src/samples
DESTINATION ${CMAKE_INSTALL_PREFIX}
PATTERN "build" EXCLUDE)
Expand All @@ -136,6 +94,8 @@ INSTALL(DIRECTORY test DESTINATION
PATTERN "*.cpp" EXCLUDE
PATTERN "*.txt" EXCLUDE
PATTERN "haystack" EXCLUDE
PATTERN "magicbytes" EXCLUDE
PATTERN "magicbytes_cmplog" EXCLUDE
PATTERN "setup_jerryscript" EXCLUDE
PATTERN "test_only" EXCLUDE
PATTERN "test_only/*" EXCLUDE
Expand All @@ -151,3 +111,13 @@ INSTALL(DIRECTORY data DESTINATION
file (COPY test/haystackSUT/haystack
DESTINATION ${CMAKE_INSTALL_PREFIX}/test/haystackSUT
USE_SOURCE_PERMISSIONS)

#install magicbytes executable
file (COPY test/magicBytesSUT/magicbytes
DESTINATION ${CMAKE_INSTALL_PREFIX}/test/magicBytesSUT
USE_SOURCE_PERMISSIONS)

#install magicbytes_cmplog executable
file (COPY test/magicBytesSUT/magicbytes_cmplog
DESTINATION ${CMAKE_INSTALL_PREFIX}/test/magicBytesSUT/
USE_SOURCE_PERMISSIONS)
40 changes: 0 additions & 40 deletions Dockerfile

This file was deleted.

39 changes: 0 additions & 39 deletions Dockerfile.klee

This file was deleted.

49 changes: 27 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,26 @@
* [Run VMF](#run-vmf)
- [License](#license)

## Downloading & Initializing VMF

In the past, it was necessary to initialize submodules containing build dependencies. This is only
necessary now if you need to build those dependencies. You can get started with VMF without this step,
as long as you have a standard Ubuntu 18.04, 20.04, or 22.04 distribution of Linux.

See [external](external/README.md) and [submodules](submodules/README.md) for details. See
[docs/external_projects.md/#klee](docs/external_projects.md/#klee) for more information on klee installation.
### Upgrading from an Earlier Release of VMF?
See [migration-4.0.0.md](docs/migration-4.0.0.md) for a list of the API changes in VMF 4.0.0.

### VMF Compatibility

As of now, VMF can be run on the Ubuntu 18.04, 20.04, and 22.04 distributions of Linux, or in Docker.
As of now, VMF can be run in Docker and on the following distributions of Linux:

- CentOS 8 and 9
- Kali
- Oracle Linux 8 & 9
- RedHat 8 & 9
- Ubuntu 20.04, and 22.04

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

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

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


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

### Building VMF

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

Execute the following commands to build VMF:

```bash
# from /path/to/vader/ directory:
# from /path/to/vmf/ directory:
mkdir build
cd build
cmake .. && make
Expand All @@ -77,9 +86,9 @@ cmake -DCMAKE_INSTALL_PREFIX=<your install path here> ..
make
```

To install the VMF build, do this in the build directory:
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):
```bash
make install
make install -j8
```

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

```bash
cd vmf_install
./vader -d test/config/serverconfig.yaml
./bin/vader -d test/config/serverconfig.yaml
```

### Samples

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

#### Supplemental Installs

In order to build VMF, the packages mentioned in the `Installed Packages` section of [External Projects](docs/external_projects.md) need to be installed.

## License

VMF is licensed under GNU General Public License Version 2
Expand Down
Loading

0 comments on commit 553708b

Please sign in to comment.