Categorygithub.com/wadeking98/gosmbexec
repositorypackage
0.0.0-20240206231327-f36531c0a559
Repository: https://github.com/wadeking98/gosmbexec.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author

# README

License Lifecycle:Maturing

gosmbexec

Go implementation of SMB exec.

Why does this exist?

I couldn't find any smbexec implementations that allow you to pass an NTLM hash, so I decided to make my own.

Limitations:

  • right now the maximum size of a command to execute is 4096 bytes
  • doesn't support kerberos

Credits:

All credits go to https://github.com/Kevin-Robertson/Invoke-TheHash. I got pretty much all the code from there and translated it into golang.
I still had to do a lot of troubleshooting, but not nearly as much as if I implemented it from scratch.

Example usage:

Install:

go install github.com/wadeking98/gosmbexec@latest

Usage:

gosmbexec -u Administrator -p 'Password!' -h 127.0.0.1 -d lab.local -c 'echo test C:\test.txt'
gosmbexec -u Administrator -hash fbdcd5041c96ddbd82224270b57f11fc -h 127.0.0.1 -d lab.local -c 'echo test C:\test.txt'

Created by:
Hack The Box