ablog

不器用で落着きのない技術者のメモ

Amazon Inspector で OS とミドルウェアの脆弱性・設定をチェックしてみた

Amazon Inspector はOSやミドルウェア脆弱性(CVE)や設定(CIS)などをチェックしてくれるサービス。EC2(Amazon Linux)に Inspector のエージェントをインストールして、マネジメントコンソールから Inspector の評価を実行して、評価結果を見てみた。

Rules Packages in Amazon Inspector
The following are the rules packages available in Amazon Inspector:

  • Common Vulnerabilities and Exposures
  • Center for Internet Security (CIS) Benchmarks
  • Security Best Practices
  • Runtime Behavior Analysis
Amazon Inspector のルール パッケージとルール - Amazon Inspector
EC2の設定

    • IAMロールに "EC2RoleforSSM" を指定する。


Amazon LinuxWindows はデフォルトで SSM Agent がインストールされているが、他の OS の AMI の場合は手動でインストールが必要。

Inspector の設定
  • Inspector を始める
    • Inspector をクリックし、[今すぐ始める]をクリックする。
    • [Run Weekly] をクリックする。
  • EC2 にエージェントをインストールする
    • [評価ターゲット]を選択し、[Install Agents with Run Command] をクリックする。

    • [Systems Manager]-[ランコマンド]-[コマンド or コマンド履歴]でインストール状況を確認できる。

    • [Inspector]-[評価ターゲット]で "Assessment-Target-All-Instances" を選択し、[Preview Target]をクリックし、インスタンスの [Agent Status] が "HEALTHY" だとエージェントのインストールに成功している。

[:W360]

Inspector で評価を実行する
  • [Inspector]-[評価ターゲット]で "Assessment-Target-All-Instances" を選択し、[実行]をクリックする。

  • [Inspector]-[評価の実行]で "Assessment-Target-All-Instances" を選択し、実行状況を確認する。

Inspector で評価結果を確認する
  • Inspector-[結果]で評価結果を確認する。