Skip to content
KitploitKITPLOIT
ツールブログ
提出
ツールブログ
提出

ハッキング、侵入テスト、サイバーセキュリティツールをあなたのセキュリティアーセナルに!

Kitploitはハッキング、サイバーセキュリティ、ペネトレーションテストのツールディレクトリです。最新のプロジェクトアップデートを見つけて、脆弱性の発見、システム分析、テストの自動化、セキュリティの強化を行いましょう。

··フィード·お問い合わせ·プライバシー·© 2026 Kitploit

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
atomic-operator — Atomic Red Teamテスト(Atomics)を複数のオペレーティングシステム環境で実行するために使用されるPythonパッケージです。 | Kitploit
ツール/GitHubGitHub/swimlane/atomic-operator
防御ツールスクリプトと自動化ペネトレーションテストクラウドセキュリティ学習と教育レッドチーミングArchived
GitHubswimlane/atomic-operator

atomic-operator

Atomic Red Teamテスト(Atomics)を複数のオペレーティングシステム環境で実行するために使用されるPythonパッケージです。

リポジトリを見る
156312年前Kitploit レビュー済み

人気

すべて見る →

コミュニティで最も使われているツールを見つけましょう。

すべてのツールを探索

ツールコレクションを閲覧

すべてのツールを見る →
共有

PyPI Status Python Version [License][license]

Read the documentation at https://atomic-operator.com/ Code Quality & Tests

Black

atomic-operator

このPythonパッケージは、Atomic Red Teamテスト(Atomics)を複数のオペレーティングシステム環境で実行するために使用されます。

(新機能はこちら?)

なぜ?

atomic-operatorは、セキュリティ専門家がatomic-red-teamで定義された所定の手法に対して、検出および防御能力をテストすることを可能にします。atomic-operatorのようなテストフレームワークを利用することで、防御能力と防御カバレッジのギャップの両方を特定できます。

さらに、atomic-operatorは以下のような多くの他の状況でも使用できます:

  • 製品をテストするためのアラートの生成
  • EDRやその他のセキュリティツールのテスト
  • 敵対者の視点から防御回避を実行する方法の特定
  • など。

機能

  • Windows、macOS、Linuxシステム上でのAtomic Red Teamテストのローカルおよびリモート実行をサポート
  • iaas:awsに対するアトミックテストの実行をサポート
  • 入力引数のプロンプト表示が可能ですが必須ではありません
  • atomic-red-teamリポジトリのダウンロードを支援
  • 設定ファイルに基づいてさらに自動化可能
  • コマンドラインおよびインポート可能なPythonパッケージ
  • 1つ以上の手法が指定された場合に特定のテストを選択可能
  • 完璧なテストを探すために全アトミックを横断検索
  • コマンドライン経由でテストのinput_argumentsを入力として渡すことが可能
  • など

はじめに

atomic-operatorはPyPiでホストされているPythonのみのパッケージで、Python 3.6以上で動作します。

PowerShell版が必要な場合は、Invoke-AtomicRedTeamをチェックしてください。

root@kitploit:~
pip install atomic-operator

次のステップでは、atomic-operatorのセットアップと実行について説明します。

  • Atomicsを取得 Atomic Red Teamリポジトリのインストール/クローン
  • atomic-operator atomic-operatorで利用可能なオプションを理解する
  • コマンドラインでテストを実行 またはスクリプト内でテストを実行
  • 設定ファイルを使用してテストを実行

インストール

atomic-operatorはOS X、Linux、Windowsにインストールできます。ソースから直接インストールすることもできます。インストールするには、該当するオペレーティングシステムの見出しの下にあるコマンドを参照してください。

前提条件

以下のライブラリが必要で、atomic-operatorによってインストールされます。

root@kitploit:~
pyyaml==5.4.1
fire==0.4.0
requests==2.26.0
attrs==21.2.0
pick==1.2.0

macOS、Linux、Windows:

root@kitploit:~
pip install atomic-operator

