MySQL之万能密码原理分析

MySQL之万能密码原理分析

SQL注入复现

通过报错回显可以得知具有sql注入

image-20230822220035775

尝试万能密码登录:**’ or 1=1 – **

原理分析

源代码:

select * from user where id = '1';

万能密码结合:

select * from user where id = '' or 1=1 -- ';

结合之后,可以发现,始终成立,所以可以查出所有数据

结论

可以自己先推测出sql语句,然后利用一些绕过方式与推测的sql语句进行结合尝试。

猜你喜欢

转载自blog.csdn.net/weixin_46367450/article/details/132461166