A tester has only a command-line reverse shell on a Windows Server Core host, which has no graphical desktop. The tester must build and debug a multi-line cmdlet script with breakpoints, and nothing may be installed. What is the best approach?
Show the answer
Correct answerA. Debug the script in ISE on a Windows test host, then upload it
AWhy this is right: ISE on a Windows test host gives breakpoints and stepping; the finished .ps1 is then uploaded without installing anything.
BWhy not this: Batch files run in cmd.exe, which has no breakpoints or stepping, and cannot use cmdlets and .NET objects.
CWhy not this: explorer.exe is also a graphical shell that needs a desktop, and it is not a script debugger.
DWhy not this: ISE is a graphical tool; a reverse shell on Server Core has no desktop to display it.
PowerShell ISE is a graphical editor and debugger, so it needs an interactive desktop, which a Server Core reverse shell lacks. Building and debugging in ISE on a test host, then uploading the .ps1, meets every constraint. Starting ISE or explorer.exe from the shell fails for the same reason.