Documentation
¶
Index ¶
- Constants
- Variables
- func ASFPing(host string, port int, timeout time.Duration) ([]byte, error)
- func ASFPingPacket(msgTag byte) []byte
- func AllCmds() []byte
- func AuthAlgosForCiphers(ids []int) []byte
- func BuildRMCPPlus(payloadType byte, body []byte) []byte
- func BuildRMCPPlusWithSID(payloadType byte, sid uint32, body []byte) []byte
- func CipherSuiteName(id int) string
- func CipherSuiteWeak(id int) bool
- func CloseSession15(host string, port int, sess *Session15, timeout time.Duration)
- func CloseSetupSession(c *Client, bmcSID uint32) (byte, error)
- func CloseSetupSessionAsync(c *Client, bmcSID uint32) error
- func DefaultBroadCmds() []byte
- func DefaultBroadNetFns() []byte
- func EnumCipherSuites15(host string, port int, timeout time.Duration) ([]int, []byte, error)
- func ExecClearIPMI(c *Client, bmcSID uint32, netfn, cmd byte, data []byte, rqSeq byte) (byte, []byte, error)
- func FormatFirmwareRevision(major, minor byte) string
- func FormatFirmwareRevisionFull(manufacturerID uint32, major, minor byte, aux [4]byte) string
- func GetChannelAuthCaps15(host string, port int, channel byte, reqPriv byte, timeout time.Duration) ([]byte, error)
- func GetChannelAuthCapsPacket(channel byte, reqPriv byte) []byte
- func GetSessionChallenge15(c *Client, authType byte, username string) (cc byte, tempSID uint32, challenge []byte, err error)
- func GetSystemGUID15(host string, port int, timeout time.Duration) ([]byte, error)
- func ILOAlgoZeroControlAccepted(host string, port int, timeout time.Duration) (accepted bool, status byte, err error)
- func IPMBChecksum(b []byte) byte
- func ManufacturerNameFor(id uint32) string
- func ParseOpenSessionResponse(pkt []byte) (uint32, error)
- func ParsePrivilege(v string) (byte, error)
- func ParseSystemGUIDReply(reply []byte) ([]byte, error)
- func PrivilegeName(level byte) string
- func RAKP1RoleStatus(host string, port int, username string, role byte, timeout time.Duration) (byte, error)
- func RmcpPlusPayload(pkt []byte) ([]byte, error)
- func SMCArchiveMember(gz []byte, key string) ([]byte, bool, error)
- func SMCArchiveMemberNames(gz []byte) ([]string, error)
- func SMCContainerUnwrap(ct, key, iv []byte, cipherKind SMCConfigCipher) ([]byte, bool, error)
- func SMCContainerWrap(pt, key, iv []byte, cipherKind SMCConfigCipher) ([]byte, error)
- func SMCDetectGeneration(host string, port int, timeout time.Duration) (generation, modelPrefix string, err error)
- func SMCLooksGzip(b []byte) bool
- func SMCLooksOpenSSLSalted(b []byte) bool
- func SMCOpenSSLSaltedUnwrap(blob, password []byte) (pt []byte, looksGzip bool, err error)
- func SMCOpenSSLSaltedWrap(pt, password []byte) ([]byte, error)
- func SampleSessionIDs(host string, port, n int, timeout time.Duration) []uint32
- func SessionResourceExhausted(inv *PostAuthCollection, err error) bool
- func UsernamePrivRank(user string) int
- func V15OracleUserList() []string
- func WithCommandProgress(ctx context.Context, fn func(string)) context.Context
- func WithPostAuthTrace(ctx context.Context, trace func(string, ...any)) context.Context
- type AuthCaps
- type AuthFlow
- type AuthOptions
- type AuthReport
- type ChassisStatus
- type CipherAlgos
- type CipherAttempt
- type Client
- type CmdSess
- func (s *CmdSess) AdvertisedCiphers() []int
- func (s *CmdSess) ChassisStatus(ctx context.Context) (*ChassisStatus, error)
- func (s *CmdSess) Close()
- func (s *CmdSess) CommandProtection() string
- func (s *CmdSess) ExecRaw(netfn, cmd byte, req []byte) (byte, []byte, error)
- func (s *CmdSess) FRUPrint(ctx context.Context, maxFields int) ([]FRUField, error)
- func (s *CmdSess) Flow() AuthFlow
- func (s *CmdSess) Host() string
- func (s *CmdSess) I2CMasterWriteRead(channel, slaveAddr, readCount byte, writeData []byte) ([]byte, error)
- func (s *CmdSess) LANPrint(ctx context.Context) (map[string]string, map[string]string, error)
- func (s *CmdSess) MCInfo(ctx context.Context) (*MCInfo, error)
- func (s *CmdSess) MCReset(cold bool) error
- func (s *CmdSess) SMCGeneration(ctx context.Context) (*SMCGenerationResult, error)
- func (s *CmdSess) SMCRAKPDetected() bool
- func (s *CmdSess) SOLActivate() ([]byte, error)
- func (s *CmdSess) SOLDeactivate() error
- func (s *CmdSess) SOLGetConfigParam(ctx context.Context, param byte) ([]byte, error)
- func (s *CmdSess) SOLSetConfigParam(ctx context.Context, param byte, value []byte) error
- func (s *CmdSess) SPDRead(slaveAddr, offset, length byte) ([]byte, error)
- func (s *CmdSess) UserClear(ctx context.Context, id int) error
- func (s *CmdSess) UserDisable(id int) error
- func (s *CmdSess) UserEnable(id int) error
- func (s *CmdSess) UserList(ctx context.Context) ([]UserEntry, error)
- func (s *CmdSess) UserSetName(id int, name string) error
- func (s *CmdSess) UserSetPassword(id int, password string) error
- func (s *CmdSess) UserSetPrivilege(ctx context.Context, id int, priv byte) error
- type CmdSessOptions
- type CrackOptions
- type CrackResult
- type DCMICapabilities
- type DeviceID
- type FRUField
- type IPMBSweepEntry
- type IPMBSweepResult
- type MCInfo
- type NetFnSweepEntry
- type NetFnSweepMode
- type NetFnSweepResult
- type NullUserPrivProbe
- type OpenBMCDisabledSetupOverwriteProbe
- type OpenBMCSetupData
- type OpenBMCSetupProbe
- type OpenBMCSetupSession
- type PostAuthCollection
- type PreAuthMapConfig
- type PreAuthMapResult
- type PreAuthRequestResult
- type RAKPPreAuthResult
- type RAKPResult
- type SIDClass
- type SIDCorrelationConfig
- type SIDCorrelationResult
- type SMCConfigCipher
- type SMCConfigXfer
- type SMCCryptoProfile
- type SMCGenerationResult
- type SMCRAKPOnlinePasswordReport
- type SMCRAKPOrderProbe
- type SMCRoleClampProbe
- type SOLConfig
- type Session15
- type Session20
- func OpenSession20(host string, port int, username, password string, suite CipherAlgos, ...) (*Session20, error)
- func OpenSession20NullUser(host string, port int, username string, suite CipherAlgos, ...) (*Session20, byte, error)
- func OpenSession20User(host string, port int, username, password string, suite CipherAlgos, ...) (*Session20, error)
- func OpenSession20WithKey(host string, port int, username string, key []byte, suite CipherAlgos, ...) (*Session20, error)
- func (s *Session20) Close()
- func (s *Session20) CommandProtectionUsed() string
- func (s *Session20) Exec(netfn, cmd byte, data []byte) (byte, []byte, error)
- func (s *Session20) PresentPrivilege() (level byte, cc byte, err error)
- func (s *Session20) ReadSOLConfig(channel byte) *SOLConfig
- func (s *Session20) RequestSessionPrivilege(requested byte) (SetPrivAttempt, error)
- func (s *Session20) SetCommandProtection(mode commandProtection)
- func (s *Session20) SetPrivilegeAttempts() []SetPrivAttempt
- type SetPrivAttempt
- type UserEntry
- type V15Capabilities
- type V15CredResult
- type V15Options
- type V15OracleEntry
- type V15Report
Constants ¶
View Source
const ( CmdSetSOLConfigParams byte = 0x21 CmdGetSOLConfigParams byte = 0x22 CmdMasterWriteRead byte = 0x52 )
View Source
const ( DefaultPort = 623 RMCPVersion byte = 0x06 RMCPReserved byte = 0x00 RMCPSeqNoAck byte = 0xFF RMCPClassIPMI byte = 0x07 RMCPClassASF byte = 0x06 IPMI15AuthNone byte = 0x00 IPMI15AuthMD2 byte = 0x01 IPMI15AuthMD5 byte = 0x02 IPMI15AuthPass byte = 0x04 IPMI15AuthOEM byte = 0x05 IPMI20Format byte = 0x06 )
View Source
const ( PayloadIPMI byte = 0x00 PayloadSOL byte = 0x01 PayloadOpenSessionReq byte = 0x10 PayloadOpenSessionRes byte = 0x11 PayloadRAKP1 byte = 0x12 PayloadRAKP2 byte = 0x13 PayloadRAKP3 byte = 0x14 PayloadRAKP4 byte = 0x15 )
View Source
const ( RAKPNone byte = 0x00 RAKPHMACSHA1 byte = 0x01 RAKPHMACMD5 byte = 0x02 RAKPHMACSHA256 byte = 0x03 )
View Source
const ( IntegrityNone byte = 0x00 IntegrityHMACSHA196 byte = 0x01 IntegrityHMACMD5128 byte = 0x02 IntegrityMD5128 byte = 0x03 IntegrityHMACSHA256128 byte = 0x04 )
View Source
const ( ConfNone byte = 0x00 ConfAESCBC byte = 0x01 ConfXRC4128 byte = 0x02 ConfXRC440 byte = 0x03 )
View Source
const ( NetFnChassis byte = 0x00 NetFnBridge byte = 0x02 NetFnSensor byte = 0x04 NetFnApp byte = 0x06 NetFnFirmware byte = 0x08 NetFnStorage byte = 0x0A NetFnTransport byte = 0x0C NetFnGroup byte = 0x2C NetFnOEM byte = 0x2E )
View Source
const ( CmdGetChassisStatus byte = 0x01 CmdGetDeviceID byte = 0x01 CmdGetLANConfigParams byte = 0x02 CmdColdReset byte = 0x02 CmdWarmReset byte = 0x03 CmdGetSelfTestResults byte = 0x04 CmdGetDeviceGUID byte = 0x08 CmdGetSystemGUID byte = 0x37 CmdGetChannelAuthCaps byte = 0x38 CmdGetSessionChallenge byte = 0x39 CmdActivateSession byte = 0x3A CmdSetSessionPrivilege byte = 0x3B CmdCloseSession byte = 0x3C CmdGetAuthCode byte = 0x3F CmdSetChannelAccess byte = 0x40 CmdGetChannelAccess byte = 0x41 CmdGetChannelInfo byte = 0x42 CmdSetUserAccess byte = 0x43 CmdGetUserAccess byte = 0x44 CmdSetUserName byte = 0x45 CmdGetUserName byte = 0x46 CmdSetUserPassword byte = 0x47 CmdActivatePayload byte = 0x48 CmdDeactivatePayload byte = 0x49 CmdGetPayloadStatus byte = 0x4A CmdGetPayloadInfo byte = 0x4B CmdGetChannelCipherSuites byte = 0x54 CmdGetFRUInventoryInfo byte = 0x10 CmdReadFRUData byte = 0x11 )
View Source
const ( SOLParamEnable byte = 0x01 SOLParamAuthentication byte = 0x02 SOLParamPayloadChannel byte = 0x07 SOLParamPayloadPort byte = 0x08 )
View Source
const ( DCMIGroupExtID byte = 0xDC CmdDCMIGetCapabilities byte = 0x01 DCMIParamSupportedCaps byte = 0x01 )
View Source
const ( PrivUnspecified byte = 0x00 PrivCallback byte = 0x01 PrivUser byte = 0x02 PrivOperator byte = 0x03 PrivAdministrator byte = 0x04 PrivOEM byte = 0x05 PrivNoAccess byte = 0x0f )
View Source
const ( NetFnSMCOEM byte = 0x30 CmdSMCFileTransactions byte = 0xA0 SMCFileTypeConfig byte = 0x01 )
Variables ¶
View Source
var OEMNetFnRange = [...]byte{
0x2E, 0x30, 0x32, 0x34, 0x36, 0x38, 0x3A, 0x3C, 0x3E,
}
View Source
var SMCConfigInnerPassword = []byte("CKSAM1SUCKSAM1SUASMUCIKSASMUCIKS")
View Source
var SMCObfuscationIV = []byte{
0x2e, 0x7b, 0x4c, 0x71, 0xd0, 0x45, 0x2a, 0x6b,
0x89, 0xb8, 0x9a, 0xf9, 0x6a, 0xb3, 0xc6, 0xca,
}
View Source
var SMCRoleProbeAccountCandidates = []string{"ADMIN", "admin", "root"}
Functions ¶
func ASFPingPacket ¶
func AuthAlgosForCiphers ¶
func BuildRMCPPlus ¶
func BuildRMCPPlusWithSID ¶
func CipherSuiteName ¶
func CipherSuiteWeak ¶
func CloseSession15 ¶
func CloseSetupSessionAsync ¶
func DefaultBroadCmds ¶
func DefaultBroadCmds() []byte
func DefaultBroadNetFns ¶
func DefaultBroadNetFns() []byte
func EnumCipherSuites15 ¶
func ExecClearIPMI ¶
func FormatFirmwareRevision ¶
func GetChannelAuthCaps15 ¶
func GetSessionChallenge15 ¶
func GetSystemGUID15 ¶
func IPMBChecksum ¶
func ManufacturerNameFor ¶
func ParsePrivilege ¶
func ParseSystemGUIDReply ¶
func PrivilegeName ¶
func RAKP1RoleStatus ¶
func RmcpPlusPayload ¶
func SMCArchiveMemberNames ¶
func SMCContainerUnwrap ¶
func SMCContainerUnwrap(ct, key, iv []byte, cipherKind SMCConfigCipher) ([]byte, bool, error)
func SMCContainerWrap ¶
func SMCContainerWrap(pt, key, iv []byte, cipherKind SMCConfigCipher) ([]byte, error)
func SMCDetectGeneration ¶
func SMCLooksGzip ¶
func SMCLooksOpenSSLSalted ¶
func SMCOpenSSLSaltedUnwrap ¶
func SMCOpenSSLSaltedWrap ¶
func SampleSessionIDs ¶
func SessionResourceExhausted ¶
func SessionResourceExhausted(inv *PostAuthCollection, err error) bool
func UsernamePrivRank ¶
func V15OracleUserList ¶
func V15OracleUserList() []string
func WithCommandProgress ¶
Types ¶
type AuthCaps ¶
type AuthCaps struct {
Channel byte
AuthTypeMask byte
IPMI20 bool
AnonLogin bool
NullUser bool
NonNullUser bool
UserLevelAuth bool
PerMessageAuth bool
KG bool
OEMID uint32
GUID []byte
CompletionCode byte
Raw []byte
}
func ParseAuthCapsReply ¶
func (*AuthCaps) HasAuthMD2 ¶
func (*AuthCaps) HasAuthMD5 ¶
func (*AuthCaps) HasAuthNone ¶
func (*AuthCaps) HasAuthOEM ¶
func (*AuthCaps) HasAuthStraight ¶
type AuthFlow ¶
type AuthFlow struct {
Version string `json:"version"`
Mode string `json:"mode"`
Username string `json:"username,omitempty"`
Password string `json:"password,omitempty"`
RelabelUser string `json:"relabelUser,omitempty"`
AuthType byte `json:"authType,omitempty"`
Suite CipherAlgos `json:"suite"`
Source string `json:"source,omitempty"`
}
func SelectPostAuthFlow ¶
func SelectPostAuthFlow(auth *AuthReport, v15 *V15Report) (AuthFlow, bool)
func SelectPostAuthFlows ¶
func SelectPostAuthFlows(auth *AuthReport, v15 *V15Report) []AuthFlow
type AuthOptions ¶
type AuthReport ¶
type AuthReport struct {
Host string `json:"host"`
Port int `json:"port"`
Suite *CipherAlgos `json:"suite,omitempty"`
CipherZero bool `json:"cipherZero"`
FakeUsername bool `json:"fakeUsername"`
CipherZeroSID uint32 `json:"cipherZeroSid,omitempty"`
FakeUsernameSID uint32 `json:"fakeUsernameSid,omitempty"`
FakeUsernameProbe string `json:"fakeUsernameProbe,omitempty"`
Results []RAKPResult `json:"results"`
Cracked []CrackResult `json:"cracked"`
}
func RunAuth ¶
func RunAuth(ctx context.Context, host string, port int, opts AuthOptions) (*AuthReport, error)
type ChassisStatus ¶
type ChassisStatus struct {
PowerOn bool `json:"powerOn"`
PowerOverload bool `json:"powerOverload"`
PowerInterlock bool `json:"powerInterlock"`
MainPowerFault bool `json:"mainPowerFault"`
PowerControlFault bool `json:"powerControlFault"`
PowerRestore string `json:"powerRestorePolicy,omitempty"`
LastEvent string `json:"lastPowerEvent,omitempty"`
IdentifyOn bool `json:"identifyOn"`
CoolingFault bool `json:"coolingFault"`
DriveFault bool `json:"driveFault"`
Raw string `json:"raw,omitempty"`
}
type CipherAlgos ¶
type CipherAlgos struct {
Suite int `json:"suite"`
Auth byte `json:"auth"`
Integrity byte `json:"integrity"`
Conf byte `json:"conf"`
}
func CipherAlgosFor ¶
func CipherAlgosFor(id int) (CipherAlgos, bool)
func CipherTriples ¶
func CipherTriples(ids []int) []CipherAlgos
type CipherAttempt ¶
type Client ¶
type CmdSess ¶
type CmdSess struct {
// contains filtered or unexported fields
}
func OpenCmdSess ¶
func OpenCmdSess(opts CmdSessOptions) (*CmdSess, error)
func (*CmdSess) AdvertisedCiphers ¶
func (*CmdSess) ChassisStatus ¶
func (s *CmdSess) ChassisStatus(ctx context.Context) (*ChassisStatus, error)
func (*CmdSess) CommandProtection ¶
func (*CmdSess) I2CMasterWriteRead ¶
func (*CmdSess) SMCGeneration ¶
func (s *CmdSess) SMCGeneration(ctx context.Context) (*SMCGenerationResult, error)
func (*CmdSess) SMCRAKPDetected ¶
func (*CmdSess) SOLActivate ¶
func (*CmdSess) SOLDeactivate ¶
func (*CmdSess) SOLGetConfigParam ¶
func (*CmdSess) SOLSetConfigParam ¶
func (*CmdSess) UserDisable ¶
func (*CmdSess) UserEnable ¶
type CmdSessOptions ¶
type CrackOptions ¶
type CrackResult ¶
type CrackResult struct {
Username string `json:"username"`
Password string `json:"password"`
PasswordType string `json:"passwordType"`
Vendor string `json:"vendor,omitempty"`
Attempts int `json:"attempts"`
Verified bool `json:"verified"`
LoginTested bool `json:"loginTested"`
AcceptsAny bool `json:"acceptsAny,omitempty"`
CommandCapable bool `json:"commandCapable,omitempty"`
Proof string `json:"proof,omitempty"`
}
func CrackRAKP ¶
func CrackRAKP(r *RAKPResult, opts CrackOptions) *CrackResult
type DCMICapabilities ¶
type DCMICapabilities struct {
MajorVersion byte
MinorVersion byte
ParamRevision byte
ParamData []byte
}
func GetDCMICapabilities15 ¶
func ParseDCMICapabilitiesReply ¶
func ParseDCMICapabilitiesReply(reply []byte) (*DCMICapabilities, error)
func (*DCMICapabilities) SupportedCapsHex ¶
func (d *DCMICapabilities) SupportedCapsHex() string
func (*DCMICapabilities) Version ¶
func (d *DCMICapabilities) Version() string
type DeviceID ¶
type DeviceID struct {
ID byte
Revision byte
FirmwareMajor byte
FirmwareMinor byte
IPMIVersion byte
AdditionalSupport byte
ManufacturerID uint32
ProductID uint16
AuxFirmwareVersion [4]byte
}
func GetDeviceID15 ¶
func ParseDeviceIDReply ¶
func (*DeviceID) Attributes ¶
func (*DeviceID) FirmwareRevisionFull ¶
func (*DeviceID) ManufacturerName ¶
type IPMBSweepEntry ¶
type IPMBSweepResult ¶
type IPMBSweepResult struct {
Host string
Entries []IPMBSweepEntry
Reachable []IPMBSweepEntry
}
func SweepIPMBBridge ¶
func (*IPMBSweepResult) IPMBSweepSummary ¶
func (r *IPMBSweepResult) IPMBSweepSummary() string
type MCInfo ¶
type MCInfo struct {
DeviceID byte `json:"deviceId"`
DeviceRevision byte `json:"deviceRevision"`
FirmwareRevision string `json:"firmwareVersion"`
FirmwareRevisionFull string `json:"firmwareVersionFull,omitempty"`
IPMIVersion string `json:"ipmiVersion"`
ManufacturerID uint32 `json:"manufacturerId"`
ManufacturerName string `json:"manufacturerName,omitempty"`
ProductID uint16 `json:"productId"`
AuxFirmwareHex string `json:"auxFirmwareHex,omitempty"`
AdditionalSupport byte `json:"additionalSupport"`
}
type NetFnSweepEntry ¶
type NetFnSweepMode ¶
type NetFnSweepMode uint8
const ( SweepPreSession NetFnSweepMode = iota SweepSessionZero )
type NetFnSweepResult ¶
type NetFnSweepResult struct {
Host string
Mode NetFnSweepMode
Entries []NetFnSweepEntry
Accepted []NetFnSweepEntry
WriteReachable []NetFnSweepEntry
}
func SweepOEMNetFns ¶
func SweepOEMNetFns(host string, port int, mode NetFnSweepMode, sweepAllCmds bool, timeout time.Duration) (*NetFnSweepResult, error)
func SweepOEMNetFnsSample ¶
func SweepOEMNetFnsSample(host string, port int, mode NetFnSweepMode, cmds []byte, timeout time.Duration, logf func(string)) (*NetFnSweepResult, error)
func (*NetFnSweepResult) SweepResultSummary ¶
func (r *NetFnSweepResult) SweepResultSummary() string
type NullUserPrivProbe ¶
type NullUserPrivProbe struct {
Username string `json:"username"`
Suite int `json:"suite"`
Activated bool `json:"activated"`
Error string `json:"error,omitempty"`
OpenSessionMaxPriv byte `json:"openSessionMaxPriv"`
Privilege byte `json:"privilege"`
PrivilegeOK bool `json:"privilegeOk"`
PrivilegeCC byte `json:"privilegeCc,omitempty"`
Protection string `json:"protection,omitempty"`
DeviceIDCC byte `json:"deviceIdCc"`
DeviceIDOK bool `json:"deviceIdOk"`
DeviceIDSeen bool `json:"deviceIdSeen"`
SOL *SOLConfig `json:"sol,omitempty"`
}
func ProbeNullUserPrivilege ¶
func (*NullUserPrivProbe) Status ¶
func (p *NullUserPrivProbe) Status() string
func (*NullUserPrivProbe) UsableAccess ¶
func (p *NullUserPrivProbe) UsableAccess() bool
type OpenBMCDisabledSetupOverwriteProbe ¶
type OpenBMCDisabledSetupOverwriteProbe struct {
DisabledUsername string `json:"disabledUsername"`
AdminUsername string `json:"adminUsername"`
Suite int `json:"suite,omitempty"`
BMCSID uint32 `json:"bmcSid"`
DisabledRAKPStatus byte `json:"disabledRakpStatus"`
DisabledRAKPHMACLen int `json:"disabledRakpHmacLen"`
DisabledPrivQueryCC byte `json:"disabledPrivQueryCc,omitempty"`
DisabledSetPrivAdminCC byte `json:"disabledSetPrivAdminCc,omitempty"`
DisabledCommandsWork bool `json:"disabledCommandsWork"`
AdminRAKPStatus byte `json:"adminRakpStatus"`
AdminRAKPHMACLen int `json:"adminRakpHmacLen"`
AfterPrivQueryCC byte `json:"afterPrivQueryCc,omitempty"`
AfterPrivQueryData []byte `json:"afterPrivQueryData,omitempty"`
AfterSetPrivAdminCC byte `json:"afterSetPrivAdminCc,omitempty"`
AfterSetPrivAdminData []byte `json:"afterSetPrivAdminData,omitempty"`
SetupOverwriteCommandsWork bool `json:"setupOverwriteCommandsWork"`
CloseSetupCC byte `json:"closeSetupCc,omitempty"`
CloseSetupError string `json:"closeSetupError,omitempty"`
Error string `json:"error,omitempty"`
}
func ProbeOpenBMCDisabledSetupOverwrite ¶
func ProbeOpenBMCDisabledSetupOverwrite(host string, port int, disabledUsername, adminUsername string, suite CipherAlgos, timeout time.Duration) (*OpenBMCDisabledSetupOverwriteProbe, error)
type OpenBMCSetupData ¶
type OpenBMCSetupData struct {
PrivilegeQueryCC byte `json:"privilegeQueryCc"`
PrivilegeQueryDataHex string `json:"privilegeQueryDataHex,omitempty"`
PayloadStatusCC byte `json:"payloadStatusCc"`
PayloadStatusDataHex string `json:"payloadStatusDataHex,omitempty"`
PayloadInfoCC byte `json:"payloadInfoCc,omitempty"`
PayloadInfoDataHex string `json:"payloadInfoDataHex,omitempty"`
ProviderGetDeviceIDCC byte `json:"providerGetDeviceIdCc,omitempty"`
ProviderGetDeviceIDHex string `json:"providerGetDeviceIdHex,omitempty"`
ProviderBlocked bool `json:"providerBlocked"`
Error string `json:"error,omitempty"`
}
type OpenBMCSetupProbe ¶
type OpenBMCSetupProbe struct {
Username string `json:"username"`
Suite int `json:"suite,omitempty"`
AuthAlgo byte `json:"authAlgo,omitempty"`
IntegrityAlgo byte `json:"integrityAlgo,omitempty"`
ConfAlgo byte `json:"confAlgo,omitempty"`
BMCSID uint32 `json:"bmcSid"`
RAKPStatus byte `json:"rakpStatus"`
RAKPHMACLen int `json:"rakpHmacLen"`
OpenSessionOnlyRejected bool `json:"openSessionOnlyRejected"`
OpenSessionOnlyPrivQueryCC byte `json:"openSessionOnlyPrivQueryCc,omitempty"`
OpenSessionOnlyError string `json:"openSessionOnlyError,omitempty"`
PrePrivQueryCC byte `json:"prePrivQueryCc,omitempty"`
PrePrivQueryData []byte `json:"prePrivQueryData,omitempty"`
SetPrivAdminCC byte `json:"setPrivAdminCc,omitempty"`
SetPrivAdminData []byte `json:"setPrivAdminData,omitempty"`
PayloadStatusCC byte `json:"payloadStatusCc,omitempty"`
PayloadStatusData []byte `json:"payloadStatusData,omitempty"`
PayloadInfoCC byte `json:"payloadInfoCc,omitempty"`
PayloadInfoData []byte `json:"payloadInfoData,omitempty"`
SetupCommandsWork bool `json:"setupCommandsWork"`
AdminPrivAccepted bool `json:"adminPrivAccepted"`
CrossSocketRAKPStatus byte `json:"crossSocketRakpStatus,omitempty"`
CrossSocketRAKPHMACLen int `json:"crossSocketRakpHmacLen,omitempty"`
CrossSocketPrivQueryCC byte `json:"crossSocketPrivQueryCc,omitempty"`
CrossSocketPrivQueryData []byte `json:"crossSocketPrivQueryData,omitempty"`
CrossSocketSetPrivAdminCC byte `json:"crossSocketSetPrivAdminCc,omitempty"`
CrossSocketSetPrivAdminData []byte `json:"crossSocketSetPrivAdminData,omitempty"`
CrossSocketSetupCommandsWork bool `json:"crossSocketSetupCommandsWork"`
CrossSocketError string `json:"crossSocketError,omitempty"`
CloseSetupCC byte `json:"closeSetupCc,omitempty"`
CloseSetupError string `json:"closeSetupError,omitempty"`
Error string `json:"error,omitempty"`
}
func ProbeOpenBMCSetupState ¶
func ProbeOpenBMCSetupState(host string, port int, username string, suite CipherAlgos, timeout time.Duration) (*OpenBMCSetupProbe, error)
type OpenBMCSetupSession ¶
type OpenBMCSetupSession struct {
// contains filtered or unexported fields
}
func OpenOpenBMCSetupSession ¶
func OpenOpenBMCSetupSession(host string, port int, username string, suite CipherAlgos, timeout time.Duration) (*OpenBMCSetupSession, error)
func (*OpenBMCSetupSession) Close ¶
func (s *OpenBMCSetupSession) Close()
func (*OpenBMCSetupSession) RequestSessionPrivilege ¶
func (s *OpenBMCSetupSession) RequestSessionPrivilege(requested byte) (SetPrivAttempt, error)
func (*OpenBMCSetupSession) SetPrivilegeAttempts ¶
func (s *OpenBMCSetupSession) SetPrivilegeAttempts() []SetPrivAttempt
type PostAuthCollection ¶
type PostAuthCollection struct {
Flow AuthFlow `json:"flow"`
CipherMatrix []CipherAttempt `json:"cipherMatrix,omitempty"`
SetPrivAttempts []SetPrivAttempt `json:"setPrivAttempts,omitempty"`
OpenBMCSetup *OpenBMCSetupData `json:"openbmcSetup,omitempty"`
MCInfo *MCInfo `json:"mcInfo,omitempty"`
Chassis *ChassisStatus `json:"chassis,omitempty"`
Users []UserEntry `json:"users,omitempty"`
LAN map[string]string `json:"lan,omitempty"`
LAN6 map[string]string `json:"lan6,omitempty"`
FRU []FRUField `json:"fru,omitempty"`
CommandProtection string `json:"commandProtection,omitempty"`
Error string `json:"-"`
Completed []string `json:"completed,omitempty"`
Empty []string `json:"empty,omitempty"`
IncompleteAt string `json:"incompleteAt,omitempty"`
}
func (PostAuthCollection) MarshalJSON ¶
func (p PostAuthCollection) MarshalJSON() ([]byte, error)
type PreAuthMapConfig ¶
type PreAuthMapResult ¶
type PreAuthMapResult struct {
Host string `json:"host"`
Port int `json:"port"`
StartedAt time.Time `json:"startedAt"`
FinishedAt time.Time `json:"finishedAt"`
Requests []PreAuthRequestResult `json:"requests"`
RAKP []RAKPPreAuthResult `json:"rakp,omitempty"`
ResponseCount int `json:"responseCount"`
AcceptedCount int `json:"acceptedCount"`
PotentialLeakCount int `json:"potentialLeakCount"`
PotentialBypassCount int `json:"potentialBypassCount"`
}
func MapPreAuthSurface ¶
func MapPreAuthSurface(host string, port int, cfg PreAuthMapConfig) (*PreAuthMapResult, error)
type PreAuthRequestResult ¶
type PreAuthRequestResult struct {
Mode string `json:"mode"`
NetFn byte `json:"netfn,omitempty"`
Cmd byte `json:"cmd,omitempty"`
IPMBAddr byte `json:"ipmbAddr,omitempty"`
ResponseSeen bool `json:"responseSeen"`
CompletionCode byte `json:"completionCode,omitempty"`
ParsedCC bool `json:"parsedCc"`
ResponseLen int `json:"responseLen,omitempty"`
ResponsePrefix string `json:"responsePrefix,omitempty"`
Error string `json:"error,omitempty"`
PotentialMemoryLeak bool `json:"potentialMemoryLeak"`
LeakReason string `json:"leakReason,omitempty"`
PotentialAuthBypass bool `json:"potentialAuthBypass"`
BypassReason string `json:"bypassReason,omitempty"`
}
type RAKPPreAuthResult ¶
type RAKPPreAuthResult struct {
Username string `json:"username"`
ErrorCode byte `json:"errorCode"`
HashLen int `json:"hashLen"`
GUIDPrefix string `json:"guidPrefix,omitempty"`
PotentialHashLeak bool `json:"potentialHashLeak"`
PotentialUserOracle bool `json:"potentialUserOracle"`
Error string `json:"error,omitempty"`
}
type RAKPResult ¶
type RAKPResult struct {
Host string
Username string
AuthAlgo byte
IntegrityAlgo byte
ConfAlgo byte
ClientSID uint32
BMCSID uint32
ClientRand []byte
BMCRand []byte
BMCGUID []byte
RAKPHash []byte
ErrorCode byte
OpenSessionRaw []byte
RAKP2Raw []byte
Crack *CrackResult
}
func SendRAKP1ToSession ¶
func (*RAKPResult) Hashcat ¶
func (r *RAKPResult) Hashcat() string
func (*RAKPResult) Salt ¶
func (r *RAKPResult) Salt() []byte
func (*RAKPResult) SaltHashLine ¶
func (r *RAKPResult) SaltHashLine() string
func (*RAKPResult) UsesSMCRAKPFixedKey ¶
func (r *RAKPResult) UsesSMCRAKPFixedKey() bool
func (*RAKPResult) VerifyRAKPKey ¶
func (r *RAKPResult) VerifyRAKPKey(key []byte) bool
func (*RAKPResult) VerifyRAKPPassword ¶
func (r *RAKPResult) VerifyRAKPPassword(password string) bool
type SIDClass ¶
func ClassifySessionIDs ¶
type SIDCorrelationConfig ¶
type SIDCorrelationResult ¶
type SIDCorrelationResult struct {
Host string
Trials int
ClientSIDs []uint32
ManagedSIDs []uint32
MutualInfoBits float64
BitCorrelation [32]float64
MaxBitCorr float64
PerBitPValue [32]float64
PerBitCILow [32]float64
PerBitCIHigh [32]float64
ConfidenceLevel float64
SignificantBits []int
Finding string
}
func MeasureSIDClientCorrelationWithConfig ¶
func MeasureSIDClientCorrelationWithConfig(host string, port int, trials int, timeout time.Duration, cfg *SIDCorrelationConfig) (*SIDCorrelationResult, error)
type SMCConfigCipher ¶
type SMCConfigCipher string
const ( SMCCipherAES128CBC SMCConfigCipher = "aes-128-cbc" SMCCipher3DESCBC SMCConfigCipher = "3des-ede3-cbc" )
type SMCConfigXfer ¶
type SMCConfigXfer struct {
UploadChunk int
DownloadChunk int
PollInterval time.Duration
PollDeadline time.Duration
// contains filtered or unexported fields
}
func NewSMCConfigXfer ¶
func NewSMCConfigXfer(sess *CmdSess) *SMCConfigXfer
type SMCCryptoProfile ¶
type SMCCryptoProfile struct {
Cipher SMCConfigCipher
Key []byte
IV []byte
}
func SMCCryptoProfileForGeneration ¶
func SMCCryptoProfileForGeneration(gen string) (SMCCryptoProfile, bool)
type SMCGenerationResult ¶
type SMCRAKPOnlinePasswordReport ¶
type SMCRAKPOnlinePasswordReport struct {
Attempted bool `json:"attempted"`
Usernames []string `json:"usernames,omitempty"`
Suites []int `json:"suites,omitempty"`
Candidates int `json:"candidates"`
Attempts int `json:"attempts"`
SessionOK bool `json:"sessionOk"`
Credential *CrackResult `json:"credential,omitempty"`
}
func RunSMCRAKPOnlinePasswordEnum ¶
func RunSMCRAKPOnlinePasswordEnum(ctx context.Context, host string, port int, auth *AuthReport, opts AuthOptions, progressEvery int, onProgress func(attempts int, sessionAlive bool)) *SMCRAKPOnlinePasswordReport
type SMCRAKPOrderProbe ¶
type SMCRAKPOrderProbe struct {
Host string `json:"host"`
Port int `json:"port"`
ConsoleSID uint32 `json:"consoleSid"`
BMCSID uint32 `json:"bmcSid"`
CipherSuite int `json:"cipherSuite"`
Answered bool `json:"answered"`
RAKP4Status byte `json:"rakp4Status"`
RAKP4StatusText string `json:"rakp4StatusText,omitempty"`
SIDEchoed bool `json:"sidEchoed"`
EchoedSID uint32 `json:"echoedSid,omitempty"`
Defect bool `json:"defect"`
SpecConformant bool `json:"specConformant"`
Activated bool `json:"activated"`
Error string `json:"error,omitempty"`
}
func ProbeSMCRAKPOrder ¶
func (*SMCRAKPOrderProbe) Summary ¶
func (p *SMCRAKPOrderProbe) Summary() string
type SMCRoleClampProbe ¶
type SMCRoleClampProbe struct {
Host string `json:"host"`
Port int `json:"port"`
Username string `json:"username"`
UsernameCandidates []string `json:"usernameCandidates,omitempty"`
BaselineRole byte `json:"baselineRole"`
BaselineStatus byte `json:"baselineStatus"`
BaselineAccepted bool `json:"baselineAccepted"`
ConformantRole byte `json:"conformantRole"`
ConformantStatus byte `json:"conformantStatus"`
ConformantAccepted bool `json:"conformantAccepted"`
ReservedRole byte `json:"probeRole"`
ReservedStatus byte `json:"probeRoleStatus"`
ReservedAccepted bool `json:"probeRoleAccepted"`
ProbeRejectedConformantly bool `json:"probeRoleRejectedConformantly"`
Defect bool `json:"defect"`
Error string `json:"error,omitempty"`
}
func ProbeSMCRoleClamp ¶
func (*SMCRoleClampProbe) Summary ¶
func (p *SMCRoleClampProbe) Summary() string
type SOLConfig ¶
type SOLConfig struct {
ParamRevision byte `json:"paramRevision,omitempty"`
Enabled bool `json:"enabled"`
EnabledOK bool `json:"enabledOk"`
RequiredPrivilege byte `json:"requiredPrivilege,omitempty"`
RequiredPrivilegeOK bool `json:"requiredPrivilegeOk"`
PayloadChannel byte `json:"payloadChannel,omitempty"`
PayloadChannelOK bool `json:"payloadChannelOk"`
PayloadPort uint16 `json:"payloadPort,omitempty"`
PayloadPortOK bool `json:"payloadPortOk"`
Params map[byte]string `json:"params,omitempty"`
}
type Session15 ¶
type Session20 ¶
type Session20 struct {
// contains filtered or unexported fields
}
func OpenSession20 ¶
func OpenSession20NullUser ¶
func OpenSession20User ¶
func OpenSession20WithKey ¶
func (*Session20) CommandProtectionUsed ¶
func (*Session20) PresentPrivilege ¶
func (*Session20) ReadSOLConfig ¶
func (*Session20) RequestSessionPrivilege ¶
func (s *Session20) RequestSessionPrivilege(requested byte) (SetPrivAttempt, error)
func (*Session20) SetCommandProtection ¶
func (s *Session20) SetCommandProtection(mode commandProtection)
func (*Session20) SetPrivilegeAttempts ¶
func (s *Session20) SetPrivilegeAttempts() []SetPrivAttempt
type SetPrivAttempt ¶
type V15Capabilities ¶
type V15Capabilities struct {
ConfirmedPriv byte `json:"confirmedPriv"`
SetPrivOK bool `json:"setPrivOk"`
SetPrivCC byte `json:"setPrivCc"`
ReadOK bool `json:"readOk"`
ReadCC byte `json:"readCc"`
Detail string `json:"detail,omitempty"`
}
func (*V15Capabilities) Proof ¶
func (c *V15Capabilities) Proof() string
type V15CredResult ¶
type V15CredResult struct {
Username string `json:"username"`
Password string `json:"password"`
Via string `json:"via"`
Priv byte `json:"priv"`
Caps *V15Capabilities `json:"caps,omitempty"`
}
type V15Options ¶
type V15OracleEntry ¶
type V15Report ¶
type V15Report struct {
Host string `json:"host"`
Port int `json:"port"`
AuthNoneOK bool `json:"authNoneSession"`
AuthNonePriv byte `json:"authNonePriv"`
AuthNoneCaps *V15Capabilities `json:"authNoneCaps,omitempty"`
DefaultCred *V15CredResult `json:"defaultCred,omitempty"`
ValidUsernames []V15OracleEntry `json:"validUsernames,omitempty"`
OracleInvalidUser string `json:"oracleInvalidUser,omitempty"`
OracleInvalidCC byte `json:"oracleInvalidCc,omitempty"`
}
func RunSession15 ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.