# 使用Amazon Security Lake收集安全日志

## 什么是AWS Security Lake？

亚马逊安全湖（Amazon Security Lake）是一项服务，可自动将来自 AWS 环境、领先 SaaS 提供商、IDC和云原生的安全数据集中到一个专用数据湖中，从而使客户能够更快地对安全数据采取行动，并简化混合和多云环境中的安全数据管理。Amazon Security Lake 将传入的安全数据转换并符合开放网络安全模式框架 ([Open Cybersecurity Schema Framework, OCSF](https://github.com/ocsf)) 开放标准，使安全团队能够更轻松地自动收集、组合和分析来自 [80 多个来源](https://aws.amazon.com/security-lake/partners/)（包括 AWS、安全合作伙伴和分析提供商）的安全数据。Amazon Security Lake 是一系列广泛的 AWS 云安全服务的一部分，这些服务以 AWS 的安全基础架构为基础，帮助使 AWS 成为最灵活、最安全的云，受到数百万客户（包括一些对安全最敏感的组织）的信赖，并得到广泛的安全合作伙伴社区的支持，帮助客户提升云中的安全性。Amazon Security Lake 可聚合和优化大量不同的日志和事件数据，以实现更快的威胁检测、调查和响应，从而使企业可以使用其首选的分析工具快速有效地解决潜在问题。要开始使用 Amazon Security Lake，请访问 <https://aws.amazon.com/security-lake>。

只需几个步骤，客户就可以轻松创建一个数据湖，从 Amazon VPC Flow Logs 和 AWS CloudTrail 等来源、Splunk、CrowdStrike、Datadog 和 Cribl 等第三方来源以及他们自己的数据来源收集安全数据。Amazon Security Lake 中的所有安全数据都符合 OCSF 模式，从而使使用单一、统一的视图进行安全调查变得更加简单。客户可以使用其首选的安全和分析工具（包括 Amazon Athena、Amazon OpenSearch Service 和 Amazon SageMaker）以及领先的第三方解决方案，快速、轻松地获取更广泛、更深入的分析。

## AWS日志收集

Amazon Security Lake 可以从以下支持的 AWS 服务中收集日志和事件：

* CloudTrail - Management events
* CloudTrail - Lambda data events
* CloudTrail - S3 data events
* Amazon Route 53 resolver query logs
* AWS Security Hub findings
* Amazon Virtual Private Cloud (Amazon VPC) Flow Logs

### CloudTrail event logs <a href="#cloudtrail-event-logs" id="cloudtrail-event-logs"></a>

AWS CloudTrail 可为您提供帐户的 AWS API 调用历史记录，包括使用 AWS 管理控制台、AWS SDK、命令行工具和某些 AWS 服务进行的 API 调用。CloudTrail 还允许您识别哪些用户和帐户调用了支持 CloudTrail 的服务的 AWS API、调用的源 IP 地址以及调用发生的时间。有关详细信息，请参阅[AWS CloudTrail User Guide](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/).

查看AWS CloudTrail 事件历史记录可以选择使用Amazon Security Lake统一收集并用Athena查询。（好处是开启Amazon Security Lake以后<mark style="color:purple;">直接就可以使用Athena查询</mark>比如CloudTrail日志了，不需要再配置Athena创建数据库和表以及也不需要做字段拆分。非常方便）。使用AWS Security Lake统一收集并用Athena查询会比使用CloudTrail Lake进行日志的分析要便宜，两者的对比可以[参见此文档](https://aws-gcr-wwso-security.gitbook.io/an-quan-zui-jia-shi-jian/an-quan-chan-pin-cheng-ben-gu-suan/amazon-security-lake-he-aws-cloudtrail-lake-zuo-ri-zhi-fen-xi-de-cheng-ben-dui-bi)。

* 通过CloudTrail创建和管理trail ，从*AWS CloudTrail* 用户手册中查看 [Creating a trail for an organization](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-trail-organization.html) &#x20;
* 通过AWS Control Tower创建和管理trail ，从 *AWS Control Tower* 用户手册中查看 [Logging AWS Control Tower actions with AWS CloudTrail](https://docs.aws.amazon.com/controltower/latest/userguide/logging-using-cloudtrail.html)。

### Route 53 resolver query logs <a href="#route-53-logs" id="route-53-logs"></a>

Route 53 解析器查询日志可跟踪 Amazon 虚拟私有云 (Amazon VPC) 中资源进行的 DNS 查询。这有助于您了解应用程序的运行情况并发现安全威胁。

在 Security Lake 中将 Route 53 解析器查询日志添加为源时，Security Lake 会立即开始通过独立和重复的事件流直接从 Route 53 收集解析器查询日志。

Security Lake 不会管理 Route 53 日志，也不会影响现有的解析器查询日志配置。要管理解析器查询日志，您必须使用 Route 53 服务控制台。[Managing Resolver query logging configurations](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/resolver-query-logging-configurations-managing.html)

有关 Security Lake 如何将 Route 53 日志规范化为 OCSF，请参阅[GitHub OCSF repository for Route 53 logs](https://github.com/ocsf/examples/tree/main/Network%20Activity/DNS%20Activity/AWS/Route53).

### Security Hub findings <a href="#security-hub-findings" id="security-hub-findings"></a>

安全中心的发现可帮助您了解 AWS 中的安全状况，并让您根据安全行业标准和最佳实践检查您的环境。Security Hub从各种来源收集发现，包括与其他 AWS 服务的集成、第三方产品集成以及Security Hub预置的检查控制项。Security Hub将 AWS 安全发现统一为一种格式，称为AWS Security Finding Format (ASFF) 。当您在Security Lake中添加Security Hub发现作为源时，Security Lake会立即开始通过独立和重复的事件流直接从Security Hub收集您的发现。Security Lake还会将调查结果从 ASFF 转换到 [Open Cybersecurity Schema Framework (OCSF)](https://docs.aws.amazon.com/security-lake/latest/userguide/open-cybersecurity-schema-framework.html) 。

Security Lake 不会管理 Security Hub发现，也不会影响现有的Security Hub配置。要管理Security Hub发现，您必须使用 Security Hub 服务控制台。[Findings in AWS Security Hub](https://docs.aws.amazon.com/securityhub/latest/userguide/securityhub-findings.html)

有关 Security Lake 如何将 Security Hub findings 规范化为 OCSF，请参阅 [GitHub OCSF repository for Security Hub findings](https://github.com/ocsf/examples/tree/main/Findings/Security%20Finding/AWS/Security%20Hub).

### VPC Flow Logs <a href="#vpc-flow-logs" id="vpc-flow-logs"></a>

Amazon VPC 的 VPC 流量日志功能可捕获有关进出环境中网络接口的 IP 流量的信息。

在Security Lake 中添加 VPC Flow Logs 作为源时，Security Lake 会立即开始收集 VPC Flow Logs。它通过独立和重复的 Flow Logs 流直接从 Amazon VPC 获取 VPC Flow Logs。

Security Lake 不会管理您的 VPC Flow Logs 或影响您的 Amazon VPC 配置。要管理 Flow 日志，您必须使用 Amazon VPC 服务控制台。[Work with Flow Logs](https://docs.aws.amazon.com/vpc/latest/userguide/working-with-flow-logs.html)&#x20;

有关 Security Lake 如何将 VPC Flow Logs 规范化为 OCSF 的信息，请参阅 [GitHub OCSF repository for VPC Flow Logs](https://github.com/ocsf/examples/tree/main/Network%20Activity/Network%20Activity/AWS/VPC%20Flowlogs).

## 第三方日志集成

Amazon Security Lake 支持第三方的提供OCSF格式安全数据来源， 包括 [Barracuda Networks](https://blog.barracuda.com/2022/11/29/barracuda-integration-aws-security-lake/), [Cisco](https://blogs.cisco.com/security/cisco-joins-amazon-web-services-aws-for-the-launch-of-security-lake), [Cribl](https://cribl.io/blog/when-stream-meets-lake-cribl-integrates-with-new-amazon-security-lake/), [CrowdStrike](https://www.crowdstrike.com/blog/crowdstrike-announces-expanded-service-integrations-at-aws-reinvent-2022/), [CyberArk](https://www.cyberark.com/resources/product-announcements-blog/cyberark-audit-delivers-security-event-information-to-amazon-security-lake), [Lacework](https://www.lacework.com/blog/lacework-integrates-with-amazon-security-lake-to-reduce-complexity-in-your-cloud), [Laminar](https://laminarsecurity.com/blog/laminar-integrates-with-amazon-security-lake/), [Netscout](https://www.netscout.com/blog/utilizing-netscout-deep-packet-inspection-technology-enrich), [Netskope](https://www.netskope.com/press-releases/netskope-further-improves-risk-visibility-on-aws-strengthening-customers-security-posture), [Okta](https://www.okta.com/blog/2022/11/amazon-security-lake-and-okta-make-data-more-accessible-for-increased-security/), [Orca](https://orca.security/resources/blog/amazon-security-lake-orca-security/), [Palo Alto Networks](https://www.paloaltonetworks.com/blog/prisma-cloud/amazon-security-lake), Ping Identity, [SecurityScorecard](https://securityscorecard.com/blog/up-level-your-amazon-security), [Tanium](https://tanium.com/blog/ocsf-amazon-security-lake/), [The Falco Project](https://falco.org/blog/falco-on-aws), Trend Micro, [Vectra AI](https://www.vectra.ai/blogpost/vectra-offers-game-changing-amazon-security-lake-integration), [VMware](https://blogs.vmware.com/management/2022/11/vmware-aria-automation-for-secure-clouds-integration-with-amazon-security-lake.html), [Wiz](https://www.wiz.io/blog/wiz-launches-support-for-ocsf-to-detect-and-resolve-cloud-security-issues), and Zscaler.

您还可以使用第三方安全分析工具分析日志，包括： [Datadog](https://www.datadoghq.com/blog/analyze-amazon-security-lake-logs-with-datadog), [IBM](https://community.ibm.com/community/user/security/blogs/gaurav-sharma/2022/11/10/ibm-qradar-and-aws-announcement), [Rapid7](https://www.rapid7.com/blog/post/2022/11/29/insightidr-launches-integration-with-new-aws-security-data-lake-service/), Securonix, [SentinelOne](https://s1.ai/amazon-security-lake), [Splunk](https://www.splunk.com/en_us/blog/security/splunk-integrates-with-amazon-security-lake-to-deliver-analytics-using-the-open-cybersecurity-schema-framework.html), Sumo Logic, and [Trellix](https://www.trellix.com/en-us/about/newsroom/stories/xdr/trellix-leverages-amazon-security-lake.html)。还有服务合作伙伴，比如  Accenture, Atos, Deloitte, DXC, [Kyndryl](https://www.kyndryl.com/us/en/about-us/news/2022/11/kyndryl-aws-data-security), PWC, Rackspace, and Wipro t可以和你一起用好Amazon Security Lake。

其中将 Cribl Stream 与Amazon Security Lake集成可以收集本地和其他云上的日志：

比如

Cisco FTD、CrowdStrike Account Change、CrowdStrike Authentication、CrowdStrike Network Activity、GCP Audit Logs Account Activity、Palo Alto Networks (PAN) Threat and Traffic、SentinelOne、Windows Logon Activity、ZScaler Firewall and Weblogs；

<figure><img src="https://3752289132-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LTfg4e0NhLEbwi6WFJp%2Fuploads%2FkhEVHX3Ig7xVoZxNH9Oq%2Fimage.png?alt=media&#x26;token=e13a6a26-d73a-45df-a784-84a4a365d11d" alt=""><figcaption></figcaption></figure>

[https://docs.cribl.io/stream/usecase-security-lake/\
](https://docs.cribl.io/stream/usecase-security-lake/)

## 参考资料

\[AWS Docs][What is Amazon Security Lake?](https://docs.aws.amazon.com/security-lake/latest/userguide/what-is-security-lake.html)

\[AWS Docs][Security Lake pricing](https://docs.aws.amazon.com/security-lake/latest/userguide/estimating-costs.html)

\[Youtube] [How to get started and manage Amazon Security Lake with AWS Organizations | Amazon Web Services](https://www.youtube.com/watch?v=fKGhscpwN-k)

\[Youtube] [Amazon Security Lake Custom Source | Amazon Web Services](https://www.youtube.com/watch?v=8MDP3LX2A-A)

\[Youtube] [AWS Summit Tel Aviv 2023 - Amazon Security Lake: Analyze Multiple Security Events (SEC305)](https://www.youtube.com/watch?v=kBzy3htVUSs)

\[Github] [Amazon Security Lake OCSF Queries](https://github.com/awslabs/aws-security-analytics-bootstrap/tree/main/AWSSecurityAnalyticsBootstrap/amazon_security_lake_queries)

\[Github] [AWS Security Analytics Bootstrap Deployment Guide](https://github.com/awslabs/aws-security-analytics-bootstrap/blob/main/AWSSecurityAnalyticsBootstrap/docs/aws_security_analytics_bootstrap_deployment_guide.md)

\[Github] [Using Jupyter for Incident Response - Github Repository](https://github.com/mikejgillespie/aws-incident-response-playbooks/tree/master/jupyter)

[The JupyterLab Interface](https://jupyterlab.readthedocs.io/en/stable/user/interface.html)

[Jupyter with Jupyter Lab Notebook User Guide](https://jupyterlab.readthedocs.io/en/stable/user/notebook.html)

[\[Tool\] Assisted Log Enabler for AWS](https://github.com/awslabs/assisted-log-enabler-for-aws)

[\[Tool\] AthenaGlueService Logs](https://github.com/awslabs/athena-glue-service-logs)

[\[Service\] Amazon Detective](https://aws.amazon.com/detective/)

[\[Doc\] Running SQL Queries Using Amazon Athena](https://docs.aws.amazon.com/athena/latest/ug/querying-athena-tables.html)

[\[Doc\] Querying AWS Service Logs](https://docs.aws.amazon.com/athena/latest/ug/querying-AWS-service-logs.html)

[\[Blog\] Analyze Security, Compliance, and Operational Activity Using AWS CloudTrail and Amazon Athena](https://aws.amazon.com/blogs/big-data/aws-cloudtrail-and-amazon-athena-dive-deep-to-analyze-security-compliance-and-operational-activity/)

[\[Blog\] Athena Performance Tips](https://aws.amazon.com/blogs/big-data/top-10-performance-tuning-tips-for-amazon-athena/)

[\[Q\&A\] CTAS Bucketing Guidance](https://aws.amazon.com/premiumsupport/knowledge-center/set-file-number-size-ctas-athena/)

[\[Blog\] Amazon Route 53 Resolver Query Logs](https://aws.amazon.com/blogs/aws/log-your-vpc-dns-queries-with-route-53-resolver-query-logs)

[\[Doc\] Configure Amazon Route 53 Resolver Query Logs](https://console.aws.amazon.com/route53resolver/home/query-logging#/query-logging/configure) (choose Amazon S3 destination)

[\[Doc\] Security Reference Architecture: Log Archive Account](https://docs.aws.amazon.com/prescriptive-guidance/latest/security-reference-architecture/log-archive.html)

[\[Doc\] Running SQL Queries Using Amazon Athena](https://docs.aws.amazon.com/athena/latest/ug/querying-athena-tables.html)

[Open Cybersecurity Schema Framework (OCSF) project](https://github.com/ocsf)

Amazon Security Lake - 15min overview - [Lightening Talk](https://tiny.amazon.com/ku7q9ymw/collamaznuxeuidocc6f4), [Presentation](https://tiny.amazon.com/13jxjtme/collamaznuxeuidocf2c5)

Webinar - [AWS re:Inforce 2023 - Build your security data lake w/ Amazon Security Lake, featuring IPG (TDR205)](https://www.youtube.com/watch?v=qcXB6Y_7bNo)

Webinar - [AWS re:Invent session - Introducing Amazon Security Lake](https://www.youtube.com/watch?v=V7XwbPPjXSY)

Webinar - [AWS On Air ft. Amazon Security Lake (Preview)](https://www.youtube.com/watch?v=7xHTS5bRbbM), and [AWS on Air: Lockdown](https://www.youtube.com/watch?v=3WO6fhJt1kQ)

Demo - [How to get started and manage Amazon Security Lake with AWS Organizations](https://www.youtube.com/watch?v=fKGhscpwN-k)

Demo - [Amazon Security Lake with Amazon Athena and Amazon QuickSight](https://www.youtube.com/watch?v=M0GviMezp3w)

Customer Blog - [Exploring Amazon Security Lake (Salesforce’s detection and response team) ](https://security.salesforce.com/blog/exploring-amazon-security-lake)

Blog - [Amazon Security Lake is now generally available](https://aws.amazon.com/blogs/security/amazon-security-lake-is-now-generally-available/)

Blog - [Get custom data into Amazon Security Lake through ingesting Azure activity logs](https://aws.amazon.com/blogs/security/get-custom-data-into-amazon-security-lake-through-ingesting-azure-activity-logs/)

Blog -[ Generate machine learning insights for Amazon Security Lake data using Amazon SageMaker](https://aws.amazon.com/blogs/security/generate-machine-learning-insights-for-amazon-security-lake-data-using-amazon-sagemaker/)

Blog - [Generate security insights from Amazon Security Lake data using Amazon OpenSearch Ingestion](https://aws.amazon.com/blogs/big-data/generate-security-insights-from-amazon-security-lake-data-using-amazon-opensearch-ingestion/)

[\[Github\]Security Lake bill estimate tool](https://github.com/aws-samples/amazon-security-lake-bill-estimate-tool)

[\[Github\]AWS Security Analytics Bootstrap](https://github.com/awslabs/aws-security-analytics-bootstrap/tree/AmazonSecurityLake_Preview)

[\[Github\] Amazon Security Lake OCSF Queries](https://github.com/awslabs/aws-security-analytics-bootstrap/tree/main/AWSSecurityAnalyticsBootstrap/amazon_security_lake_queries)

[Amazon Security Lake Overview](https://aws.amazon.com/security-lake/)

[Amazon Security Lake Pricing](https://aws.amazon.com/security-lake/pricing/)

[6 ways Amazon Security Lake could boost security analytics](https://www.techtarget.com/searchdatamanagement/opinion/6-ways-Amazon-Security-Lake-could-boost-data-security?Offer=abt_pubpro_AI-Insider)

[\[blog\]Identify and remediate security threats to your business using security analytics with Amazon OpenSearch Service](https://aws.amazon.com/tw/blogs/big-data/identify-and-remediate-security-threats-to-your-business-using-security-analytics-with-amazon-opensearch-service/)

## 第三方集成指引

[\[Github\] CrowdStrike Falcon Data Replicator and Amazon Security Lake Integration Guide](https://github.com/CrowdStrike/aws-security-lake)

[Amazon OpenSearch Ingestion now supports ingesting events from Amazon Security Lake](https://aws.amazon.com/about-aws/whats-new/2023/06/amazon-opensearch-ingestion-events-security-lake/)

[\[Github\] Ingesting Custom Application Logs into AWS Security Lake](https://github.com/liangfb/security-lake-custom-source-ingestion)
