

# AWS Security Hub CSPM との統合
<a name="securityhub-integration"></a>

[AWS Security Hub CSPM](https://docs.aws.amazon.com/securityhub/latest/userguide/what-is-securityhub.html) では、AWS のセキュリティ状態を包括的に把握し、セキュリティ業界標準およびベストプラクティスに照らして環境をチェックするのに役立ちます。Security Hub CSPM は、AWS アカウント、サービス、およびサポートされているサードパーティーパートナー製品全体からセキュリティデータを収集します。Security Hub CSPM を使用して、セキュリティの傾向を分析し、最も優先度の高いセキュリティ問題を特定できます。

Security Hub CSPM との AWS IoT Device Defender 統合により、AWS IoT Device Defender から Security Hub CSPM に結果を送信できます。Security Hub CSPM は、セキュリティ体制の分析にこれらの検出結果を含めます。

**Contents**
+ [統合の有効化と構成](#securityhub-integration-enable)
+ [AWS IoT Device Defender から Security Hub CSPM に検出結果を送信する方法](#securityhub-integration-sending-findings)
  + [AWS IoT Device Defender が送信する検出結果の種類](#securityhub-integration-finding-types)
  + [検出結果が送信されるまでのレイテンシー](#securityhub-integration-finding-latency)
  + [Security Hub CSPM が使用できない場合の再試行](#securityhub-integration-retry-send)
  + [Security Hub CSPM の既存の検出結果を更新する](#securityhub-integration-finding-updates)
+ [AWS IoT Device Defender からの一般的な検出結果](#securityhub-integration-finding-example)
+ [AWS IoT Device Defender が検出結果を Security Hub CSPM に送信するのを停止する](#securityhub-integration-disable)

## 統合の有効化と構成
<a name="securityhub-integration-enable"></a>

AWS IoT Device Defender を Security Hub CSPM と統合する前に、まず Security Hub CSPM を有効にする必要があります。Security Hub CSPM を有効にする方法の詳細については、「*AWS Security Hub ユーザーガイド*」の「[Security Hub の設定](https://docs.aws.amazon.com/securityhub/latest/userguide/securityhub-settingup.html)」を参照してください。

AWS IoT Device Defender と Security Hub CSPM の両方を有効にしたら、[Security Hub CSPM コンソールで [統合] ページ](https://console.aws.amazon.com//securityhub/home#/integrations)を開き、[監査]、[検出]、またはその両方の **[結果を受け入れる]** を選択します。AWS IoT Device Defender が結果を Security Hub CSPM へ送信します。

## AWS IoT Device Defender から Security Hub CSPM に検出結果を送信する方法
<a name="securityhub-integration-sending-findings"></a>

Security Hub CSPM では、セキュリティの問題が*検出結果*として追跡されます。結果の中には、他の AWS のサービスやサードパーティー製品が検出した問題に由来するものもあります。

Security Hub CSPM には、これらすべてのソースからの検出結果を管理するためのツールが用意されています。検出結果の一覧を表示およびフィルタリングして、検出結果の詳細を表示できます。詳細については、*AWS Security Hub ユーザーガイド*の「[検出結果の表示](https://docs.aws.amazon.com/securityhub/latest/userguide/securityhub-findings-viewing.html)」を参照してください。検出結果の調査状況を追跡することもできます 詳細については、*AWS Security Hub ユーザーガイド*の「[検出結果に対するアクションの実行](https://docs.aws.amazon.com/securityhub/latest/userguide/securityhub-findings-taking-action.html)」を参照してください。

Security Hub CSPM のすべての調査結果で、*AWS Security Finding 形式 (ASFF)* と呼ばれる標準の JSON 形式が使用されます。ASFF には、問題のソース、影響を受けるリソース、および検出結果の現在のステータスに関する詳細が含まれます。詳細については、*AWS Security Hub ユーザーガイド*の 「[AWS Security Finding 形式 (ASFF)](https://docs.aws.amazon.com/securityhub/latest/userguide/securityhub-findings-format.html)」を参照してください。

AWS IoT Device Defender は Security Hub CSPM に検出結果を送信する AWS サービスの １ つです。

### AWS IoT Device Defender が送信する検出結果の種類
<a name="securityhub-integration-finding-types"></a>

Security Hub CSPM 統合を有効にすると、AWS IoT Device Defender 監査は生成した結果 (*チェックサマリー*と呼ばれる) を Security Hub CSPM に送信します。チェックサマリーは、特定の監査チェックタイプと特定の監査タスクに関する一般的な情報です。監査の詳細については、「[監査チェック](https://docs.aws.amazon.com/iot/latest/developerguide/device-defender-audit-checks.html)」を参照してください。

AWS IoT Device Defender 監査は、各監査タスクの監査チェックサマリーと監査結果の両方について、検出結果の更新を Security Hub CSPM に送信します。監査チェックで見つかったすべてのリソースが準拠している場合、または監査タスクがキャンセルされた場合、監査は Security Hub CSPM のチェックサマリーをアーカイブ済みのレコード状態に更新します。あるリソースが監査チェックで非準拠と報告されたが、最後の監査タスクで準拠していると報告された場合、監査はそのリソースを準拠に変更し、Security Hub CSPM での結果を ARCHIVED レコードの状態に更新します。

AWS IoT Device Defender Detect は、違反の検出結果を Security Hub CSPM に送信します。これらの違反結果には、機械学習 (ML)、統計的動作、静的動作が含まれます。

結果を Security Hub CSPM に送信するために、AWS IoT Device Defender は [AWS Security Finding Format (ASFF)](https://docs.aws.amazon.com/securityhub/latest/userguide/securityhub-findings-format.html) を使用します。ASFF では、`Types` フィールドが検出結果タイプを提供します。AWS IoT Device Defender の検出結果には、`Types` に対する次の値を指定できます。

**異常な動作**  
競合する MQTT クライアント ID とデバイス証明書共有チェックの検出タイプ、および Detect の検出タイプ。

**ソフトウェアと設定のチェック/脆弱性**  
その他すべての Audit チェックの結果タイプ。

### 検出結果が送信されるまでのレイテンシー
<a name="securityhub-integration-finding-latency"></a>

AWS IoT Device Defender Audit によって新しい結果が作成されると、その結果が Security Hub CSPM へ送信されます。レイテンシーは監査タスクで生成される結果の量によって異なります。Security Hub CSPM は通常 1 時間以内に結果を受け取ります。

AWS IoT Device Defender Detect は違反の検出結果を Security Hub へ送信します。違反がアラームに入ったり、アラームから外れたりすると (つまり、アラームが作成または削除された場合)、対応する Security Hub CSPM の結果がすぐに作成またはアーカイブされます。

### Security Hub CSPM が使用できない場合の再試行
<a name="securityhub-integration-retry-send"></a>

Security Hub CSPM が使用できない場合、AWS IoT Device Defender Audit と AWS IoT Device Defender Detect は検出結果が受信されるまでその結果を再送信し続けます。

### Security Hub CSPM の既存の検出結果を更新する
<a name="securityhub-integration-finding-updates"></a>

AWS IoT Device Defender Audit 結果が Security Hub CSPM に送信されると、チェックされたリソース ID と監査チェックタイプによって識別できます。同じリソースと監査チェックの後続の監査タスクで新しい監査結果が生成された場合、AWS IoT Device Defender Audit 更新を送信して、検出アクティビティの追加の観測を Security Hub CSPM に反映します。同じリソースと監査チェックに対する後続の監査タスクで追加の監査結果が生成されない場合、リソースは監査チェックに準拠するように変更されます。AWS IoT Device DefenderAudit は検出結果を Security Hub CSPM へ送信します。

AWS IoT Device Defender Audit では、Security Hub CSPM チェックサマリーも更新されます。監査チェックで準拠していないリソースが見つかったり、チェックが失敗したりすると、Security Hub CSPM の検索結果のステータスがアクティブになります。それ以外の場合、AWS IoT Device Defender Audit は検出結果を Security Hub CSPM へ送信します。

AWS IoT Device Defender Detect は、違反があったとき (アラーム中など) に Security Hub CSPM の検出結果を作成します。この結果は、次のいずれかの条件が満たされた場合にのみ更新されます。
+ Security Hub CSPM での検索結果はまもなく期限切れになるため、AWS IoT Device Defender は、更新を送信して結果を最新の状態に保ちます。結果は、最新の更新から 90 日後、または更新が行われない場合は作成日から 90 日後に削除されます。詳細については、「*AWS Security Hub ユーザーガイド*」の「[Security Hub CSPM クォータ](https://docs.aws.amazon.com/securityhub/latest/userguide/securityhub_limits.html)」を参照してください。
+ 該当する違反はアラーム終了となり、AWS IoT Device Defender は、検出ステータスを ARCHIVED に更新します。

## AWS IoT Device Defender からの一般的な検出結果
<a name="securityhub-integration-finding-example"></a>

AWS IoT Device Defender は、[AWS Security Finding Format (ASFF)](https://docs.aws.amazon.com/securityhub/latest/userguide/securityhub-findings-format.html) を使用して結果を Security Hub CSPM に送信します。

次の例は、監査結果についての Security Hub CSPM の一般的な結果を示しています。`ProductFields` の `ReportType` は `AuditFinding` です。

```
  {
  "SchemaVersion": "2018-10-08",
  "Id": "336757784525/IOT_POLICY/policyexample/1/IOT_POLICY_OVERLY_PERMISSIVE_CHECK/ALLOWS_BROAD_ACCESS_TO_IOT_DATA_PLANE_ACTIONS",
  "ProductArn": "arn:aws:securityhub:us-west-2::product/aws/iot-device-defender-audit",
  "ProductName": "IoT Device Defender - Audit",
  "CompanyName": "AWS",
  "Region": "us-west-2",
  "GeneratorId": "1928b87ab338ee2f541f6fab8c41c4f5",
  "AwsAccountId": "123456789012",
  "Types": [
    "Software and Configuration Check/Vulnerabilities"
  ],
  "CreatedAt": "2022-11-06T22:11:40.941Z",
  "UpdatedAt": "2022-11-06T22:11:40.941Z",
  "Severity": {
    "Label": "CRITICAL",
    "Normalized": 90
  },
  "Title": "IOT_POLICY_OVERLY_PERMISSIVE_CHECK: ALLOWS_BROAD_ACCESS_TO_IOT_DATA_PLANE_ACTIONS",
  "Description": "IOT_POLICY policyexample:1 is reported as non-compliant for IOT_POLICY_OVERLY_PERMISSIVE_CHECK by Audit task 9f71b6e90cfb57d4ac671be3a4898e6a. The non-compliant reason is Policy allows broad access to IoT data plane actions: [iot:Connect].",
  "SourceUrl": "https://us-west-2.console.aws.amazon.com/iot/home?region=us-west-2#/policy/policyexample",
  "ProductFields": {
    "CheckName": "IOT_POLICY_OVERLY_PERMISSIVE_CHECK",
    "TaskId": "9f71b6e90cfb57d4ac671be3a4898e6a",
    "TaskType": "ON_DEMAND_AUDIT_TASK",
    "PolicyName": "policyexample",
    "IsSuppressed": "false",
    "ReasonForNonComplianceCode": "ALLOWS_BROAD_ACCESS_TO_IOT_DATA_PLANE_ACTIONS",
    "ResourceType": "IOT_POLICY",
    "FindingId": "1928b87ab338ee2f541f6fab8c41c4f5",
    "PolicyVersionId": "1",
    "ReportType": "AuditFinding",
    "TaskStartTime": "1667772700554",
    "aws/securityhub/FindingId": "arn:aws:securityhub:us-west-2::product/aws/iot-device-defender-audit/336757784525/IOT_POLICY/policyexample/1/IOT_POLICY_OVERLY_PERMISSIVE_CHECK/ALLOWS_BROAD_ACCESS_TO_IOT_DATA_PLANE_ACTIONS",
    "aws/securityhub/ProductName": "IoT Device Defender - Audit",
    "aws/securityhub/CompanyName": "AWS"
  },
  "Resources": [
    {
      "Type": "AwsIotPolicy",
      "Id": "policyexample",
      "Partition": "aws",
      "Region": "us-west-2",
      "Details": {
        "Other": {
          "PolicyVersionId": "1"
        }
      }
    }
  ],
  "WorkflowState": "NEW",
  "Workflow": {
    "Status": "NEW"
  },
  "RecordState": "ACTIVE",
  "FindingProviderFields": {
    "Severity": {
      "Label": "CRITICAL"
    },
    "Types": [
      "Software and Configuration Check/Vulnerabilities"
    ]
  }
}
```

次の例は、監査チェックサマリーに関する Security Hub CSPM からの結果を示しています。`ProductFields` の `ReportType` は `CheckSummary` です。

```
  {
  "SchemaVersion": "2018-10-08",
  "Id": "615243839755/SCHEDULED_AUDIT_TASK/daily_audit_schedule_checks/DEVICE_CERTIFICATE_KEY_QUALITY_CHECK",
  "ProductArn": "arn:aws:securityhub:us-east-1::product/aws/iot-device-defender-audit",
  "ProductName": "IoT Device Defender - Audit",
  "CompanyName": "AWS",
  "Region": "us-east-1",
  "GeneratorId": "f3021945485adf92487c273558fcaa51",
  "AwsAccountId": "123456789012",
  "Types": [
    "Software and Configuration Check/Vulnerabilities/CVE"
  ],
  "CreatedAt": "2022-10-18T14:20:13.933Z",
  "UpdatedAt": "2022-10-18T14:20:13.933Z",
  "Severity": {
    "Label": "CRITICAL",
    "Normalized": 90
  },
  "Title": "DEVICE_CERTIFICATE_KEY_QUALITY_CHECK Summary: Completed with 2 non-compliant resources",
  "Description": "Task f3021945485adf92487c273558fcaa51 of weekly scheduled Audit daily_audit_schedule_checks completes. 2 non-cimpliant resources are found for DEVICE_CERTIFICATE_KEY_QUALITY_CHECK out of 1000 resources in the account. The percentage of non-compliant resources is 0.2%.",
  "SourceUrl": "https://us-east-1.console.aws.amazon.com/iot/home?region=us-east-1#/dd/audit/results/f3021945485adf92487c273558fcaa51/DEVICE_CERTIFICATE_KEY_QUALITY_CHECK",
  "ProductFields": {
    "TaskId": "f3021945485adf92487c273558fcaa51",
    "TaskType": "SCHEDULED_AUDIT_TASK",
    "ScheduledAuditName": "daily_audit_schedule_checks",
    "CheckName": "DEVICE_CERTIFICATE_KEY_QUALITY_CHECK",
    "ReportType": "CheckSummary",
    "CheckRunStatus": "COMPLETED_NON_COMPLIANT",
    "NonComopliantResourcesCount": "2",
    "SuppressedNonCompliantResourcesCount": "1",
    "TotalResourcesCount": "1000",
    "aws/securityhub/FindingId": "arn:aws:securityhub:us-east-1::product/aws/iot-device-defender-audit/615243839755/SCHEDULED/daily_audit_schedule_checks/DEVICE_CERTIFICATE_KEY_QUALITY_CHECK",
    "aws/securityhub/ProductName": "IoT Device Defender - Audit",
    "aws/securityhub/CompanyName": "AWS"
  },
  "Resources": [
    {
      "Type": "AwsIotAuditTask",
      "Id": "f3021945485adf92487c273558fcaa51",
      "Region": "us-east-1"
    }
  ],
  "WorkflowState": "NEW",
  "Workflow": {
    "Status": "NEW"
  },
  "RecordState": "ACTIVE",
  "FindingProviderFields": {
    "Severity": {
      "Label": "CRITICAL"
    },
    "Types": [
      "Software and Configuration Check/Vulnerabilities/CVE"
    ]
  }
}
```

次の例は、AWS IoT Device Defender 検出違反に対する Security Hub CSPM からの一般的な検出結果を示しています。

```
  {
  "SchemaVersion": "2018-10-08",
  "Id": "e92a782593c6f5b1fc7cb6a443dc1a12",
  "ProductArn": "arn:aws:securityhub:us-east-1::product/aws/iot-device-defender-detect",
  "ProductName": "IoT Device Defender - Detect",
  "CompanyName": "AWS",
  "Region": "us-east-1",
  "GeneratorId": "arn:aws:iot:us-east-1:123456789012:securityprofile/MySecurityProfile",
  "AwsAccountId": "123456789012",
  "Types": [
    "Unusual Behaviors"
  ],
  "CreatedAt": "2022-11-09T22:45:00Z",
  "UpdatedAt": "2022-11-09T22:45:00Z",
  "Severity": {
    "Label": "MEDIUM",
    "Normalized": 40
  },
  "Title": "Registered thing MyThing is in alarm for STATIC behavior MyBehavior.",
  "Description": "Registered thing MyThing violates STATIC behavior MyBehavior of security profile MySecurityProfile. Violation was triggered because the device did not conform to aws:num-disconnects less-than 1.",
  "SourceUrl": "https://us-east-1.console.aws.amazon.com/iot/home?region=us-east-1#/dd/securityProfile/MySecurityProfile?tab=violations",
  "ProductFields": {
    "ComparisonOperator": "less-than",
    "BehaviorName": "MyBehavior",
    "ViolationId": "e92a782593c6f5b1fc7cb6a443dc1a12",
    "ViolationStartTime": "1668033900000",
    "SuppressAlerts": "false",
    "ConsecutiveDatapointsToAlarm": "1",
    "ConsecutiveDatapointsToClear": "1",
    "DurationSeconds": "300",
    "Count": "1",
    "MetricName": "aws:num-disconnects",
    "BehaviorCriteriaType": "STATIC",
    "ThingName": "MyThing",
    "SecurityProfileName": "MySecurityProfile",
    "aws/securityhub/FindingId": "arn:aws:securityhub:us-east-1::product/aws/iot-device-defender-detect/e92a782593c6f5b1fc7cb6a443dc1a12",
    "aws/securityhub/ProductName": "IoT Device Defender - Detect",
    "aws/securityhub/CompanyName": "AWS"
  },
  "Resources": [
    {
      "Type": "AwsIotRegisteredThing",
      "Id": "MyThing",
      "Region": "us-east-1",
      "Details": {
        "Other": {
          "SourceUrl": "https://us-east-1.console.aws.amazon.com/iot/home?region=us-east-1#/thing/MyThing?tab=violations",
          "IsRegisteredThing": "true",
          "ThingArn": "arn:aws:iot:us-east-1:123456789012:thing/MyThing"
        }
      }
    }
  ],
  "WorkflowState": "NEW",
  "Workflow": {
    "Status": "NEW"
  },
  "RecordState": "ACTIVE",
  "FindingProviderFields": {
    "Severity": {
      "Label": "MEDIUM"
    },
    "Types": [
      "Unusual Behaviors"
    ]
  }
}
```

## AWS IoT Device Defender が検出結果を Security Hub CSPM に送信するのを停止する
<a name="securityhub-integration-disable"></a>

Security Hub CSPM への結果の送信を停止するには、Security Hub CSPM コンソールまたは API を使用できます。

詳細については、「*AWS Security Hub ユーザーガイド*」の「[統合からの検出結果のフローの無効化と有効化 (コンソール)](https://docs.aws.amazon.com/securityhub/latest/userguide/securityhub-integrations-managing.html#securityhub-integration-findings-flow-console)」または「[統合からの検出結果のフローの無効化 (Security Hub CSPM API、AWS CLI)](https://docs.aws.amazon.com/securityhub/latest/userguide/securityhub-integrations-managing.html#securityhub-integration-findings-flow-disable-api)」を参照してください。