Tag Archives: process

WLS 3.7 Released!

WLS 3.7 is here! The latest version of vendor-agnostic Windows event log forwarding with process creation metadata and user defined contextual information, now with RemoteConfiguration for dynamic install-time and post-install settings management.

CertificateMonitor

  • TPM SRKPUB information reported if available
  • TPM information reported for EKCERT and EKNVCERT when TPM is selected as a store location to report. EKCERT may be overwritten and/or contain multiple certificates as configured by the organization/user. EKNVCERT should reflect the TPM provided certificate.  Examples:

2021-07-20T08:27:08-05:00 host WLS_CertificateMonitor: LogType=”WLS”, Archived=”False”, ChangeType=”Initial”, Critical=”1,2,3″, EnhancedKeyUsages=”Endorsement Key Certificate”, ExtensionCount=”9″, Extensions=”Authority Information Access,Key Usage,Subject Alternative Name,Basic Constraints,CRL Distribution Points,Certificate Policies,Authority Key Identifier,Enhanced Key Usage,Subject Directory Attributes”, HasPrivateKey=”False”, Issuer=”CN=Infineon OPTIGA(TM) TPM 2.0 RSA CA 042, OU=OPTIGA(TM), O=Infineon Technologies AG, C=DE”, KeyAlgorithm=”RSA”, KeyUsages=”KeyEncipherment”, NotAfter=”12/30/2034 7:05:45 AM”, NotBefore=”12/30/2019 7:05:45 AM”, PublicKeySize=”2048″, SerialNumber=”5FF96D85″, SHA1=”0D8C16C554A825CBEF8B880A4216851F0577724F”, SignatureAlgorithm=”sha256RSA”, StoreLocation=”TPM”, StoreName=”EKNVCERT“, Subject=”TPMVersion=id:0755, TPMModel=SLB 9670 TPM2.0, TPMManufacturer=id:49465800″, SubjectAlternativeName=”Directory Address:TPMVersion=id:0755, TPMModel=SLB 9670 TPM2.0, TPMManufacturer=id:49465800″, User=”Local Computer”, Version=”3″, WLSKey=”1079″

2021-07-20T08:27:07-05:00 host WLS_CertificateMonitor: LogType=”WLS”, Archived=”False”, ChangeType=”Initial”, Critical=”1,2,3″, EnhancedKeyUsages=”Endorsement Key Certificate”, ExtensionCount=”9″, Extensions=”Authority Information Access,Key Usage,Subject Alternative Name,Basic Constraints,CRL Distribution Points,Certificate Policies,Authority Key Identifier,Enhanced Key Usage,Subject Directory Attributes”, HasPrivateKey=”False”, Issuer=”CN=Infineon OPTIGA(TM) TPM 2.0 RSA CA 042, OU=OPTIGA(TM), O=Infineon Technologies AG, C=DE”, KeyAlgorithm=”RSA”, KeyUsages=”KeyEncipherment”, NewHash=”True”, NotAfter=”12/30/2034 7:05:45 AM”, NotBefore=”12/30/2019 7:05:45 AM”, PublicKeySize=”2048″, SerialNumber=”5FF96D85″, SHA1=”0D8C16C554A825CBEF8B880A4216851F0577724F”, SignatureAlgorithm=”sha256RSA”, StoreLocation=”TPM”, StoreName=”EKCERT“, Subject=”TPMVersion=id:0755, TPMModel=SLB 9670 TPM2.0, TPMManufacturer=id:49465800″, SubjectAlternativeName=”Directory Address:TPMVersion=id:0755, TPMModel=SLB 9670 TPM2.0, TPMManufacturer=id:49465800″, User=”Local Computer”, Version=”3″, WLSKey=”612″

CommandMonitor

  • Supports Windows 10 14393 and later

Database

  • Optional in-memory only log caching – intended reduce disk usage on temporal systems such as non-persistent VDI

FileMetadata enhancements

Logging

  • CPU affinity will be used to restrict the processors available to WLS when CPUAffinity or CPULimitCores is set
  • Improved filter performance and added more options. WLS App for Splunk includes Filter Data dashboard
    • FilterData
  • Event descriptions can be reported periodically (LogEventDescriptionInterval). WLS App for Splunk includes a scheduled search, lookup, and macro to build unique event descriptions and return them at search time.
  • Process “tree” information can be reported. WLS App for Splunk contains dashboards for filtering and analysis.
    • ProcessTree
  • Process ID fields present in logs can be resolved to a process name and reported as [ProcessIDField]Name

LogFormats

  • HMAC can be added to logs for later integrity verification. Secret key is encrypted after being set. WLS App for Splunk includes setup and macro for verification.

LogRouting

  • Logs can be output to a text file at a user defined destination
    • This can be the primary output, or a parallel output to other destinations

NamedPipeMonitor

  • Enhanced filtering options
  • Improved filtering performance

Print Monitor – New!

  • Log print jobs processed through the local print spooler

Process / MonitorFilter

  • Monitors that are triggered by process creation/termination can be tuned to reduce resource utilization caused by frequent, expected processes

