Hunting Suspicious PowerShell Execution

Hunting Suspicious PowerShell Execution

Writes and runs a KQL query in Microsoft Defender XDR advanced hunting to find suspicious PowerShell executions with encoded commands or downloads, returned as a table.

In Microsoft Defender XDR advanced hunting, write and run a KQL query to find PowerShell executions in the last 7 days where:

  • The process was launched by a non-standard parent (not explorer.exe, svchost.exe, or scheduled tasks)
  • The command line contains encoded commands (-EncodedCommand or -enc) or downloads (Invoke-WebRequest, IEX, DownloadString)

Return results as a table with columns: device name, initiating process, PowerShell command line (truncated to 200 chars), timestamp, and logged-in user. Sort by timestamp descending. Limit to 50 results.

© Mathieu Kessler · CC BY-SA 4.0 · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 13,404 prompts

More by @OpenSourceBuffGuy

See all
Ten frame storyboard for a face cream commercial prompt image

Ten frame storyboard for a face cream commercial

Draws a 2x5 storyboard sheet of ten numbered, timestamped frames for a luxury face cream commercial, with a shared palette, lighting and camera look.

image-prompt, storyboard, multi-panel, product-photography, advertising, photorealistic, cinematic, luxury, macro, studio-lighting, soft-lighting, white-background, skincare, beauty, text-rendering, long-form, gpt-image, for-marketers, for-filmmakers, for-designers, timed-beats, structured-output, slow-motion

Black and Gold Baroque Saint Potato Chips Bag prompt image

Black and Gold Baroque Saint Potato Chips Bag

Draws a premium black-and-gold potato chip bag mockup with Baroque saint artwork, ornate foil lettering and exact Japanese copy in set zones.

image-prompt, gpt-image, packaging-design, mockup, product-photography, luxury, text-rendering, photorealistic, white-background, dramatic-lighting, vertical-format, food-photography, classical-art, gothic, japan, still-life, structured-output, negative-prompt, for-designers, branding, advertising, long-form, advanced, symmetry

Dancer in brutalist hall with CV tracking overlay prompt image

Dancer in brutalist hall with CV tracking overlay

Generates a 15-second continuous shot of a solo dancer in a brutalist hall with glowing computer-vision tracking nodes and lines overlaid on every movement.

video-prompt, dance, single-take, camera-movement, tracking-shot, motion-graphics, visual-effects, cinematic, dramatic-lighting, night-scene, negative-prompt, guardrails, architecture, music-video, hailuo, long-form, advanced, computer-vision, neon, low-angle, high-angle

Reviews

Loading reviews…

Discussion

Loading comments…