https://fin-jaws.connpass.com/event/293126/
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved.SIEM on Amazon OpenSearch Serviceを1年運用してわかったことFin-JAWS運営 小出 淳二
View Slide
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved.自己紹介小出 淳二 (こいで じゅんじ)株式会社QUICK グループ統括CIO補佐株式会社QES クラウドプラットフォーム本部 本部長補佐Fin-JAWS 運営E-JAWS 人材育成分科会運営re:Invent歴:5回(2015,2016,2017,2019,2022)AWS認定13冠趣味:海外旅行(渡航60ヵ国)世界遺産巡り
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved.SIEM導入の背景• ミッションクリティカルな株価配信サービス基盤を AWS へ移行し1,500 台の仮想サーバーのクラウド化で 60% のサーバーコストを削減競合優位性の獲得に向けてクラウドネイティブ化を加速https://aws.amazon.com/jp/solutions/case-studies/quick/• 今後オンプレミスのさらに大規模な AWS 移行を予定している。現状さまざまな課題があるので、このタイミングで全社統合ログ分析基盤の構築を検討したい
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved.• リアルタイムなログ分析現状のログ分析基盤はリアルタイムな集計や分析に対応していないため、顧客のニーズやインサイトをいち早く捉えることが出来ない• トラブル発生時のログ調査アプリケーション不具合、セキュリティインシデント等のトラブル発生時、ログの調査に時間がかかり対応も属人的になっている• AWS サービスログの分析Amazon Athena で SQL クエリー文を書く必要があり学習コストが高いダッシュボードが準備されておらず分析等に有効活用できていない当時の課題
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved.課題解決に向けて• 全社ログの集約全社のログを一カ所に集約し、横串で相関分析できるようにする• データソースの拡充(アクセスログ、アプリログの取り込み)データソースの範囲を AWS 全サービスログ、OS、アクセスログ、アプリケーションログ等に広げる• ログの可視化ダッシュボードを見れば一目で社内システムの状況がわかるように、ログを可視化する
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved.SIEM基盤が出来ると何がうれしいのかトラブル対応(セキュリティインシデント等)トラブル発生時、迅速に原因を特定し対応することが出来る学習コストダッシュボードと使い易い GUI を用意することにより、学習コストが下がり、迅速な分析が可能になるデータ活用ログにおける様々なデータをニアリアルタイムに集約・収集・分析出来ることにより、サービスの機能改善や分析データの顧客提供などデータの活用が促進できる
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved.SIEM基盤の要件• AWS 全サービスログ、OS、アクセスログ、アプリケーションログ等を取り込みダッシュボードによる可視化が可能であること• ログの取り込みはマルチアカウントに対応していること• ニアリアルタイムな分析が可能であること• ログ監視基盤でもあること(柔軟なアラート設定が可能であること)• 1年は即時検索可能であること(1年経過したログは、Amazon S3 に保管し Amazon Athena で検索可能)
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved.Amazon Elasticsearch Service における課題どうやって Amazon Elasticsearch Service にログを取り込めばいいのか?ログの取り込みにコストが掛かる• AWS各サービスのログを取り込むためには、Amazon S3 またはAmazon CloudWatch Logs に出力されたログを取り込むLogstash サーバを立てる必要がある• 各ログのフォーマットを分析して Logstash で ETL 処理するのは正直つらい・・
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved.2020/10/23SIEM on Amazon Elasticsearch Service(SIEM on Amazon ES) がオープンソースで公開!
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved.SIEM on Amazon ES(現SIEM on AmazonOpenSearch Service)が課題をすべて解決!
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved.SIEM on Amazon ES とは• AWS が OSS で公開している SIEM ソリューション• このソリューションを利用することで、AWS CloudTrail や VPC Flow Logs、Amazon GuardDuty、OS などの各種ログの可視化やセキュリティ分析を行う事が可能• 各種ログが適切に正規化されている• マネージドサービスとサーバーレスの仕組みで作られていて運用が楽• マルチアカウント、マルチリージョンのログ取り込みが可能https://github.com/aws-samples/siem-on-amazon-elasticsearch-service/blob/main/README_ja.md
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved.なぜログ分析に Amazon Elasticsearch Service なのか?Kibana の操作性が秀逸(これに尽きる!)• 簡単な直感的な操作でログをフィルタリングして調査できる• アドホックな分析に強く、検索性能も高い• ダッシュボード作成も難易度は低い“ 学習コストが低いため、利用者への説明コストもかなり低くなった ”
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved.Kibana(現 OpenSearch Dashboard) 画面❶全文検索機能 & 簡単操作でのフィルタリング❷直感的なフィールド選択❹時間の範囲選択も簡単❸フィールド値の上位5位まで表示SQL知識が無くても格納されているデータをすぐに把握できるのが最大の魅力
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved.ユースケースコンテナアプリログ(ECS/Fargate)のログ取り込み
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved.※アプリケーション毎に Amazon Kinesis Data Firehose をデプロイアプリケーション毎に Amazon S3 のファイルパスを分けるAWS CloudFargateTaskApplication A FirelenslogAmazon KinesisData FirehoseFluent bitS3 BucketFargateTaskApplication B FirelenslogAmazon KinesisData FirehoseFluent bitS3 BucketAWS CloudS3 ReplicationTime ControlS3 BucketS3 BucketS3 ReplicationTime ControlAmazon ElasticsearchServicees-loaderes-loaderログ分析基盤アカウント
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved.アプリケーションログをJSONで出力してもらうことで、アプリケーション独自のフィールドをOpenSearchに取り込んでいる
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved.本番運用を1年以上やってわかったこと
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved.本番運用を1年以上やってわかったこと• 全AWSサービスログの取り込み、特にVPC Flowlogsはムリ全取り込みしていたが、ログ全体の95%以上がVPC Flowlogsというよくわからない状況にw大規模構成では、コスト見合いで必要なサブネットだけ取り込むとか、rejectだけ取り込むとか、あきらめる、とかの工夫が必要
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved.本番運用を1年以上やってわかったこと• バージョンアップがつらい
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved.開発環境で週末に セキュリティパッチを適用してみました(B/Gデプロイが走ります)
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved.パッチ適用に時間かかっても、B/GデプロイだからKibanaダッシュボードは普通に使えるんでしょ?Lambdaからのログ取り込みも問題ないんでしょ?
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved.3時間ほどKibanaダッシュボードが使えませんでした・・・
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved.https://dev.classmethod.jp/articles/tsnote-opensearch-kibana-01/
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved.バージョン 1.3 → 2.5 へのバージョンアップ作業を実施するにあたり、数時間のKibanaダッシュボード利用不可に関して、利用者からは「どうにかしてほしい」と申し入れがあった。
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved.対応策として、別アカウントにSIEMのコピーをもう一面作成して、バージョンアップ中はそちらを参照することにより、Kibanaダッシュボードのサービス提供を継続!
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved.※利用者への案内
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved.OpenSearch別面構築は、手順化したため超簡単に構築可能。今後設定変更の事前確認等でも活用予定。なお、もう1面の追加費用は約80USD/日※r6g.2xlarge.search×3台、ストレージ3TB
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved.まとめエンタープライズの AWS利用に関して、SIEM基盤構築は組織や事業にとって非常に重要バージョンアップ運用(セキュリティパッチ含む)は結構つらいSIEM on Amazon OpenSearch Service は、AWSCloudFormation で手軽に導入可能なので是非ご活用いただきたい!https://github.com/aws-samples/siem-on-amazon-opensearch-service/blob/main/README_ja.md
© 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved.ご清聴ありがとうございました