RemoteConfiguration – New!

  • WLS settings can be read from a file or web URL
    • Remote URL can be set at installation, no predefined configuration is required for deployment
    • Support for XML digital signatures to provide verification of content and that the signing certificate is trusted
  • Rules can be used to load specific settings for hosts based on host attributes and WMI data

ServiceMonitor – New!

  • Monitor Windows services. WLS App for Splunk includes dashboard for viewing the last known status and comparing changes over time.
    • ServiceStatus

SessionMonitor

  • Log user-defined certificate fields if used for authentication
  • Log local non-loopback IP addresses (positive user/IP correlation!)
  • Log user defined WinStationClient fields
    • WLS App for Splunk provides decoding for PerformanceFlags and WSFlags

Task Monitor – New!

  • Log scheduled tasks on startup, periodically, and on-change
    • WLS App for Splunk provides a dashboard for analysis

WinObjectMonitor

  • Enhanced filtering options
  • Improved filtering performance

Misc

  • Added support for decoding additional encoded IP address fields
  • Improved finding files when user specific environmental variables are used
  • Improved finding files when files have relative paths and are located in directories specified in the PATH environmental variable

For more information on WLS, click “WLS Information” at the top, or here: WLS Information

If you’d like licensing or other information about WLS, send me a note via the contact form. WLS is currently available to US entities, but does require a signed license agreement.

Process Execution Logs (and WLS)

Something I’ve found useful when analyzing a Windows host is a record of what processes executed. If you’ve ever looked in Event Viewer, you’ll know that by default, they look like this:

(This space intentionally left blank.)

So, let’s turn process auditing on.  Enable auditing for “Audit Process Creation” and “Audit Process Termination”.

TurnAuditingOn

Now, anytime a process is created or terminated, you’ll get a log similar to the following:

A new process has been created.

Subject:
Security ID: [domain]/[user]
Account Name: [user]
Account Domain: [domain]
Logon ID: 0x9cb68

Process Information:
New Process ID: 0x18f8
New Process Name: C:\Windows\System32\mspaint.exe
Token Elevation Type: TokenElevationTypeDefault (1)
Creator Process ID: 0x1084

Token Elevation Type indicates the type of token that was assigned to the new process in accordance with User Account Control policy.

Type 1 is a full token with no privileges removed or groups disabled. A full token is only used if User Account Control is disabled or if the user is the built-in Administrator account or a service account.

Type 2 is an elevated token with no privileges removed or groups disabled. An elevated token is used when User Account Control is enabled and the user chooses to start the program using Run as administrator. An elevated token is also used when an application is configured to always require administrative privilege or to always require maximum privilege, and the user is a member of the Administrators group.

Type 3 is a limited token with administrative privileges removed and administrative groups disabled. The limited token is used when User Account Control is enabled, the application does not require administrative privilege, and the user does not choose to start the program using Run as administrator.

That’s an OK log, we know what executed and when, and could trace back the “Creator Process ID” to find the creating process. However, the log is rather long and contains quite a bit of useless information; this will chew up your Splunk (or other log aggregation tool) license in no time.

WLS can help us here. It will create key / value pairs from the log, add useful information, and not fill your logs with paragraphs of redundant information. The example below uses my default metadata settings for WLS, the bold text indicates the extra information WLS added to the log.

Mar 21 12:45:26 [host] Security: LogType=”WLS”, BaseFileName=”mspaint.exe”, Cached=”True”, Channel=”Security”, CommandLine=”‘C:\windows\system32\mspaint.exe’ ‘C:\Users\[user]\Desktop\blog\TurnAuditingOn.png'”, CompanyName=”Microsoft Corporation”, Computer=”[host].[domain]”, CreatorProcessName=”explorer”, Entropy=”6.17942325269204″, EventID=”4688″, EventRecordID=”1145730″, ExecutionProcessID=”4″, ExecutionThreadID=”48″, FileDescription=”Paint”, FileVersion=”6.1.7600.16385 (win7_rtm.090713-1255)”, InternalName=”MSPAINT”, Keywords=”0x8020000000000000″, Language=”English (United States)”, Length=”6676480″, Level=”0″, MD5=”458F4590F80563EB2A0A72709BFC2BD9″, NewProcessId=”0x18f8″, NewProcessName=”C:\Windows\System32\mspaint.exe”, Opcode=”0″, ProcessId=”0x1084″, ProductVersion=”6.1.7600.16385″, ProviderGuid=”{54849625-5478-4994-A5BA-3E3B0328C30D}”, ProviderName=”Microsoft-Windows-Security-Auditing”, SHA1=”3F97DC3BD1467C710C6A8D26B97BB6CF47DEB4C6″Signed=”False”, SubjectDomainName=”[domain]”, SubjectLogonId=”0x9cb68″, SubjectUserName=”[user]”, SubjectUserSid=”[sid]”, Task=”13312″, TokenElevationType=”%%1936″, Version=”0″, Zone=”0″

The standard windows log is 1,353 characters, the WLS log is 1,141 (with pretty much every optional data point added). Less data, higher quality, useful stuff. Now, what to do with all the data…