Vai al contenuto
New

DeepSeek V4.1 Flash free for 7 days: 10M tokens a day after a top-up of $10 or more. Until Nov 30.

How it works
meltedinhex/deobfuscating-malicious-powershellReverse engineering e fuzzing

deobfuscating-malicious-powershell

⁨Deobfuscates malicious PowerShell by decoding -EncodedCommand, reversing string⁩

v1.0.03 installazioni+3 in 7 giorni24 StelleApache-2.0sincronizzato 10 ore fa

Installa

Non hai ancora la CLI di NotHoly? Installala prima.

$ curl -fsSL https://notholy.com/install.sh | sh
$ notholy skills install meltedinhex/deobfuscating-malicious-powershell

Scrive in ⁦~/.notholy/skills⁩ dopo aver controllato la firma e lo SHA-256.

FirmaFirmato, ed25519
9Jub40PMlh…1OFt5IBg==La CLI controlla lo SHA-256 e la firma prima di scrivere qualsiasi file.
Pacchetto4dd88965…d95b1ce4
4dd88965f708…a5b9d95b1ce44 file · ⁦3.6 KB⁩
ScansioneMedio12 segnalazioni
  • command.pipe_to_shellSKILL.md:4
  • command.pipe_to_shellSKILL.md:37
  • command.pipe_to_shellSKILL.md:39
Vedi la scansione completa
Sorgentegithub.com/meltedinhex/analyst-ai-pack/tree/main/skills/deobfuscating-malicious-powershell@da7600a

Questa voce non è ancora scritta in italiano, quindi è mostrata in un'altra lingua: English.

When to Use

  • You captured an obfuscated PowerShell command from a log, maldoc, or phishing payload.
  • You need to recover the real intent: download URLs, dropped paths, shellcode, or next stage.
  • You are unrolling layered encoding (base64 → gzip → IEX) to reach the final script.

Do not use Invoke-Expression or run the script to "see what it does" on a working host. Decode statically; only execute in the isolated lab with logging if dynamic confirmation is required.

Prerequisites

  • Python (bundled script handles base64/gzip/deflate and common transforms), or a sandbox.
  • The command/script text captured as a string.

Safety & Handling

  • Never pipe attacker PowerShell into a live shell. Replace IEX/Invoke-Expression with output (print) when transforming.
  • Treat decoded URLs/IPs as live; defang before sharing.

Workflow

Step 1: Decode -EncodedCommand

-EncodedCommand (-enc) is base64 of UTF-16LE. Decode it first:

bash
python scripts/analyst.py decode --encodedcommand "<base64>"

Step 2: Identify the obfuscation style

Common patterns:

text
String reversal      : [array]::Reverse / -join with [-1..]
Format operator      : ("{1}{0}" -f 'b','a') -> 'ab'
Char codes           : [char]104 + [char]105
Concatenation/splits : 'po'+'wer'+'shell', -split / -replace tricks
Backtick/casing noise : I`E`X, iEx, &('i'+'ex')

Step 3: Unroll encoding layers

Resolve nested FromBase64String, gzip/deflate (IO.Compression), and re-IEX layers until you reach plain script. The script peels base64/gzip layers automatically.

bash
python scripts/analyst.py deobfuscate payload.ps1

Step 4: Neutralize execution sinks

Replace IEX, Invoke-Expression, &, and .Invoke() with a print so the recovered script is rendered, not run.

Step 5: Extract IOCs

Pull DownloadString/DownloadFile URLs, C2 hosts, dropped paths, and any embedded base64 shellcode for separate analysis.

Validation

  • The fully decoded script is human-readable PowerShell with no remaining base64 blobs.
  • Execution sinks are neutralized; nothing in your workflow actually ran the payload.
  • Extracted URLs/paths are consistent with the script's logic.

Pitfalls

  • Running the script to decode it — the fastest way to get compromised.
  • Stopping after one base64 layer when several are nested.
  • Missing UTF-16LE vs UTF-8 when decoding -enc (it is UTF-16LE).
  • Ignoring -replace/-f transforms that rebuild commands at runtime.

References

  • See references/api-reference.md for the decoder/deobfuscator.
  • PowerShell encoded-command docs and PSDecode (linked in frontmatter).

File di questa versione

Permessi

PermessoDichiaratoTrovato dalla scansione
Legge fileNoNo
Scrive fileNoNo
Esegue comandi shellSìSì
Usa la reteSìSì
Usa i connettoriNoNo
Controlla un browserNoNo

Segnalazioni della scansione

Rivisto il 13 nov 2026

  1. MediaComando · command.pipe_to_shellSKILL.md:4
  2. MediaComando · command.pipe_to_shellSKILL.md:37
  3. MediaComando · command.pipe_to_shellSKILL.md:39
  4. MediaComando · command.pipe_to_shellSKILL.md:50
  5. MediaComando · command.pipe_to_shellSKILL.md:73
  6. MediaComando · command.pipe_to_shellSKILL.md:78
  7. MediaComando · command.base64_execSKILL.md:78
  8. MediaComando · command.pipe_to_shellSKILL.md:87
  9. MediaComando · command.pipe_to_shellreferences/api-reference.md:6
  10. MediaComando · command.pipe_to_shellreferences/api-reference.md:32
  11. MediaFile · Script eseguibile incluso nella skillscripts/analyst.py
  12. InfoLink · Link a domini esterni

Una scansione pulita abbassa il rischio, ma non prova che il pacchetto sia sicuro. Leggi quello che installi.

VersionePubblicataCommitSHA-256FirmaCambio di permessi
v1.0.013 nov 2026da7600a4dd88965Firmata–

Chiedi tutto quello che il tuo perimetro consente.

Crea un account, aggiungi crediti e fai la prima domanda in chat o nel terminale.

  1. 1/3

    Crea l'account

    Privato o azienda. Puoi passare ad azienda in seguito senza perdere saldo o chiavi.

    PrivatoAzienda
  2. 2/3

    Aggiungi crediti

    Con carta. Paghi a token, senza abbonamento.

    $5.00ricarica minima
  3. 3/3

    Chiedi

    In chat, oppure installa la CLI ed esegui notholy login nel terminale.

    $ notholy login