PrivescCheck - Empire Module
This page contains detailed information about how to use the powershell/privesc/privesccheck Empire module. For list of all Empire modules, visit the Empire Module Library.
Module Overview
Name: PrivescCheck
Module: powershell/privesc/privesccheck
Source code [1]: empire/server/modules/powershell/privesc/privesccheck.yaml
Source code [2]: empire/server/data/module_source/privesc/PrivescCheck.ps1
MITRE ATT&CK:
T1046
Language: PowerShell
Needs admin: No
OPSEC safe: Yes
Background: Yes
The privesccheck module finds Windows local privilege escalation vulnerabilities.
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 privesccheck 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 privesccheck module:
Agent
Agent to run module on.
Extended
Set this flag to enable extended checks.
Default value: False
.
Format
Select the format of the output file (e.g.: TXT, HTML or CSV).
Default value: TXT
.
Additional Module Options
This is a list of additional options that are supported by the privesccheck module:
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
.
Privesccheck Example Usage
Here's an example of how to use the privesccheck 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/privesc/privesccheck
Author @itm4n
Background True
Comments https://github.com/itm4n/PrivescCheck
Description Find Windows local privilege escalation vulnerabilities.
Language powershell
Name powershell/privesc/privesccheck
NeedsAdmin False
OpsecSafe True
Techniques http://attack.mitre.org/techniques/T1046
,Record Options--,------------,----------,-------------------------------------,
| Name | Value | Required | Description |
|----------------|------------|----------|-------------------------------------|
| Agent | | True | Agent to run module on. |
|----------------|------------|----------|-------------------------------------|
| Extended | False | True | Set this flag to enable extended |
| | | | checks. |
|----------------|------------|----------|-------------------------------------|
| Format | TXT | True | Select the format of the output |
| | | | file (e.g.: TXT, HTML or CSV). |
|----------------|------------|----------|-------------------------------------|
| OutputFunction | Out-String | False | PowerShell's output function to use |
| | | | ("Out-String", "ConvertTo-Json", |
| | | | "ConvertTo-Csv", "ConvertTo-Html", |
| | | | "ConvertTo-Xml"). |
'----------------'------------'----------'-------------------------------------'
(Empire: usemodule/powershell/privesc/privesccheck) > set Agent Y4LHEV83
[*] Set Agent to Y4LHEV83
(Empire: usemodule/powershell/privesc/privesccheck) > set Extended False
[*] Set Extended to False
(Empire: usemodule/powershell/privesc/privesccheck) > set Format TXT
[*] Set Format to TXT
(Empire: usemodule/powershell/privesc/privesccheck) > execute
[*] Tasked Y4LHEV83 to run Task 1
...
Now wait for the results to come.
Author
References
- https://github.com/BC-SECURITY/Empire/tree/master/empire/server/modules/powershell/privesc/privesccheck.yaml
- https://github.com/BC-SECURITY/Empire/tree/master/empire/server/data/module_source/privesc/PrivescCheck.ps1
- https://github.com/itm4n/PrivescCheck
- http://attack.mitre.org/techniques/T1046
- https://docs.microsoft.com/en-us/windows/win32/secauthz/privilege-constants
- http://stackoverflow.com/questions/28029872/retrieving-security-descriptor-and-getting-number-for-filesystemrights
- https://rohnspowershellblog.wordpress.com/2013/03/19/viewing-service-acls/
- https://github.com/xcat2/xcat-core/blob/master/xCAT-server/share/xcat/netboot/windows/detectefi.cpp
- https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-getfirmwareenvironmentvariablea
- https://github.com/ChrisWarwick/GetUEFI/blob/master/GetFirmwareBIOSorUEFI.psm1
- https://docs.microsoft.com/en-us/windows/security/identity-protection/credential-guard/credential-guard-manage
- https://docs.microsoft.com/en-us/windows-server/security/credentials-protection-and-management/configuring-additional-lsa-protection
- https://docs.microsoft.com/en-us/windows-hardware/customize/desktop/unattend/microsoft-windows-lua-settings-enablelua
- http://acme-upd01.corp.internal.com:8535
- https://book.hacktricks.xyz/windows/windows-local-privilege-escalation#wsus
- https://github.com/pimps/wsuxploit
- http://*
- https://support.microsoft.com/en-us/help/832017/service-overview-and-network-port-requirements-for-windows
- https://techthoughts.info/windows-version-numbers/
- https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/11972272-09ec-4a42-bf5e-3e99b321cf55
- https://github.com/PwnDexter/Invoke-EDRChecker
- https://support.microsoft.com/en-us/help/243330/well-known-security-identifiers-in-windows-operating-systems
- https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-dtyp/81d92bba-d22b-4a8c-908a-554ab29148ab
- https://support.microsoft.com/en-us/help/324737/how-to-turn-on-automatic-logon-in-windows
- https://github.com/
- https://docs.microsoft.com/en-us/windows/win32/api/wincred/nf-wincred-credenumeratew
- https://github.com/gentilkiwi/mimikatz/wiki/howto-~-credential-manager-saved-credentials
- https://github.com/gentilkiwi/mimikatz/blob/master/mimikatz/modules/kuhl_m_vault.c
- https://github.com/EmpireProject/Empire/blob/master/data/module_source/credentials/Get-VaultCredential.ps1
- https://github.com/PowerShellMafia/PowerSploit/blob/master/Privesc/PowerUp.ps1
- https://adsecurity.org/?p=2288
- https://docs.microsoft.com/en-us/security-updates/securitybulletins/2014/ms14-025
- https://support.microsoft.com/en-us/help/2962486/ms14-025-vulnerability-in-group-policy-preferences-could-allow-elevati
- https://www.reddit.com/r/hacking/comments/b0lr05/a_few_binary_plating_0days_for_windows/?utm_source=amp&utm_medium=&utm_content=post_title
- http://LHOST:LPORT/P
See Also
Check also the following modules related to this module:
- powershell/privesc/bypassuac
- powershell/privesc/bypassuac_env
- powershell/privesc/bypassuac_tokenmanipulation
- powershell/privesc/winPEAS
- powershell/privesc/sweetpotato
- powershell/privesc/tater
- powershell/privesc/ms16-135
- powershell/privesc/ask
- powershell/privesc/bypassuac_wscript
- powershell/privesc/mcafee_sitelist
- powershell/privesc/sherlock
- powershell/privesc/ms16-032
- powershell/privesc/bypassuac_eventvwr
- powershell/privesc/zerologon
- powershell/privesc/printdemon
- powershell/privesc/getsystem
- powershell/privesc/gpp
- powershell/privesc/bypassuac_sdctlbypass
- powershell/privesc/watson
- powershell/privesc/bypassuac_fodhelper
- powershell/privesc/printnightmare
- powershell/privesc/powerup/service_exe_useradd
- powershell/privesc/powerup/write_dllhijacker
- powershell/privesc/powerup/service_stager
- powershell/privesc/powerup/service_exe_restore
- powershell/privesc/powerup/service_exe_stager
- powershell/privesc/powerup/find_dllhijack
- powershell/privesc/powerup/service_useradd
- powershell/privesc/powerup/allchecks
Version
This page has been created based on Empire version 4.1.3 (BC Security Fork).
Visit Empire Module Library for more modules.