mongodb

package
v0.0.181 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2026 License: Apache-2.0 Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package mongodb provides MongoDB penetration testing functionality

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PerformAuth

func PerformAuth(ctx context.Context, target string, config *mongodbfern.PentestMongodbConfig) (*pentestfern.AuthResult, error)

PerformAuth tests each username+password combination against MongoDB and returns an AuthResult. On the first successful authentication (when StopFirstSuccess is set), it stops early.

func PerformProbe

func PerformProbe(ctx context.Context, target string, config *mongodbfern.PentestMongodbConfig) (*mongodbfern.ProbeResult, error)

PerformProbe connects anonymously to a MongoDB server, retrieves build information, and checks whether unauthenticated access to databases is permitted.

func PerformQuery

func PerformQuery(ctx context.Context, target string, client *mongo.Client, config *mongodbfern.PentestMongodbConfig) (*mongodbfern.QueryResult, error)

PerformQuery executes find() queries on each database/collection accessible via the provided client. Only read operations are supported. Documents are serialized as JSON strings.

func RunPentest

RunPentest performs MongoDB pentest operations using a phased approach: PROBE (always) -> AUTH -> QUERY based on requested actions.

Types

type Target

type Target struct {
	Host string
	Port int
}

Target represents a MongoDB server target

func ParseTarget

func ParseTarget(s string) (*Target, error)

ParseTarget parses a target string into a Target struct. Supports "host:port" and "host" formats. Defaults to port 27017.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL