set many hosts in RHOST metasploit

<<

impelse

Hero Member
Hero Member

Posts: 619

Joined: Mon Feb 16, 2009 3:40 pm

Post Mon May 18, 2009 9:15 am

set many hosts in RHOST metasploit

I am using Metasploit and I want to set RHOST not just one ip, around two or three, is there any form to set it? because I tried using something 192.168.0.1-5, or 192.168.0.1, 2, 3 etc and never work.

Can you set just one ip or many?

Thanks
CCNA, Security+, 70-290, 70-291
CCNA Security
CEH
Online Pentest lab: http://www.thehost1.com/
Blog: http://blog.thehost1.com/
<<

Ketchup

User avatar

Hero Member
Hero Member

Posts: 1021

Joined: Fri Jul 04, 2008 7:44 pm

Location: Philadelphia, PA

Post Mon May 18, 2009 10:27 am

Re: set many hosts in RHOST metasploit

Someone correct me if I am wrong, but I don't believe you can do this through msfconsole or msfgui directly.  I think that there are a couple of options.

1.  You could run db-autopwn if you have something you can import into a database.

2.  You can run msfcli and script your hosts from, let's say a file.    The annoying thing about this is that I believe the msfcli will try to load the module tree on every iteration.  You would do something like this:

  Code:
for host in `cat rhosts.txt`
do
  echo pwning host $host;
  /pentest/exploits/framework3/msfcli windows/smb/ms08_067_netapi LHOST 127.0.0.1 RHOST $host PAYLOAD windows/meterpreter/<payload>;
done
~~~~~~~~~~~~~~
Ketchup
<<

impelse

Hero Member
Hero Member

Posts: 619

Joined: Mon Feb 16, 2009 3:40 pm

Post Mon May 18, 2009 10:40 am

Re: set many hosts in RHOST metasploit

Thanks, I saw a video using db-autopwn but there is a rpboem with BT4 beta that the database is not installed very well, also I wan to learn to do it manually so I can learn how this tool work, after that I will do it auto.
CCNA, Security+, 70-290, 70-291
CCNA Security
CEH
Online Pentest lab: http://www.thehost1.com/
Blog: http://blog.thehost1.com/
<<

LSOChris

Post Wed May 20, 2009 6:51 pm

Re: set many hosts in RHOST metasploit

in general on the scanner aux modules will allow you to set RHOSTS to a network range versus RHOST that only allows a single IP.

if you think about this it makes sense because its really not a good idea to be blasting multiple attacks and multiple IPs.
<<

timmedin

User avatar

Sr. Member
Sr. Member

Posts: 469

Joined: Thu Feb 05, 2009 11:18 pm

Post Wed May 20, 2009 10:34 pm

Re: set many hosts in RHOST metasploit

You would either have to use autopwn or script it. You can't use multiple ip addresses since the handler only handles one connection.

If you do as Ketchup suggested that would work great, but you have to setup the multi-handler first.
twitter.com/timmedin | http://blog.securitywhole.com

Return to Network Pen Testing

Who is online

Users browsing this forum: No registered users and 2 guests

cron
Powered by phpBB® Forum Software © phpBB Group.
Designed by ST Software