Cybersecurity Analyst Interview Question

If you had to write a detection for malicious PowerShell, what would you key on?

What the interviewer is probing, how to structure your answer, and a spoken example you can adapt.

Quick answer

Key on behavior and context rather than keywords. Strong signals include suspicious parent processes (Office applications, browsers, WMI), encoded or obfuscated command lines, execution policy bypass combined with a hidden window, script block logging content showing download or reflection calls, and outbound connections from powershell.exe to new infrastructure. Enable module and script block logging first, because without them you are matching on a command line alone.

Why interviewers ask this

This separates people who have written detections from people who have read blog posts. The interviewer wants to hear the telemetry prerequisites, the difference between command line matching and script block logging, and awareness that string based rules break the moment an attacker obfuscates. They also listen for how you would test the rule and which legitimate administrative activity is going to trip it in week one.

How to structure your answer

  • Start with the telemetry you need enabled before any rule works.
  • List behavioral signals in order of durability.
  • Explain how you would test the rule against real attacker tooling.
  • Name the legitimate activity most likely to trip it.

Example answer

Spoken example, first person

Before writing anything I check that script block logging and module logging are on, plus process creation with command line auditing, because a rule against a truncated command line is close to useless. Then I stack signals rather than relying on one. Parent process is the strongest: PowerShell spawned by Word, Excel, Outlook, mshta or a browser is worth an alert almost on its own. After that, encoded commands combined with a hidden window and an execution policy bypass, and inside script block content I look for reflective loading, DownloadString, Invoke-Expression against a variable, and direct calls into memory APIs. Network side, powershell.exe talking to a raw IP or to a domain first seen in the last week. I test with atomic tests plus a couple of obfuscated variants, because if my rule dies to simple string concatenation it was never a detection. The usual legitimate trip is the deployment and monitoring stack, so I baseline those service accounts before go live rather than after the pager goes off.

Walking into this interview soon? GhostPilot listens to your live call, spots the question the moment it is asked, and puts a structured answer on your screen in real time. Try it on your next mock, or grab a $29 Session Pass, no subscription, for the real thing.

See how it works

Follow-up questions to expect

  • How would you catch PowerShell running from a process other than powershell.exe?
  • What does your rule miss if the attacker uses a signed binary instead?
  • How do you handle admins who legitimately use encoded commands?

Related cybersecurity analyst questions

Your interviewer will ask their own version of this. Paste your actual job description into the free Question Predictor and get the 20 questions that role is most likely to ask, with what each one is really probing.

Predict my questions

Rehearse the hard questions before they are asked

Practise with a live copilot, then walk in ready. A $29 Session Pass gets you through the interview with no subscription and no lock-in.

Get GhostPilot