How to Get Started with Mayhem
Once the runtime environment is provided, Mayhem will run your application. There are a couple of steps before we started.
First, determine if your application is compatible with Mayhem. Mayhem can analyze compiled binaries written in languages like C/C++, Go, Rust, Java, and Python that read from a file, standard input, or from the network via a TCP or UDP socket. Mayhem also handles user-land (containerized) Linux applications. Mayhem supports binaries that run on the x86, x64, ARM, and MIPS architectures.
Here are some helpful tips for quickly determining if your application is compatible:
- Does the Linux file <app> command say that your application is a Linux ELF file? Mayhem requires the application to be an ELF file.
- Is the application a user-land application? If you can dockerize the application, it is a user-land application. If the application requires special hardware, then you will need to write a harness to remove the hardware dependencies.
- Is a GUI the only way to interact with the application? Mayhem does not analyze GUIs currently.
Packaging Targets
Before Mayhem can run and detect defects associated with your program, it requires the complete runtime environment for the application. This includes the executable itself, related libraries, environment variables, and configuration settings. Mayhem supports two different methods for providing the runtime environment:
- Docker: Docker is the recommended method for ingesting applications into Mayhem and is a light-weight mechanism for packaging the complete runtime of an application and its dependencies. Given a Docker image, Mayhem will spin up and tear down containers as needed to run the application in the containerized environment.
- Mayhem packages: If Docker is not an option, you can package a Linux application using the mayhem package command to statically analyze your app and gather as many dependencies as it can infer.
Development Speed or Code Security. Why Not Both?
Mayhem is an award-winning AI that autonomously finds new exploitable bugs and improves your test suites.
Get Mayhem Free Request A Demo
Executing Runs via Mayhem UI or Mayhem CLI
Users can execute their runs using either the Mayhem UI or Mayhem CLI.
The Mayhem UI is an easy-to-use web interface that allows users to fuzz specified applications, or targets, as well as analyze and manage fuzz testing results. Out-of-the-box, users can easily fuzz containerized applications by creating a Mayhem Run and selecting Docker images as its source; Mayhem can ingest local Docker images uploaded to Mayhem's internal Docker registry (included on all Mayhem deployments), or Docker images publicly available via the Docker Hub registry.
The Mayhem CLI is a command line interface that users can download and install on their local machines to execute Mayhem operations straight from their terminals! Users will need to first authenticate their installed Mayhem CLI with a deployed Mayhem server prior to use, but once complete, users can execute Mayhem operations via the command line or create scripts to establish automated Mayhem workflows.
✏️ Summary and Recap
In this lesson we learned why you would use Mayhem, what Mayhem is, and the underlying concepts of how Mayhem works and what you needed to get started.
Add Mayhem to Your DevSecOps for Free.
Get a full-featured 30 day free trial.