靶机:192.168.11.105
攻击机kail:192.168.11.106
1.在kali中启动setoolkit
setoolkit
2.利用SET构建钓鱼网站
1)选择1 Social-Engineering Attacks (社会工程学攻击)
![](https://img-blog.csdnimg.cn/9041f83e2bce48a5ae266f73cd1581f7.png)
2)选择2 Website Attack Vectors (网站攻击流量)
![](https://img-blog.csdnimg.cn/1b6c22233fc846179bfe4f12bf7c74dc.png)
3)选择3 Credential Harvester Attack Method (凭证收集攻击方法)
![](https://img-blog.csdnimg.cn/7ef0a953e6ce407da59a31fa5e4e448d.png)
4) 选择1 Web Templates (网站模板)
![](https://img-blog.csdnimg.cn/e03400fa66ed462b98012e6c184154eb.png)
5)输入攻击机ip,作为钓鱼网站(凭证收集器)的地址
![](https://img-blog.csdnimg.cn/42e159e693e14947b710338d8b409ca9.png)
6)选择2 Google 建立Google网站模板
![](https://img-blog.csdnimg.cn/f4e5ca66f0bb4343ae48202e4974a74f.png)
![](https://img-blog.csdnimg.cn/5078b65ca22a4bc7bc4b141bbd25e32a.png)
3、利用靶机访问钓鱼网站,观察操作机能否收集到靶机的登录凭证
在靶机192.168.11.105上访问钓鱼网站:
http://192.168.11.106,输入用户名密码 并登录
![](https://img-blog.csdnimg.cn/22edeec6dfb544e99b414454d8c07d45.png)
![](https://img-blog.csdnimg.cn/17906be85c474228a558190ab581c466.png)
3.powershell注入攻击
1、生成PowerShell脚本,默认放在
/root/.set/reports/powershell/路径下,我们复制里面的内容
![](https://img-blog.csdnimg.cn/863866b02b0945038b9d292c4bb53e46.png)
生成的注入文件:
![](https://img-blog.csdnimg.cn/0ff3937ee838491c8becc240e3ae2ce6.png)
2、通过各种途径,在靶机105上面执行PowerShell脚本里的内容-ShellCode代码
通过http协议发送powershell文件,用python打开一个http服务器:
python -m http.server 80008
![](https://img-blog.csdnimg.cn/8cb4f342b6ae44f79c5315ac8983d241.png)
靶机105上,web访问
http://192.168.11.106:14472,下载powershell注入文件,复制其中内容,执行
![](https://img-blog.csdnimg.cn/4a1e061e210d4398b701cbbbe50ced4a.png)
3、回到Kali,会发现出现了一个会话,使用 sessions -i 查询,上线成功!
![](https://img-blog.csdnimg.cn/3e5010cc17374c089023f36f6e73a96c.png)