Module 3 · Linux and Windows Administration · Lesson 8 of 75
Windows administration for security
Accounts, UAC, NTFS permissions, the registry, services, Event Viewer IDs every analyst knows, and PowerShell for admins.
In this lesson · about 40 minutes
- Explain local versus domain accounts and what UAC does
- Find persistence locations in the registry and services
- Use the key Windows security event IDs and basic PowerShell
Accounts and UAC
- Local accounts live on one PC. Domain accounts live in Active Directory and work on every PC in the company.
- Built-in high-value accounts: the local Administrator, the SYSTEM account (more powerful than Administrator; services often run as it), and in a domain, members of Domain Admins.
- User Account Control (UAC): even an admin works with a normal-strength token, and a prompt appears before anything needs full rights. It stops silent changes, but is not a security boundary against a determined attacker.
- Commands:
whoami /all(your groups and privileges),net user,net localgroup administrators.
NTFS permissions and shares
Windows uses access control lists (ACLs): each file or folder has a list of who may Read, Write, Modify or have Full control. Network shares have their own share permissions on top; the stricter of the two wins. Check with icacls C:\Finance. "Everyone: Full control" on a share is a classic finding.
The registry
A huge database of settings, organised in hives such as HKEY_LOCAL_MACHINE (HKLM, the whole machine) and HKEY_CURRENT_USER (HKCU, the logged-in user). Persistence keys to check first:
HKLM\Software\Microsoft\Windows\CurrentVersion\Runand...\RunOnceHKCU\Software\Microsoft\Windows\CurrentVersion\RunHKLM\System\CurrentControlSet\Services(every service)
Other persistence spots: the Startup folder, scheduled tasks (schtasks /query /fo LIST /v) and WMI subscriptions. Microsoft's free Autoruns tool lists them all in one window.
Event logs and the IDs to know
Event Viewer (eventvwr.msc) holds the Security, System and Application logs, plus PowerShell and Sysmon logs if enabled.
| ID | Meaning | Why it matters |
|---|---|---|
| 4624 | Successful logon | Logon type 2 = at the keyboard, 3 = over the network, 10 = Remote Desktop |
| 4625 | Failed logon | Many in a row = password guessing |
| 4672 | Special privileges assigned | An admin-level logon |
| 4688 | New process created | What ran, and its parent (enable command-line logging) |
| 4720 / 4732 | User created / added to a local group | Attackers create accounts and add them to Administrators |
| 4740 | Account locked out | Brute force, or a user with an old password on their phone |
| 7045 | New service installed (System log) | A classic sign of remote-execution tools and malware |
| 1102 | Security log cleared | Almost always suspicious: someone covering tracks |
| 4104 | PowerShell script block logged | Shows the actual script that ran, even if it was obfuscated |
PowerShell
PowerShell is Windows' powerful shell. Commands are Verb-Noun and output objects, not text, so you can filter and sort them:
Get-Process | Sort-Object CPU -Descending | Select-Object -First 5Get-Service | Where-Object Status -eq 'Running'Get-LocalUser,Get-LocalGroupMember AdministratorsGet-WinEvent -FilterHashtable @{LogName='Security'; Id=4625} -MaxEvents 20Get-NetTCPConnection -State Listen(the Windows cousin ofss -tuln)
Attackers love PowerShell too ("living off the land"), which is why defenders turn on script-block logging and constrained language mode.
Hands-on lab (simulated terminal)
Lab: check a Windows workstation with PowerShell
A user reports their PC "feels strange". You open an administrator PowerShell window on WS-ACCT-07 in your lab domain. Output is simulated.
Step 1 of 5. Type each command and press Enter. Nothing runs on your computer.
1. Show who you are and your group memberships.
Sorting drill
Normal or suspicious?
You are reviewing a Windows machine. Sort each finding.
- Event 4624 logon type 2 for the user at 9:02 on a Monday
- Event 1102: the Security log was cleared
- OneDrive in the Run key
- Event 7045: service 'xQ7pd' installed from C:\Windows\Temp
- 300 event 4625 failures for 'administrator' in 5 minutes
- svchost.exe running from C:\Windows\System32
0 of 6 sorted
Check your understanding0 of 4 correct
Quiz score: 0 of 4
Written by Noviq Academy in its own words. All labs are simulations: no real systems are touched, and every name, address, password and hash is made up. The offensive techniques taught here are for defending systems and for authorised testing only; never scan, access or test a system without the owner's written permission. Tool and product names belong to their owners, and command output may differ slightly from yours. Read-aloud uses your device's built-in voices.