CAS-004 Security Operations Practice Question
A security analyst is reviewing a suspicious PowerShell script that was found on a compromised host. The analyst wants to understand the script's functionality without executing it. Which of the following techniques should the analyst use?
⚠ Common exam trap
The trap here is thinking that debugging or sandboxing is a form of static analysis, when they actually involve execution.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Static code analysis
The analyst needs to understand the script's functionality without executing it. Static code analysis involves examining the script's code, deobfuscating if necessary, and identifying malicious commands. This avoids the risks of execution. Dynamic analysis, debugging, and network traffic analysis all require or assume execution, which is not desired here. Therefore, static code analysis is the correct approach.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Network traffic analysis
Why it's wrong here
Network traffic analysis captures and inspects network communications, which could reveal C2 traffic if the script were executed. However, it does not analyze the script's code itself. Without executing the script, there would be no network traffic to analyze. Thus, it does not help understand the script's functionality in this scenario.
- ✗
Debugging with PowerShell ISE
Why it's wrong here
PowerShell ISE debugging allows step-through execution, which still runs the script, albeit line by line. This could trigger malicious actions if the script has immediate payloads. The analyst wants to avoid execution entirely, so debugging is not suitable. It also requires the script to be run in a controlled environment, which may not be available.
- ✓
Static code analysis
Why this is correct
Static code analysis examines the script's source code without executing it. The analyst can read the PowerShell commands, identify obfuscation, and understand the script's intent. Tools like PowerShell's AST parser or manual review can be used. This directly fulfills the requirement to analyze without execution, making it the correct choice.
- ✗
Dynamic analysis in a sandbox
Why it's wrong here
Dynamic analysis involves executing the script in a controlled environment to observe its behavior. While this can reveal functionality, it carries the risk of the script evading sandbox detection or causing unintended effects. The analyst specifically wants to avoid execution, so dynamic analysis is not appropriate. It also requires a sandbox setup, which may not be immediately available.
Go deeper
Related to this question
About these practice questions
This CAS-005 question is part of Courseiva's 973-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official CompTIA exam blueprint
This CAS-005 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CAS-005 exam.