8000 GitHub - n00py/go-secdump: Tool to remotely dump secrets from the Windows registry
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

n00py/go-secdump

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-secdump

Description

Package go-secdump is a tool built to remotely extract hashes from the SAM registry hive as well as LSA secrets and cached hashes from the SECURITY hive without any remote agent and without touching disk.

The tool is built on top of the library https://github.com/jfjallid/go-smb and use it to communicate with the Windows Remote Registry to retrieve registry keys directly from memory.

It was built as a learning experience and as a proof of concept that it should be possible to remotely retrieve the NT Hashes from the SAM hive and the LSA secrets as well as domain cached credentials without having to first save the registry hives to disk and then parse them locally.

The main problem to overcome was that the SAM and SECURITY hives are only readable by NT AUTHORITY\SYSTEM. However, I noticed that the local group administrators had the WriteDACL permission on the registry hives and could thus be used to temporarily grant read access to itself to retrieve the secrets and then restore the original permissions.

Credits

Much of the code in this project is inspired/taken from Impacket's secdump but converted to access the Windows registry remotely and to only access the required registry keys.

Some of the other sources that have been useful to understanding the registry structure and encryption methods are listed below:

https://www.passcape.com/index.php?section=docsys&cmd=details&id=23

http://www.beginningtoseethelight.org/ntsecurity/index.htm

https://social.technet.microsoft.com/Forums/en-US/6e3c4486-f3a1-4d4e-9f5c-bdacdb245cfd/how-are-ntlm-hashes-stored-under-the-v-key-in-the-sam?forum=win10itprogeneral

Usage

Usage of ./go-secdump:
  -d string
    	domain
  -debug
    	enable debugging
  -hash string
    	hex encoded NT Hash for user
  -host string
    	host
  -noenc
    	disable smb encryption
  -pass string
    	password
  -port int
    	SMB Port (default 445)
  -smb2
    	Force smb 2.1
  -user string
    	username

Examples

Dump registry secrets

./go-secdump --host DESKTOP-AIG0C1D2 -user Administrator -pass adminPass123

About

Tool to remotely dump secrets from the Windows registry

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 99.6%
  • Makefile 0.4%
0