Invoke-SMBLogin - Empire Module
This page contains detailed information about how to use the powershell/situational_awareness/network/smblogin Empire module. For list of all Empire modules, visit the Empire Module Library.
Module Overview
Name: Invoke-SMBLogin
Module: powershell/situational_awareness/network/smblogin
Source code [1]: empire/server/modules/powershell/situational_awareness/network/smblogin.yaml
Source code [2]: empire/server/data/module_source/situational_awareness/network/Invoke-SMBLogin.ps1
MITRE ATT&CK:
T1135, T1187
Language: PowerShell
Needs admin: No
OPSEC safe: Yes
Background: No
The smblogin module validates username & password combination(s) across a host or group of hosts using the SMB protocol.
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 smblogin 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 smblogin module:
Agent
Agent to grab a screenshot from.
ComputerName
A single computer name (ip) or a list of comma separated computer names (ips).
Password
A single password or list of comma separated passwords.
UserName
A single username or a list of comma separated usernames.
Additional Module Options
This is a list of additional options that are supported by the smblogin module:
CredID
CredID from the store to use.
Domain
Domain to use. If not defined, local accounts will be used.
OutputFunction
PowerShell's output function to use ("Out-String", "ConvertTo-Json", "ConvertTo-Csv", "ConvertTo-Html", "ConvertTo-Xml").
Default value: Out-String
.
Suggested values: Out-String
, ConvertTo-Json
, ConvertTo-Csv
, ConvertTo-Html
, ConvertTo-Xml
.
Smblogin Example Usage
Here's an example of how to use the smblogin 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/smblogin
Author Mauricio Velazco (@mvelazco)
Background False
Comments Github:
https://github.com/mvelazc0/Invoke-SMBLogin
Description Validates username & password combination(s) across a host or group of
hosts using the SMB protocol.
Language powershell
Name powershell/situational_awareness/network/smblogin
NeedsAdmin False
OpsecSafe True
Techniques http://attack.mitre.org/techniques/T1135
http://attack.mitre.org/techniques/T1187
,Record Options--,------------,----------,-------------------------------------,
| Name | Value | Required | Description |
|----------------|------------|----------|-------------------------------------|
| Agent | | True | Agent to grab a screenshot from. |
|----------------|------------|----------|-------------------------------------|
| ComputerName | | True | A single computer name (ip) or a |
| | | | list of comma separated computer |
| | | | names (ips) |
|----------------|------------|----------|-------------------------------------|
| CredID | | False | CredID from the store to use. |
|----------------|------------|----------|-------------------------------------|
| Domain | | False | Domain to use. If not defined, |
| | | | local accounts will be used |
|----------------|------------|----------|-------------------------------------|
| OutputFunction | Out-String | False | PowerShell's output function to use |
| | | | ("Out-String", "ConvertTo-Json", |
| | | | "ConvertTo-Csv", "ConvertTo-Html", |
| | | | "ConvertTo-Xml"). |
|----------------|------------|----------|-------------------------------------|
| Password | | True | A single password or list of comma |
| | | | separated passwords |
|----------------|------------|----------|-------------------------------------|
| UserName | | True | A single username or a list of |
| | | | comma separated usernames |
'----------------'------------'----------'-------------------------------------'
(Empire: usemodule/powershell/situational_awareness/network/smblogin) > set Agent Y4LHEV83
[*] Set Agent to Y4LHEV83
(Empire: usemodule/powershell/situational_awareness/network/smblogin) > set ComputerName dbserver-01
[*] Set ComputerName to dbserver-01
(Empire: usemodule/powershell/situational_awareness/network/smblogin) > set Password Password123
[*] Set Password to Password123
(Empire: usemodule/powershell/situational_awareness/network/smblogin) > set UserName user
[*] Set UserName to user
(Empire: usemodule/powershell/situational_awareness/network/smblogin) > execute
[*] Tasked Y4LHEV83 to run Task 1
...
Now wait for the results to come.
Author
- Mauricio Velazco (@mvelazco)
References
- https://github.com/BC-SECURITY/Empire/tree/master/empire/server/modules/powershell/situational_awareness/network/smblogin.yaml
- https://github.com/BC-SECURITY/Empire/tree/master/empire/server/data/module_source/situational_awareness/network/Invoke-SMBLogin.ps1
- https://github.com/mvelazc0/Invoke-SMBLogin
- http://attack.mitre.org/techniques/T1135
- http://attack.mitre.org/techniques/T1187
See Also
Check also the following modules related to this module:
- powershell/situational_awareness/network/bloodhound3
- powershell/situational_awareness/network/arpscan
- powershell/situational_awareness/network/reverse_dns
- powershell/situational_awareness/network/get_sql_server_info
- powershell/situational_awareness/network/smbscanner
- powershell/situational_awareness/network/bloodhound
- powershell/situational_awareness/network/get_kerberos_service_ticket
- powershell/situational_awareness/network/portscan
- powershell/situational_awareness/network/get_sql_instance_domain
- powershell/situational_awareness/network/smbautobrute
- powershell/situational_awareness/network/get_spn
Version
This page has been created based on Empire version 4.1.3 (BC Security Fork).
Visit Empire Module Library for more modules.