You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### Identify and Take Over "Password must change at next logon" Accounts (SAMR)
107
+
108
+
A low-noise technique is to spray a benign/empty password and catch accounts returning STATUS_PASSWORD_MUST_CHANGE, which indicates the password was forcibly expired and can be changed without knowing the old one.
109
+
110
+
Workflow:
111
+
- Enumerate users (RID brute via SAMR) to build the target list:
The CIFS service is highlighted as a common target for accessing the victim's file system, but other services like HOST and RPCSS can also be exploited for tasks and WMI queries.
45
45
46
+
### Example: MSSQL service (MSSQLSvc) + Potato to SYSTEM
47
+
48
+
If you have the NTLM hash (or AES key) of a SQL service account (e.g., sqlsvc) you can forge a TGS for the MSSQL SPN and impersonate any user to the SQL service. From there, enable xp_cmdshell to execute commands as the SQL service account. If that token has SeImpersonatePrivilege, chain a Potato to elevate to SYSTEM.
49
+
50
+
```bash
51
+
# Forge a silver ticket for MSSQLSvc (RC4/NTLM example)
Copy file name to clipboardExpand all lines: src/windows-hardening/authentication-credentials-uac-and-efs/README.md
+47Lines changed: 47 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -169,6 +169,47 @@ You can read this password with [**GMSAPasswordReader**](https://github.com/rvaz
169
169
170
170
Also, check this [web page](https://cube0x0.github.io/Relaying-for-gMSA/) about how to perform a **NTLM relay attack** to **read** the **password** of **gMSA**.
3) Read the gMSA managed password via LDAP and derive the NTLM hash. NetExec automates the extraction of `msDS-ManagedPassword` and conversion to NTLM:
191
+
192
+
```bash
193
+
# Shows PrincipalsAllowedToReadPassword and computes NTLM automatically
4) Authenticate as the gMSA using the NTLM hash (no plaintext needed). If the account is in Remote Management Users, WinRM will work directly:
199
+
200
+
```bash
201
+
# SMB / WinRM as the gMSA using the NT hash
202
+
netexec smb <DC.FQDN> -u 'mgtsvc$' -H <NTLM>
203
+
netexec winrm <DC.FQDN> -u 'mgtsvc$' -H <NTLM>
204
+
```
205
+
206
+
Notes:
207
+
- LDAP reads of `msDS-ManagedPassword` require sealing (e.g., LDAPS/sign+seal). Tools handle this automatically.
208
+
- gMSAs are often granted local rights like WinRM; validate group membership (e.g., Remote Management Users) to plan lateral movement.
209
+
- If you only need the blob to compute the NTLM yourself, see MSDS-MANAGEDPASSWORD_BLOB structure.
210
+
211
+
212
+
172
213
## LAPS
173
214
174
215
The **Local Administrator Password Solution (LAPS)**, available fordownload from [Microsoft](https://www.microsoft.com/en-us/download/details.aspx?id=46899), enables the management of local Administrator passwords. These passwords, which are **randomized**, unique, and **regularly changed**, are stored centrallyin Active Directory. Access to these passwords is restricted through ACLs to authorized users. With sufficient permissions granted, the ability to readlocal admin passwords is provided.
@@ -269,4 +310,10 @@ The SSPI will be in charge of finding the adequate protocol for two machines tha
269
310
uac-user-account-control.md
270
311
{{#endref}}
271
312
313
+
## References
314
+
315
+
- [Relaying for gMSA – cube0x0](https://cube0x0.github.io/Relaying-for-gMSA/)
0 commit comments