Skip to content

dwelch-r7/metasploit-omnibus

 
 

Repository files navigation

metasploit-framework Omnibus project

This project creates full-stack platform-specific packages for metasploit-framework. This is not the same as the Metasploit Community edition. It only contains the framework command-line interface and the associated tools and modules.

Installing the package

If you just want to install this package, we provide a number of pre-built binaries for Metasploit that are rebuilt every night. See https://github.com/rapid7/metasploit-framework/wiki/Nightly-Installers for installation information.

Building the package

Prerequisites

This project has a package cache that should be pulled in before building. Run 'git submodule update -i' to download the git submodule that contains these packages. We cache these both for performance, and because occasionally upstream locations go away, and this allows the build to continue without broken dependencies.

Building on Ubuntu / Debian systems

In general, a build environment needs a working C/C++ compiler, Ruby 1.9 or higher and the ruby development headers, bundler, git, bison and flex. A quad-core CPU and 4GB of ram are recommended.

The following steps should produce a successful build with Ubuntu and other Debian derivatives, starting from a fresh installation:

# install required packages to build on Ubuntu / Debian systems
sudo apt-get -y install build-essential git ruby bundler ruby-dev bison flex autoconf automake

Configure the omnibus cache and target directories if you want to build as non-root user (recommended).

# setup build directories you can write to
sudo mkdir -p /var/cache/omnibus
sudo mkdir -p /opt/metasploit-framework
sudo chown `whoami` /var/cache/omnibus
sudo chown `whoami` /opt/metasploit-framework

Next setup git if you need to.

# setup git (ignore if you already have it configured)
git config --global user.name "Nobody"
git config --global user.email "nobody@example.com"

Checkout the metasploit-framework installer builder and install omnibus' dependencies.

# checkout the builder repository
git clone https://github.com/rapid7/metasploit-omnibus.git
cd metasploit-omnibus
# install omnibus' dependencies
bundle install --binstubs

Finally, build the installer itself:

# build the metasploit-framework package
bin/omnibus build metasploit-framework

when complete, there will be a new installable .deb file under the 'pkg' directory.

Building on OS X

From OS X, first install XCode and the command line development tools. I use ruby, bundler, git, bison and flex from the Mac Homebrew project. The rest of the steps are identical to building on Ubuntu. A .pkg file will be under the pkg directory instead.

Clean

You can clean up all temporary files generated during the build process with the clean command:

$ bin/omnibus clean metasploit-framework

Adding the --purge purge option removes ALL files generated during the build including the project install directory (/opt/metasploit-framework) and the package cache directory (/var/cache/omnibus/pkg) as well as ALL files in the local package cache directory (./local/cache):

$ bin/omnibus clean metasploit-framework --purge

Restore the git submodule that contains the local package cache:

$ git submodule update -i

Publish

Omnibus has a built-in mechanism for releasing to a variety of "backends", such as Amazon S3. You must set the proper credentials in your omnibus.rb config file or specify them via the command line.

$ bin/omnibus publish path/to/*.deb --backend s3

Help

Full help for the Omnibus command line interface can be accessed with the help command:

$ bin/omnibus help

About

Packaging metasploit-framework with omnibus

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 70.2%
  • Dockerfile 12.4%
  • Shell 8.9%
  • HTML 7.2%
  • Other 1.3%