Library / Third-party

pwsh.exe

PowerShell 7 · Microsoft Corporation

Third-partySysmon-confirmedSigma refs: 155

OriginalFilename

  • pwsh.dll

.NET apphostDiffers from file nameNames a DLLShared with other binaries

Gotchas

PowerShell 7 ships pwsh.exe as a .NET apphost: a small native launcher that loads pwsh.dll. The build copies the DLL's version resource into the launcher, so Sysmon and MDE report pwsh.dll for pwsh.exe processes. Windows PowerShell 5.1 (powershell.exe) reports PowerShell.EXE.

  • .NET apphost: pwsh.exe is a native launcher that copies its version resource from pwsh.dll, so OriginalFilename names the DLL.
  • OriginalFilename doesn't match the file name: a rule using OriginalFileName: pwsh.exe never fires.
  • Same OriginalFilename as pwsh.dll, so OriginalFilename alone can't tell them apart.

Query snippets

logsource:
  category: process_creation
  product: windows
detection:
  selection:
    - Image|endswith: '\pwsh.exe'
    - OriginalFileName: 'pwsh.dll'
  condition: selection

process_creation logsource. Sigma string matching is case-insensitive.

Values across builds

OriginalFilenameBuildsArchFile versionWindows releasesSourceSysmon
pwsh.dll1x647.6.9.500Vendor✓ 1

InternalName: pwsh.dll · Product: PowerShell

All 1 parsed builds
SHA256VersionArchOriginalFilenameWindows releasesSignatureSourceSysmon
2a6769a3330d…7.6.9.500x64pwsh.dllPowerShell 7Vendor✓

Winbindex builds link to the Microsoft symbol server copy that was hashed and parsed.