Metasploit is a tool developed by HD Moore in 2003. In a nutshell, it is used to exploit vulnerabilities in daemons(background) running on an open port. It is extremely powerful tool that is not easy to control. In many ways, it is the quintessential hacker tool. It is powerful, flexible, free, and loaded with awesomeness. It is without a doubt the coolest offensive tool covered in this website. Ask any professional PenTester : “What is the single most useful Tool when it comes to Hacking?”, their answer will always be “Metasploit”.

Before Diving into this heavenly tool, here are a few things that are often used when using MetaSploit :

What is a vulnerability?

A vulnerability is a security hole in a piece of software, hardware or operating system that provides a potential angle to attack the system. Not all vulnerabilities are dangerous and not all of them are exploitable. They can be often found in outdated applications, services or operating systems. Now that we understand what being exploitable means, what is an exploit itself?

What are exploits?

Exploits are highly specialized small programs, whose only purpose is to take advantage of a vulnerability and deliver a payload, which will grant attacker the control. Metasploit is a great tool that has a vast number of exploits. I will cover using some of them later on. So, if it’s purpose is to deliver a payload, what is payload?

What is a payload?

Payload is delivered by exploit and is used to control the remote system.Think of it this way: Exploit is like terrorist that is carrying a bomb in his backpack. He enters the system and leaves his backpack there. Most popular and widely known payload is meterpreter, that has a lot of features. With it you can Browse remote files, downlaod them, upload your own, capture keystrokes, take screenshots, open DOS, and pivot to another machine as well. Through meterpreter, you can pivot and attack machines in networks that are not your own.

An example: Buffer Overflow :

Buffer Overflow is a common method used to make exploits. How does it work?

Imagine a glass of water. You’re thirsty and you want to drink it. You keep pouring more into the glass, but at one point, the water will have filled the glass and it will leak outside of it, on your carpet. This is exactly what buffer overflow is. It happens when a program or file writes data to a buffer and overflows it. It leaks into adjacent memory and overrides it. That way we get our malicious part to execute.

Metasploit and all of it’s exploits are written in Ruby. Metasploit has four main interfaces.

►MsfCli

►MsfConsole

►MsfGui

►Armitage

I will be getting into each one of those and more in the next tutorials. You can run metasploit in both Windows and Linux.

Windows - You can download it from: http://www.metasploit.com/

Kali - Metasploit, among many other tools comes pre-installed with this operating system.

The first step to success is a small one. Like I always say, Penetration Testing is something you just cannot learn without getting your hands dirty. Metasploit itself is an incredibly volatile tool, i.e. it’s literally updated several times a day with new exploits and features. An exploit that can compromise a million systems today might be totally useless tomorrow, and one that doesn’t exist today might effect even more tomorrow. Metasploit does have a GUI, but in the following tutorials I use only console commands since it gives you a sense of what exactly is happening, keeps you in the loop - Something that is not so obvious when using the GUI.

So, move on to the next tutorial to get started right away !



Want to be a real hacker? Sign Up!



Recommended | All | New


go to top