M1プロセッサを使用したmacOS

root@kitploit:~
git clone https://github.com/swimlane/atomic-operator.git
cd atomic-operator

# ModuleNotFoundError: No module named 'setuptools_rust' を解消
brew install rust
pip3 install --upgrade pip
pip3 install setuptools_rust

# 通常のプログラムに戻ります...
pip install -r requirements.txt
python setup.py install

ソースからのインストール

root@kitploit:~
git clone https://github.com/swimlane/atomic-operator.git
cd atomic-operator
pip install -r requirements.txt
python setup.py install

使用例(コマンドライン)

atomic-operatorはコマンドラインから、または独自のPythonスクリプト内で実行できます。コマンドラインでatomic-operatorを使用するには、ターミナルに次のように入力します:

root@kitploit:~
atomic-operator --help
atomic-operator run -- --help

runコマンドの詳細を表示するには atomic-operator run -- --help を実行し、atomic-operator run --help は実行しないでください。

Atomicテストの取得

atomic-operatorを使用するには、ローカルシステムに1つ以上のatomic-red-teamテスト(Atomics)が必要です。atomic-operatorはAtomic Red Teamリポジトリをダウンロードする機能を提供します。コマンドラインで以下を実行することでダウンロードできます:

root@kitploit:~
atomic-operator get_atomics 
# --destinationフラグを使用して宛先ディレクトリを指定できます
atomic-operator get_atomics --destination "/tmp/some_directory"

ローカルでのテスト実行

テストを実行するには、追加のプロパティ(および必要に応じてオプション)を指定する必要があります。テストを実行する主なメソッドは run です。

root@kitploit:~
# これにより、ローカルオペレーティングシステムと互換性のあるすべてのテストが実行されます
atomic-operator run --atomics-path "/tmp/some_directory/redcanaryco-atomic-red-team-3700624"

1つ以上の特定の手法を指定すると、個別のテストを選択できます。例えば、コマンドラインで以下を実行すると:

root@kitploit:~
atomic-operator run --techniques T1564.001 --select_tests

その手法に関連するテストの選択リストがユーザーに表示されます。ユーザーはスペースバーを使用して目的のテストをハイライトし、1つ以上のテストを選択できます:

root@kitploit:~
 Select Test(s) for Technique T1564.001 (Hide Artifacts: Hidden Files and Directories)

 * Create a hidden file in a hidden directory (61a782e5-9a19-40b5-8ba4-69a4b9f3d7be)
   Mac Hidden file (cddb9098-3b47-4e01-9d3b-6f5f323288a9)
   Create Windows System File with Attrib (f70974c8-c094-4574-b542-2c545af95a32)
   Create Windows Hidden File with Attrib (dadb792e-4358-4d8d-9207-b771faa0daa5)
   Hidden files (3b7015f2-3144-4205-b799-b05580621379)
   Hide a Directory (b115ecaf-3b24-4ed2-aefe-2fcb9db913d3)
   Show all hidden files (9a1ec7da-b892-449f-ad68-67066d04380c)

以下を使用すると、テストにカスタム入力引数を提供できます。これは、runメソッドの input_arguments パラメータにキーと値の辞書を渡すことで行います。

root@kitploit:~
atomic-operator run --techniques T1564.001 --input_arguments '{"project-id": "some_value", "another_key": "another value"}'
# input_arguments の値はシングルクォートで囲んでください。

リモートでのテスト実行

テストをリモートで実行するには、追加のプロパティ(および必要に応じてオプション)を指定する必要があります。テストを実行する主なメソッドは run です。

root@kitploit:~
# これにより、ローカルオペレーティングシステムと互換性のあるすべてのテストが実行されます
atomic-operator run --atomics-path "/tmp/some_directory/redcanaryco-atomic-red-team-3700624" --hosts "10.32.1.0" --username "my_username" --password "my_password"

Windowsホストに対してリモートでコマンドを実行する場合、PSRemotingの設定が必要になる場合があります。詳細はこちら:Windows Remoting

