Trusted Design

T1059 - Command and Scripting Interpreter

概要

Adversaries may abuse command and script interpreters to execute commands, scripts, or binaries. These interfaces and languages provide ways of interacting with computer systems and are a common feature across many different platforms. Most systems come with some built-in command-line interface and scripting capabilities, for example, macOS and Linux distributions include some flavor of Unix Shell while Windows installations include the Windows Command Shell and PowerShell.

There are also cross-platform interpreters such as Python, as well as those commonly associated with client applications such as JavaScript and Visual Basic.

Adversaries may abuse these technologies in various ways as a means of executing arbitrary commands. Commands and scripts can be embedded in Initial Access payloads delivered to victims as lure documents or as secondary payloads downloaded from an existing C2. Adversaries may also execute commands through interactive terminals/shells, as well as utilize various Remote Services in order to achieve remote Execution.(Citation: Powershell Remote Commands)(Citation: Cisco IOS Software Integrity Assurance - Command History)(Citation: Remote Shell Execution in Python)

管理者によるコメント

T1059「Command and Scripting Interpreter」(コマンドとスクリプトのインタープリター) は、攻撃者がシステムを操作するために、OSに標準搭載されているコマンドラインやスクリプト環境を悪用する手法です。

この手法は非常に汎用的で、ほぼすべての攻撃フェーズ(偵察、実行、永続化、横展開など)で使用される「攻撃のエンジン」といえます。

1. 概要

この手法で攻撃者は、「既存の正規ツールを用いた、自由度の高い命令実行」を実現します。

何を実現できるのか

2. 攻撃の種類(サブテクニック)

T1059は、使用される環境によって多くのサブテクニックに分かれています。

3. 攻撃の流れ

攻撃者はフィッシングメールや脆弱性悪用を通じて、これらのインタープリターにアクセスします。

  1. 侵入・呼び出し: フィッシングメールの添付ファイルを開くと、背後で powershell.execmd.exe が起動するように仕込みます。
  2. 難読化: コマンドをそのまま打つと検知されるため、文字をバラバラにしたり、Base64でエンコードしたりして隠蔽します。
    • 例: powershell.exe -EncodedCommand [長い文字列]
  3. ペイロードの展開: ネットワーク経由で次のマルウェアをダウンロードさせたり、レジストリから隠されたスクリプトを読み取って実行したりします。
  4. 目的の遂行: データの持ち出し、ユーザーパスワードの収集、他のPCへの感染拡大などを行います。

4. 防御・対策

「正規ツール」を止めることは難しいため、その「使い方」を監視・制限する必要があります。

5. 重要ポイント

6. 関連する主なCWE / CVE

実務上のアドバイス

現代の攻撃のほとんどは T1059(特にPowerShell)を経由します。管理者が普段使わないような難読化された長いコマンドライン引数は、それだけで「侵害の証拠(IoC)」として扱うべきです。

分析

この攻撃手法を利用する脅威アクター

関連する CVE

この攻撃手法に関連する CVE は登録されていません。

攻撃手法 – 脅威アクター Graph


← Technique一覧に戻る ← Tactics一覧に戻る