OKI Printer Default Login Credential Scanner - Metasploit


This page contains detailed information about how to use the auxiliary/scanner/misc/oki_scanner metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.

Module Overview


Name: OKI Printer Default Login Credential Scanner
Module: auxiliary/scanner/misc/oki_scanner
Source code: modules/auxiliary/scanner/misc/oki_scanner.rb
Disclosure date: -
Last modification time: 2017-07-24 06:26:21 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: -
Target network port(s): -
List of CVEs: -

This module scans for OKI printers via SNMP, then tries to connect to found devices with vendor default administrator credentials via HTTP authentication. By default, OKI network printers use the last six digits of the MAC as admin password.

Module Ranking and Traits


Module Ranking:

  • normal: The exploit is otherwise reliable, but depends on a specific version and can't (or doesn't) reliably autodetect. More information about ranking can be found here.

Basic Usage


This module is a scanner module, and is capable of testing against multiple hosts.

msf > use auxiliary/scanner/misc/oki_scanner
msf auxiliary(oki_scanner) > show options
    ... show and set options ...
msf auxiliary(oki_scanner) > set RHOSTS ip-range
msf auxiliary(oki_scanner) > exploit

Other examples of setting the RHOSTS option:

Example 1:

msf auxiliary(oki_scanner) > set RHOSTS 192.168.1.3-192.168.1.200 

Example 2:

msf auxiliary(oki_scanner) > set RHOSTS 192.168.1.1/24

Example 3:

msf auxiliary(oki_scanner) > set RHOSTS file:/tmp/ip_list.txt

Required Options


  • RHOSTS: The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'

Go back to menu.

Msfconsole Usage


Here is how the scanner/misc/oki_scanner auxiliary module looks in the msfconsole:

msf6 > use auxiliary/scanner/misc/oki_scanner

msf6 auxiliary(scanner/misc/oki_scanner) > show info

       Name: OKI Printer Default Login Credential Scanner
     Module: auxiliary/scanner/misc/oki_scanner
    License: Metasploit Framework License (BSD)
       Rank: Normal

Provided by:
  antr6X <[email protected]>

Check supported:
  No

Basic options:
  Name       Current Setting  Required  Description
  ----       ---------------  --------  -----------
  COMMUNITY  public           yes       SNMP Community String
  HTTPPORT   80               yes       The HTTP Port
  RETRIES    1                yes       SNMP Retries
  RHOSTS                      yes       The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
  SNMPPORT   161              yes       The SNMP Port
  THREADS    1                yes       The number of concurrent threads (max one per host)
  TIMEOUT    1                yes       SNMP Timeout
  VERSION    1                yes       SNMP Version <1/2c>

Description:
  This module scans for OKI printers via SNMP, then tries to connect 
  to found devices with vendor default administrator credentials via 
  HTTP authentication. By default, OKI network printers use the last 
  six digits of the MAC as admin password.

Module Options


This is a complete list of options available in the scanner/misc/oki_scanner auxiliary module:

msf6 auxiliary(scanner/misc/oki_scanner) > show options

Module options (auxiliary/scanner/misc/oki_scanner):

   Name       Current Setting  Required  Description
   ----       ---------------  --------  -----------
   COMMUNITY  public           yes       SNMP Community String
   HTTPPORT   80               yes       The HTTP Port
   RETRIES    1                yes       SNMP Retries
   RHOSTS                      yes       The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
   SNMPPORT   161              yes       The SNMP Port
   THREADS    1                yes       The number of concurrent threads (max one per host)
   TIMEOUT    1                yes       SNMP Timeout
   VERSION    1                yes       SNMP Version <1/2c>

Advanced Options


Here is a complete list of advanced options supported by the scanner/misc/oki_scanner auxiliary module:

msf6 auxiliary(scanner/misc/oki_scanner) > show advanced

Module advanced options (auxiliary/scanner/misc/oki_scanner):

   Name                 Current Setting  Required  Description
   ----                 ---------------  --------  -----------
   CHOST                                 no        The local client address
   CPORT                                 no        The local client port
   ShowProgress         true             yes       Display progress messages during a scan
   ShowProgressPercent  10               yes       The interval in percent that progress should be shown
   VERBOSE              false            no        Enable detailed status messages
   WORKSPACE                             no        Specify the workspace for this module

Auxiliary Actions


This is a list of all auxiliary actions that the scanner/misc/oki_scanner module can do:

msf6 auxiliary(scanner/misc/oki_scanner) > show actions

Auxiliary actions:

   Name  Description
   ----  -----------

Evasion Options


Here is the full list of possible evasion options supported by the scanner/misc/oki_scanner auxiliary module in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):

msf6 auxiliary(scanner/misc/oki_scanner) > show evasion

Module evasion options:

   Name  Current Setting  Required  Description
   ----  ---------------  --------  -----------

Go back to menu.

Error Messages


This module may fail with the following error messages:

Check for the possible causes from the code snippets below found in the module source code. This can often times help in identifying the root cause of the problem.

Default credentials failed


Here is a relevant code snippet related to the "Default credentials failed" error message:

112:	            user: 'admin',
113:	            password: last_six,
114:	            proof: response.inspect
115:	          )
116:	        when "401"
117:	          print_error("Default credentials failed")
118:	        when "404"
119:	          print_status("Page not found, try credential manually: admin/#{last_six}")
120:	        else
121:	          print_status("Unexpected message")
122:	        end

Page not found, try credential manually: admin/<LAST_SIX>


Here is a relevant code snippet related to the "Page not found, try credential manually: admin/<LAST_SIX>" error message:

114:	            proof: response.inspect
115:	          )
116:	        when "401"
117:	          print_error("Default credentials failed")
118:	        when "404"
119:	          print_status("Page not found, try credential manually: admin/#{last_six}")
120:	        else
121:	          print_status("Unexpected message")
122:	        end
123:	
124:	        disconnect()

<IP> Error: <E.CLASS> <E> <E.BACKTRACE>


Here is a relevant code snippet related to the "<IP> Error: <E.CLASS> <E> <E.BACKTRACE>" error message:

127:	
128:	    # No need to make noise about timeouts
129:	    rescue ::Rex::ConnectionError, ::SNMP::RequestTimeout, ::SNMP::UnsupportedVersion
130:	    rescue ::Interrupt
131:	      raise $!
132:	    rescue ::Exception => e
133:	      print_error("#{ip} Error: #{e.class} #{e} #{e.backtrace}")
134:	    ensure
135:	      disconnect_snmp
136:	    end
137:	end

Go back to menu.


Go back to menu.

See Also


Check also the following modules related to this module:

Authors


antr6X <anthr6x[at]gmail.com>

Version


This page has been produced using Metasploit Framework version 6.2.7-dev. For more modules, visit the Metasploit Module Library.

Go back to menu.