
AWSテストおよびレポート管理ツール
Outpost は、AssumeRole 用の AWS 設定ファイルを生成し、アカウントが機能することを検証するテスト機能と、ScoutSuite のスキャン結果のレポート生成機能を提供するシンプルなツールです。
Outpost の実行には Python3 と boto3 が必要です。
依存関係をインストールします。
virtualenv -p python3 .
source bin/activate
pip install -r requirements.txt
python outpost.py --help
usage: outpost.py [-h] --command COMMAND [--config-creds] [--assume ASSUME] [--accounts ACCOUNTS] [--primary PRIMARY] [--token TOKEN]
[--secret-key SECRET_KEY] [--access-key ACCESS_KEY] [--directory DIRECTORY] [--risk RISK] [--project PROJECT]
optional arguments:
-h, --help show this help message and exit
--command COMMAND Commands: generate, report, testaccounts
--config-creds Configure creds while using the generate command
--assume ASSUME Optional assume role ARN, use ACCOUNT_ID for placeholder. (i.e. arn:aws:iam::ACCOUNT_ID:role/ROLENAME
--accounts ACCOUNTS File containing account numbers (one account per line)
--primary PRIMARY Primary account used to assume roles
--token TOKEN Primary AWS session token
--secret-key SECRET_KEY
Primary AWS secret access key
--access-key ACCESS_KEY
Primary AWS access key
--directory DIRECTORY
Parent directory of ScoutSuite report(s)
--risk RISK Select finding risk to report: danger, warning
--project PROJECT Project name for report details
Outpost は、解析対象の scoutsuite_results*.js ファイルを探すために、すべてのレポートフォルダを再帰的に検索します。つまり、レポートのルートフォルダ内に複数の ScoutSuite レポートが含まれている場合は、ルートフォルダを --directory フラグとして指定する必要があります。
構造の例は次のとおりです。
~/Engagements/CustomerName/reports/account1/
~/Engagements/CustomerName/reports/account2/
~/Engagements/CustomerName/reports/account3/
3 つのアカウントレポートすべてを解析するには、次のコマンドを実行します。
python outpost.py --command report --directory ~/Engagements/CustomerName/reports/ --project Customer_2022-123
このツールは、ScoutSuite 結果のルートフォルダ内に data_archive という名前のフォルダを作成します。レポートにそのままコピー&ペーストできる検出結果を含む <project name>.txt ファイルを生成します。さらに、各検出結果について、アカウントと脆弱な特定のリソースの概要を示す補足ファイルがフォルダ内に作成されます。