# 623/UDP/TCP - IPMI

Resources :&#x20;

* [Hacktricks](https://book.hacktricks.xyz/pentesting/623-udp-ipmi).
* [rapid7](https://www.rapid7.com/blog/post/2013/07/02/a-penetration-testers-guide-to-ipmi/)

Intelligent Platform Management Interface (IPMI) is a set of standardized specifications for hardware-based host management systems used for system management and monitoring.

## Footprinting IPMI

```
sudo nmap -sU --script ipmi-version -p 623 staphysec.local
# Metasploit Version Scan
use auxiliary/scanner/ipmi/ipmi_version
```

> If default credentials do not work to access a BMC, we can turn to a [flaw](http://fish2.com/ipmi/remote-pw-cracking.html) in the RAKP protocol in IPMI 2.0. During the authentication process, the server sends a salted SHA1 or MD5 hash of the user's password to the client before authentication takes place. This can be leveraged to obtain the password hash for ANY valid user account on the BMC. These password hashes can then be cracked offline using a dictionary attack using `Hashcat` mode `7300`. In the event of an HP iLO using a factory default password, we can use this Hashcat mask attack command `hashcat -m 7300 ipmi.txt -a 3 ?1?1?1?1?1?1?1?1 -1 ?d?u` which tries all combinations of upper case letters and numbers for an eight-character password.

To retrieve IPMI hashes, we can use the Metasploit [IPMI 2.0 RAKP Remote SHA1 Password Hash Retrieval](https://www.rapid7.com/db/modules/auxiliary/scanner/ipmi/ipmi_dumphashes/) module.

**Metasploit Dumping Hashes**

```
msf6 > use auxiliary/scanner/ipmi/ipmi_dumphashes 

```