追加パラメータ

追加のパラメータは、次のコマンドを実行して確認できます:

root@kitploit:~
atomic-operator run -- --help

次のような出力が表示されるはずです:

root@kitploit:~
NAME
    atomic-operator run - The main method in which we run Atomic Red Team tests.

SYNOPSIS
    atomic-operator run <flags>

DESCRIPTION
    The main method in which we run Atomic Red Team tests.

FLAGS
    --techniques=TECHNIQUES
        Type: list
        Default: ['all']
        One or more defined techniques by attack_technique ID. Defaults to 'all'.
    --test_guids=TEST_GUIDS
        Type: list
        Default: []
        One or more Atomic test GUIDs. Defaults to None.
    --select_tests=SELECT_TESTS
        Type: bool
        Default: False
        Select one or more tests from provided techniques. Defaults to False.
    --atomics_path=ATOMICS_PATH
        Default: '/U...
        The path of Atomic tests. Defaults to os.getcwd().
    --input_arguments={}
        Default: {}
        A dictionary of input arguments to pass to the test.
    --check_prereqs=CHECK_PREREQS
        Default: False
        Whether or not to check for prereq dependencies (prereq_comand). Defaults to False.
    --get_prereqs=GET_PREREQS
        Default: False
        Whether or not you want to retrieve prerequisites. Defaults to False.
    --cleanup=CLEANUP
        Default: False
        Whether or not you want to run cleanup command(s). Defaults to False.
    --copy_source_files=COPY_SOURCE_FILES
        Default: True
        Whether or not you want to copy any related source (src, bin, etc.) files to a remote host. Defaults to True.
    --command_timeout=COMMAND_TIMEOUT
        Default: 20
        Timeout duration for each command. Defaults to 20.
    --debug=DEBUG
        Default: False
        Whether or not you want to output details about tests being ran. Defaults to False.
    --prompt_for_input_args=PROMPT_FOR_INPUT_ARGS
        Default: False
        Whether you want to prompt for input arguments for each test. Defaults to False.
    --return_atomics=RETURN_ATOMICS
        Default: False
        Whether or not you want to return atomics instead of running them. Defaults to False.
    --config_file=CONFIG_FILE
        Type: Optional[]
        Default: None
        A path to a conifg_file which is used to automate atomic-operator in environments. Default to None.
    --config_file_only=CONFIG_FILE_ONLY
        Default: False
        Whether or not you want to run tests based on the provided config_file only. Defaults to False.
    --hosts=HOSTS
        Default: []
        A list of one or more remote hosts to run a test on. Defaults to [].
    --username=USERNAME
        Type: Optional[]
        Default: None
        Username for authentication of remote connections. Defaults to None.
    --password=PASSWORD
        Type: Optional[]
        Default: None
        Password for authentication of remote connections. Defaults to None.
    --ssh_key_path=SSH_KEY_PATH
        Type: Optional[]
        Default: None
        Path to a SSH Key for authentication of remote connections. Defaults to None.
    --private_key_string=PRIVATE_KEY_STRING
        Type: Optional[]
        Default: None
        A private SSH Key string used for authentication of remote connections. Defaults to None.
    --verify_ssl=VERIFY_SSL
        Default: False
        Whether or not to verify ssl when connecting over RDP (windows). Defaults to False.
    --ssh_port=SSH_PORT
        Default: 22
        SSH port for authentication of remote connections. Defaults to 22.
    --ssh_timeout=SSH_TIMEOUT
        Default: 5
        SSH timeout for authentication of remote connections. Defaults to 5.
    Additional flags are accepted.
        If provided, keys matching inputs for a test will be replaced. Default is None.

config_fileを使用したatomic-operatorの実行

atomic-operatorでパラメータを渡す機能に加えて、すべてのAtomicテストとその潜在的な入力を含む config_file へのパスを渡すこともできます。このconfig_fileの例はこちらにあります:

