Documentation
¶
Overview ¶
Package imap implements IMAP4rev1/IMAP4rev2 mail server enumeration.
Index ¶
Constants ¶
View Source
const ( DefaultImapPort = 143 DefaultImapsPort = 993 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LibraryEnumerateIMAP ¶
type LibraryEnumerateIMAP struct{}
LibraryEnumerateIMAP implements NetworkApplicationLibrary for IMAP enumeration. Mode A only (pre-auth fingerprinting): greeting, CAPABILITY pre/post STARTTLS, advertised SASL mechanisms, TLS cert/cipher. Mode B (auth + folder/message enumeration) lives under `internal/pentest/imap/` and `pentest service imap`.
func (*LibraryEnumerateIMAP) EnumerateTarget ¶
func (l *LibraryEnumerateIMAP) EnumerateTarget(ctx context.Context, target string) (*enumeratefern.EnumerateServiceDetails, []string)
EnumerateTarget performs IMAP enumeration against a single target.
Flow:
- Parse target (host:port, default port 143)
- Try plain TCP; on failure try implicit TLS (port 993 or any port with TLS)
- Run CAPABILITY; detect STARTTLS; upgrade if available
- Re-CAPABILITY after TLS upgrade
- Detect IMAP version, extract TLS cert info
- If Username set: authenticate and enumerate folders, statuses, messages
Click to show internal directories.
Click to hide internal directories.