Invoke-SMBAutoBrute - Empire Module


This page contains detailed information about how to use the powershell/situational_awareness/network/smbautobrute Empire module. For list of all Empire modules, visit the Empire Module Library.

Module Overview


Name: Invoke-SMBAutoBrute
Module: powershell/situational_awareness/network/smbautobrute
Source code [1]: empire/server/modules/powershell/situational_awareness/network/smbautobrute.yaml
Source code [2]: empire/server/data/module_source/situational_awareness/network/Invoke-SMBAutoBrute.ps1
MITRE ATT&CK: T1135, T1187
Language: PowerShell
Needs admin: No
OPSEC safe: No
Background: Yes

The smbautobrute module runs an SMB brute against a list of usernames/passwords. Will check the DCs to interrogate the bad password count of the users and will keep bruting until either a valid credential is discoverd or the bad password count reaches one below the threshold. Run "shell net accounts" on a valid agent to determine the lockout threshold. VERY noisy! Generates a ton of traffic on the DCs.

This module runs in a foreground and is OPSEC unsafe as it writes on the disk and therefore could be detected by AV/EDR running on the target system.

Note that the smbautobrute module does not need administrative privileges to work properly which means that a normal user can run this module.

Required Module Options


This is a list of options that are required by the smbautobrute module:

Agent
Agent to run smbautobrute from.

LockoutThreshold
The max number of bad password attempts until the account locks. Autobrute will try till one less than this setting.

PasswordList
Comma separated list of passwords to test. Wrap in double quotes.

Additional Module Options


This is a list of additional options that are supported by the smbautobrute module:

Delay
Amount of time to wait (in milliseconds) between attempts. Default 100.

ShowVerbose
Show failed attempts & skipped accounts in addition to success.

StopOnSuccess
Quit running after the first successful authentication.

UserList
File of users to brute (on the target), one per line. If not specified, autobrute will query a list of users with badpwdcount < LockoutThreshold - 1 for each password brute. Wrap path in double quotes.

Smbautobrute Example Usage


Here's an example of how to use the smbautobrute module in the Empire client console:

[+] New agent Y4LHEV83 checked in
[*] Sending agent (stage 2) to Y4LHEV83 at 192.168.204.135
(empire usestager/windows/ducky) > usemodule powershell/situational_awareness/network/smbautobrute

 Author       @curi0usJack                                                         
 Background   True                                                                 
 Description  Runs an SMB brute against a list of usernames/passwords. Will check  
              the DCs to interrogate the bad password count of the users and will  
              keep bruting until either a valid credential is discoverd or the bad 
              password count reaches one below the threshold. Run "shell net       
              accounts" on a valid agent to determine the lockout threshold. VERY  
              noisy! Generates a ton of traffic on the DCs.                        
 Language     powershell                                                           
 Name         powershell/situational_awareness/network/smbautobrute                
 NeedsAdmin   False                                                                
 OpsecSafe    False                                                                
 Techniques   http://attack.mitre.org/techniques/T1135                             
              http://attack.mitre.org/techniques/T1187                             


,Record Options----,-------,----------,-------------------------------------,
| Name             | Value | Required | Description                         |
|------------------|-------|----------|-------------------------------------|
| Agent            |       | True     | Agent to run smbautobrute from.     |
|------------------|-------|----------|-------------------------------------|
| Delay            |       | False    | Amount of time to wait (in          |
|                  |       |          | milliseconds) between attempts.     |
|                  |       |          | Default 100.                        |
|------------------|-------|----------|-------------------------------------|
| LockoutThreshold |       | True     | The max number of bad password      |
|                  |       |          | attempts until the account locks.   |
|                  |       |          | Autobrute will try till one less    |
|                  |       |          | than this setting.                  |
|------------------|-------|----------|-------------------------------------|
| PasswordList     |       | True     | Comma separated list of passwords   |
|                  |       |          | to test. Wrap in double quotes.     |
|------------------|-------|----------|-------------------------------------|
| ShowVerbose      |       | False    | Show failed attempts & skipped      |
|                  |       |          | accounts in addition to success.    |
|------------------|-------|----------|-------------------------------------|
| StopOnSuccess    |       | False    | Quit running after the first        |
|                  |       |          | successful authentication.          |
|------------------|-------|----------|-------------------------------------|
| UserList         |       | False    | File of users to brute (on the      |
|                  |       |          | target), one per line. If not       |
|                  |       |          | specified, autobrute will query a   |
|                  |       |          | list of users with badpwdcount <    |
|                  |       |          | LockoutThreshold - 1 for each       |
|                  |       |          | password brute. Wrap path in double |
|                  |       |          | quotes.                             |
'------------------'-------'----------'-------------------------------------'

(Empire: usemodule/powershell/situational_awareness/network/smbautobrute) > set Agent Y4LHEV83
[*] Set Agent to Y4LHEV83
(Empire: usemodule/powershell/situational_awareness/network/smbautobrute) > set LockoutThreshold value
[*] Set LockoutThreshold to value
(Empire: usemodule/powershell/situational_awareness/network/smbautobrute) > set PasswordList value
[*] Set PasswordList to value
(Empire: usemodule/powershell/situational_awareness/network/smbautobrute) > execute
[*] Tasked Y4LHEV83 to run Task 1
...

Now wait for the results to come.

Author


References


See Also


Check also the following modules related to this module:

Version


This page has been created based on Empire version 4.1.3 (BC Security Fork).
Visit Empire Module Library for more modules.