Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Path: blob/master/documentation/modules/auxiliary/admin/sccm/get_naa_credentials.md
Views: 18093
NAA Credential Exploitation
The NAA account is used by some SCCM configurations in the policy deployment process. It does not require many privileges, but in practice is often misconfigured to have excessive privileges.
The account can be retrieved in various ways, many requiring local administrative privileges on an existing host. However, it can also be requested by an existing computer account, which by default most user accounts are able to create.
Module usage
The admin/dcerpc/samr_computer
module is generally used to first create a computer account, which requires no permissions:
From msfconsole
Do:
use auxiliary/admin/dcerpc/samr_account
Set the
RHOSTS
,SMBUser
andSMBPass
options a. For theADD_COMPUTER
action, if you don't specifyACCOUNT_NAME
orACCOUNT_PASSWORD
- one will be generated automatically b. For theDELETE_ACCOUNT
action, set theACCOUNT_NAME
option c. For theLOOKUP_ACCOUNT
action, set theACCOUNT_NAME
optionRun the module and see that a new machine account was added
Then the auxiliary/admin/sccm/get_naa_credentials
module can be used:
use auxiliary/admin/sccm/get_naa_credentials
Set the
RHOST
value to a target domain controller (if LDAP autodiscovery is used)Set the
USERNAME
andPASSWORD
information to a domain accountSet the
COMPUTER_USER
andCOMPUTER_PASSWORD
to the values obtained through thesamr_computer
moduleRun the module to obtain the NAA credentials, if present.
Alternatively, if the Management Point and Site Code are known, the module can be used without autodiscovery:
use auxiliary/admin/sccm/get_naa_credentials
Set the
COMPUTER_USER
andCOMPUTER_PASSWORD
to the values obtained through thesamr_computer
moduleSet the
MANAGEMENT_POINT
andSITE_CODE
to the known values.Run the module to obtain the NAA credentials, if present.
The management point and site code can be retrieved using the auxiliary/gather/ldap_query
module, using the ENUM_SCCM_MANAGEMENT_POINTS
action.
See the Scenarios for a more detailed walk through
Options
RHOST, USERNAME, PASSWORD, DOMAIN, SESSION, RHOST
Options used to authenticate to the Domain Controller's LDAP service for SCCM autodiscovery.
COMPUTER_USER, COMPUTER_PASSWORD
Credentials for a computer account (may be created with the samr_account
module). If you've retrieved the NTLM hash of a computer account, you can use that for COMPUTER_PASSWORD.
MANAGEMENT_POINT
The SCCM server.
SITE_CODE
The Site Code of the management point.
Scenarios
In the following example the user ssccm.lab\eve
is a low-privilege user.
Creating computer account
Running with Autodiscovery
Using the credentials just obtained with the samr_account
module.