No description
Find a file
2020-08-25 16:35:24 +03:00
Examples COMSPEC create out of service 2020-08-20 17:34:08 +03:00
SMBExec Removed unused modules 2020-08-23 16:40:52 +03:00
Tool Random Service 2020-08-25 16:35:24 +03:00
.gitattributes Initial commit 2020-08-17 09:50:59 +03:00
LICENSE Initial commit 2020-08-17 09:50:59 +03:00
README.md Update README.md 2020-08-24 23:49:34 +03:00
SMBExec.nim Random Service Name 2020-08-24 11:28:06 +03:00
SMBExec.nimble Added regex to nimble 2020-08-20 17:51:05 +03:00

Nim-SMBExec

SMBExec implementation in Nim - SMBv2 using NTLM Authentication with Pass-The-Hash technique

Install

nimble install SMBExec

Usage

import SMBExec

Examples

Create SMB object, connect to target and execute a command under specified service name:

let hash = toNTLMHash("SecretPassword") # Returns NTLMHash => e.g 47bf8039a8506cd67c524a03ff84ba4e

var smb = newSMB2("IP Address/Hostname", "Domain", "Username", "Password Hash", "ServiceName (Optional)") # Creates SMB object

let response = smb.connect() # Connect and authenticate to the target via SMB

smb.exec("cmd command", response) # Response from the negotiation

smb.close() # Close socket

Support

Only supports SMBv2 Authentication

Credits

Powershell: Invoke-SMBExec - https://github.com/Kevin-Robertson/Invoke-TheHash/blob/master/Invoke-SMBExec.ps1