Live-Fire Security Testing with Armitage and Metasploit
Your boss calls you into her office. You stare at the fake mahogany panels that line her wall. She strikes a match and asks, “Did you see the news? Criminals broke into our competitor's network. Embarrassing.” She lights her cigar and demands, “I want you to test our network and tell me that we're safe!”
Many are finding themselves in this position. The Payment Card Industry Data Security Standard requires a penetration test each year. Sarbanes-Oxley, FISMA and HIPAA demand an annual security review. Because of these pressures, many organizations are looking at penetration testing.
A penetration test is a step beyond a vulnerability assessment. A vulnerability assessment pairs missing patches and configuration errors with vague threat descriptions. A penetration test requires exploiting vulnerabilities to learn how an attacker may get access to key systems and files.
By following this article, you'll evaluate your security posture using the same process skilled attackers follow. You'll learn how to perform reconnaissance, exploit hosts and maneuver deeper into your network. To do this, you'll use Armitage and Metasploit.
Metasploit is an open-source exploit development framework owned by Rapid7. Armitage is one of the interfaces available for Metasploit. Armitage makes it easy to launch exploits and conduct post-exploitation steps once you have access to a host.
Use BackTrack Linux to follow this article. BackTrack Linux includes Metasploit and its dependencies. Update your Metasploit installation to get the latest version of Armitage:
cd /pentest/exploits/framework3 svn update .
To start Armitage:
/etc/init.d/mysql start ./armitage
Click Start MSF when the GUI comes up. Armitage will execute Metasploit in the background and connect to it.
Figure 1 shows the Armitage user interface; it has three parts. The top-left is the module browser. Use this browser to search for and execute any of Metasploit's modules. The top-right is the targets area. Armitage displays your hosts here. The bottom is the tabs area. Armitage opens each shell, console and browser in a separate tab.
Attackers perform reconnaissance to learn your network configuration. Accurate information allows them to execute targeted attacks. Use reconnaissance to learn how attackers see your network. Attackers want to know which hosts are on your network, which ports are open and what software you're running.
Nmap is a popular reconnaissance tool. It scans your network to report open ports and service banners. Nmap also guesses host operating systems using irregularities in TCP/IP packet headers. Click Hosts→Nmap Scan→Quick Scan (OS Detect) to scan your network. Once the scan is complete, Armitage populates its targets area with your hosts. Click View→Targets→Table View to display your hosts in a table if you have a lot of hosts.
Right-click a host and select Services to see the results of your scan. Armitage displays the open ports and service banners in a new tab. Highlight multiple hosts to display your scan results in one tab. Figure 2 shows a scan of my network.
Execute the reconnaissance step from both inside and outside your network. Outside reconnaissance will show you how attackers see your network. You'll learn what your firewall blocks and which services display too much information to anonymous users.
It's time to exploit your network. You need to match your hosts and services against Metasploit's 640+ exploits. The next sections in this article discuss automatic, semi-automatic and manual ways to do this. You also will learn how to launch password-guessing and client-side attacks.
I recommend using your inside scans for this phase of the penetration test. You should assume attackers will get inside your network perimeter. I also recommend attacking hosts from inside your network perimeter. This will better show what attackers can do. I justify these recommendations in the pivoting section.
Practical Task Scheduling Deployment
One of the best things about the UNIX environment (aside from being stable and efficient) is the vast array of software tools available to help you do your job. Traditionally, a UNIX tool does only one thing, but does that one thing very well. For example, grep is very easy to use and can search vast amounts of data quickly. The find tool can find a particular file or files based on all kinds of criteria. It's pretty easy to string these tools together to build even more powerful tools, such as a tool that finds all of the .log files in the /home directory and searches each one for a particular entry. This erector-set mentality allows UNIX system administrators to seem to always have the right tool for the job.
Cron traditionally has been considered another such a tool for job scheduling, but is it enough? This webinar considers that very question. The first part builds on a previous Geek Guide, Beyond Cron, and briefly describes how to know when it might be time to consider upgrading your job scheduling infrastructure. The second part presents an actual planning and implementation framework.
Join Linux Journal's Mike Diehl and Pat Cameron of Help Systems.
Free to Linux Journal readers.View Now!
|The Firebird Project's Firebird Relational Database||Jul 29, 2016|
|Stunnel Security for Oracle||Jul 28, 2016|
|SUSE LLC's SUSE Manager||Jul 21, 2016|
|My +1 Sword of Productivity||Jul 20, 2016|
|Non-Linux FOSS: Caffeine!||Jul 19, 2016|
|Murat Yener and Onur Dundar's Expert Android Studio (Wrox)||Jul 18, 2016|
- Stunnel Security for Oracle
- The Firebird Project's Firebird Relational Database
- SUSE LLC's SUSE Manager
- Murat Yener and Onur Dundar's Expert Android Studio (Wrox)
- Managing Linux Using Puppet
- My +1 Sword of Productivity
- Non-Linux FOSS: Caffeine!
- Doing for User Space What We Did for Kernel Space
- SuperTuxKart 0.9.2 Released
- Google's SwiftShader Released