Live-Fire Security Testing with Armitage and Metasploit

Armitage and Metasploit let you attack your network like skilled criminals. Use these attacks to evaluate your security posture.
Automatic Exploitation

Armitage's Hail Mary feature uses your scan results to launch exploits automatically. Go to Attacks→Hail Mary→by port. Armitage finds, filters and sorts exploits into an optimal order. Armitage then launches these exploits against each of your hosts.

At the end of this attack, Armitage lists the compromised hosts and the successful exploits. This attack is noisy, and some exploits may crash a service before the correct exploit reaches it. However, this attack requires little skill to run. Try this attack from outside your network to see what your intrusion-detection system finds.

Semi-Automatic Exploitation

Use Attacks→Find Attacks→by port to get exploit recommendations. Armitage creates an Attack menu (Figure 3) for each host with relevant exploits. These are the same exploits launched by the Hail Mary attack. Right-click a host in the targets area to reach this menu.

Figure 3. Attack Menu

Armitage organizes each Attack menu by exploitable service. On my network, I have a Windows XP SP2 host. To exploit it, I right-click the host and navigate to Attacks→smb→ms08_067_netapi. This opens the launch dialog shown in Figure 4.

Figure 4. Exploit Launch Dialog

The exploit launch dialog has a table of preconfigured options. Double-click any value to edit it. Click Show advanced options to see other options. Most of the time you don't need to change these. Click Launch to run the exploit against your target. If the attack succeeds, your target turns red with lightning bolts around it (Figure 5).

Figure 5. Compromised Host

Mind the Risk

Exploiting services is a risky business. You're introducing input into your applications that executes flawed code paths. When possible, you should test nonproduction systems. If you must test against a production host, it helps to understand Metasploit's exploit rating system.

Metasploit rates each exploit as poor, normal, good, great or excellent. Excellent rated exploits use simple command injection flaws. These are the safest and most reliable exploits. Exploits rated great are reliable memory corruption exploits. These may crash your system, but it's extremely unlikely. Exploits rated good and below have more risk associated with them, and they're less reliable. Armitage's Hail Mary and exploit recommendation features use exploits rated at the great and excellent levels only. You can change this through Armitage→Preferences.

Metasploit rates some exploits as manual. These exploits need extra information, such as a user name and password, to launch. Manual exploits are not available using the automatic and semi-automatic approaches.

Manual Exploitation

Manual exploitation requires matching your devices and services to Metasploit modules. This step requires some preparation. Create an inventory of your network devices and the software running on each host.

Type each software package and device into the search field below the module browser. Press Enter to execute the search. If you know a Linux host is running ProFTPD 1.3.3, type ProFTPD into the search field. Armitage displays all matching modules in the module browser.

Highlight hosts in the targets area to preconfigure the module's RHOSTS option. Double-click a module to open its launcher. Click Launch to run the attack.

You sometimes will see auxiliary modules in your search results. Figure 6 shows a search for Cisco. This search reveals auxiliary modules to scan for known authorization bypass vulnerabilities and access configuration files using SNMP. Pay attention to the auxiliary modules. They offer a lot of attack value.

Figure 6. Cisco Modules

The manual exploitation approach is the best way to learn what capabilities Metasploit has against your network. This approach requires more time and skill to get access, but it's also more thorough.

______________________

Webinar
One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems

As Linux continues to play an ever increasing role in corporate data centers and institutions, ensuring the integrity and protection of these systems must be a priority. With 60% of the world's websites and an increasing share of organization's mission-critical workloads running on Linux, failing to stop malware and other advanced threats on Linux can increasingly impact an organization's reputation and bottom line.

Learn More

Sponsored by Bit9

Webinar
Linux Backup and Recovery Webinar

Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.

In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.

Learn More

Sponsored by Storix