Перейти к содержимому
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/hunting-suspicious-powershell-executionDFIR и threat hunting

hunting-suspicious-powershell-execution

⁨Hunts malicious PowerShell using script-block (EID 4104) and module logging:⁩

v1.0.03 установки+3 за 7 дней24 ЗвездыApache-2.0синхронизировано 10 часов назад

Установка

Ещё нет NotHoly CLI? Сначала установите её.

$ curl -fsSL https://notholy.com/install.sh | sh
$ notholy skills install meltedinhex/hunting-suspicious-powershell-execution

Пишет в ⁦~/.notholy/skills⁩ после проверки подписи и SHA-256.

ПодписьПодписано, ed25519
XMAerylceS…b+QR4ICQ==CLI проверяет SHA-256 и подпись, прежде чем записать хоть один файл.
Пакет5c2a893c…63805edb
5c2a893c02b6…b76563805edb4 файла · ⁦3.4 KB⁩
ПроверкаСредний7 замечаний
  • command.pipe_to_shellSKILL.md:57
  • command.base64_execSKILL.md:58
  • command.pipe_to_shellSKILL.md:87
Вся проверка
Источникgithub.com/meltedinhex/analyst-ai-pack/tree/main/skills/hunting-suspicious-powershell-execution@da7600a

Эта запись еще не переведена на русский, поэтому показан текст на другом языке: English.

When to Use

  • You have PowerShell script-block (Event ID 4104) and/or module logging and want to hunt abuse.
  • You are testing a hypothesis that attackers use encoded commands, download cradles, or AMSI/logging bypasses.
  • You need to score and decode a large volume of PowerShell events into a triage queue.

Do not use simple keyword blocklists as the sole method — admins legitimately use many of the same cmdlets; score combinations and decode before judging.

Prerequisites

  • Script-block logging enabled (Event ID 4104) and exported to a queryable store.
  • A baseline of normal administrative PowerShell for your environment.

Workflow

Step 1: Collect script-block events

Pull EID 4104 script-block text (and EID 4103 module logging) over the hunt window. Reassemble multi-part script blocks before analysis.

Step 2: Score suspicious constructs

Weight combinations rather than single keywords: -EncodedCommand, IEX/Invoke-Expression with Net.WebClient/Invoke-WebRequest, FromBase64String, -w hidden -nop, AMSI strings, and [Ref].Assembly reflection.

bash
python scripts/analyst.py score events.json

Step 3: Decode payloads

Base64-decode -EncodedCommand (UTF-16LE) and recover layered encodings to read the real intent (download URLs, in-memory loaders).

Step 4: Baseline and pivot

Compare against normal admin activity; for survivors, pull the parent process, user, host, and network connections to confirm.

Step 5: Confirm and operationalize

Validate true positives, escalate to IR, and convert the scoring logic into a detection rule.

Validation

  • High-score events decode to coherent malicious intent, not benign admin scripts.
  • Multi-part script blocks are reassembled before scoring (no truncated false negatives).
  • Confirmed cases tie to a parent process and user consistent with intrusion.

Pitfalls

  • Flagging single keywords (IEX alone) and drowning in admin noise.
  • Forgetting -EncodedCommand is UTF-16LE, producing garbled decodes.
  • Ignoring AMSI/logging-bypass attempts that precede the real payload.

References

  • See references/api-reference.md for the scorer/decoder.
  • Script-block logging docs and ATT&CK T1059.001 (linked in frontmatter).

Файлы этой версии

Права

ПравоЗаявленоНайдено проверкой
Читает файлыНетНет
Пишет файлыНетНет
Выполняет команды shellДаДа
Ходит в сетьДаДа
Использует коннекторыНетНет
Управляет браузеромНетНет

Замечания проверки

Проверено 13 нояб. 2026 г.

  1. СредняяКоманда · command.pipe_to_shellSKILL.md:57
  2. СредняяКоманда · command.base64_execSKILL.md:58
  3. СредняяКоманда · command.pipe_to_shellSKILL.md:87
  4. СредняяФайл · Исполняемый скрипт в составе навыкаscripts/analyst.py
  5. СредняяКоманда · command.base64_execscripts/analyst.py:20
  6. СредняяКоманда · command.pipe_to_shellscripts/analyst.py:21
  7. ИнфоСсылка · Ссылки на внешние домены

Чистая проверка снижает риск, но не доказывает, что пакет безопасен. Читайте то, что ставите.

ВерсияОпубликованаКоммитSHA-256ПодписьИзменение прав
v1.0.013 нояб. 2026 г.da7600a5c2a893cПодписана–

Спрашивайте обо всём, что позволяет ваш скоуп.

Создайте аккаунт, пополните баланс и задайте первый вопрос в чате или в терминале.

  1. 1/3

    Создайте аккаунт

    Личный или для компании. Позже можно перейти на аккаунт компании без потери баланса и ключей.

    ЛичныйКомпания
  2. 2/3

    Пополните баланс

    Картой. Оплата за токены, без подписки.

    $5.00минимальное пополнение
  3. 3/3

    Спрашивайте

    В чате, или установите CLI и выполните notholy login в терминале.

    $ notholy login