Windows EventLog Persistence? The Windows can help us
Where
Ground Floor
BSides Las Vegas
Duration
32 min
Shows red team bypasses of PowerShell constrained language mode and shellcode hidden in a Windows event log for persistence.
Summary
The talk walks through three stages of a Windows red team operation: getting past restrictions, escalating privileges, and staying on the host. The speaker starts with PowerShell Constrained Language Mode, which limits what scripts can do, and shows that enabling it through an AppLocker rule or a registry setting still leaves a way around it. Running code through a custom runspace, built from a C# helper, is presented as the route past the restriction.
The second stage is privilege escalation. Recon finds an elevated installer configuration, and the speaker builds a malicious MSI from a WiX XML source that opens a new PowerShell session as a local administrator. The third stage is persistence. A new Application event log is created, with shellcode stored in hex inside its event data. A loader reads that data back and runs it through standard Windows APIs, and a scheduled task re-launches the loader on a short interval to keep a command channel open. In the live demo the chain produced an administrator session while Microsoft Defender was still enabled.
For practitioners, the main point is that these techniques chain legitimate Windows features, which makes them harder to spot. Defenders can look for newly created event logs, unusually large binary blobs in event records, scheduled tasks that launch loaders, and changes to AppLocker or constrained mode settings. During Q&A, the speaker was asked about event logs being overwritten once full; the answer was that a differently named log can be created to hold another payload.
Related talks
Adversary Village·23 min
Nikos Vourdas
Shows how disabled and deleted Active Directory objects keep dangerous permissions and recoverable data, with open-source tools to find and abuse them.
Main Stage·42 min
Steven Flores
Shows how to install custom WMI providers on a remote Windows host over DCOM and run post-exploitation tasks inside WMIPrvSE without dropping files via SMB or WinRM.
Main Stage·45 min
Nick Powers
Shows how Windows app packaging features like MSIX, AppContainers and package capabilities can be abused for initial access, lateral movement and SYSTEM privilege escalation.


