Introduction to Metasploit Framework
Today I’m gonna write this tutorial about the Metasploit Framework 3. First of all sorry for my bad English.
I’ve seen that most of the people don’t know what Metasploit is. I discovered this for a few months ago and absolutely love(d) it :). So… What is Metasploit?
Metasploit is a open source framework widely used by IT security professionals. It was developed mainly for penetration tests and also to search for vulnerabilities. You can download the framework for free on http://www.metasploit.com/ . Although I would advise you to download Backtrack 5 and install it on your PC because it includes SET(Social Engineer Toolkit) and we’ll need that. Metasploit includes several tools(msfconsole, msfweb, msfcli, msflogdump, msfpayload, msfpescan, msfencode, msfupdate). We’ll use msfconsole that is metasploit in console mode.
Ok, I think it’s enough :D. Let’s start exploring this powerful tool :)…. For this tutorial I’ll show you how to break into someone’s computer with Metasploit and fully compromise his/her system. Keep in mind that unless you have a public IP address this will only work on your local network. Assign a public IP address isn’t difficult, I can write how to do that if someone’s want.
The first thing you need to do is to find your IP address. To do that open the “Terminal” and type ifconfig. Looks confusing? :P. No, it isn’t, at all :).
My screen looks like that(I’ll not post screenshots)
root@bt:~# ifconfig
eth0 Link encap:Ethernet HWaddr 00:19:66:3e:bb:6e
MY IP ADDRESS -> inet addr:192.168.1.65 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::219:66ff:fe3e:bb6e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:17901 errors:0 dropped:0 overruns:0 frame:0
TX packets:13416 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:24164235 (24.1 MB) TX bytes:1282971 (1.2 MB)
Interrupt:23 Base address:0x6800
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:263 errors:0 dropped:0 overruns:0 frame:0
TX packets:263 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:34025 (34.0 KB) TX bytes:34025 (34.0 KB)
Your IP address is after inet addr:. In my case my IP address is 192.168.1.65. Quite simple right?
.I think the rest is also easy to understand.
Don’t forget your IP, you’ll need it later so the “victim” can connect to you :).
Now.. Let’s navigate to SET directory. If you have Backtrack 5 you can copy what I type, but I advise you to write for your own, just to get used with this :). So.. I typed this:
Code:
root@bt:~# cd ..
root@bt:/# cd pentest/exploits/set/
See? We’re in the SET directory. Run the SET interface by typing:
Code:
root@bt:/pentest/exploits/set# ./set
If you get something like this, congratulations, you’re in the SET interface :DD. Not bad for now :P.
bla bla bla bla.
Hehe this is a new world ready to explore :D. All the exploits to this options :D. This is why I love Metasploit + SET, they include new exploits every day :). And of course you can create your own exploits :P, just need to know how to code WELL in Ruby :). Hum what you don’t know is that on this list we have a very special exploit that makes our work a lot easier :). That exploit is number 24( 24. Metasploit Browser Autopwn (USE AT OWN RISK!)). Basically it runs all the 23 exploits and choose the most suitable to the victim PC :). I always use that, it’s the one that can be more dangerous
Yeah, everything just seems PERFECT!
And actually is xD. And you can see that it load 22 exploit modules, or in other words, all of them
Now, it’s the most important part and the most exciting too. You’re ready to break into your family/friends computer hehe. You have to convince them to open the site http://192.168.1.65 . As you can see we started a server that cloned a website, facebook. Remember? Now, when they put on the browser http://192.168.1.65 it’ll open Facebook and you’ll start receiving packets :). Don’t forget, IP addresses that start with 192.168. only work on your local network. Also, I highly reccomend you to test this on Internet Explorer. Let’s continue…. Not today, I’ll continue tomorrow :). Anyway I think you can start exploring this amazing tool ;). Good luck :). Tomorow I’ll finish this .
Ok, I’m back :P.(just joking) Let’s finish this. Supposing that you did everything like I explained you should now be receiving packets.
Now you should write sessions. It’ll show you all the connections available at that moment and each one has a unique ID. Imagine that the ID is equal to 1. In order to connect to that PC you must write on the terminal the following:
Code:
sessions -i 1
1 represents the ID. Now you’ll receive a message saying something like:
Code:
[ * ] Starting interaction with 1….
As I said the number may be different, depending on the ID. Well, now you’re basically done :D.
You’ll get a screen where it appears this:
Code:
meterpreter >
Now type help and explore all those awesome functionalities :DD.
There is different ways to do the same, I found one especially better. Let me know if you want to see another tutorial from me…
Sites of #Team_IHC ..visit n see new posts
smile emoticon http://team-ihc.inhttp://team-ihc.comhttp://indianhackerscolony.nethttp://indianhackerscolony.com
http://indianhackerscolony.blogspot.in