Documentation
¶
Overview ¶
Package snmp implements active SNMP pentest operations (write-access probing).
Index ¶
- func PerformAuth(ctx context.Context, target string, config *snmpfern.PentestSnmpConfig) (*pentestfern.AuthResult, error)
- func PerformRead(ctx context.Context, target string, config *snmpfern.PentestSnmpConfig) (*snmpfern.ReadResult, error)
- func RunPentest(ctx context.Context, config *snmpfern.PentestSnmpConfig) (*snmpfern.PentestSnmpReport, error)
- func RunWriteTest(ctx context.Context, target string, config *snmpfern.PentestSnmpConfig) (*snmpfern.WriteTestResult, []string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PerformAuth ¶ added in v0.1.3
func PerformAuth(ctx context.Context, target string, config *snmpfern.PentestSnmpConfig) (*pentestfern.AuthResult, error)
PerformAuth tests SNMP community strings (v1/v2c) or SNMPv3 usernames and returns an AuthResult. For v1/v2c: iterates config.Communities (default: ["public","private"]), tests each by issuing a GET on sysDescr. Success = non-error response with a readable PDU value. For v3: iterates config.Usernames (default: ["public"]) with NoAuthNoPriv. Honors StopOnFirstSuccess and SuccessfulOnly.
func PerformRead ¶ added in v0.1.3
func PerformRead(ctx context.Context, target string, config *snmpfern.PentestSnmpConfig) (*snmpfern.ReadResult, error)
PerformRead issues SNMP GETs (or GETBULK walks) for the configured OIDs using each available community (v1/v2c) or username (v3). It returns a ReadResult for the target.
func RunPentest ¶
func RunPentest(ctx context.Context, config *snmpfern.PentestSnmpConfig) (*snmpfern.PentestSnmpReport, error)
RunPentest performs SNMP pentest operations across all configured targets and actions.
func RunWriteTest ¶
func RunWriteTest(ctx context.Context, target string, config *snmpfern.PentestSnmpConfig) (*snmpfern.WriteTestResult, []string)
RunWriteTest probes for writable SNMP access by issuing an SNMP SET against a benign OID (sysContact by default), restoring the original value on success. For v1/v2c it tests each community string; for v3 it tests NoAuthNoPriv access for each configured username.
Types ¶
This section is empty.