Metasploit Filesystem and Libraries | Metasploit Tutorials
Understanding the Metasploit Framework Architecture
One can more easily understand the Metasploit architecture by taking a look under its hood. In learning how to use Metasploit, take some time to make yourself familiar with its filesystem and libraries. In Kali Linux and other distros (like Parrot Security OS), Metasploit is provided in the metasploit-framework package and is installed in the /usr/share/metasploit-framework directory.
Metasploit Framework Filesystem
The Metasploit Framework filesystem is laid out in an intuitive manner and is organized by directory. Some of the more important directories are briefly outlined below.
data directory: The data directory contains editable files used by Metasploit to store binaries required for certain exploits, wordlists, images, and more.
data |
documentation |
lib |
modules |
plugins |
scripts |
tools |
There are a number of MSF libraries that allow us to run our exploits without having to write additional code for rudimentary tasks, such as HTTP requests or encoding of payloads. Some of the most important libraries are outlined below.
Rex
* The basic library for most tasks.
* Handles sockets, protocols, text transformations, and others.
* SSL, SMB, HTTP, XOR, Base64, Unicode.
Msf::Core
* Provides the ‘basic’ API.
* Defines the Metasploit Framework.
Msf::Base
* Provides the ‘friendly’ API.
* Provides simplified APIs for use in the Framework.
From Offensive Security