SMBExec

Nim-SMBExec - SMBExec implementation in Nim

Pure Nim score 15/100 · tests present · no docs generated

Summary

Latest Version 1.0.0
License GPL-3.0
CI Status Failing
Downloads 0
Last Indexed 2026-08-09 05:35

Authors

  • elddy, kevrool

Installation

nimble install SMBExec
choosenim install SMBExec
git clone https://github.com/elddy/SMB-Nim

OS Compatibility

Platform Linux macOS Windows FreeBSD OpenBSD NetBSD Android iOS WASM Embedded
SMBExec - - - - - - -

Dependencies

Package Version Optional
nim >= 1.2.0", "hashlib", "hmac", "regex No

Source

Repository https://github.com/elddy/SMB-Nim
Homepage https://github.com/elddy/SMB-Nim
Registry Source nimble_official

README

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