Vulnerabilities > CVE-2010-4107 - Path Traversal vulnerability in HP products
Attack vector
UNKNOWN Attack complexity
UNKNOWN Privileges required
UNKNOWN Confidentiality impact
UNKNOWN Integrity impact
UNKNOWN Availability impact
UNKNOWN Summary
The default configuration of the PJL Access value in the File System External Access settings on HP LaserJet MFP printers, Color LaserJet MFP printers, and LaserJet 4100, 4200, 4300, 5100, 8150, and 9000 printers enables PJL commands that use the device's filesystem, which allows remote attackers to read arbitrary files via a command inside a print job, as demonstrated by a directory traversal attack.
Vulnerable Configurations
Part | Description | Count |
---|---|---|
Hardware | 8 |
Common Weakness Enumeration (CWE)
Common Attack Pattern Enumeration and Classification (CAPEC)
- Relative Path Traversal An attacker exploits a weakness in input validation on the target by supplying a specially constructed path utilizing dot and slash characters for the purpose of obtaining access to arbitrary files or resources. An attacker modifies a known path on the target in order to reach material that is not available through intended channels. These attacks normally involve adding additional path separators (/ or \) and/or dots (.), or encodings thereof, in various combinations in order to reach parent directories or entirely separate trees of the target's directory structure.
- Directory Traversal An attacker with access to file system resources, either directly or via application logic, will use various file path specification or navigation mechanisms such as ".." in path strings and absolute paths to extend their range of access to inappropriate areas of the file system. The attacker attempts to either explore the file system for recon purposes or access directories and files that are intended to be restricted from their access. Exploring the file system can be achieved through constructing paths presented to directory listing programs, such as "ls" and 'dir', or through specially crafted programs that attempt to explore the file system. The attacker engaging in this type of activity is searching for information that can be used later in a more exploitive attack. Access to restricted directories or files can be achieved through modification of path references utilized by system applications.
- File System Function Injection, Content Based An attack of this type exploits the host's trust in executing remote content including binary files. The files are poisoned with a malicious payload (targeting the file systems accessible by the target software) by the attacker and may be passed through standard channels such as via email, and standard web content like PDF and multimedia files. The attacker exploits known vulnerabilities or handling routines in the target processes. Vulnerabilities of this type have been found in a wide variety of commercial applications from Microsoft Office to Adobe Acrobat and Apple Safari web browser. When the attacker knows the standard handling routines and can identify vulnerabilities and entry points they can be exploited by otherwise seemingly normal content. Once the attack is executed, the attackers' program can access relative directories such as C:\Program Files or other standard system directories to launch further attacks. In a worst case scenario, these programs are combined with other propagation logic and work as a virus.
- Using Slashes and URL Encoding Combined to Bypass Validation Logic This attack targets the encoding of the URL combined with the encoding of the slash characters. An attacker can take advantage of the multiple way of encoding an URL and abuse the interpretation of the URL. An URL may contain special character that need special syntax handling in order to be interpreted. Special characters are represented using a percentage character followed by two digits representing the octet code of the original character (%HEX-CODE). For instance US-ASCII space character would be represented with %20. This is often referred as escaped ending or percent-encoding. Since the server decodes the URL from the requests, it may restrict the access to some URL paths by validating and filtering out the URL requests it received. An attacker will try to craft an URL with a sequence of special characters which once interpreted by the server will be equivalent to a forbidden URL. It can be difficult to protect against this attack since the URL can contain other format of encoding such as UTF-8 encoding, Unicode-encoding, etc.
- Manipulating Input to File System Calls An attacker manipulates inputs to the target software which the target software passes to file system calls in the OS. The goal is to gain access to, and perhaps modify, areas of the file system that the target software did not intend to be accessible.
Exploit-Db
description HP JetDirect PJL Query Execution. CVE-2010-4107. Remote exploit for hardware platform id EDB-ID:17636 last seen 2016-02-02 modified 2011-08-07 published 2011-08-07 reporter Myo Soe source https://www.exploit-db.com/download/17636/ title HP JetDirect PJL Query Execution description HP Laser Jet - JavaScript Persistent XSS via PJL Directory Traversal. CVE-2010-4107. Webapps exploit for hardware platform id EDB-ID:32990 last seen 2016-02-03 modified 2014-04-23 published 2014-04-23 reporter @0x00string source https://www.exploit-db.com/download/32990/ title HP Laser Jet - JavaScript Persistent XSS via PJL Directory Traversal description HP JetDirect PJL Interface Universal Path Traversal. CVE-2010-4107. Remote exploit for hardware platform id EDB-ID:17635 last seen 2016-02-02 modified 2011-08-07 published 2011-08-07 reporter Myo Soe source https://www.exploit-db.com/download/17635/ title HP JetDirect PJL Interface Universal Path Traversal description HP LaserJet Directory Traversal in PJL Interface. CVE-2010-4107. Remote exploit for hardware platform file exploits/hardware/remote/15631.txt id EDB-ID:15631 last seen 2016-02-01 modified 2010-11-29 platform hardware port published 2010-11-29 reporter n.runs AG source https://www.exploit-db.com/download/15631/ title HP LaserJet Directory Traversal in PJL Interface type remote
Nessus
NASL family | General |
NASL id | HP_LASERJET_HPSBPI02575_DIRECTORY_TRAVERSAL.NASL |
description | The remote host |
last seen | 2020-06-01 |
modified | 2020-06-02 |
plugin id | 69480 |
published | 2013-08-20 |
reporter | This script is Copyright (C) 2013-2018 and is owned by Tenable, Inc. or an Affiliate thereof. |
source | https://www.tenable.com/plugins/nessus/69480 |
title | HP LaserJet PJL Interface Directory Traversal (HPSBPI02575) |
code |
|
Packetstorm
data source https://packetstormsecurity.com/files/download/96205/n.runs-SA-2010.003.txt id PACKETSTORM:96205 last seen 2016-12-05 published 2010-11-30 reporter Moritz Jodeit source https://packetstormsecurity.com/files/96205/HP-LaserJet-PJL-Interface-Directory-Traversal.html title HP LaserJet PJL Interface Directory Traversal data source https://packetstormsecurity.com/files/download/103777/hpjetdirect-traversal.rb.txt id PACKETSTORM:103777 last seen 2016-12-05 published 2011-08-07 reporter Myo Soe source https://packetstormsecurity.com/files/103777/HP-JetDirect-PJL-Interface-Universal-Path-Traversal.html title HP JetDirect PJL Interface Universal Path Traversal data source https://packetstormsecurity.com/files/download/140813/hackingprinters-2.txt id PACKETSTORM:140813 last seen 2017-01-31 published 2017-01-31 reporter Jens Mueller source https://packetstormsecurity.com/files/140813/Hacking-Printers-Advisory-2.html title Hacking Printers Advisory 2
Seebug
bulletinFamily exploit description No description provided by source. id SSV:86247 last seen 2017-11-19 modified 2014-07-01 published 2014-07-01 reporter Root source https://www.seebug.org/vuldb/ssvid-86247 title HP Laser Jet - JavaScript Persistent XSS via PJL Directory Traversal bulletinFamily exploit description <body><h1>漏洞分析</h1><p></p> <p><span style="font-size: large"> 密码爆破</span></p> <p style="padding-left: 30px">惠普官方已经在2010年11月的安全通告上发布了漏洞解决办法,用户可以通过禁用 PJL 的文件系统访问权限或重新设置 PJL 密码来解决此问题。但 PJL 的安全密码是范围1-65535的数字,密码认证次数和频率并没有限制,远程攻击者可以通过爆破可以将 PJL 的密码安全保护禁用,进而可绕过密码验证通过 PJL 对打印机内置的文件系统进行读写。文件系统包含后台处理打印作业、收到的传真、日志文件和配置文件。</p> <p style="padding-left: 30px">使用以下 Python3 程序对系统进行漏洞检测:</p> <p></p><!-- Crayon Syntax Highlighter v2.7.1 --> <!-- [Format Time: 0.0088 seconds] --> <p></p> <p style="padding-left: 30px">如果打印出“PoC OK!”,说明系统存在漏洞。PoC 验证脚本主要分为两个部分。第一部分发送重置密码的PJL指令进行密码爆破,每进行30次密码尝试后发送一次查询当前密码保护的状态的 PJL 指令,直到查询到密码保护被关闭即为爆破成功。爆破过程如图1所示,破解密码过程中返回打印机型号和PJL报文信息。</p> <p><a href="http://blog.knownsec.com/wp-content/uploads/2015/08/1.png"><img class="aligncenter wp-image-2985" src="http://blog.knownsec.com/wp-content/uploads/2015/08/1.png" alt="1" width="700" height="169"></a></p> <p style="text-align: center">图1 Python3脚本爆破过程</p> <p></p> <p style="padding-left: 30px">第二部分发送查询磁盘文件的 PJL 指令,如果指令能够正确获取到目录,则 PJL 具有文件系统的访问权限,如图2所示,即存在漏洞,PoC 验证完成。</p> <p><a href="http://blog.knownsec.com/wp-content/uploads/2015/08/2.png"><img class="aligncenter wp-image-2986" src="http://blog.knownsec.com/wp-content/uploads/2015/08/2.png" alt="2" width="700" height="128"></a></p> <p style="text-align: center">图2 Python3进行PoC验证</p> <p> <span style="font-size: large">打印机信息泄露</span></p> <p style="padding-left: 30px">惠普打印机 File System External Access 的默认设置允许 PJL 命令访问该设备的文件系统。远程攻击者可以借助 PJL 读取任意文件,远程连接打印机并进行遍历目录操作,截图如下:</p> <p><a href="http://blog.knownsec.com/wp-content/uploads/2015/08/3.png"><img class="aligncenter wp-image-2987" src="http://blog.knownsec.com/wp-content/uploads/2015/08/3-300x141.png" alt="3" width="700" height="329"></a></p> <p style="text-align: center">图3 连接远程打印机并遍历目录</p> <p></p> <p style="padding-left: 30px">进入打印机后台,读取目录后,可以进行上传、下载和删除文件的操作,截图如下:</p> <p><a href="http://blog.knownsec.com/wp-content/uploads/2015/08/4.png"><img class="aligncenter wp-image-2988" src="http://blog.knownsec.com/wp-content/uploads/2015/08/4-300x109.png" alt="4" width="700" height="254"></a></p> <p style="text-align: center">图4 下载打印机内部文档</p> <p></p> <p style="text-align: center"><a href="http://blog.knownsec.com/wp-content/uploads/2015/08/5.png"><img class="alignnone wp-image-2989" src="http://blog.knownsec.com/wp-content/uploads/2015/08/5-300x183.png" alt="5" width="700" height="427"></a></p> <p style="text-align: center">图5 删除打印机内文件并进行本地上传</p> <p> <span style="font-size: xx-large">ZoomEye 分析概要</span></p> <p style="padding-left: 30px">通过网络空间搜索引擎 ZoomEye 进行全网搜索,得出目前全球10393台存在文件系统的惠普打印机中受到该漏洞影响的打印机有3625台,占比34.88%。</p> <p><span style="font-size: x-large">受漏洞影响设备型号全球排名 TOP 10</span></p> <p style="padding-left: 30px">受该漏洞影响打印机中 HP LaserJet 4250有424台(11.7%),HP LaserJet 4050有366台(10.1%),HP Color LaserJet 5550有267台(7.3%)。其中 HP LaserJet 系列打印机占所有受影响设备的73.9%。</p> <p><a href="http://blog.knownsec.com/wp-content/uploads/2015/08/6.png"><img class="aligncenter wp-image-2990" src="http://blog.knownsec.com/wp-content/uploads/2015/08/6-300x154.png" alt="6" width="700" height="360"></a></p> <p style="text-align: center">图6 受漏洞影响设备型号全球排名 TOP 10</p> <p> <span style="font-size: x-large"> 受漏洞影响国家全球排名 TOP 10</span></p> <p style="padding-left: 30px">受该漏洞影响的打印机数量全球排名前三分别是:<br> 1、美国2315台,占比63.9%<br> 2、韩国410台,占比11.3%<br> 3、中国302台,占比8.3%</p> <p><a href="http://blog.knownsec.com/wp-content/uploads/2015/08/7.png"><img class="aligncenter wp-image-2991" src="http://blog.knownsec.com/wp-content/uploads/2015/08/7-300x155.png" alt="7" width="700" height="361"></a></p> <p style="text-align: center">图7 受漏洞影响国家全球排名 TOP 10</p> <p> <span style="font-size: xx-large"> </span></p></body> id SSV:70298 last seen 2017-11-19 modified 2014-07-01 published 2014-07-01 reporter Root source https://www.seebug.org/vuldb/ssvid-70298 title HP LaserJet Directory Traversal in PJL Interface
References
- http://secunia.com/advisories/42238
- http://secunia.com/advisories/42238
- http://securityreason.com/securityalert/8328
- http://securityreason.com/securityalert/8328
- http://securitytracker.com/id?1024741
- http://securitytracker.com/id?1024741
- http://www.exploit-db.com/exploits/15631
- http://www.exploit-db.com/exploits/15631
- http://www.itrc.hp.com/service/cki/docDisplay.do?docId=emr_na-c02004333
- http://www.itrc.hp.com/service/cki/docDisplay.do?docId=emr_na-c02004333
- http://www.itrc.hp.com/service/cki/docDisplay.do?docId=emr_na-c02004333
- http://www.itrc.hp.com/service/cki/docDisplay.do?docId=emr_na-c02004333
- http://www.nruns.com/_downloads/SA-2010%20003-Hewlett-Packard.pdf
- http://www.nruns.com/_downloads/SA-2010%20003-Hewlett-Packard.pdf
- http://www.securityfocus.com/bid/44882
- http://www.securityfocus.com/bid/44882
- http://www.vupen.com/english/advisories/2010/2987
- http://www.vupen.com/english/advisories/2010/2987
- https://exchange.xforce.ibmcloud.com/vulnerabilities/63261
- https://exchange.xforce.ibmcloud.com/vulnerabilities/63261