Armitage Manual
Armitage Manual
Table of Contents
1.
2.
3.
4.
5.
6.
7.
8.
About Armitage
Getting Started
User Interface Tour
Host Management
Exploitation
Post-Exploitation
Maneuvering
Remote Metasploit
1. About Armitage
1.1 What is Armitage?
Armitage is a graphical cyber attack management tool for Metasploit (http://www.metasploit.com) that visualizes your targets,
recommends exploits, and exposes the advanced capabilities of the framework.
Advanced users will find Armitage valuable for managing remote Metasploit instances and collaboration. Armitage's red team
collaboration features allow your team to use the same sessions, share data, and communicate through one Metasploit instance.
Armitage makes Metasploit usable for security practitioners who understand hacking but don't use Metasploit every day. If you want
to learn Metasploit and grow into the advanced features, Armitage can help you.
For discovery, Armitage exposes several of Metasploit's host management features. You can import hosts and launch scans to
populate a database of targets. Armitage also visualizes the database of targets--you'll always know which hosts you're working with
and where you have sessions.
Armitage assists with remote exploitation--providing features to automatically recommend exploits and even run active checks so you
know which exploits will work. If these options fail, you can use the Hail Mary approach and unleash Armitage's smarter
2. Getting Started
2.1 Prerequisites
Armitage is installed with the Metasploit 4.0.0 full install package. It has all of the prerequisites you'll need, including:
Java 1.6.0+ (http://java.sun.com)
Metasploit 4.0.0+ (http://www.metasploit.com)
A database and the information to connect to it
Make sure you use the official Sun Oracle Java. This project does not support other Java environments.
You want the latest version of the Metasploit Framework. Armitage is tested against the latest Metasploit with no goal of supporting
older versions. Use subversion to check out the latest version of Metasploit and keep it up to date by running msfupdate regularly.
Finally, you must have a database for Metasploit to connect to. Armitage requires you to know the username, password, hostname,
and database before connecting.
I highly recommend that you use PostgreSQL instead of MySQL. There is an unresolved issue in Metasploit causing
MySQL databases to break when Metasploit chooses to change a database schema. The Metasploit team also tests
with Postgres. The full setup installers for Metasploit on Windows and Linux set up Postgres for you.
Click Start MSF to launch Metasploit's RPC daemon and connect to it. The settings for Metasploit's installed database are already set
up for you. You do not need to change the DB connect string.
3.1 Overview
The Armitage user interface has three main panels: modules, targets, and tabs. You may click the area between these panels to resize
them to your liking.
3.2 Modules
The module browser lets you launch a Metasploit auxiliary module, throw an exploit, generate a payload, and even run a postexploitation script. Click through the tree to find the desired module. Double click the module to bring up a dialog with options.
Armitage will place highlighted hosts from the targets panel into the RHOSTS variable of any module launched from here.
You can search for modules too. Click in the search box below the tree, type a wildcard expression (e.g., ssh_*), and hit enter. The
module tree will then show your search results, already expanded for quick viewing. Clear the search box and press enter to restore
the module browser to its original state.
A red computer with electrical jolts indicates a compromised host. Right click the computer to use any sessions related to the host.
A directional green line indicates a pivot from one host to another. Pivoting allows Metasploit to route attacks and scans through
intermediate hosts. A bright green line indicates the pivot communication path is in use.
Click a host to select it. You may select multiple hosts by clicking and dragging a box over the desired hosts. Where possible,
Armitage will try to apply an action (e.g., launching an exploit) to all selected hosts.
Right click a host to bring up a menu with available options. The attached menu will show attack and login options, menus for
existing sessions, and options to edit the host information.
The login menu is only available after a port scan reveals open ports that Metasploit can log in to. The Attack menu is only available
after finding attacks through the Attacks menu bar. Shell and Meterpreter menus only show up when a shell or Meterpreter session
exists on the selected host.
Several keyboard shortcuts are available in the targets panel. You may edit these in the Armitage -> Preferences menu.
Ctrl Plus - zoom in
Ctrl Minus - zoom out
Ctrl 0 - reset the zoom level
Ctrl A - select all hosts
Escape - clear selection
Ctrl C - arrange hosts into a circle
Ctrl S - arrange hosts into a stack
Ctrl H - arrange hosts into a hierarchy. This only works when a pivot is set up.
Ctrl R - refresh hosts from the database
Ctrl P - export hosts into an image
Right click the targets area with no selected hosts to configure the layout and zoom-level of the targets area.
Click any of the table headers to sort the hosts. Highlight a row and right-click it to bring up a menu with options for that host.
Armitage will bold the IP address of any host with sessions. If a pivot is in use, Armitage will make it bold as well.
3.5 Tabs
All functionality in Armitage is made available below the targets and module area. Each panel you open is presented in its own tab.
This is where you will spend most of your time when working with Armitage. There are several panels.
3.6 Consoles
A console panel lets you interact with a command line interface through Armitage. The Metasploit console, Meterpreter console, and
shell session interfaces all use a console panel.
The console panel features a command history. Use the up arrow to cycle through previously typed commands. The down arrow
moves back to the last command you typed.
In the Metasploit console, use the Tab key to complete commands and parameters. This works just like the Metasploit console
outside of Armitage.
Use Ctrl Plus to make the console font size larger, Ctrl Minus to make it smaller, and Ctrl 0 to reset it. This change is local to the
current console only. Visit Armitage -> Preferences to permanently change the font.
Press Ctrl F to show a panel that will let you search for text within the console.
Use Ctrl A to select all text in the console's buffer.
Armitage sends a use or a set PAYLOAD command if you click a module or a payload name in a console.
3.7 Logging
Armitage logs all console, shell, and event log output for you. Armitage organizes these logs by date and host. You'll find these logs
in the ~/.armitage folder. Go to View -> Acitivity Logs to open this folder.
Armitage also saves copies of screenshots, webcam shots, and files downloaded through the GUI to this folder.
Change the armitage.log_everything.boolean preference key to false to disable this feature.
4. Host Management
4.1 Workspaces
Use the Hosts menu to add hosts to Metasploit's database. Hosts added to Metasploit are kept in workspaces. A workspace is like a
separate database. Workspaces allow you to organize hosts into groups and switch between them.
Use the Workspaces menu to create, switch, and remove workspaces.
5. Exploitation
5.1 Remote Exploits
Before you can attack, you must choose your weapon. Armitage makes this process easy. Use Attacks -> Find Attacks to generate a
custom Attack menu for each host. This process uses Metasploit's db_autopwn feature to recommend the best exploits on a host by
host basis. Use the by vulnerability option only if you've imported a vulnerability scan.
You can exploit a host by right-clicking it, selecting Attack, and choosing an exploit. To show the most appropriate attacks, make
sure the operating system is set for the host. The Attack menu is limited to exploits with a rating of great or excellent.
Some useful exploits (e.g., lsass) are ranked good and they don't show in the attack menu. You can still launch them using the module
browser. Highlight the host (or hosts) that you want to exploit and navigate to the desired exploit in the module browser. Double click
the exploit and you will see the launch dialog.
Under Armitage -> Preferences there is an option to change the minimal exploit ranking. Try good or normal if you want more
exploits in the Attack menu.
Clicking a host and selecting Services is another way to find an exploit. If you have NMap scan results, look at the information field
and guess which server software is in use. Use the module browser to search for any Metasploit modules related to that software. One
module may help you find information required by another exploit. Apache Tomcat is an example of this. The tomcat_mgr_login
module will search for a username and password that you can use. Once you have this, you can launch the tomcat_mgr_deploy
exploit to get a shell on the host.
If all this fails, you have the hail mary option. Attacks -> Hail Mary launches this feature. Armitage's hail mary option is a smarter
db_autopwn. It first finds exploits relevant to your target set. It then filters these exploits using known information about the targets.
For example, Hail Mary won't launch a Linux exploit against a Windows target. These exploits are then sorted so the best ones are
launched first. Once this preparation is complete, Armitage launches these exploits against your targets. This feature won't give you
every possible shell, but it's a good option if you don't know what else to do.
The exploit launch dialog lets you configure variables for a module and choose whether to use a reverse connect payload.
Variables are presented in a table. Double click a value to edit it. If a variable requires a filename, double click the variable name to
bring up a file chooser dialog. You may also view and set advanced options by checking Show advanced options.
Armitage chooses a payload for you. Windows exploits will use a Meterpreter payload. UNIX exploits will launch a command shell.
Click Launch to launch the exploit. If the exploit is successful, the host's computer will change color in the targets panel. Metasploit
will also print a message to any open consoles.
Armitage makes it easy to configure client-side exploits available with Metasploit. The Attacks menu has options to set up browser
attacks, email client attacks, and even generate malicious files.
Attacks set up in this way are pre-configured to connect back to your current Metasploit instance. The exploit handler is already
configured for you.
Browser Autopwn creates a URL that uses JavaScript to fingerprint anyone who connects and launches an appropriate browser
exploit against them.
File Autopwn sets up a URL serving many malicious files, generated for your viewing pleasure. Visit the URL, download a file, and
send it to your target. Or get them to download it directly.
Hosts compromised via client-side exploits will show up in the targets panel when they connect back. Armitage does not need to
know about these hosts beforehand.
You may also use the module browser to find and launch client-side exploits. Search for *fileformat* or *browser*.
Highlight a payload and click Select. Armitage will update the PAYLOAD, DisablePayloadHandler, ExitOnSession, LHOST,
and LPORT values for you. You're welcome to edit these values as you see fit.
If you chose to select the Start a handler for this payload option, Armitage will set the payload-related values to instruct Metasploit to
launch a handler for the payload when the exploit launches. If you did not select this value, you're responsible for setting up a
multi/handler for the payload. Go to View -> Jobs to see which handlers are running.
When you generate a payload, you're responsible for setting up a listener to interact with it. Select the multi/handler output type in
the payload dialog to set up a handler for the payload with your desired options.
For Meterpreter and shell payloads, you may also go to Armitage -> Listeners to quickly launch a multi/handler. Choose a bind
listener to connect to a listening payload or a reverse listener to wait for a payload to connect.
6. Post Exploitation
6.1 Managing Sessions
Armitage makes it easy to manage the Windows Meterpreter agent once you successfully exploit a host. Hosts running the
Meterpreter payload will have a Meterpreter N menu for each Meterpreter session.
If you have shell access to a host, you will see a Shell N menu for each shell session. Right click the host to access this menu. If you
have a Windows shell session, you may go to Shell N -> Meterpreter... to upgrade the session to a Meterpreter session. If you have
a UNIX shell, go to Shell N -> Upload to upload a file using the UNIX printf command.
6.2 Access
Once you exploit a host, duplicating your access should be a first priority. Meterpreter N -> Access -> Duplicate will generate a
meterpreter executable, upload, and run it on the host for you. If you lose the original session, this will give you a fall back.
Some exploits result in administrative access to the host. Other times, you need to escalate privileges yourself. To do this, use the
Meterpreter N -> Access -> Escalate Privileges option to try several Windows privilege escalation options.
7. Maneuvering
7.1 Pivoting
Metasploit can launch attacks from a compromised host and receive sessions on the same host. This ability is called pivoting.
To create a pivot, go to Meterpreter N -> Pivoting -> Setup.... A dialog will ask you to choose which subnet you want to pivot
through the session.
Once you've set up pivoting, Armitage will draw a green line from the pivot host to all targets reachable by the pivot you created. The
line will become bright green when the pivot is in use.
To use a pivot host for a reverse connection, set the LHOST variable in the exploit launch dialog to the IP address of the pivot host.
7.3 Pass-the-Hash
When you login to a Windows host, your password is hashed and compared to a stored hash of your password. If they match, you're
in. When you attempt to access a resource on the same Windows domain, the stored hash is sent to the other host and used to
authenticate you. With access to these hashes, you can use this mechanism to take over other hosts on the same domain. This is called
a pass-the-hash attack.
To collect hashes, visit Meterpreter N -> Access -> Dump Hashes. You need administrative privileges to do this. Armitage will
store the collected hashes in a database for your use later.
You may view collected hashes through View -> Credentials. For your cracking pleasure, the Export button in this tab will export
credentials in pwdump format. You may also use the Crack Passwords button to run John the Ripper against the hashes in the
credentials database.
To install Meterpreter on another Windows host, right-click the host and go to Login -> psexec. This will present a dialog where you
can select which hash to login with.
Your hosts must be on the same active directory domain for this attack to work.
8. Remote Metasploit
8.1 Remote Connections
You can use Armitage to connect to an existing Metasploit instance on another host. Working with a remote Metasploit instance is
similar to working with a local instance. Some Armitage features require read and write access to local files to work. Armitage offers
a deconfliction server to make these features available when managing a remote Metasploit instance.
Connecting to a remote Metasploit requires starting a Metasploit RPC server. You may start a brand new one or launch the RPC
server from a running Metasploit console. The next two sections show you how to do this. Section 8.4 shows you how to start
Armitage's deconfliction server for teaming.
With these two servers set up, your use of Metasploit will look like this diagram:
It's possible to connect Armitage to a Metasploit RPC server without the deconfliction server. If you do this, remember that some
features will not work and only one person should connect at a time.
Metasploit's RPC daemon accepts local and remote connections from Armitage. To start the daemon:
sudo msfrpcd -S -U msf -P wiggles -f
This will start msfrpcd with the user msf, password wiggles, no SSL listener, on the default port 55553.
I recommend disabling SSL, with the -S flag, when using msfrpcd. The Java package distributed with Metasploit
3.7.0 has a weird problem with the crypto. You may get an "RSA Premaster secret error" if you try to connect
Armitage to a Metasploit with SSL enabled.
Once this daemon is started: start Armitage, type the correct username and password into Armitage, and click Connect. Armitage will
now connect to this running daemon. If the daemon is not running (or you got one of the parameters wrong!), Armitage will keep
trying to connect until you close it.
I recommend using the Metasploit RPC server if you're using Armitage locally. If something happens to Armitage,
you can reconnect without losing your data and sessions. If you want to connect to a Metasploit RPC server
remotely, set up the deconfliction server. Once started, the deconfliction server will tell you the information you need
to connect Armitage to Metasploit, including the remote Metasploit server's database connect string.
The value of 0.0.0.0 for ServerHost forces Metasploit to accept connections from any address. You may change this to something
more specific. Be sure to provide a numerical value, say 55553, for port.
If you don't specify ServerHost=0.0.0.0 then the RPC server will only listen for connections from 127.0.0.1. You
will see a connection refused message from Armitage when this happens.
Once the RPC daemon launches, you will see a username and password. Take note of these. You will need them when you launch
Armitage.
Once the RPC server is loaded you can connect Armitage to it. Make sure Use SSL is not checked.
If you launch the Metasploit RPC server this way AND Metasploit was installed using the full setup package then the database is
connected already. Type db_status to verify this. If the database is connected, then you do not need to worry about the DB Connect
String when connecting with Armitage from a remote host.
This process works on Windows and Linux.
When emulating a social engineering attack or using client-side exploits, it's helpful to set up Metasploit on a remote
server to receive sessions. I configure my listeners through Metasploit's console. Once the attack is launched, I load
xmlrpc and I have the option to connect with Armitage to manage the post-exploitation process.
The deconfliction server is not a GUI program. You may run it over SSH. This command will start the deconfliction server and
connect it to Metasploit on the specified port using the Metasploit RPC username and password you provide. Use 1 for ssl? if you'd
like Armitage to connect to Metasploit using SSL. Set this value to 0 for no SSL. For the host value, specify the IP address remote
Armitage users will use to connect to your Metasploit instance.
Be aware that the Armitage deconfliction server binds the Metasploit port you specify + 1. If you use port 55553 for Metasploit,
Armitage will bind 55554 for the deconfliction server. Armitage clients need to connect to your attack host on both of these ports.
It helps to see an example. This command starts a Metasploit RPC server with the username msf and the password
wiggles. The default listening port for Metasploit is 55553. The -S parameter disables SSL.
msfrpcd -U msf -P wiggles -S -f
This command connects Armitage's network attack deconfliction server to the Metasploit RPC server located on
192.168.95.3, listening on port 55553. The username is msf and the password is wiggles. SSL is disabled.
armitage --server 192.168.95.3 55553 msf wiggles 0
Optionally, you may specify a message of the day file. The message of the day file is displayed to users when they connect to
Metasploit with Armitage. Use the following options to specify the message of the day file:
armitage --motd /path/to/motd.txt --server host port user password ssl?
You do not need to run a local Armitage client on the Metasploit server.
When the deconfliction server starts, Armitage will try to provide you with a database string and other connection details. Use this
information to fill out the set up dialog when Armitage starts. Click Connect. The first client to connect must have the correct
database string. Future clients don't need it.
Once you connect, Armitage will ask for your nickname. Provide it. When you're connected and the database is set up, invite the rest
of your team to connect. Make sure your teammates are using the latest Armitage client. Teammates may connect from different
operating systems, so long as they have the same version of Java (e.g, 1.6). Your team members do not need to know the database
information.
Make sure your team is on the same page before allowing them to connect with Armitage. It will help greatly if
everyone reads this documentation. I've had teammates launch Hail Mary attacks and use Clear Hosts on a shared
Armitage server. Armitage makes it easy to collaborate, but it also allows untrained team members to hurt the current
operation. I recommend taking advantage of the --motd [file] option to spell out the rules of engagement for using a
shared Metasploit instance with Armitage.
Finally, be aware that connecting a team to Metasploit consumes resources. Make sure you have a decent amount of RAM (at least
1GB) on your attack server. Your attack server should be a Linux host too.
View -> Event Log lets you communicate with users connected to the same Metasploit instance. You should always have this tab
open. In a penetration test this event log will help you reconstruct major events.
Multiple users may now use any Meterpreter session at the same time. Each user may open one or more command shells, browse
files, and take screenshots of the compromised host.
Metasploit shell sessions are automatically locked and unlocked when in use. If a user is interacting with a shell, Armitage will warn
you that it's in use.
The file browser download feature will download from your target to the Metasploit server. If a file downloads quickly enough (less
than ten seconds), Armitage will grab it from the Metasploit server for you. The upload feature will upload your file to Metasploit first
and then upload it to the target host.
Penetration testers will find this feature invaluable. Imagine you're working on a pen test and come across a system
you don't know much about. You can reach back to your company and ask your local expert to load Armitage and
connect to the same Metasploit instance. They will immediately have access to your scan data and they can interact
with your existing sessions... seamlessly.
Or, imagine that you're simulating a phishing attack and you get access to a host. Your whole team can now work on
the same host. One person can search for data, another can set up a pivot and search for internal hosts to attack, and
another can work on persistence. The sky is the limit here.
Some meterpreter commands may have shortened output. Multi-player Armitage takes the initial output from a command and delivers
it to the client that sent the command. Additional output is ignored (although the command still executes normally). This limitation
primarily affects long running meterpreter scripts.
This document is licensed under a Creative Commons Attribution 3.0 Unported License (http://creativecommons.org/licenses/by/3.0/) .
2010-2011 Raphael Mudge (http://www.hick.org/~raffi/)
Connect: Twitter (http://twitter.com/armitagehacker) | Facebook (http://www.facebook.com/pages/Armitage/188508384501166?v=wall) | IRC