You used to have a single program to do each thing you wanted done. ◦ One program that ran a buffer overflow against apache and dropped a file into the wwwroot folder
denial of service attack on a Windows server (ping of death). • One program that created an endless loop and denied service to Windows file servers. • all of them had cute hacker names like teardrop, back orifice, or synapse).
... • Modularize your exploits • Modularize your payloads • Mix and match at will. • Thus the metasploit framework was born. ◦ Typically we just say metasploit.
2003. 11 exploits. • 6 months later it was rewritten. 19 exploits. • Project began to become popular • 2007 - Metasploit 3.0 is written in Ruby. • 2009 - Product gains commercial backing • Today - includes a GUI, CLI, and Database support. ◦ 777 exploits, 228 payloads
old days. • code that takes advantage of some weakness in a system. • that weakness is a vulnerability, like a buffer overflow vulnerability. • the exploit is the code that takes advantage of that.
on a large scale basis. It's a way of automating things you might want to do a lot of. • Want to add a new account to many machines? • Want to create a persistent session on many? • Dump password hashes from many?
msfpayload. • create executables that can hide from antivirus software. • Basically, they are different techniques for encrypting or packing a file with a small stub that unpacks it in memory.
going to attack. • Pay attention to the S on the end. Auxiliary modules use the rhosts because they run against many machines. ◦ Exploits typically use rhost because they attack a single machine.
then you need a lot of threads. • default is 1 (slow) • Windows - don't set threads higher than 100 • Linux - go up to 256. Maybe more if you've got something better than a laptop.
to true when you want more details about what an exploit of payload is doing. People new to metasploit should use verbose to get a better understanding of what is going on.
free download for Windows, Mac, or Linux. • www.metasploit.com/download Another outstanding option, the one which we'll use, is to download the Backtrack linux distribution and burn that to CD.
terminal • apt-get update • apt-get upgrade We're not going to do that today because that can take some time. You should do this every couple weeks though.
very active open source community. • Open a terminal • msfupdate We will do this now because it doesn't take long. You should do this every time you use metasploit.
of stuff scroll by on the screen. • Telling you what files are being updated, added or deleted. • When finished, you'll get told what revision number you're on.
45 to 90 seconds for it to come up. • When it is done it will give you some sweet ascii art and tell you what revision number you're on. • This should match the revision number you got from msfupdate.
you can use any linux command. Type a command, if it's not a metasploit command then it will try to use the bash shell to complete it. • For example, if you type "ip address" you can get the ip address of your machine without leaving metasploit.
find the modules that you want. You can search by name or by type of module or when it was released. • Example: search portscan type:auxiliary • Example: search ms12 type:exploit
patch ms12-020. Gather info about the module. Play around with the searching, you probably wont get it on the first try. Do some troubleshooting, ask a friend for help.
same information that info provided to you, but also see the values that have been set for the modules variables. • show options will also show you which variables are required and which are optional.
about the module that you're using. • Most of these settings do not need to be adjusted. • However, I do like to set verbose to true when I'm testing things.
the value of a variable. setg will set it globally, meaning for every module you use. • Example: set threads 100 • Example: set rhost 134.29.1.130 • Example: setg verbose true
might want to look for when hacking on a network. • auxiliary/scanner/http/cert • This is a great way to find servers that are being neglected. Might have security flaws you can exploit.
visit one of these servers and provide their credentials. • Phishing • XSS on a legit webpage • arp-cache spoofing In some cases the machine will provide credentials without user intervention.
social engineering toolkit. 2. Clone the site https://my.mnsu.edu/copyright 3. Use the metasploit fakedns to redirect dns requests to your machine. 4. Update /etc/resolv.conf to use your own machine to resolve addresses 5. Open firefox and go to http://my.mnsu.edu
shell. Exit to go back to meterpreter. 2. Type background to keep the session but go back to metasploit. 3. type sessions to see a list of all your sessions. 4. type sessions -i (number) to go back to meterpreter.
which processes are running and who is running them. 2. use migrate to move into a process that is owned by a domain user. 3. use shell to get a windows shell running as the user. 4. Perform commands as if it was the user. Download files, find out who the domain admins are, open a backdoor, etc.