PowerShell Overview

Welcome to the PowerShell section!
Select an indented topic from the menu to get started.

CAUTION: Executing Untrusted PowerShell Scripts

PowerShell is an extremely powerful administrative engine. Unlike basic batch files, PowerShell has deep access to the Windows API, system registry, active memory, and local credential stores. Executing an unknown .ps1 script gives it the same privileges as your user account—or full administrator control if run from an elevated prompt.

Primary Risks

  • Malicious Payload Execution: Scripts can silently download and execute trojans, ransomware, or remote access tools (RATs) directly in memory, bypassing traditional disk antivirus scans.
  • Credential & Data Theft: Malicious code can harvest stored passwords, web browser sessions, SSH keys, and local token stores.
  • Persistent System Compromise: Scripts can establish persistence by modifying registry run keys, creating hidden Scheduled Tasks, or injecting malicious PowerShell profiles ($PROFILE).
  • Network Spreading: If executed within a corporate or home lab network, a malicious script can use administrative permissions to scan subnets and compromise connected machines.

Safe Execution Checklist

Before running any script obtained from third-party sites, forums, or repositories:

  1. Inspect the Code First: Open the .ps1 file in Notepad or VS Code. Do not double-click or run it directly from the terminal.
  2. Watch for Obfuscation: Be suspicious of heavily encoded strings, large [System.Convert]::FromBase64String() blocks, hidden -EncodedCommand flags, or dynamic Invoke-Expression (iex) calls.
  3. Check Remote Calls: Look for network triggers like Invoke-WebRequest, Net.WebClient, or Start-Process attempting to fetch outside URLs.
  4. Test in an Isolated Sandbox: Always test unfamiliar scripts inside a disposable environment—such as Windows Sandbox, a fresh Hyper-V virtual machine, or an isolated test subnet—before executing them on your main machine or server.