Post-exploitation and Lateral Movement

Over an RDP session on a compromised workstation, a tester must run a cmdlet-based script one highlighted section at a time, with output in the same window. The script must later be saved as a .ps1 file, and nothing may be installed. Which tool fits?

Show the answer

Correct answerC. PowerShell ISE

AWhy not this: mmc.exe hosts administrative snap-ins and is not a scripting environment.

BWhy not this: msbuild builds and runs project files with inline tasks; it has no interactive script editor or console.

CWhy this is right: ISE pairs a script pane with a console, runs selected lines, saves .ps1 files, and ships with Windows PowerShell.

DWhy not this: cmd.exe runs commands and batch files but has no cmdlet-aware editor and no run-selection feature.

PowerShell ISE is a built-in GUI with an editable script pane and a console. A tester can run selected lines and save a .ps1 file without installing anything. cmd.exe is tempting as a built-in shell, but it has no cmdlet-aware editor and cannot run selected sections of a script.