If you've ever used Netcat (all of you I'm sure), you'll feel right at home. If not, connect is quite simple to use and you should pick up on it quickly given the text below.
msf > connect -h
Usage: connect [options]
Communicate with a host, similar to interacting via netcat.
OPTIONS:
-C Try to use CRLF for EOL sequence.
-S
-c
-i
-p
-s Connect with SSL.
-w
As you can see, connect has many options to choose from. One very cool one is the -c option which allows you to, for example, route through a Meterpreter session. I show this below.
I've blocked HTTP access for this computer at the router:
msf > connect metasploit.com 80
[-] Unable to connect: The connection timed out (metasploit.com:80).
But let's see if we can re-route this through another computer and get it working anyway:
msf > sessions -l
Active sessions
===============
Id Description Tunnel
-- ----------- ------
1 Meterpreter 192.168.10.3:44692 -> 192.168.10.7:4444
msf > connect -c 1 metasploit.com 80
[*] Connected to metasploit.com:80
HEAD / HTTP/1.0
HTTP/1.1 200 OK
Date: Sun, 18 Jan 2009 15:01:22 GMT
[...]
Booyah.
Of course that was just one contrived example, but having a built-in netcat-like command should open up some doors for fun and profit.
Enjoy!
Kris Katterjohn
Metasploit Blog
0 comments:
Post a Comment