*Cube-Host– full cloud services!!

Using Windows Audit Policy Activation

Using Windows Audit Policy Activation

Turn Windows logs into real security visibility

On a production server, “security” without evidence is just a guess. Proper Windows auditing gives you answers to practical questions: who logged in, what was changed, which process started, and whether someone tried to brute-force RDP.

If you run workloads on a Windows VPS, enabling audit policy is one of the fastest ways to improve incident response and meet compliance requirements. On VPS hosting, it also helps you troubleshoot issues faster because you can correlate “what happened” with “when it happened”.

What Windows Audit Policy actually does

Audit Policy defines which security-relevant actions are written to the Security event log. This is your primary timeline for:

  • successful and failed sign-ins (local, RDP, service logons),
  • privileged actions (admin rights, policy changes),
  • account and group changes (new users, added admins),
  • process creation (what executed on the server),
  • object access (files/registry) — when you explicitly enable auditing on the target objects.

Before you enable everything: avoid log overload

A common mistake is turning on every audit category and then losing the signal in noise. For VPS environments, a better approach is:

  • Enable a baseline that covers authentication and admin activity first.
  • Enable object access only for critical folders/keys (otherwise it can explode log volume).
  • Increase Security log size and export/forward logs regularly.

Step 1: Check current audit configuration

Run as Administrator:

auditpol /get /category:*

If you manage the server via GPO, remember that domain policies can override local settings. On standalone VPS, local settings are usually enough.

Step 2: Prefer Advanced Audit Policy (granular subcategories)

Modern Windows uses Advanced Audit Policy (dozens of subcategories). To avoid conflicts between “legacy categories” and subcategories, enable the policy:

  • Local Security Policy → Security Settings → Local Policies → Security Options
  • Audit: Force audit policy subcategory settings … → Enabled

Optional (standalone servers): you can also enforce this via registry (run as Administrator) and reboot:

reg add "HKLM\SYSTEM\CurrentControlSet\Control\Lsa" /v SCENoApplyLegacyAuditPolicy /t REG_DWORD /d 1 /f

Step 3: Enable a practical VPS baseline (recommended)

The following settings give strong coverage for security and troubleshooting without flooding the logs. Run these commands as Administrator:

:: Logon events (RDP/interactive/service)
auditpol /set /subcategory:"Logon" /success:enable /failure:enable
auditpol /set /subcategory:"Logoff" /success:enable /failure:enable
auditpol /set /subcategory:"Special Logon" /success:enable /failure:disable

:: Account logon (Kerberos/NTLM where applicable)
auditpol /set /subcategory:"Credential Validation" /success:enable /failure:enable

:: Account management (users/groups)
auditpol /set /subcategory:"User Account Management" /success:enable /failure:enable
auditpol /set /subcategory:"Security Group Management" /success:enable /failure:enable

:: Policy changes and privilege usage
auditpol /set /subcategory:"Audit Policy Change" /success:enable /failure:enable
auditpol /set /subcategory:"Authorization Policy Change" /success:enable /failure:enable
auditpol /set /subcategory:"Sensitive Privilege Use" /success:enable /failure:enable

:: Process creation (great for incident response)
auditpol /set /subcategory:"Process Creation" /success:enable /failure:disable

Note: “Object Access” events (files/registry) require two things: (1) enabling the audit subcategory and (2) setting SACL auditing on the actual folder/key. Without SACL, you may see almost nothing even if “Object Access” is enabled.

Optional: audit a specific “sensitive” folder (files)

First, enable file system auditing:

auditpol /set /subcategory:"File System" /success:enable /failure:enable

Then configure auditing (SACL) on the folder:

  • Right-click folder → Properties → Security → Advanced → Auditing → Add
  • Select principal (e.g., Everyone or a specific group), then choose the events (Read/Write/Delete)

This is the correct way to keep logs meaningful: audit only what matters.

Where to look: the most useful Security Event IDs

  • 4624 — successful logon
  • 4625 — failed logon (bruteforce, wrong password, invalid user)
  • 4672 — special privileges assigned to new logon (admin-like)
  • 4688 — process creation (what executed)
  • 4720 / 4726 — user created / deleted
  • 4728 / 4729 — member added/removed from a security-enabled global group
  • 4719 — audit policy changed
  • 1102 — Security log was cleared (high priority)

Quick queries with PowerShell (real-world troubleshooting)

Show failed logons for the last 24 hours:

$since = (Get-Date).AddDays(-1)
Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4625; StartTime=$since} |
  Select-Object TimeCreated, Id, Message |
  Select-Object -First 30

Show process creation events (if enabled) and search for a suspicious executable name:

$since = (Get-Date).AddHours(-6)
Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4688; StartTime=$since} |
  Where-Object { $_.Message -match 'powershell|cmd\.exe|wscript|rundll32' } |
  Select-Object TimeCreated, Message |
  Select-Object -First 20

Log retention: increase size and export regularly

On internet-facing servers, keeping logs for longer is critical. Increase Security log maximum size (example: 256 MB):

wevtutil sl Security /ms:268435456

Export Security log for archiving or incident response:

mkdir C:\Logs 2>nul
wevtutil epl Security C:\Logs\Security_$(Get-Date -Format yyyyMMdd_HHmm).evtx

Final checklist for Windows VPS auditing

  • Baseline subcategories enabled (Logon, Account Management, Policy Change, Process Creation).
  • Security log size increased; exports/forwarding configured.
  • Object access auditing only on critical folders/registry keys (SACL configured).
  • Time sync is correct (logs are useless if timestamps drift).

If you need a predictable environment for these security baselines, start with a managed Windows VPS and keep your access surface controlled via VPS hosting firewall rules and strong authentication.

Prev
Menu