root@kitploit:~
atomic_tests:
  - guid: f7e6ec05-c19e-4a80-a7e7-241027992fdb
    input_arguments:
      output_file:
        value: custom_output.txt
      input_file:
        value: custom_input.txt
  - guid: 3ff64f0b-3af2-3866-339d-38d9791407c3
    input_arguments:
        second_arg:
          value: SWAPPPED argument
  - guid: 32f90516-4bc9-43bd-b18d-2cbe0b7ca9b2

使用例(スクリプト)

atomic-operatorを使用するには、AtomicOperatorオブジェクトをインスタンス化する必要があります。

root@kitploit:~
from atomic_operator import AtomicOperator

operator = AtomicOperator()

# これにより、atomic-red-teamリポジトリのローカルコピーがダウンロードされます

print(operator.get_atomics('/tmp/some_directory'))

# これにより、ローカルシステム上でテストが実行されます
operator.run(
    technique: str='All', 
    atomics_path=os.getcwd(), 
    check_dependencies=False, 
    get_prereqs=False, 
    cleanup=False, 
    command_timeout=20, 
    debug=False,
    prompt_for_input_args=False,
    **kwargs
)

ヘルプの入手

質問がある場合や問題が発生した場合は、issueを作成してください。

使用したツール

  • carcass - Pythonパッケージテンプレート

貢献

詳細はCONTRIBUTING.mdをお読みください。行動規範やプルリクエストの提出プロセスについて説明されています。

バージョニング

バージョニングにはSemVerを使用しています。

著者

  • Josh Rickard - 初期作業 - MSAdministrator

このプロジェクトに参加した貢献者のリストもご覧ください。

ライセンス

このプロジェクトはMITライセンスの下でライセンスされています - 詳細はLICENSEファイルを参照してください。

謝辞

  • macOS M1ベースのプロセッサに関する問題を特定し、修正を提供してくれたkeithmccammonに感謝します。
ツールをダウンロード
パラメータ名型デフォルト値説明
techniqueslistallattack_technique ID によって定義された1つ以上の手法。
test_guidslistNone1つ以上のAtomicテストGUID。
select_testsboolFalse手法が指定された場合に、実行するAtomicテストを1つ以上選択します。
atomics_pathstros.getcwd()Atomicテストのパス。
input_argumentsdict{}テストに渡す入力引数の辞書。
check_prereqsboolFalse前提条件の依存関係(prereq_comand)をチェックするかどうか。
get_prereqsboolFalse前提条件を取得するかどうか。
cleanupboolFalseクリーンアップコマンドを実行するかどうか。
copy_source_filesboolTrue関連するソースファイル(src, binなど)をリモートホストにコピーするかどうか。
command_timeoutint20各コマンドのタイムアウト時間(秒)。
debugboolFalse実行中のテストに関する詳細を出力するかどうか。
prompt_for_input_argsboolFalse各テストの入力引数をプロンプト表示するかどうか。
return_atomicsboolFalseアトミックを実行せずに返すかどうか。
config_filestrNone環境内でatomic-operatorを自動化するために使用される設定ファイルへのパス。
config_file_onlyboolFalse提供されたconfig_fileのみに基づいてテストを実行するかどうか。
hostslistNoneテストを実行する1つ以上のリモートホストのリスト。
usernamestrNoneリモート接続の認証用ユーザー名。
passwordstrNoneリモート接続の認証用パスワード。
ssh_key_pathstrNoneリモート接続の認証用SSHキーへのパス。
private_key_stringstrNoneリモート接続の認証に使用するプライベートSSHキー文字列。
verify_sslboolFalseRDP(Windows)経由で接続する際にSSLを検証するかどうか。
ssh_portint22リモート接続の認証用SSHポート。
ssh_timeoutint5リモート接続の認証用SSHタイムアウト。
**kwargsdictNonerunコマンドに追加のフラグが渡された場合、Atomicテスト内で定義された入力と一致させ、その値を指定された値で置き換えようとします。