CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/lib/rex/proto/ipmi.rb
Views: 11655
1
# -*- coding: binary -*-
2
3
4
module Rex
5
module Proto
6
module IPMI
7
8
#
9
# Move these into an IPMI stack or mixin at some point
10
#
11
12
#
13
# Payload types were identified from xCAT-server source code (IPMI.pm)
14
#
15
PAYLOAD_IPMI = 0
16
PAYLOAD_SOL = 1
17
PAYLOAD_RMCPPLUSOPEN_REQ = 0x10
18
PAYLOAD_RMCPPLUSOPEN_REP = 0x11
19
PAYLOAD_RAKP1 = 0x12
20
PAYLOAD_RAKP2 = 0x13
21
PAYLOAD_RAKP3 = 0x14
22
PAYLOAD_RAKP4 = 0x15
23
24
25
#
26
# Payload types were copied from xCAT-server source code (IPMI.pm)
27
#
28
RMCP_ERRORS = {
29
1 => "Insufficient resources to create new session (wait for existing sessions to timeout)",
30
2 => "Invalid Session ID", #this shouldn't occur...
31
3 => "Invalid payload type",#shouldn't occur..
32
4 => "Invalid authentication algorithm", #if this happens, we need to enhance our mechanism for detecting supported auth algorithms
33
5 => "Invalid integrity algorithm", #same as above
34
6 => "No matching authentication payload",
35
7 => "No matching integrity payload",
36
8 => "Inactive Session ID", #this suggests the session was timed out while trying to negotiate, shouldn't happen
37
9 => "Invalid role",
38
0xa => "Unauthorised role or privilege level requested",
39
0xb => "Insufficient resources to create a session at the requested role",
40
0xc => "Invalid username length",
41
0xd => "Unauthorized name",
42
0xe => "Unauthorized GUID",
43
0xf => "Invalid integrity check value",
44
0x10 => "Invalid confidentiality algorithm",
45
0x11 => "No cipher suite match with proposed security algorithms",
46
0x12 => "Illegal or unrecognized parameter", #have never observed this, would most likely mean a bug in xCAT or IPMI device
47
}
48
49
50
end
51
end
52
end
53
54