sql注入笔记-sqlite

1. SQLite

1. 常用语句及基本结构

 (1)sqlite因为其比较简易每个db文件就是一个数据库,所以不存在information_schema数据库,但存在类似作用的表sqlite_master。

 

 该表记录了该库下的所有表,索引,表的创建sql等所以我们可以通过此读取数据,常见语句如下。

1 读取表名:select group_concat(name) from sqlite_master where type='table' 
2 读取字段:select group_concat(sql) from sqlite_master where type='table' and name='表名'

2. 函数及特性

全部核心函数:https://www.sqlite.org/lang_corefunc.html

 

 sqlite中十六进制会被转换为十进制所以字符串无法使用十六进制绕过,相对可以使用函数绕过,但因不存在mysql中ord,ascii等,sqlite中应该使用char与hex两个函数大致如下:

select * from sqlite_master where type=char(0x74,0x61,0x62,0x6c,0x65); //该处16进制为了查看方便,实际使用十进制亦可

select * from sqlite_master where type='table';

if绕过

select case (1) when 1 then 2 else 0

 

posted @ 2019-10-07 16:53  ~kagi~  阅读(1338)  评论(0编辑  收藏  举报