{Detective}Setting up Amazon Detective

潜在的なセキュリティの問題を調査および分析

https://blog.serverworks.co.jp/tech/2020/04/08/post-82639/

https://dev.classmethod.jp/articles/amazon-detective/

https://docs.aws.amazon.com/detective/latest/adminguide/detective-setup.html


Amazon GuardDuty が有効になってから少なくとも 48 時間が経過している場合のみ、
そのアカウントで Amazon Detective を有効にできます。


-- 1. コマンド等のインストール

-- 1.1 aws cli version 2 インストール

curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
aws --version

-- 1.2 jqインストール
sudo yum -y install jq

 


-- 2. Amazon GuardDuty の有効化

aws guardduty create-detector \
--finding-publishing-frequency SIX_HOURS \
--enable

aws guardduty list-detectors

aws guardduty get-detector \
--detector-id 11111111111111111111111111111111


48時間程度待つ
実際は、1日程度でDetectiveを有効化できた


-- 3. Detectiveの有効化

aws detective create-graph

aws detective list-graphs

 

 


-- 4. クリーンアップ

-- Detectiveの無効化


aws detective list-graphs


aws detective delete-graph \
--graph-arn arn:aws:detective:ap-northeast-1:999999999999:graph:22222222222222222222222222222222


-- Amazon GuardDuty の無効化

aws guardduty list-detectors

aws guardduty get-detector \
--detector-id 11111111111111111111111111111111


aws guardduty delete-detector \
--detector-id 11111111111111111111111111111111