HabrJuly 21, 2026🇷🇺Translated from Russian

Advanced Windows Auditing Configuration Guide for Effective Incident Response in SOC Environments

When beginning work in a SOC (Security Operations Center), it quickly becomes clear that default Windows logging provides limited visibility into system activities. Events such as logons, process creation, and policy changes are either not recorded or appear in a heavily truncated form.

The service responsible for managing auditing is LSASS (Local Security Authority Subsystem Service), which runs at startup and resides in memory to handle user sessions, authentication requests, and protection of sensitive data. LSASS writes audit information to the Security event log according to configured policies.

Windows offers two auditing levels: basic auditing with nine categories configured via secpol.msc and advanced auditing with 53 subcategories managed through the auditpol utility. The article focuses on advanced auditing because it allows precise control, for example enabling only Logon and Special Logon without cluttering logs with irrelevant Kerberos or IPsec events on standalone machines.

Key Subcategories and Corresponding Event IDs

The most important subcategories for incident response include:

  • Logon – successful logons (Event ID 4624)
  • Logoff – session termination (Event IDs 4634, 4647)
  • Account Lockout – lockout events (Event ID 4740)
  • Special Logon – privilege escalation via runas (Event ID 4648)
  • User Account Management – account creation and deletion (Event IDs 4720, 4726)
  • Security Group Management – group membership changes (Event IDs 4732, 4728)
  • Process Creation – executable launches (Event ID 4688)
  • Audit Policy Change – modifications to auditing itself (Event ID 4719)
  • Other System Events – log clearing (Event ID 1102)

Each subcategory has a fixed GUID that can be used with auditpol when localized names cause issues.

Enabling Advanced Auditing and Additional Logging

After opening an elevated command prompt on a clean Windows 10 Pro 22H2 virtual machine running under VMware Workstation 17 Pro, the author enables a baseline set of subcategories using multiple auditpol commands. Verification is performed with auditpol /get /category:* to confirm success and failure auditing is active for each item.

PowerShell logging is enabled via registry modification under HKLM\SOFTWARE\Policies\Microsoft\Windows\PowerShell\ScriptBlockLogging, activating Script Block Logging that records decoded script content in the Microsoft-Windows-PowerShell/Operational log (Event IDs 4104 and 4103).

Command-line auditing for process creation events is activated by setting the registry value ProcessCreationIncludeCmdLine_Enabled under HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\Audit, ensuring the Command Line field in Event ID 4688 is populated.

Practical Testing of Configured Auditing

Five hands-on tests illustrate the value of the configuration. A successful interactive logon produces Event ID 4624 showing Logon Type 2, account name, workstation name, and the responsible process. Failed logon attempts generate Event ID 4625 with failure reason codes such as 0xC000006A for incorrect password.

Process creation with arguments is demonstrated by running whoami /all, resulting in a detailed Event ID 4688 that includes Creator Process ID, New Process ID, and the full command line. Account creation and administrative group membership changes produce Events 4720 and 4732, revealing subject and target account details along with group names.

The article emphasizes performing all changes on virtual machines to prevent excessive log growth or interference with installed applications on production hosts.

Related articles

HabrPolicy & Regulation

Alfa-Bank Balances Cloud Trust and Zero Trust Models During Migration to Yandex Cloud

Alfa-Bank's head of container and cloud security, Sasha Chertok, detailed how the bank migrated regulated workloads to Yandex Cloud while preserving existing Zero Trust controls. The organization mapped on-premises network segmentation, Active Directory authentication, and firewall policies directly onto Yandex Cloud resources using interconnect links secured with GOST encryption. Responsibility for managed services is shared under a Cloud Trust model, yet the bank retains oversight through Terraform-managed Security Groups, custom CSPM checks, and internal CI/CD gates. User access continues to authenticate via on-premises Active Directory and KeyCloak federations, while authorization leverages granular Yandex Cloud IAM roles. Logging and detection rely on a combination of Yandex Cloud Audit Trail, Cloud Logging, and the YCDR service to compensate for incomplete control-plane visibility. The resulting hybrid architecture now supports 1,500 virtual machines, 100 managed services, and 1,000 identities across multiple environments without disrupting established security processes.

HabrPolicy & Regulation

EnvSpec Naming Standard Introduces Strict Six-Environment Hierarchy for Zero Trust Infrastructure

The EnvSpec Naming 1.0.0 standard proposes replacing ad-hoc hostnames with a strict hierarchical naming system based on environment, perimeter, system, slot and node. It defines exactly six environments—dev, test, stage, prod, infrastructure and workplace—and treats any test or pilot system processing real data as prod. The model projects names into SPIFFE IDs, Kubernetes namespaces, cloud projects and mandatory tags for automated policy enforcement. Rules prohibit direct communication between different linear environments and require all access from workplace devices through dedicated gateways. The standard is published under CC BY-SA 4.0 and includes machine-checkable criteria for compliance.

AntiMalwarePolicy & Regulation

Russian Woman Fined 30,000 Rubles and Loses iPhone 11 for Posting AI-Generated Bear Photo

A resident of Duldurga village in Zabaykalsky Krai was fined 30,000 rubles under part 9 of article 13.15 of the Russian Code of Administrative Offenses for publishing an AI-generated image of a bear presented as authentic. The court also ordered confiscation of her iPhone 11 as the instrument of the administrative violation. The woman knew the photograph was fake before posting it, yet the image spread widely online and was even shared by a local Ministry of Natural Resources channel on 10 September. Local authorities used the case to warn residents that publishing neural-network-generated fake images carries real legal consequences. The incident highlights ongoing enforcement of Russian legislation against the distribution of knowingly false socially significant information under the guise of credible reports. Meanwhile, wildlife specialists continue to investigate separate reports of actual bears near populated areas in the region.

HabrPolicy & Regulation

Inserting Contracts into ChatGPT Risks Major Fines Under Russia's 152-FZ Personal Data Law

A detailed analysis examines the legal consequences of uploading contracts containing personal data into foreign AI services such as ChatGPT under Russian Federal Law 152-FZ. The article clarifies that even standard supply agreements include names, positions, passport details, INN numbers, phones and emails that qualify as personal data. It breaks down applicable administrative penalties from Article 13.11 of the Code of Administrative Offenses, including 150-300 thousand rubles for processing without a proper legal basis and separate fines for failing to notify Roskomnadzor. Cross-border transfer rules under Article 12 require a dedicated notification to the regulator before sending data to services hosted in the United States or European Union. The piece also reviews recent court practice, including a Moscow district court ruling that treated uploading commercial information to DeepSeek as disclosure of trade secrets. No criminal liability under Article 272.1 of the Criminal Code applies to ordinary business use, yet the absence of a data processing agreement with OpenAI or similar providers creates ongoing compliance exposure.