HTB PowerShell_Script
Sherlock Scenario
You've come across a puzzling Base64 script, seemingly laced with malicious intent. Your mission, should you choose to accept it, is to dissect and analyze this script, unveiling its true nature and potential risks. Dive into the code and reveal its secrets to safeguard our digital realm. Good luck on this daring quest!
Connect to the VM with the credential provided using RDP.
Tool Needed: Cyberchef
File Location: C:\Users\LetsDefend\Desktop\ChallengeFile\script.ps1
This challenge prepared by ZaadoOfc
Credit: csnp.org
Q1
What encoding is the malicious script using?

Base64
Q2
What parameter in the powershell script makes it so that the powershell window is hidden when executed?
-W Hidden
Q3
What parameter in the Powershell script prevents the user from closing the process?
-NonI
Q4
What line of code allows the script to interact with websites and retrieve information from them?

$WC=New-ObjEcT SySTeM.NET.WebCliENt
Q5
What is the user agent string that is being spoofed in the malicious script?
Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko
Q6
What line of code is used to set the proxy credentials for authentication in the script?
$wc.PROxY.CrEdenTialS = [SysTem.NEt.CRedeNTIAlCAcHE]::DeFAULTNetWOrKCredENTiAls
Q7
When the malicious script is executed, what is the URL that the script contacts to download the malicious payload?
http://98.103.103.170:7443/index.asp