diff --git a/packages/aws/_dev/build/docs/guardduty.md b/packages/aws/_dev/build/docs/guardduty.md new file mode 100644 index 00000000000..08ed5e0225c --- /dev/null +++ b/packages/aws/_dev/build/docs/guardduty.md @@ -0,0 +1,86 @@ +# GuardDuty + +## Overview + +The [Amazon GuardDuty](https://aws.amazon.com/guardduty/) integration collects and parses data from Amazon GuardDuty [Findings](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_GetFindings.html) REST APIs. + +The Amazon GuardDuty integration can be used in three different modes to collect data: +- HTTP REST API - Amazon GuardDuty pushes logs directly to an HTTP REST API. +- AWS S3 polling - Amazon GuardDuty writes data to S3 and Elastic Agent polls the S3 bucket by listing its contents and reading new files. +- AWS S3 SQS - Amazon GuardDuty writes data to S3, S3 pushes a new object notification to SQS, Elastic Agent receives the notification from SQS, and then reads the S3 object. Multiple Agents can be used in this mode. + +## Requirements + +You need Elasticsearch for storing and searching your data and Kibana for visualizing and managing it. You can use our hosted Elasticsearch Service on Elastic Cloud, which is recommended, or self-manage the Elastic Stack on your own hardware. + +**Note**: It is recommended to use AWS SQS for Amazon GuardDuty. + +## Compatibility + + 1. The minimum compatible version of this module is **Elastic Agent 8.6.0**. + + 2. Following GuardDuty Resource types have been supported in the current integration version: + + | Sr. No. | Resource types | + |---------|----------------------| + | 1 | accessKeyDetails | + | 2 | containerDetails | + | 3 | ebsVolumeDetails | + | 4 | ecsClusterDetails | + | 5 | eksClusterDetails | + | 6 | instanceDetails | + | 7 | kubernetesDetails | + | 8 | s3BucketDetails | + | 9 | rdsDbInstanceDetails | + | 10 | rdsDbUserDetails | + + 3. Following GuardDuty Service action types have been supported in the current integration version: + + | Sr. No. | Service action types | + |---------|--------------------------| + | 1 | awsApiCallAction | + | 2 | dnsRequestAction | + | 3 | kubernetesApiCallAction | + | 4 | networkConnectionAction | + | 5 | portProbeAction | + | 6 | rdsLoginAttemptAction | + +## Setup + +### To collect data from AWS S3 Bucket, follow the steps below: +- Configure the [Data Forwarder](https://docs.aws.amazon.com/guardduty/latest/ug/guardduty_exportfindings.html) to ingest data into an AWS S3 bucket. However, the user can set the parameter "Bucket List Prefix" according to the requirement. + +### To collect data from AWS SQS, follow the steps below: +1. If data forwarding to an AWS S3 bucket hasn't been configured, then first setup an AWS S3 bucket as mentioned in the documentation above. +2. To setup an SQS queue, follow "Step 1: Create an Amazon SQS queue" mentioned in the [Documentation](https://docs.aws.amazon.com/AmazonS3/latest/userguide/ways-to-add-notification-config-to-bucket.html). + - While creating an SQS queue, please provide the same bucket ARN that has been generated after creating the AWS S3 bucket. +3. Setup event notification for an S3 bucket. Follow this [guide](https://docs.aws.amazon.com/AmazonS3/latest/userguide/enable-event-notifications.html). + - The user has to perform Step 3 for the guardduty data-stream, and the prefix parameter should be set the same as the S3 Bucket List Prefix as created earlier. For example, `logs/` for guardduty data stream. + - For all the event notifications that have been created, select the event type as s3:ObjectCreated:*, select the destination type SQS Queue, and select the queue that has been created in Step 2. + +**Note**: + - Credentials for the above AWS S3 and SQS input types should be configured according to the [input configuration guide](https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-input-aws-s3.html#aws-credentials-config). + - Data collection via AWS S3 Bucket and AWS SQS are mutually exclusive in this case. + +## To collect data from Amazon GuardDuty API, users must have an Access Key and a Secret Key. To create an API token follow the steps below: + + 1. Login to https://console.aws.amazon.com/. + 2. Go to https://console.aws.amazon.com/iam/ to access the IAM console. + 3. On the navigation menu, choose Users. + 4. Choose your IAM user name. + 5. Select Create access key from the Security Credentials tab. + 6. To see the new access key, choose Show. + +## Note + + - The Secret Access Key and Access Key ID are required for the current integration package. + +## Logs + +### GuardDuty + +This is the [`GuardDuty`](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_GetFindings.html#guardduty-GetFindings-response-findings) data stream. + +{{event "guardduty"}} + +{{fields "guardduty"}} diff --git a/packages/aws/changelog.yml b/packages/aws/changelog.yml index 72ff8079d6f..f089d7019aa 100644 --- a/packages/aws/changelog.yml +++ b/packages/aws/changelog.yml @@ -1,4 +1,9 @@ # newer versions go on top +- version: "1.31.0" + changes: + - description: Add a data stream for Amazon GuardDuty. + type: enhancement + link: https://github.com/elastic/integrations/pull/4915 - version: "1.30.0" changes: - description: Add dashboards data streams filters. diff --git a/packages/aws/data_stream/guardduty/_dev/deploy/docker/docker-compose.yml b/packages/aws/data_stream/guardduty/_dev/deploy/docker/docker-compose.yml new file mode 100644 index 00000000000..7b284b311c1 --- /dev/null +++ b/packages/aws/data_stream/guardduty/_dev/deploy/docker/docker-compose.yml @@ -0,0 +1,17 @@ +version: '2.3' +services: + guardduty: + image: docker.elastic.co/observability/stream:v0.8.0 + hostname: guardduty.xxxx.amazonaws.com + ports: + - 443 + volumes: + - ./files:/files:ro + environment: + PORT: "443" + command: + - http-server + - --addr=:443 + - --config=/files/config.yml + - --tls-cert=/files/certificate.crt + - --tls-key=/files/private.key diff --git a/packages/aws/data_stream/guardduty/_dev/deploy/docker/files/certificate.crt b/packages/aws/data_stream/guardduty/_dev/deploy/docker/files/certificate.crt new file mode 100644 index 00000000000..ed6efc4c704 --- /dev/null +++ b/packages/aws/data_stream/guardduty/_dev/deploy/docker/files/certificate.crt @@ -0,0 +1,20 @@ +-----BEGIN CERTIFICATE----- +MIIDTjCCAjYCCQCP7/+x5TSKBTANBgkqhkiG9w0BAQsFADBpMQswCQYDVQQGEwJY +WDEVMBMGA1UEBwwMRGVmYXVsdCBDaXR5MRwwGgYDVQQKDBNEZWZhdWx0IENvbXBh +bnkgTHRkMSUwIwYDVQQDDBxndWFyZGR1dHkueHh4eC5hbWF6b25hd3MuY29tMB4X +DTIyMTIwOTA3MDY1NVoXDTIzMTIwOTA3MDY1NVowaTELMAkGA1UEBhMCWFgxFTAT +BgNVBAcMDERlZmF1bHQgQ2l0eTEcMBoGA1UECgwTRGVmYXVsdCBDb21wYW55IEx0 +ZDElMCMGA1UEAwwcZ3VhcmRkdXR5Lnh4eHguYW1hem9uYXdzLmNvbTCCASIwDQYJ +KoZIhvcNAQEBBQADggEPADCCAQoCggEBAM465fWaXWFWxW2grodH77Tbn9Fh50yf +jcn0gCdoeF0ppz6Mfr1A+sV8TEZraP2i8rfI1Qr65iWRN2p07NPQculyxmlT2VAg +wOF0wvMfcypu+P6Wp9D62//GP4WMfG0yUblIee+jHfzaHk8TZI6d6Od+q3u82g0x +xIuq2WruhUXc/Bx4oKqo4GfZtW82TYHxEJ21G8DbZ3Kek/rXg5w0byp+m115XVXc +AhfaQsEnxgxzIwdPxwZyLa6G2Rdm0TBR3VzgMlgiOLqcECH1L5ZdDueI3vhM7Hpl +sY6vvygm4GA0onduAv/NbwJy1nEIVWZ8wPa6FFAvRBPYT/mlwk2/O6UCAwEAATAN +BgkqhkiG9w0BAQsFAAOCAQEAc+xGD2w7Btxwcud2wFiwqs9oDO4iS+DeER4hGkV7 +2zNk42pezOrNbty+cZzxbYU7+FmmLJMs35kT1ody81I/wG9iBMp08CDz6MCmzgG0 +9C8Qgiro/TfqrqoEt3xrs7iNQ06lcwR7iFqMyeqZuFyM4BRQgoGzdhYxwkQtI3t2 +sLX8n+roy+D2JlMRWEsH1xV+MOLDFhLiXDMkf7pvhp5+MKjZscnSsU2lHn6gbVkk +Jphsrsom4I3y7Rm0PlaVMO/AKffnRkDSqEhFPx23RoFpWL0zfc5C3DDLGewd7J8O +gCFBRnggudvoELRFuuwEQfAdANyw+xoha+ScbyQZIVUdNw== +-----END CERTIFICATE----- diff --git a/packages/aws/data_stream/guardduty/_dev/deploy/docker/files/config.yml b/packages/aws/data_stream/guardduty/_dev/deploy/docker/files/config.yml new file mode 100644 index 00000000000..b396981cd7c --- /dev/null +++ b/packages/aws/data_stream/guardduty/_dev/deploy/docker/files/config.yml @@ -0,0 +1,13 @@ +rules: + - path: /detector/xxxx/findings + methods: ["POST"] + responses: + - status_code: 200 + body: | + {"findingIds": ["e0c22973b012f3af67ac593443e920ff"],"nextToken": ""} + - path: /detector/xxxx/findings/get + methods: ["POST"] + responses: + - status_code: 200 + body: |- + {"findings":[{"schemaVersion":"2.0","accountId":"123412341234","region":"us-east-1","partition":"aws","id":"e0c22973b012f3af67ac593443e920ff","arn":"arn:aws:guardduty:us-east-1:123412341234:detector/12341234e19ce5461eabcd1234abcd1234/finding/43b6abcdeabcdeabcde1234562176924","type":"Discovery:Kubernetes/TorIPCaller","resource":{"resourceType":"EKSCluster","eksClusterDetails":{"name":"GeneratedFindingEKSClusterName","arn":"GeneratedFindingEKSClusterArn","createdAt":1635962410.342,"vpcId":"GeneratedFindingEKSClusterVpcId","status":"ACTIVE","tags":[{"value":"GeneratedFindingEKSClusterTagValue1","key":"GeneratedFindingEKSClusterTag1"},{"value":"GeneratedFindingEKSClusterTagValue2","key":"GeneratedFindingEKSClusterTag2"},{"value":"GeneratedFindingEKSClusterTagValue3","key":"GeneratedFindingEKSClusterTag3"}]},"kubernetesDetails":{"kubernetesWorkloadDetails":null,"kubernetesUserDetails":{"username":"GeneratedFindingUserName","uid":"GeneratedFindingUID","groups":["GeneratedFindingUserGroup"]}},"accessKeyDetails":{"accessKeyId":"GeneratedFindingAccessKeyId","principalId":"GeneratedFindingPrincipalId","userType":"Role","userName":"GeneratedFindingUserName"}},"service":{"serviceName":"guardduty","detectorId":"12341234e19ce5461eabcd1234abcd1234","action":{"actionType":"KUBERNETES_API_CALL","kubernetesApiCallAction":{"requestUri":"GeneratedFindingRequestURI","verb":"list","sourceIPs":["175.16.199.1"],"userAgent":"","remoteIpDetails":{"ipAddressV4":"175.16.199.1","organization":{"asn":"0","asnOrg":"GeneratedFindingASNOrg","isp":"GeneratedFindingISP","org":"GeneratedFindingORG"},"country":{"countryName":"GeneratedFindingCountryName"},"city":{"cityName":"GeneratedFindingCityName"},"geoLocation":{"lat":0,"lon":0}},"statusCode":200}},"resourceRole":"TARGET","additionalInfo":{"threatName":"GeneratedFindingThreatName","threatListName":"GeneratedFindingThreatListName","sample":true,"value":"{\"threatName\":\"GeneratedFindingThreatName\",\"threatListName\":\"GeneratedFindingThreatListName\",\"sample\":true}","type":"default"},"evidence":{"threatIntelligenceDetails":[{"threatNames":["GeneratedFindingThreatName"],"threatListName":"GeneratedFindingThreatListName"}]},"eventFirstSeen":"2022-11-17T09:33:19.000Z","eventLastSeen":"2022-11-22T12:22:20.000Z","archived":false,"count":2},"severity":5,"createdAt":"2022-11-17T09:33:19.228Z","updatedAt":"2022-11-22T12:22:20.938Z","title":"Kubernetes API commonly used in Discovery tactics invoked from a Tor exit node IP address.","description":"Kubernetes API commonly used in Discovery tactics was invoked on cluster GeneratedFindingEKSClusterName from Tor exit node IP address 175.16.199.1."}]} diff --git a/packages/aws/data_stream/guardduty/_dev/deploy/docker/files/private.key b/packages/aws/data_stream/guardduty/_dev/deploy/docker/files/private.key new file mode 100644 index 00000000000..fd6cca4858d --- /dev/null +++ b/packages/aws/data_stream/guardduty/_dev/deploy/docker/files/private.key @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDOOuX1ml1hVsVt +oK6HR++025/RYedMn43J9IAnaHhdKac+jH69QPrFfExGa2j9ovK3yNUK+uYlkTdq +dOzT0HLpcsZpU9lQIMDhdMLzH3Mqbvj+lqfQ+tv/xj+FjHxtMlG5SHnvox382h5P +E2SOnejnfqt7vNoNMcSLqtlq7oVF3PwceKCqqOBn2bVvNk2B8RCdtRvA22dynpP6 +14OcNG8qfptdeV1V3AIX2kLBJ8YMcyMHT8cGci2uhtkXZtEwUd1c4DJYIji6nBAh +9S+WXQ7niN74TOx6ZbGOr78oJuBgNKJ3bgL/zW8CctZxCFVmfMD2uhRQL0QT2E/5 +pcJNvzulAgMBAAECggEAbtuQU+bnvXRkalrOlp/fxeutTGOBb1nxYRdScFyjHwlO +AryJQHiWlOQNKGmCpZ0bNhn6E43te1JFZK93wyCxNLZi26mcDoucw1T9mq1UPgIr +TMd1bEv9SM+rw8FR/WzoK14/VcbsTsh9NGqrSlKuKQqZacmJuUAAdEeh2e5fq754 +Dw7qJJ4QyyhyMXejz7dhQ3VG8yk28+manpZWkVOqSceWQFedaJK0op6m0I7dnS2h +qSteq7RZeRqfvNMhEHR/dqi1e8yPx8Gk5UU3ClvCrctpDIGJl0ea64nShWYPBZfG +vLIehk3WFmTUxK9M1ttZkqfUcYVch7CGMd6mM4ROYQKBgQD2jMUtXSaT7oR8KZ9/ +x9awOCrkbSOPGbVpXf+2mDn4nAw+oI5Buc2sxs62afb1dgh4A4PgKHECCgdNz0mt +Hr9uIOiyPUULBI3xSDOWKxVjU7wjqFK4QNEdBicMm5XK2yvf2EPewp0OkCNHgYEL +vRKzDKBbgG5UQR9mJe2oF/0+vQKBgQDWIn8g30zR3i3SJnAR4us+nzvgsJQg1QXO +3mHLjNLtdXjLCHbiqoI6n5xsC7EK3dM80svwd023j3P6AHNAqLV30ohL48Rox7mL +omPgvOp9EPCLF0cqVDYpeK4Ile/GHleUhn69RgPzyuSXOwPOik3R59ok/SwVo42y +7IdoTfATCQKBgQDK26qFF8bdIvxpOMoelivEFILeLhp67LlCN/BlqbzRHHxKr0o9 +NAbRqUZ9+pQTBQoUzTedoUjSV7QIxoylX848a+FqflUnqpirtS+U2GAhuMztPdrJ +9bLZQa2xhvZp0Ym5BTVavSAC0n/knt6x7ODM54+tme+tbWPLZVu02gAptQKBgQCY +SVBAAI6RcoEDw3JQRiEnF/dthCbUcqr+xAioyi330mNlgU+LQ9f5+Sk1bdsq7zcb +Oo7vJOmQceT5FvjgMxtba86iqgk0u1WpiIOfgLsC1tk7EgL6h4k9VSXv1TIAo/OF +HWFlGjYVW2XWZ5H9gT522Xy6cZK4kOhlJvHlrAfggQKBgCjMj2o5HdljJHYt5Vvq +Pq5Sjj4d5TtX99+kIbSDUb3AUMzLSp7W3B08ZZdpXo7bUjC4vQHKERJSzli1qabZ +GvrzXhOmm7pwCndFDC9E+rKttZaatQNbVr6aljiKyyxEC+feTk1ocNQ2XLjjAd0x +GECkVnHERfCzG1062iCOaBvT +-----END PRIVATE KEY----- diff --git a/packages/aws/data_stream/guardduty/_dev/test/pipeline/test-common-config.yml b/packages/aws/data_stream/guardduty/_dev/test/pipeline/test-common-config.yml new file mode 100644 index 00000000000..be41bb0d476 --- /dev/null +++ b/packages/aws/data_stream/guardduty/_dev/test/pipeline/test-common-config.yml @@ -0,0 +1,4 @@ +fields: + tags: + - preserve_original_event + - preserve_duplicate_custom_fields diff --git a/packages/aws/data_stream/guardduty/_dev/test/pipeline/test-guardduty.log b/packages/aws/data_stream/guardduty/_dev/test/pipeline/test-guardduty.log new file mode 100644 index 00000000000..a37779f6cbf --- /dev/null +++ b/packages/aws/data_stream/guardduty/_dev/test/pipeline/test-guardduty.log @@ -0,0 +1,5 @@ +{"schemaVersion":"2.0","accountId":"123412341234","region":"us-east-1","partition":"aws","id":"d6012345678912345678912349f831b8f","arn":"arn:aws:guardduty:us-east-1:123412341234:detector/d60123456789e5461eabcd1234abcd1234/finding/d6012345678912345678912349f831b8f","type":"Trojan:EC2/BlackholeTraffic!DNS","resource":{"resourceType":"Instance","instanceDetails":{"instanceId":"i-99999999","instanceType":"m3.xlarge","outpostArn":"arn:aws:outposts:us-west-2:123456789000:outpost/op-abcdefabcdef1234","launchTime":"2016-08-02T02:05:06.000Z","platform":null,"productCodes":[{"productCodeId":"GeneratedFindingProductCodeId","productCodeType":"GeneratedFindingProductCodeType"}],"iamInstanceProfile":{"arn":"arn:aws:iam::123412341234:example/instance/profile","id":"GeneratedFindingInstanceProfileId"},"networkInterfaces":[{"networkInterfaceId":"eni-abcdef888","privateIpAddresses":[{"privateDnsName":"GeneratedFindingPrivateName","privateIpAddress":"175.16.199.1"}],"subnetId":"GeneratedFindingSubnetId","vpcId":"GeneratedFindingVPCId","privateDnsName":"GeneratedFindingPrivateDnsName","securityGroups":[{"groupName":"GeneratedFindingSecurityGroupName","groupId":"GeneratedFindingSecurityId"}],"publicIp":"175.16.199.1","ipv6Addresses":[],"publicDnsName":"GeneratedFindingPublicDNSName","privateIpAddress":"175.16.199.1"}],"tags":[{"value":"GeneratedFindingInstaceValue1","key":"GeneratedFindingInstaceTag1"},{"value":"GeneratedFindingInstaceTagValue2","key":"GeneratedFindingInstaceTag2"},{"value":"GeneratedFindingInstaceTagValue3","key":"GeneratedFindingInstaceTag3"},{"value":"GeneratedFindingInstaceTagValue4","key":"GeneratedFindingInstaceTag4"},{"value":"GeneratedFindingInstaceTagValue5","key":"GeneratedFindingInstaceTag5"},{"value":"GeneratedFindingInstaceTagValue6","key":"GeneratedFindingInstaceTag6"},{"value":"GeneratedFindingInstaceTagValue7","key":"GeneratedFindingInstaceTag7"},{"value":"GeneratedFindingInstaceTagValue8","key":"GeneratedFindingInstaceTag8"},{"value":"GeneratedFindingInstaceTagValue9","key":"GeneratedFindingInstaceTag9"}],"instanceState":"running","availabilityZone":"GeneratedFindingInstaceAvailabilityZone","imageId":"ami-99999999","imageDescription":"GeneratedFindingInstaceImageDescription"}},"service":{"serviceName":"guardduty","detectorId":"d60123456789e5461eabcd1234abcd1234","action":{"actionType":"DNS_REQUEST","dnsRequestAction":{"domain":"GeneratedFindingDomainName","protocol":"UDP","blocked":true}},"resourceRole":"TARGET","additionalInfo":{"threatListName":"GeneratedFindingThreatListName","sample":true,"value":"{\"threatListName\":\"GeneratedFindingThreatListName\",\"sample\":true}","type":"default"},"evidence":{"threatIntelligenceDetails":[{"threatNames":["GeneratedFindingThreatName"],"threatListName":"GeneratedFindingThreatListName"}]},"eventFirstSeen":"2022-11-17T09:33:19.000Z","eventLastSeen":"2022-11-22T12:22:20.000Z","archived":false,"count":2},"severity":5,"createdAt":"2022-11-17T09:33:19.224Z","updatedAt":"2022-11-22T12:22:20.934Z","title":"Blackholed domain name queried by EC2 instance i-99999999.","description":"EC2 instance i-99999999 is querying a domain name of a blackholed domain."} +{"schemaVersion":"2.0","accountId":"123412341234","region":"us-east-1","partition":"aws","id":"250023a9abcdefabcdef12345678","arn":"arn:aws:guardduty:us-east-1:123412341234:detector/abcdefe19ce5461eabcd1234abcd1234/finding/250023a9abcdefabcdef12345678","type":"Persistence:Kubernetes/SuccessfulAnonymousAccess","resource":{"resourceType":"EKSCluster","eksClusterDetails":{"name":"GeneratedFindingEKSClusterName","arn":"GeneratedFindingEKSClusterArn","createdAt":1636625755.218,"vpcId":"GeneratedFindingEKSClusterVpcId","status":"ACTIVE","tags":[{"value":"GeneratedFindingEKSClusterTagValue1","key":"GeneratedFindingEKSClusterTag1"},{"value":"GeneratedFindingEKSClusterTagValue2","key":"GeneratedFindingEKSClusterTag2"},{"value":"GeneratedFindingEKSClusterTagValue3","key":"GeneratedFindingEKSClusterTag3"}]},"kubernetesDetails":{"kubernetesWorkloadDetails":null,"kubernetesUserDetails":{"username":"system:anonymous","uid":"GeneratedFindingUID","groups":["system:unauthenticated"]}}},"service":{"serviceName":"guardduty","detectorId":"abcdefe19ce5461eabcd1234abcd1234","action":{"actionType":"KUBERNETES_API_CALL","kubernetesApiCallAction":{"requestUri":"GeneratedFindingRequestURI","verb":"get","sourceIPs":["175.16.199.1"],"userAgent":"","remoteIpDetails":{"ipAddressV4":"175.16.199.1","organization":{"asn":"0","asnOrg":"GeneratedFindingASNOrg","isp":"GeneratedFindingISP","org":"GeneratedFindingORG"},"country":{"countryName":"GeneratedFindingCountryName"},"city":{"cityName":"GeneratedFindingCityName"},"geoLocation":{"lat":0,"lon":0}},"statusCode":200,"parameters":"GeneratedFindingActionParameters"}},"resourceRole":"TARGET","additionalInfo":{"sample":true,"value":"{\"sample\":true}","type":"default"},"evidence":null,"eventFirstSeen":"2022-11-17T09:33:19.000Z","eventLastSeen":"2022-11-22T12:22:20.000Z","archived":false,"count":2},"severity":8,"createdAt":"2022-11-17T09:33:19.225Z","updatedAt":"2022-11-22T12:22:20.935Z","title":"Kubernetes API commonly used in Persistence tactics invoked by the anonymous user.","description":"Kubernetes API commonly used in Persistence tactics was invoked on cluster GeneratedFindingEKSClusterName by the anonymous user system:anonymous."} +{"schemaVersion":"2.0","accountId":"123412341234","region":"us-east-1","partition":"aws","id":"43b6abcdeabcdeabcde1234562176924","arn":"arn:aws:guardduty:us-east-1:123412341234:detector/12341234e19ce5461eabcd1234abcd1234/finding/43b6abcdeabcdeabcde1234562176924","type":"Discovery:Kubernetes/TorIPCaller","resource":{"resourceType":"EKSCluster","eksClusterDetails":{"name":"GeneratedFindingEKSClusterName","arn":"GeneratedFindingEKSClusterArn","createdAt":1635962410.342,"vpcId":"GeneratedFindingEKSClusterVpcId","status":"ACTIVE","tags":[{"value":"GeneratedFindingEKSClusterTagValue1","key":"GeneratedFindingEKSClusterTag1"},{"value":"GeneratedFindingEKSClusterTagValue2","key":"GeneratedFindingEKSClusterTag2"},{"value":"GeneratedFindingEKSClusterTagValue3","key":"GeneratedFindingEKSClusterTag3"}]},"kubernetesDetails":{"kubernetesWorkloadDetails":null,"kubernetesUserDetails":{"username":"GeneratedFindingUserName","uid":"GeneratedFindingUID","groups":["GeneratedFindingUserGroup"]}},"accessKeyDetails":{"accessKeyId":"GeneratedFindingAccessKeyId","principalId":"GeneratedFindingPrincipalId","userType":"Role","userName":"GeneratedFindingUserName"}},"service":{"serviceName":"guardduty","detectorId":"12341234e19ce5461eabcd1234abcd1234","action":{"actionType":"KUBERNETES_API_CALL","kubernetesApiCallAction":{"requestUri":"GeneratedFindingRequestURI","verb":"list","sourceIPs":["175.16.199.1"],"userAgent":"","remoteIpDetails":{"ipAddressV4":"175.16.199.1","organization":{"asn":"0","asnOrg":"GeneratedFindingASNOrg","isp":"GeneratedFindingISP","org":"GeneratedFindingORG"},"country":{"countryName":"GeneratedFindingCountryName"},"city":{"cityName":"GeneratedFindingCityName"},"geoLocation":{"lat":0,"lon":0}},"statusCode":200}},"resourceRole":"TARGET","additionalInfo":{"threatName":"GeneratedFindingThreatName","threatListName":"GeneratedFindingThreatListName","sample":true,"value":"{\"threatName\":\"GeneratedFindingThreatName\",\"threatListName\":\"GeneratedFindingThreatListName\",\"sample\":true}","type":"default"},"evidence":{"threatIntelligenceDetails":[{"threatNames":["GeneratedFindingThreatName"],"threatListName":"GeneratedFindingThreatListName"}]},"eventFirstSeen":"2022-11-17T09:33:19.000Z","eventLastSeen":"2022-11-22T12:22:20.000Z","archived":false,"count":2},"severity":5,"createdAt":"2022-11-17T09:33:19.228Z","updatedAt":"2022-11-22T12:22:20.938Z","title":"Kubernetes API commonly used in Discovery tactics invoked from a Tor exit node IP address.","description":"Kubernetes API commonly used in Discovery tactics was invoked on cluster GeneratedFindingEKSClusterName from Tor exit node IP address 175.16.199.1."} +{"schemaVersion":"2.0","accountId":"123412341234","region":"us-east-1","partition":"aws","id":"5abcdefabcdefabcdef2a123456789f6","arn":"arn:aws:guardduty:us-east-1:123412341234:detector/4ec22961e1defabcdefabcdef2a1234/finding/5abcdefabcdefabcdef2a123456789f6","type":"CredentialAccess:RDS/AnomalousBehavior.SuccessfulLogin","resource":{"resourceType":"RDSDBInstance","rdsDbInstanceDetails":{"dbInstanceIdentifier":"GeneratedFindingDBInstanceId","engine":"GeneratedFindingEngine","engineVersion":"13.6","dbClusterIdentifier":"GeneratedFindingDBClusterId","dbInstanceArn":"arn:aws:rds:us-east-1:123456789000:db:GeneratedFindingDBInstanceId"},"rdsDbUserDetails":{"user":"GeneratedFindingUserName","application":"GeneratedFindingApplicationName","database":"GeneratedFindingDatabaseName","ssl":"GeneratedSSLValue","authMethod":"GeneratedFindingAuthMethod"}},"service":{"action":{"actionType":"RDS_LOGIN_ATTEMPT","rdsLoginAttemptAction":{"remoteIpDetails":{"ipAddressV4":"175.16.199.1","organization":{"asn":"0","asnOrg":"GeneratedFindingAsnOrg","isp":"GeneratedFindingIsp","org":"GeneratedFindingOrg"},"country":{"countryName":"GeneratedFindingCountryName"},"city":{"cityName":"GeneratedFindingCityName"},"geoLocation":{"lat":0,"lon":0}}}},"additionalInfo":{"unusualBehavior":{"unusualUserNameClusterProfiling":{"userName":"GeneratedFindingUserName","failedLoginCount":0,"successfulLoginCount":1,"incompleteConnectionCount":0},"unusualASNClusterProfiling":{"asnOrg":"GeneratedFindingAsnOrg","failedLoginCount":0,"successfulLoginCount":10,"incompleteConnectionCount":0},"unusualApplicationNameClusterProfiling":{"applicationName":"GeneratedFindingApplicationName","failedLoginCount":0,"successfulLoginCount":1,"incompleteConnectionCount":0},"unusualDatabaseNameClusterProfiling":{"databaseName":"GeneratedFindingDatabaseName","failedLoginCount":0,"successfulLoginCount":1,"incompleteConnectionCount":0}},"sample":true,"value":"{\"unusualBehavior\":{\"unusualUserNameClusterProfiling\":{\"userName\":\"GeneratedFindingUserName\",\"failedLoginCount\":0,\"successfulLoginCount\":1,\"incompleteConnectionCount\":0},\"unusualASNClusterProfiling\":{\"asnOrg\":\"GeneratedFindingAsnOrg\",\"failedLoginCount\":0,\"successfulLoginCount\":10,\"incompleteConnectionCount\":0},\"unusualApplicationNameClusterProfiling\":{\"applicationName\":\"GeneratedFindingApplicationName\",\"failedLoginCount\":0,\"successfulLoginCount\":1,\"incompleteConnectionCount\":0},\"unusualDatabaseNameClusterProfiling\":{\"databaseName\":\"GeneratedFindingDatabaseName\",\"failedLoginCount\":0,\"successfulLoginCount\":1,\"incompleteConnectionCount\":0}},\"sample\":true}","type":"default"},"resourceRole":"TARGET","evidence":null,"count":1,"detectorId":"4ec22961e1defabcdefabcdef2a1234","eventFirstSeen":"2022-12-07T10:28:35.000Z","eventLastSeen":"2022-12-07T10:28:35.000Z","serviceName":"guardduty","archived":false},"createdAt":"2022-12-07T10:28:35.948Z","severity":8,"updatedAt":"2022-12-07T10:28:35.948Z","title":"Unusual successful login by GeneratedFindingUserName observed on RDS instance GeneratedFindingDBInstanceId.","description":"Unusual successful login by GeneratedFindingUserName observed on RDS instance GeneratedFindingDBInstanceId."} +{"findings":[]} diff --git a/packages/aws/data_stream/guardduty/_dev/test/pipeline/test-guardduty.log-expected.json b/packages/aws/data_stream/guardduty/_dev/test/pipeline/test-guardduty.log-expected.json new file mode 100644 index 00000000000..607786feb1f --- /dev/null +++ b/packages/aws/data_stream/guardduty/_dev/test/pipeline/test-guardduty.log-expected.json @@ -0,0 +1,820 @@ +{ + "expected": [ + { + "@timestamp": "2022-11-22T12:22:20.934Z", + "aws": { + "guardduty": { + "account_id": "123412341234", + "arn": "arn:aws:guardduty:us-east-1:123412341234:detector/d60123456789e5461eabcd1234abcd1234/finding/d6012345678912345678912349f831b8f", + "created_at": "2022-11-17T09:33:19.224Z", + "description": "EC2 instance i-99999999 is querying a domain name of a blackholed domain.", + "id": "d6012345678912345678912349f831b8f", + "partition": "aws", + "region": "us-east-1", + "resource": { + "instance_details": { + "availability_zone": "GeneratedFindingInstaceAvailabilityZone", + "iaminstance_profile": { + "arn": "arn:aws:iam::123412341234:example/instance/profile", + "id": "GeneratedFindingInstanceProfileId" + }, + "image": { + "description": "GeneratedFindingInstaceImageDescription", + "id": "ami-99999999" + }, + "instance": { + "id": "i-99999999", + "state": "running", + "type": "m3.xlarge" + }, + "launch_time": "2016-08-02T02:05:06.000Z", + "network_interfaces": [ + { + "network_interface_id": "eni-abcdef888", + "private": { + "dns_name": "GeneratedFindingPrivateDnsName", + "ip_address": "175.16.199.1", + "ip_addresses": [ + { + "private": { + "dns_name": "GeneratedFindingPrivateName", + "ip_address": "175.16.199.1" + } + } + ] + }, + "public": { + "dns_name": "GeneratedFindingPublicDNSName", + "ip": "175.16.199.1" + }, + "security_groups": [ + { + "group": { + "id": "GeneratedFindingSecurityId", + "name": "GeneratedFindingSecurityGroupName" + } + } + ], + "subnet_id": "GeneratedFindingSubnetId", + "vpc_id": "GeneratedFindingVPCId" + } + ], + "outpost_arn": "arn:aws:outposts:us-west-2:123456789000:outpost/op-abcdefabcdef1234", + "product_codes": [ + { + "product_code": { + "id": "GeneratedFindingProductCodeId", + "type": "GeneratedFindingProductCodeType" + } + } + ], + "tags": [ + { + "key": "GeneratedFindingInstaceTag1", + "value": "GeneratedFindingInstaceValue1" + }, + { + "key": "GeneratedFindingInstaceTag2", + "value": "GeneratedFindingInstaceTagValue2" + }, + { + "key": "GeneratedFindingInstaceTag3", + "value": "GeneratedFindingInstaceTagValue3" + }, + { + "key": "GeneratedFindingInstaceTag4", + "value": "GeneratedFindingInstaceTagValue4" + }, + { + "key": "GeneratedFindingInstaceTag5", + "value": "GeneratedFindingInstaceTagValue5" + }, + { + "key": "GeneratedFindingInstaceTag6", + "value": "GeneratedFindingInstaceTagValue6" + }, + { + "key": "GeneratedFindingInstaceTag7", + "value": "GeneratedFindingInstaceTagValue7" + }, + { + "key": "GeneratedFindingInstaceTag8", + "value": "GeneratedFindingInstaceTagValue8" + }, + { + "key": "GeneratedFindingInstaceTag9", + "value": "GeneratedFindingInstaceTagValue9" + } + ] + }, + "type": "Instance" + }, + "schema_version": "2.0", + "service": { + "action": { + "dns_request_action": { + "blocked": true, + "domain": "GeneratedFindingDomainName", + "protocol": "UDP" + }, + "type": "DNS_REQUEST" + }, + "additional_info": { + "sample": true, + "threatListName": "GeneratedFindingThreatListName", + "type": "default", + "value": "{\"threatListName\":\"GeneratedFindingThreatListName\",\"sample\":true}" + }, + "archived": false, + "count": 2, + "detector_id": "d60123456789e5461eabcd1234abcd1234", + "event": { + "first_seen": "2022-11-17T09:33:19.000Z", + "last_seen": "2022-11-22T12:22:20.000Z" + }, + "evidence": { + "threat_intelligence_details": [ + { + "threat": { + "list_name": "GeneratedFindingThreatListName", + "names": [ + "GeneratedFindingThreatName" + ] + } + } + ] + }, + "resource_role": "TARGET", + "service_name": "guardduty" + }, + "severity": { + "code": 5.0, + "value": "Medium" + }, + "title": "Blackholed domain name queried by EC2 instance i-99999999.", + "type": "Trojan:EC2/BlackholeTraffic!DNS", + "updated_at": "2022-11-22T12:22:20.934Z" + } + }, + "cloud": { + "account": { + "id": "123412341234" + }, + "instance": { + "id": "i-99999999" + }, + "machine": { + "type": "m3.xlarge" + }, + "provider": "aws", + "region": "us-east-1", + "service": { + "name": "guardduty" + } + }, + "dns": { + "question": { + "name": "GeneratedFindingDomainName" + } + }, + "ecs": { + "version": "8.2.0" + }, + "event": { + "action": "DNS_REQUEST", + "created": "2022-11-17T09:33:19.224Z", + "end": "2022-11-22T12:22:20.000Z", + "id": "d6012345678912345678912349f831b8f", + "kind": [ + "event" + ], + "original": "{\"schemaVersion\":\"2.0\",\"accountId\":\"123412341234\",\"region\":\"us-east-1\",\"partition\":\"aws\",\"id\":\"d6012345678912345678912349f831b8f\",\"arn\":\"arn:aws:guardduty:us-east-1:123412341234:detector/d60123456789e5461eabcd1234abcd1234/finding/d6012345678912345678912349f831b8f\",\"type\":\"Trojan:EC2/BlackholeTraffic!DNS\",\"resource\":{\"resourceType\":\"Instance\",\"instanceDetails\":{\"instanceId\":\"i-99999999\",\"instanceType\":\"m3.xlarge\",\"outpostArn\":\"arn:aws:outposts:us-west-2:123456789000:outpost/op-abcdefabcdef1234\",\"launchTime\":\"2016-08-02T02:05:06.000Z\",\"platform\":null,\"productCodes\":[{\"productCodeId\":\"GeneratedFindingProductCodeId\",\"productCodeType\":\"GeneratedFindingProductCodeType\"}],\"iamInstanceProfile\":{\"arn\":\"arn:aws:iam::123412341234:example/instance/profile\",\"id\":\"GeneratedFindingInstanceProfileId\"},\"networkInterfaces\":[{\"networkInterfaceId\":\"eni-abcdef888\",\"privateIpAddresses\":[{\"privateDnsName\":\"GeneratedFindingPrivateName\",\"privateIpAddress\":\"175.16.199.1\"}],\"subnetId\":\"GeneratedFindingSubnetId\",\"vpcId\":\"GeneratedFindingVPCId\",\"privateDnsName\":\"GeneratedFindingPrivateDnsName\",\"securityGroups\":[{\"groupName\":\"GeneratedFindingSecurityGroupName\",\"groupId\":\"GeneratedFindingSecurityId\"}],\"publicIp\":\"175.16.199.1\",\"ipv6Addresses\":[],\"publicDnsName\":\"GeneratedFindingPublicDNSName\",\"privateIpAddress\":\"175.16.199.1\"}],\"tags\":[{\"value\":\"GeneratedFindingInstaceValue1\",\"key\":\"GeneratedFindingInstaceTag1\"},{\"value\":\"GeneratedFindingInstaceTagValue2\",\"key\":\"GeneratedFindingInstaceTag2\"},{\"value\":\"GeneratedFindingInstaceTagValue3\",\"key\":\"GeneratedFindingInstaceTag3\"},{\"value\":\"GeneratedFindingInstaceTagValue4\",\"key\":\"GeneratedFindingInstaceTag4\"},{\"value\":\"GeneratedFindingInstaceTagValue5\",\"key\":\"GeneratedFindingInstaceTag5\"},{\"value\":\"GeneratedFindingInstaceTagValue6\",\"key\":\"GeneratedFindingInstaceTag6\"},{\"value\":\"GeneratedFindingInstaceTagValue7\",\"key\":\"GeneratedFindingInstaceTag7\"},{\"value\":\"GeneratedFindingInstaceTagValue8\",\"key\":\"GeneratedFindingInstaceTag8\"},{\"value\":\"GeneratedFindingInstaceTagValue9\",\"key\":\"GeneratedFindingInstaceTag9\"}],\"instanceState\":\"running\",\"availabilityZone\":\"GeneratedFindingInstaceAvailabilityZone\",\"imageId\":\"ami-99999999\",\"imageDescription\":\"GeneratedFindingInstaceImageDescription\"}},\"service\":{\"serviceName\":\"guardduty\",\"detectorId\":\"d60123456789e5461eabcd1234abcd1234\",\"action\":{\"actionType\":\"DNS_REQUEST\",\"dnsRequestAction\":{\"domain\":\"GeneratedFindingDomainName\",\"protocol\":\"UDP\",\"blocked\":true}},\"resourceRole\":\"TARGET\",\"additionalInfo\":{\"threatListName\":\"GeneratedFindingThreatListName\",\"sample\":true,\"value\":\"{\\\"threatListName\\\":\\\"GeneratedFindingThreatListName\\\",\\\"sample\\\":true}\",\"type\":\"default\"},\"evidence\":{\"threatIntelligenceDetails\":[{\"threatNames\":[\"GeneratedFindingThreatName\"],\"threatListName\":\"GeneratedFindingThreatListName\"}]},\"eventFirstSeen\":\"2022-11-17T09:33:19.000Z\",\"eventLastSeen\":\"2022-11-22T12:22:20.000Z\",\"archived\":false,\"count\":2},\"severity\":5,\"createdAt\":\"2022-11-17T09:33:19.224Z\",\"updatedAt\":\"2022-11-22T12:22:20.934Z\",\"title\":\"Blackholed domain name queried by EC2 instance i-99999999.\",\"description\":\"EC2 instance i-99999999 is querying a domain name of a blackholed domain.\"}", + "severity": 5, + "start": "2022-11-17T09:33:19.000Z", + "type": [ + "info" + ] + }, + "host": { + "id": "i-99999999", + "type": "m3.xlarge" + }, + "message": "EC2 instance i-99999999 is querying a domain name of a blackholed domain.", + "network": { + "transport": [ + "udp" + ] + }, + "related": { + "hosts": [ + "GeneratedFindingDomainName" + ], + "ip": [ + "175.16.199.1" + ] + }, + "rule": { + "category": "Trojan", + "name": "Trojan:EC2/BlackholeTraffic!DNS", + "ruleset": "Trojan:EC2" + }, + "tags": [ + "preserve_original_event", + "preserve_duplicate_custom_fields" + ] + }, + { + "@timestamp": "2022-11-22T12:22:20.935Z", + "aws": { + "guardduty": { + "account_id": "123412341234", + "arn": "arn:aws:guardduty:us-east-1:123412341234:detector/abcdefe19ce5461eabcd1234abcd1234/finding/250023a9abcdefabcdef12345678", + "created_at": "2022-11-17T09:33:19.225Z", + "description": "Kubernetes API commonly used in Persistence tactics was invoked on cluster GeneratedFindingEKSClusterName by the anonymous user system:anonymous.", + "id": "250023a9abcdefabcdef12345678", + "partition": "aws", + "region": "us-east-1", + "resource": { + "eks_cluster_details": { + "arn": "GeneratedFindingEKSClusterArn", + "created_at": "2021-11-11T10:15:55.218Z", + "name": "GeneratedFindingEKSClusterName", + "status": "ACTIVE", + "tags": [ + { + "key": "GeneratedFindingEKSClusterTag1", + "value": "GeneratedFindingEKSClusterTagValue1" + }, + { + "key": "GeneratedFindingEKSClusterTag2", + "value": "GeneratedFindingEKSClusterTagValue2" + }, + { + "key": "GeneratedFindingEKSClusterTag3", + "value": "GeneratedFindingEKSClusterTagValue3" + } + ], + "vpcid": "GeneratedFindingEKSClusterVpcId" + }, + "kubernetes_details": { + "kubernetes_user_details": { + "groups": [ + "system:unauthenticated" + ], + "uid": "GeneratedFindingUID", + "user_name": "system:anonymous" + } + }, + "type": "EKSCluster" + }, + "schema_version": "2.0", + "service": { + "action": { + "kubernetes_api_call_action": { + "parameters": "GeneratedFindingActionParameters", + "remote_ip_details": { + "city": { + "name": "GeneratedFindingCityName" + }, + "country": { + "name": "GeneratedFindingCountryName" + }, + "geo_location": { + "lat": 0, + "lon": 0 + }, + "ip_address_v4": "175.16.199.1", + "organization": { + "asn": "0", + "asnorg": "GeneratedFindingASNOrg", + "isp": "GeneratedFindingISP", + "org": "GeneratedFindingORG" + } + }, + "request_uri": "GeneratedFindingRequestURI", + "source_ips": [ + "175.16.199.1" + ], + "status_code": 200, + "verb": "get" + }, + "type": "KUBERNETES_API_CALL" + }, + "additional_info": { + "sample": true, + "type": "default", + "value": "{\"sample\":true}" + }, + "archived": false, + "count": 2, + "detector_id": "abcdefe19ce5461eabcd1234abcd1234", + "event": { + "first_seen": "2022-11-17T09:33:19.000Z", + "last_seen": "2022-11-22T12:22:20.000Z" + }, + "resource_role": "TARGET", + "service_name": "guardduty" + }, + "severity": { + "code": 8.0, + "value": "High" + }, + "title": "Kubernetes API commonly used in Persistence tactics invoked by the anonymous user.", + "type": "Persistence:Kubernetes/SuccessfulAnonymousAccess", + "updated_at": "2022-11-22T12:22:20.935Z" + } + }, + "cloud": { + "account": { + "id": "123412341234" + }, + "provider": "aws", + "region": "us-east-1", + "service": { + "name": "guardduty" + } + }, + "ecs": { + "version": "8.2.0" + }, + "event": { + "action": "KUBERNETES_API_CALL", + "created": "2022-11-17T09:33:19.225Z", + "end": "2022-11-22T12:22:20.000Z", + "id": "250023a9abcdefabcdef12345678", + "kind": [ + "event" + ], + "original": "{\"schemaVersion\":\"2.0\",\"accountId\":\"123412341234\",\"region\":\"us-east-1\",\"partition\":\"aws\",\"id\":\"250023a9abcdefabcdef12345678\",\"arn\":\"arn:aws:guardduty:us-east-1:123412341234:detector/abcdefe19ce5461eabcd1234abcd1234/finding/250023a9abcdefabcdef12345678\",\"type\":\"Persistence:Kubernetes/SuccessfulAnonymousAccess\",\"resource\":{\"resourceType\":\"EKSCluster\",\"eksClusterDetails\":{\"name\":\"GeneratedFindingEKSClusterName\",\"arn\":\"GeneratedFindingEKSClusterArn\",\"createdAt\":1636625755.218,\"vpcId\":\"GeneratedFindingEKSClusterVpcId\",\"status\":\"ACTIVE\",\"tags\":[{\"value\":\"GeneratedFindingEKSClusterTagValue1\",\"key\":\"GeneratedFindingEKSClusterTag1\"},{\"value\":\"GeneratedFindingEKSClusterTagValue2\",\"key\":\"GeneratedFindingEKSClusterTag2\"},{\"value\":\"GeneratedFindingEKSClusterTagValue3\",\"key\":\"GeneratedFindingEKSClusterTag3\"}]},\"kubernetesDetails\":{\"kubernetesWorkloadDetails\":null,\"kubernetesUserDetails\":{\"username\":\"system:anonymous\",\"uid\":\"GeneratedFindingUID\",\"groups\":[\"system:unauthenticated\"]}}},\"service\":{\"serviceName\":\"guardduty\",\"detectorId\":\"abcdefe19ce5461eabcd1234abcd1234\",\"action\":{\"actionType\":\"KUBERNETES_API_CALL\",\"kubernetesApiCallAction\":{\"requestUri\":\"GeneratedFindingRequestURI\",\"verb\":\"get\",\"sourceIPs\":[\"175.16.199.1\"],\"userAgent\":\"\",\"remoteIpDetails\":{\"ipAddressV4\":\"175.16.199.1\",\"organization\":{\"asn\":\"0\",\"asnOrg\":\"GeneratedFindingASNOrg\",\"isp\":\"GeneratedFindingISP\",\"org\":\"GeneratedFindingORG\"},\"country\":{\"countryName\":\"GeneratedFindingCountryName\"},\"city\":{\"cityName\":\"GeneratedFindingCityName\"},\"geoLocation\":{\"lat\":0,\"lon\":0}},\"statusCode\":200,\"parameters\":\"GeneratedFindingActionParameters\"}},\"resourceRole\":\"TARGET\",\"additionalInfo\":{\"sample\":true,\"value\":\"{\\\"sample\\\":true}\",\"type\":\"default\"},\"evidence\":null,\"eventFirstSeen\":\"2022-11-17T09:33:19.000Z\",\"eventLastSeen\":\"2022-11-22T12:22:20.000Z\",\"archived\":false,\"count\":2},\"severity\":8,\"createdAt\":\"2022-11-17T09:33:19.225Z\",\"updatedAt\":\"2022-11-22T12:22:20.935Z\",\"title\":\"Kubernetes API commonly used in Persistence tactics invoked by the anonymous user.\",\"description\":\"Kubernetes API commonly used in Persistence tactics was invoked on cluster GeneratedFindingEKSClusterName by the anonymous user system:anonymous.\"}", + "severity": 8, + "start": "2022-11-17T09:33:19.000Z", + "type": [ + "info" + ] + }, + "message": "Kubernetes API commonly used in Persistence tactics was invoked on cluster GeneratedFindingEKSClusterName by the anonymous user system:anonymous.", + "related": { + "ip": [ + "175.16.199.1" + ], + "user": [ + "GeneratedFindingUID", + "system:anonymous" + ] + }, + "rule": { + "category": "Persistence", + "name": "Persistence:Kubernetes/SuccessfulAnonymousAccess", + "ruleset": "Persistence:Kubernetes" + }, + "source": { + "address": [ + "175.16.199.1" + ], + "as": { + "number": [ + 0 + ], + "organization": { + "name": [ + "GeneratedFindingASNOrg" + ] + } + }, + "geo": { + "city_name": [ + "GeneratedFindingCityName" + ], + "country_name": [ + "GeneratedFindingCountryName" + ], + "location": [ + { + "lat": 0, + "lon": 0 + } + ] + }, + "ip": [ + "175.16.199.1" + ] + }, + "tags": [ + "preserve_original_event", + "preserve_duplicate_custom_fields" + ], + "user": { + "id": [ + "GeneratedFindingUID" + ], + "name": [ + "system:anonymous" + ], + "roles": [ + "system:unauthenticated" + ] + } + }, + { + "@timestamp": "2022-11-22T12:22:20.938Z", + "aws": { + "guardduty": { + "account_id": "123412341234", + "arn": "arn:aws:guardduty:us-east-1:123412341234:detector/12341234e19ce5461eabcd1234abcd1234/finding/43b6abcdeabcdeabcde1234562176924", + "created_at": "2022-11-17T09:33:19.228Z", + "description": "Kubernetes API commonly used in Discovery tactics was invoked on cluster GeneratedFindingEKSClusterName from Tor exit node IP address 175.16.199.1.", + "id": "43b6abcdeabcdeabcde1234562176924", + "partition": "aws", + "region": "us-east-1", + "resource": { + "access_key_details": { + "accesskey_id": "GeneratedFindingAccessKeyId", + "principal_id": "GeneratedFindingPrincipalId", + "user": { + "name": "GeneratedFindingUserName", + "type": "Role" + } + }, + "eks_cluster_details": { + "arn": "GeneratedFindingEKSClusterArn", + "created_at": "2021-11-03T18:00:10.342Z", + "name": "GeneratedFindingEKSClusterName", + "status": "ACTIVE", + "tags": [ + { + "key": "GeneratedFindingEKSClusterTag1", + "value": "GeneratedFindingEKSClusterTagValue1" + }, + { + "key": "GeneratedFindingEKSClusterTag2", + "value": "GeneratedFindingEKSClusterTagValue2" + }, + { + "key": "GeneratedFindingEKSClusterTag3", + "value": "GeneratedFindingEKSClusterTagValue3" + } + ], + "vpcid": "GeneratedFindingEKSClusterVpcId" + }, + "kubernetes_details": { + "kubernetes_user_details": { + "groups": [ + "GeneratedFindingUserGroup" + ], + "uid": "GeneratedFindingUID", + "user_name": "GeneratedFindingUserName" + } + }, + "type": "EKSCluster" + }, + "schema_version": "2.0", + "service": { + "action": { + "kubernetes_api_call_action": { + "remote_ip_details": { + "city": { + "name": "GeneratedFindingCityName" + }, + "country": { + "name": "GeneratedFindingCountryName" + }, + "geo_location": { + "lat": 0, + "lon": 0 + }, + "ip_address_v4": "175.16.199.1", + "organization": { + "asn": "0", + "asnorg": "GeneratedFindingASNOrg", + "isp": "GeneratedFindingISP", + "org": "GeneratedFindingORG" + } + }, + "request_uri": "GeneratedFindingRequestURI", + "source_ips": [ + "175.16.199.1" + ], + "status_code": 200, + "verb": "list" + }, + "type": "KUBERNETES_API_CALL" + }, + "additional_info": { + "sample": true, + "threatListName": "GeneratedFindingThreatListName", + "threatName": "GeneratedFindingThreatName", + "type": "default", + "value": "{\"threatName\":\"GeneratedFindingThreatName\",\"threatListName\":\"GeneratedFindingThreatListName\",\"sample\":true}" + }, + "archived": false, + "count": 2, + "detector_id": "12341234e19ce5461eabcd1234abcd1234", + "event": { + "first_seen": "2022-11-17T09:33:19.000Z", + "last_seen": "2022-11-22T12:22:20.000Z" + }, + "evidence": { + "threat_intelligence_details": [ + { + "threat": { + "list_name": "GeneratedFindingThreatListName", + "names": [ + "GeneratedFindingThreatName" + ] + } + } + ] + }, + "resource_role": "TARGET", + "service_name": "guardduty" + }, + "severity": { + "code": 5.0, + "value": "Medium" + }, + "title": "Kubernetes API commonly used in Discovery tactics invoked from a Tor exit node IP address.", + "type": "Discovery:Kubernetes/TorIPCaller", + "updated_at": "2022-11-22T12:22:20.938Z" + } + }, + "cloud": { + "account": { + "id": "123412341234" + }, + "provider": "aws", + "region": "us-east-1", + "service": { + "name": "guardduty" + } + }, + "ecs": { + "version": "8.2.0" + }, + "event": { + "action": "KUBERNETES_API_CALL", + "created": "2022-11-17T09:33:19.228Z", + "end": "2022-11-22T12:22:20.000Z", + "id": "43b6abcdeabcdeabcde1234562176924", + "kind": [ + "event" + ], + "original": "{\"schemaVersion\":\"2.0\",\"accountId\":\"123412341234\",\"region\":\"us-east-1\",\"partition\":\"aws\",\"id\":\"43b6abcdeabcdeabcde1234562176924\",\"arn\":\"arn:aws:guardduty:us-east-1:123412341234:detector/12341234e19ce5461eabcd1234abcd1234/finding/43b6abcdeabcdeabcde1234562176924\",\"type\":\"Discovery:Kubernetes/TorIPCaller\",\"resource\":{\"resourceType\":\"EKSCluster\",\"eksClusterDetails\":{\"name\":\"GeneratedFindingEKSClusterName\",\"arn\":\"GeneratedFindingEKSClusterArn\",\"createdAt\":1635962410.342,\"vpcId\":\"GeneratedFindingEKSClusterVpcId\",\"status\":\"ACTIVE\",\"tags\":[{\"value\":\"GeneratedFindingEKSClusterTagValue1\",\"key\":\"GeneratedFindingEKSClusterTag1\"},{\"value\":\"GeneratedFindingEKSClusterTagValue2\",\"key\":\"GeneratedFindingEKSClusterTag2\"},{\"value\":\"GeneratedFindingEKSClusterTagValue3\",\"key\":\"GeneratedFindingEKSClusterTag3\"}]},\"kubernetesDetails\":{\"kubernetesWorkloadDetails\":null,\"kubernetesUserDetails\":{\"username\":\"GeneratedFindingUserName\",\"uid\":\"GeneratedFindingUID\",\"groups\":[\"GeneratedFindingUserGroup\"]}},\"accessKeyDetails\":{\"accessKeyId\":\"GeneratedFindingAccessKeyId\",\"principalId\":\"GeneratedFindingPrincipalId\",\"userType\":\"Role\",\"userName\":\"GeneratedFindingUserName\"}},\"service\":{\"serviceName\":\"guardduty\",\"detectorId\":\"12341234e19ce5461eabcd1234abcd1234\",\"action\":{\"actionType\":\"KUBERNETES_API_CALL\",\"kubernetesApiCallAction\":{\"requestUri\":\"GeneratedFindingRequestURI\",\"verb\":\"list\",\"sourceIPs\":[\"175.16.199.1\"],\"userAgent\":\"\",\"remoteIpDetails\":{\"ipAddressV4\":\"175.16.199.1\",\"organization\":{\"asn\":\"0\",\"asnOrg\":\"GeneratedFindingASNOrg\",\"isp\":\"GeneratedFindingISP\",\"org\":\"GeneratedFindingORG\"},\"country\":{\"countryName\":\"GeneratedFindingCountryName\"},\"city\":{\"cityName\":\"GeneratedFindingCityName\"},\"geoLocation\":{\"lat\":0,\"lon\":0}},\"statusCode\":200}},\"resourceRole\":\"TARGET\",\"additionalInfo\":{\"threatName\":\"GeneratedFindingThreatName\",\"threatListName\":\"GeneratedFindingThreatListName\",\"sample\":true,\"value\":\"{\\\"threatName\\\":\\\"GeneratedFindingThreatName\\\",\\\"threatListName\\\":\\\"GeneratedFindingThreatListName\\\",\\\"sample\\\":true}\",\"type\":\"default\"},\"evidence\":{\"threatIntelligenceDetails\":[{\"threatNames\":[\"GeneratedFindingThreatName\"],\"threatListName\":\"GeneratedFindingThreatListName\"}]},\"eventFirstSeen\":\"2022-11-17T09:33:19.000Z\",\"eventLastSeen\":\"2022-11-22T12:22:20.000Z\",\"archived\":false,\"count\":2},\"severity\":5,\"createdAt\":\"2022-11-17T09:33:19.228Z\",\"updatedAt\":\"2022-11-22T12:22:20.938Z\",\"title\":\"Kubernetes API commonly used in Discovery tactics invoked from a Tor exit node IP address.\",\"description\":\"Kubernetes API commonly used in Discovery tactics was invoked on cluster GeneratedFindingEKSClusterName from Tor exit node IP address 175.16.199.1.\"}", + "severity": 5, + "start": "2022-11-17T09:33:19.000Z", + "type": [ + "info" + ] + }, + "message": "Kubernetes API commonly used in Discovery tactics was invoked on cluster GeneratedFindingEKSClusterName from Tor exit node IP address 175.16.199.1.", + "related": { + "ip": [ + "175.16.199.1" + ], + "user": [ + "GeneratedFindingPrincipalId", + "GeneratedFindingUserName", + "GeneratedFindingUID" + ] + }, + "rule": { + "category": "Discovery", + "name": "Discovery:Kubernetes/TorIPCaller", + "ruleset": "Discovery:Kubernetes" + }, + "source": { + "address": [ + "175.16.199.1" + ], + "as": { + "number": [ + 0 + ], + "organization": { + "name": [ + "GeneratedFindingASNOrg" + ] + } + }, + "geo": { + "city_name": [ + "GeneratedFindingCityName" + ], + "country_name": [ + "GeneratedFindingCountryName" + ], + "location": [ + { + "lat": 0, + "lon": 0 + } + ] + }, + "ip": [ + "175.16.199.1" + ] + }, + "tags": [ + "preserve_original_event", + "preserve_duplicate_custom_fields" + ], + "user": { + "id": [ + "GeneratedFindingPrincipalId", + "GeneratedFindingUID" + ], + "name": [ + "GeneratedFindingUserName" + ], + "roles": [ + "GeneratedFindingUserGroup" + ] + } + }, + { + "@timestamp": "2022-12-07T10:28:35.948Z", + "aws": { + "guardduty": { + "account_id": "123412341234", + "arn": "arn:aws:guardduty:us-east-1:123412341234:detector/4ec22961e1defabcdefabcdef2a1234/finding/5abcdefabcdefabcdef2a123456789f6", + "created_at": "2022-12-07T10:28:35.948Z", + "description": "Unusual successful login by GeneratedFindingUserName observed on RDS instance GeneratedFindingDBInstanceId.", + "id": "5abcdefabcdefabcdef2a123456789f6", + "partition": "aws", + "region": "us-east-1", + "resource": { + "rdsdb_instance_details": { + "cluster_identifier": "GeneratedFindingDBClusterId", + "engine": "GeneratedFindingEngine", + "engine_version": "13.6", + "instance_arn": "arn:aws:rds:us-east-1:123456789000:db:GeneratedFindingDBInstanceId", + "instance_identifier": "GeneratedFindingDBInstanceId" + }, + "rdsdb_user_details": { + "application": "GeneratedFindingApplicationName", + "auth_method": "GeneratedFindingAuthMethod", + "database": "GeneratedFindingDatabaseName", + "ssl": "GeneratedSSLValue", + "user": "GeneratedFindingUserName" + }, + "type": "RDSDBInstance" + }, + "schema_version": "2.0", + "service": { + "action": { + "rds_login_attempt_action": { + "remote_ip_details": { + "city": { + "name": "GeneratedFindingCityName" + }, + "country": { + "name": "GeneratedFindingCountryName" + }, + "geo_location": { + "lat": 0, + "lon": 0 + }, + "ip_address_v4": "175.16.199.1", + "organization": { + "asn": "0", + "asnorg": "GeneratedFindingAsnOrg", + "isp": "GeneratedFindingIsp", + "org": "GeneratedFindingOrg" + } + } + }, + "type": "RDS_LOGIN_ATTEMPT" + }, + "additional_info": { + "sample": true, + "type": "default", + "unusualBehavior": { + "unusualASNClusterProfiling": { + "asnOrg": "GeneratedFindingAsnOrg", + "failedLoginCount": 0, + "incompleteConnectionCount": 0, + "successfulLoginCount": 10 + }, + "unusualApplicationNameClusterProfiling": { + "applicationName": "GeneratedFindingApplicationName", + "failedLoginCount": 0, + "incompleteConnectionCount": 0, + "successfulLoginCount": 1 + }, + "unusualDatabaseNameClusterProfiling": { + "databaseName": "GeneratedFindingDatabaseName", + "failedLoginCount": 0, + "incompleteConnectionCount": 0, + "successfulLoginCount": 1 + }, + "unusualUserNameClusterProfiling": { + "failedLoginCount": 0, + "incompleteConnectionCount": 0, + "successfulLoginCount": 1, + "userName": "GeneratedFindingUserName" + } + }, + "value": "{\"unusualBehavior\":{\"unusualUserNameClusterProfiling\":{\"userName\":\"GeneratedFindingUserName\",\"failedLoginCount\":0,\"successfulLoginCount\":1,\"incompleteConnectionCount\":0},\"unusualASNClusterProfiling\":{\"asnOrg\":\"GeneratedFindingAsnOrg\",\"failedLoginCount\":0,\"successfulLoginCount\":10,\"incompleteConnectionCount\":0},\"unusualApplicationNameClusterProfiling\":{\"applicationName\":\"GeneratedFindingApplicationName\",\"failedLoginCount\":0,\"successfulLoginCount\":1,\"incompleteConnectionCount\":0},\"unusualDatabaseNameClusterProfiling\":{\"databaseName\":\"GeneratedFindingDatabaseName\",\"failedLoginCount\":0,\"successfulLoginCount\":1,\"incompleteConnectionCount\":0}},\"sample\":true}" + }, + "archived": false, + "count": 1, + "detector_id": "4ec22961e1defabcdefabcdef2a1234", + "event": { + "first_seen": "2022-12-07T10:28:35.000Z", + "last_seen": "2022-12-07T10:28:35.000Z" + }, + "resource_role": "TARGET", + "service_name": "guardduty" + }, + "severity": { + "code": 8.0, + "value": "High" + }, + "title": "Unusual successful login by GeneratedFindingUserName observed on RDS instance GeneratedFindingDBInstanceId.", + "type": "CredentialAccess:RDS/AnomalousBehavior.SuccessfulLogin", + "updated_at": "2022-12-07T10:28:35.948Z" + } + }, + "cloud": { + "account": { + "id": "123412341234" + }, + "provider": "aws", + "region": "us-east-1", + "service": { + "name": "guardduty" + } + }, + "ecs": { + "version": "8.2.0" + }, + "event": { + "action": "RDS_LOGIN_ATTEMPT", + "created": "2022-12-07T10:28:35.948Z", + "end": "2022-12-07T10:28:35.000Z", + "id": "5abcdefabcdefabcdef2a123456789f6", + "kind": [ + "event" + ], + "original": "{\"schemaVersion\":\"2.0\",\"accountId\":\"123412341234\",\"region\":\"us-east-1\",\"partition\":\"aws\",\"id\":\"5abcdefabcdefabcdef2a123456789f6\",\"arn\":\"arn:aws:guardduty:us-east-1:123412341234:detector/4ec22961e1defabcdefabcdef2a1234/finding/5abcdefabcdefabcdef2a123456789f6\",\"type\":\"CredentialAccess:RDS/AnomalousBehavior.SuccessfulLogin\",\"resource\":{\"resourceType\":\"RDSDBInstance\",\"rdsDbInstanceDetails\":{\"dbInstanceIdentifier\":\"GeneratedFindingDBInstanceId\",\"engine\":\"GeneratedFindingEngine\",\"engineVersion\":\"13.6\",\"dbClusterIdentifier\":\"GeneratedFindingDBClusterId\",\"dbInstanceArn\":\"arn:aws:rds:us-east-1:123456789000:db:GeneratedFindingDBInstanceId\"},\"rdsDbUserDetails\":{\"user\":\"GeneratedFindingUserName\",\"application\":\"GeneratedFindingApplicationName\",\"database\":\"GeneratedFindingDatabaseName\",\"ssl\":\"GeneratedSSLValue\",\"authMethod\":\"GeneratedFindingAuthMethod\"}},\"service\":{\"action\":{\"actionType\":\"RDS_LOGIN_ATTEMPT\",\"rdsLoginAttemptAction\":{\"remoteIpDetails\":{\"ipAddressV4\":\"175.16.199.1\",\"organization\":{\"asn\":\"0\",\"asnOrg\":\"GeneratedFindingAsnOrg\",\"isp\":\"GeneratedFindingIsp\",\"org\":\"GeneratedFindingOrg\"},\"country\":{\"countryName\":\"GeneratedFindingCountryName\"},\"city\":{\"cityName\":\"GeneratedFindingCityName\"},\"geoLocation\":{\"lat\":0,\"lon\":0}}}},\"additionalInfo\":{\"unusualBehavior\":{\"unusualUserNameClusterProfiling\":{\"userName\":\"GeneratedFindingUserName\",\"failedLoginCount\":0,\"successfulLoginCount\":1,\"incompleteConnectionCount\":0},\"unusualASNClusterProfiling\":{\"asnOrg\":\"GeneratedFindingAsnOrg\",\"failedLoginCount\":0,\"successfulLoginCount\":10,\"incompleteConnectionCount\":0},\"unusualApplicationNameClusterProfiling\":{\"applicationName\":\"GeneratedFindingApplicationName\",\"failedLoginCount\":0,\"successfulLoginCount\":1,\"incompleteConnectionCount\":0},\"unusualDatabaseNameClusterProfiling\":{\"databaseName\":\"GeneratedFindingDatabaseName\",\"failedLoginCount\":0,\"successfulLoginCount\":1,\"incompleteConnectionCount\":0}},\"sample\":true,\"value\":\"{\\\"unusualBehavior\\\":{\\\"unusualUserNameClusterProfiling\\\":{\\\"userName\\\":\\\"GeneratedFindingUserName\\\",\\\"failedLoginCount\\\":0,\\\"successfulLoginCount\\\":1,\\\"incompleteConnectionCount\\\":0},\\\"unusualASNClusterProfiling\\\":{\\\"asnOrg\\\":\\\"GeneratedFindingAsnOrg\\\",\\\"failedLoginCount\\\":0,\\\"successfulLoginCount\\\":10,\\\"incompleteConnectionCount\\\":0},\\\"unusualApplicationNameClusterProfiling\\\":{\\\"applicationName\\\":\\\"GeneratedFindingApplicationName\\\",\\\"failedLoginCount\\\":0,\\\"successfulLoginCount\\\":1,\\\"incompleteConnectionCount\\\":0},\\\"unusualDatabaseNameClusterProfiling\\\":{\\\"databaseName\\\":\\\"GeneratedFindingDatabaseName\\\",\\\"failedLoginCount\\\":0,\\\"successfulLoginCount\\\":1,\\\"incompleteConnectionCount\\\":0}},\\\"sample\\\":true}\",\"type\":\"default\"},\"resourceRole\":\"TARGET\",\"evidence\":null,\"count\":1,\"detectorId\":\"4ec22961e1defabcdefabcdef2a1234\",\"eventFirstSeen\":\"2022-12-07T10:28:35.000Z\",\"eventLastSeen\":\"2022-12-07T10:28:35.000Z\",\"serviceName\":\"guardduty\",\"archived\":false},\"createdAt\":\"2022-12-07T10:28:35.948Z\",\"severity\":8,\"updatedAt\":\"2022-12-07T10:28:35.948Z\",\"title\":\"Unusual successful login by GeneratedFindingUserName observed on RDS instance GeneratedFindingDBInstanceId.\",\"description\":\"Unusual successful login by GeneratedFindingUserName observed on RDS instance GeneratedFindingDBInstanceId.\"}", + "severity": 8, + "start": "2022-12-07T10:28:35.000Z", + "type": [ + "info" + ] + }, + "message": "Unusual successful login by GeneratedFindingUserName observed on RDS instance GeneratedFindingDBInstanceId.", + "related": { + "ip": [ + "175.16.199.1" + ], + "user": [ + "GeneratedFindingUserName" + ] + }, + "rule": { + "category": "CredentialAccess", + "name": "CredentialAccess:RDS/AnomalousBehavior.SuccessfulLogin", + "ruleset": "CredentialAccess:RDS" + }, + "source": { + "address": [ + "175.16.199.1" + ], + "as": { + "number": [ + 0 + ], + "organization": { + "name": [ + "GeneratedFindingAsnOrg" + ] + } + }, + "geo": { + "city_name": [ + "GeneratedFindingCityName" + ], + "country_name": [ + "GeneratedFindingCountryName" + ], + "location": [ + { + "lat": 0, + "lon": 0 + } + ] + } + }, + "tags": [ + "preserve_original_event", + "preserve_duplicate_custom_fields" + ], + "user": { + "name": [ + "GeneratedFindingUserName" + ] + } + }, + null + ] +} \ No newline at end of file diff --git a/packages/aws/data_stream/guardduty/_dev/test/system/test-default-config.yml b/packages/aws/data_stream/guardduty/_dev/test/system/test-default-config.yml new file mode 100644 index 00000000000..36f01b1e926 --- /dev/null +++ b/packages/aws/data_stream/guardduty/_dev/test/system/test-default-config.yml @@ -0,0 +1,37 @@ +input: httpjson +skip: + reason: "Support backward compatibility of Current AWS package." + link: https://github.com/elastic/integrations/issues/4911 +service: guardduty +vars: + secret_access_key: xxxx + access_key_id: xxxx +data_stream: + vars: + aws_region: xxxx + detector_id: xxxx + preserve_original_event: true + preserve_duplicate_custom_fields: true + ssl: | + certificate_authorities: + - | + -----BEGIN CERTIFICATE----- + MIIDTjCCAjYCCQCP7/+x5TSKBTANBgkqhkiG9w0BAQsFADBpMQswCQYDVQQGEwJY + WDEVMBMGA1UEBwwMRGVmYXVsdCBDaXR5MRwwGgYDVQQKDBNEZWZhdWx0IENvbXBh + bnkgTHRkMSUwIwYDVQQDDBxndWFyZGR1dHkueHh4eC5hbWF6b25hd3MuY29tMB4X + DTIyMTIwOTA3MDY1NVoXDTIzMTIwOTA3MDY1NVowaTELMAkGA1UEBhMCWFgxFTAT + BgNVBAcMDERlZmF1bHQgQ2l0eTEcMBoGA1UECgwTRGVmYXVsdCBDb21wYW55IEx0 + ZDElMCMGA1UEAwwcZ3VhcmRkdXR5Lnh4eHguYW1hem9uYXdzLmNvbTCCASIwDQYJ + KoZIhvcNAQEBBQADggEPADCCAQoCggEBAM465fWaXWFWxW2grodH77Tbn9Fh50yf + jcn0gCdoeF0ppz6Mfr1A+sV8TEZraP2i8rfI1Qr65iWRN2p07NPQculyxmlT2VAg + wOF0wvMfcypu+P6Wp9D62//GP4WMfG0yUblIee+jHfzaHk8TZI6d6Od+q3u82g0x + xIuq2WruhUXc/Bx4oKqo4GfZtW82TYHxEJ21G8DbZ3Kek/rXg5w0byp+m115XVXc + AhfaQsEnxgxzIwdPxwZyLa6G2Rdm0TBR3VzgMlgiOLqcECH1L5ZdDueI3vhM7Hpl + sY6vvygm4GA0onduAv/NbwJy1nEIVWZ8wPa6FFAvRBPYT/mlwk2/O6UCAwEAATAN + BgkqhkiG9w0BAQsFAAOCAQEAc+xGD2w7Btxwcud2wFiwqs9oDO4iS+DeER4hGkV7 + 2zNk42pezOrNbty+cZzxbYU7+FmmLJMs35kT1ody81I/wG9iBMp08CDz6MCmzgG0 + 9C8Qgiro/TfqrqoEt3xrs7iNQ06lcwR7iFqMyeqZuFyM4BRQgoGzdhYxwkQtI3t2 + sLX8n+roy+D2JlMRWEsH1xV+MOLDFhLiXDMkf7pvhp5+MKjZscnSsU2lHn6gbVkk + Jphsrsom4I3y7Rm0PlaVMO/AKffnRkDSqEhFPx23RoFpWL0zfc5C3DDLGewd7J8O + gCFBRnggudvoELRFuuwEQfAdANyw+xoha+ScbyQZIVUdNw== + -----END CERTIFICATE----- diff --git a/packages/aws/data_stream/guardduty/agent/stream/aws-s3.yml.hbs b/packages/aws/data_stream/guardduty/agent/stream/aws-s3.yml.hbs new file mode 100644 index 00000000000..9d48e69a97c --- /dev/null +++ b/packages/aws/data_stream/guardduty/agent/stream/aws-s3.yml.hbs @@ -0,0 +1,82 @@ +{{#if collect_s3_logs}} + +{{#if bucket_arn}} +bucket_arn: {{bucket_arn}} +{{/if}} +{{#if number_of_workers}} +number_of_workers: {{number_of_workers}} +{{/if}} +{{#if interval}} +bucket_list_interval: {{interval}} +{{/if}} +{{#if bucket_list_prefix}} +bucket_list_prefix: {{bucket_list_prefix}} +{{/if}} + +{{else}} + +{{#if queue_url}} +queue_url: {{queue_url}} +{{/if}} +{{#if visibility_timeout}} +visibility_timeout: {{visibility_timeout}} +{{/if}} +{{#if api_timeout}} +api_timeout: {{api_timeout}} +{{/if}} +{{#if max_number_of_messages}} +max_number_of_messages: {{max_number_of_messages}} +{{/if}} +{{#if file_selectors}} +file_selectors: +{{file_selectors}} +{{/if}} + +{{/if}} + +{{#if access_key_id}} +access_key_id: {{access_key_id}} +{{/if}} +{{#if secret_access_key}} +secret_access_key: {{secret_access_key}} +{{/if}} +{{#if session_token}} +session_token: {{session_token}} +{{/if}} +{{#if shared_credential_file}} +shared_credential_file: {{shared_credential_file}} +{{/if}} +{{#if credential_profile_name}} +credential_profile_name: {{credential_profile_name}} +{{/if}} +{{#if role_arn}} +role_arn: {{role_arn}} +{{/if}} +{{#if fips_enabled}} +fips_enabled: {{fips_enabled}} +{{/if}} +{{#if proxy_url}} +proxy_url: {{proxy_url}} +{{/if}} +tags: +{{#if collect_s3_logs}} + - collect_s3_logs +{{else}} + - collect_sqs_logs +{{/if}} +{{#if preserve_original_event}} + - preserve_original_event +{{/if}} +{{#if preserve_duplicate_custom_fields}} + - preserve_duplicate_custom_fields +{{/if}} +{{#each tags as |tag|}} + - {{tag}} +{{/each}} +{{#contains "forwarded" tags}} +publisher_pipeline.disable_host: true +{{/contains}} +{{#if processors}} +processors: +{{processors}} +{{/if}} \ No newline at end of file diff --git a/packages/aws/data_stream/guardduty/agent/stream/httpjson.yml.hbs b/packages/aws/data_stream/guardduty/agent/stream/httpjson.yml.hbs new file mode 100644 index 00000000000..11389e2d75d --- /dev/null +++ b/packages/aws/data_stream/guardduty/agent/stream/httpjson.yml.hbs @@ -0,0 +1,96 @@ +config_version: 2 +interval: {{interval}} +request.url: https://guardduty.{{aws_region}}.amazonaws.com/detector/{{detector_id}}/findings +request.method: POST +{{#if http_client_timeout}} +request.timeout: {{http_client_timeout}} +{{/if}} +{{#if proxy_url}} +request.proxy_url: {{proxy_url}} +{{/if}} +{{#if ssl}} +request.ssl: {{ssl}} +{{/if}} +request.transforms: + - set: + target: header.X-Amz-Date + value: '[[formatDate (now) "20060102T150405Z"]]' + - set: + target: body.MaxResults + value: 50 + value_type: int + - set: + target: body.sortCriteria + value: '{"attributeName":"updatedAt","orderBy":"ASC"}' + value_type: json + - set: + target: body.findingCriteria.criterion.updatedAt.greaterThan + value: '[[((parseDate .cursor.last_execution_datetime).Truncate (parseDuration "1h")).UnixMilli]]' + default: '[[((now (parseDuration "-{{initial_interval}}")).Truncate (parseDuration "1h")).UnixMilli]]' + - set: + target: body.findingCriteria.criterion.updatedAt.lessThan + value: '[[((now).Truncate (parseDuration "1h")).UnixMilli]]' + - set: + target: header.Authorization + value: '[[$now := (now)]][[(sprintf "AWS4-HMAC-SHA256 Credential={{access_key_id}}/%s/{{aws_region}}/guardduty/aws4_request, SignedHeaders=host;x-amz-date, Signature=%s" (formatDate ($now) "20060102") (hmac "sha256" (hexDecode (hmac "sha256" (hexDecode (hmac "sha256" (hexDecode (hmac "sha256" (hexDecode (hmac "sha256" "AWS4{{secret_access_key}}" (formatDate ($now) "20060102"))) "{{aws_region}}")) "guardduty")) "aws4_request")) "AWS4-HMAC-SHA256\n" (formatDate ($now) "20060102T150405Z") "\n" (sprintf "%s/%s\n" (formatDate ($now) "20060102") "{{aws_region}}/guardduty/aws4_request") (hash "sha256" "POST\n" "/detector/{{detector_id}}/findings\n" "\n" "host:guardduty.{{aws_region}}.amazonaws.com\n" (sprintf "x-amz-date:%s\n\n" (formatDate ($now) "20060102T150405Z")) "host;x-amz-date\n" (hash "sha256" (sprintf `%s` .body)))))]]' +response.pagination: + - set: + target: body.nextToken + value: '[[if (ne .last_response.body.nextToken "")]][[.last_response.body.nextToken]][[end]]' + fail_on_template_error: true + - delete: + target: header.Authorization + - set: + target: header.Authorization + value: '[[$now := (now)]][[(sprintf "AWS4-HMAC-SHA256 Credential={{access_key_id}}/%s/{{aws_region}}/guardduty/aws4_request, SignedHeaders=host;x-amz-date, Signature=%s" (formatDate ($now) "20060102") (hmac "sha256" (hexDecode (hmac "sha256" (hexDecode (hmac "sha256" (hexDecode (hmac "sha256" (hexDecode (hmac "sha256" "AWS4{{secret_access_key}}" (formatDate ($now) "20060102"))) "{{aws_region}}")) "guardduty")) "aws4_request")) "AWS4-HMAC-SHA256\n" (formatDate ($now) "20060102T150405Z") "\n" (sprintf "%s/%s\n" (formatDate ($now) "20060102") "{{aws_region}}/guardduty/aws4_request") (hash "sha256" "POST\n" "/detector/{{detector_id}}/findings\n" "\n" "host:guardduty.{{aws_region}}.amazonaws.com\n" (sprintf "x-amz-date:%s\n\n" (formatDate ($now) "20060102T150405Z")) "host;x-amz-date\n" (hash "sha256" (sprintf `%s` .body)))))]]' +chain: + - step: + request.url: https://guardduty.{{aws_region}}.amazonaws.com/detector/{{detector_id}}/findings/get + replace: $.nextToken + {{#if http_client_timeout}} + request.timeout: {{http_client_timeout}} + {{/if}} + {{#if proxy_url}} + request.proxy_url: {{proxy_url}} + {{/if}} + {{#if ssl}} + request.ssl: {{ssl}} + {{/if}} + request.method: POST + request.transforms: + - set: + target: header.X-Amz-Date + value: '[[formatDate (now) "20060102T150405Z"]]' + - set: + target: body.findingIds + value: '[[toJSON .parent_last_response.body.findingIds]]' + value_type: json + - set: + target: body.sortCriteria + value: '{"attributeName":"updatedAt","orderBy":"ASC"}' + value_type: json + - set: + target: header.Authorization + value: '[[$now := (now)]][[(sprintf "AWS4-HMAC-SHA256 Credential={{access_key_id}}/%s/{{aws_region}}/guardduty/aws4_request, SignedHeaders=host;x-amz-date, Signature=%s" (formatDate ($now) "20060102") (hmac "sha256" (hexDecode (hmac "sha256" (hexDecode (hmac "sha256" (hexDecode (hmac "sha256" (hexDecode (hmac "sha256" "AWS4{{secret_access_key}}" (formatDate ($now) "20060102"))) "{{aws_region}}")) "guardduty")) "aws4_request")) "AWS4-HMAC-SHA256\n" (formatDate ($now) "20060102T150405Z") "\n" (sprintf "%s/%s\n" (formatDate ($now) "20060102") "{{aws_region}}/guardduty/aws4_request") (hash "sha256" "POST\n" "/detector/{{detector_id}}/findings/get\n" "\n" "host:guardduty.{{aws_region}}.amazonaws.com\n" (sprintf "x-amz-date:%s\n\n" (formatDate ($now) "20060102T150405Z")) "host;x-amz-date\n" (hash "sha256" (sprintf `%s` .body)))))]]' + response.split: + target: body.findings +cursor: + last_execution_datetime: + value: '[[if (ne (len .last_response.body.findings) 50)]][[.last_event.updatedAt]][[end]]' +tags: +{{#if preserve_original_event}} + - preserve_original_event +{{/if}} +{{#if preserve_duplicate_custom_fields}} + - preserve_duplicate_custom_fields +{{/if}} +{{#each tags as |tag|}} + - {{tag}} +{{/each}} +{{#contains "forwarded" tags}} +publisher_pipeline.disable_host: true +{{/contains}} +{{#if processors}} +processors: +{{processors}} +{{/if}} diff --git a/packages/aws/data_stream/guardduty/elasticsearch/ingest_pipeline/default.yml b/packages/aws/data_stream/guardduty/elasticsearch/ingest_pipeline/default.yml new file mode 100644 index 00000000000..ce55dee867b --- /dev/null +++ b/packages/aws/data_stream/guardduty/elasticsearch/ingest_pipeline/default.yml @@ -0,0 +1,2482 @@ +--- +description: Pipeline for processing Amazon GuardDuty Findings logs. +processors: + - set: + field: ecs.version + value: '8.2.0' + - set: + field: event.kind + value: [event] + - set: + field: event.type + value: [info] + - rename: + field: message + target_field: event.original + ignore_missing: true + - json: + field: event.original + target_field: json + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - drop: + if: ctx.json?.findings != null && ctx.json.findings.isEmpty() + - fingerprint: + fields: + - json.updatedAt + - json.id + - json.createdAt + - json.description + - json.accountId + target_field: _id + ignore_missing: true + - rename: + field: json.accountId + target_field: aws.guardduty.account_id + ignore_missing: true + - rename: + field: json.arn + target_field: aws.guardduty.arn + ignore_missing: true + - rename: + field: json.confidence + target_field: aws.guardduty.confidence + ignore_missing: true + - date: + field: json.createdAt + target_field: aws.guardduty.created_at + formats: + - ISO8601 + - UNIX + - yyyy-MM-dd'T'HH:mm:ss.SSS'Z' + if: ctx.json?.createdAt != null + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - rename: + field: json.description + target_field: aws.guardduty.description + ignore_missing: true + - rename: + field: json.id + target_field: aws.guardduty.id + ignore_missing: true + - rename: + field: json.partition + target_field: aws.guardduty.partition + ignore_missing: true + - rename: + field: json.region + target_field: aws.guardduty.region + ignore_missing: true + - rename: + field: json.resource.accessKeyDetails.accessKeyId + target_field: aws.guardduty.resource.access_key_details.accesskey_id + ignore_missing: true + - rename: + field: json.resource.accessKeyDetails.userType + target_field: aws.guardduty.resource.access_key_details.user.type + ignore_missing: true + - rename: + field: json.resource.accessKeyDetails.principalId + target_field: aws.guardduty.resource.access_key_details.principal_id + ignore_missing: true + - append: + field: related.user + value: '{{{aws.guardduty.resource.access_key_details.principal_id}}}' + if: ctx.aws?.guardduty?.resource?.access_key_details?.principal_id != null + allow_duplicates: false + - rename: + field: json.resource.accessKeyDetails.userName + target_field: aws.guardduty.resource.access_key_details.user.name + ignore_missing: true + - append: + field: related.user + value: '{{{aws.guardduty.resource.access_key_details.user.name}}}' + if: ctx.aws?.guardduty?.resource?.access_key_details?.user?.name != null + allow_duplicates: false + - rename: + field: json.resource.containerDetails.containerRuntime + target_field: aws.guardduty.resource.container_details.container_runtime + ignore_missing: true + - rename: + field: json.resource.containerDetails.id + target_field: aws.guardduty.resource.container_details.id + ignore_missing: true + - rename: + field: json.resource.containerDetails.image + target_field: aws.guardduty.resource.container_details.image.value + ignore_missing: true + - rename: + field: json.resource.containerDetails.imagePrefix + target_field: aws.guardduty.resource.container_details.image.prefix + ignore_missing: true + - rename: + field: json.resource.containerDetails.name + target_field: aws.guardduty.resource.container_details.name + ignore_missing: true + - convert: + field: json.resource.containerDetails.securityContext.privileged + target_field: aws.guardduty.resource.container_details.security_context.privileged + type: boolean + ignore_missing: true + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - foreach: + field: json.resource.containerDetails.volumeMounts + if: ctx.json?.resource?.containerDetails?.volumeMounts instanceof List + processor: + rename: + field: _ingest._value.mountPath + target_field: _ingest._value.mount_path + ignore_missing: true + - rename: + field: json.resource.containerDetails.volumeMounts + target_field: aws.guardduty.resource.container_details.volume_mounts + ignore_missing: true + - foreach: + field: json.resource.ebsVolumeDetails.scannedVolumeDetails + if: ctx.json?.resource?.ebsVolumeDetails?.scannedVolumeDetails instanceof List + processor: + rename: + field: _ingest._value.deviceName + target_field: _ingest._value.device_name + ignore_missing: true + - foreach: + field: json.resource.ebsVolumeDetails.scannedVolumeDetails + if: ctx.json?.resource?.ebsVolumeDetails?.scannedVolumeDetails instanceof List + processor: + rename: + field: _ingest._value.encryptionType + target_field: _ingest._value.encryption_type + ignore_missing: true + - foreach: + field: json.resource.ebsVolumeDetails.scannedVolumeDetails + if: ctx.json?.resource?.ebsVolumeDetails?.scannedVolumeDetails instanceof List + processor: + rename: + field: _ingest._value.kmsKeyArn + target_field: _ingest._value.kmskey_arn + ignore_missing: true + - foreach: + field: json.resource.ebsVolumeDetails.scannedVolumeDetails + if: ctx.json?.resource?.ebsVolumeDetails?.scannedVolumeDetails instanceof List + processor: + rename: + field: _ingest._value.snapshotArn + target_field: _ingest._value.snapshot_arn + ignore_missing: true + - foreach: + field: json.resource.ebsVolumeDetails.scannedVolumeDetails + if: ctx.json?.resource?.ebsVolumeDetails?.scannedVolumeDetails instanceof List + processor: + rename: + field: _ingest._value.volumeArn + target_field: _ingest._value.volume.arn + ignore_missing: true + - foreach: + field: json.resource.ebsVolumeDetails.scannedVolumeDetails + if: ctx.json?.resource?.ebsVolumeDetails?.scannedVolumeDetails instanceof List + processor: + convert: + field: _ingest._value.volumeSizeInGB + target_field: _ingest._value.volume.size_in_gb + type: long + ignore_missing: true + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - foreach: + field: json.resource.ebsVolumeDetails.scannedVolumeDetails + if: ctx.json?.resource?.ebsVolumeDetails?.scannedVolumeDetails instanceof List + processor: + rename: + field: _ingest._value.volumeType + target_field: _ingest._value.volume.type + ignore_missing: true + - foreach: + field: json.resource.ebsVolumeDetails.scannedVolumeDetails + if: ctx.json?.resource?.ebsVolumeDetails?.scannedVolumeDetails instanceof List + processor: + remove: + field: _ingest._value.volumeSizeInGB + ignore_missing: true + - rename: + field: json.resource.ebsVolumeDetails.scannedVolumeDetails + target_field: aws.guardduty.resource.ebs_volume_details.scanned_volume_details + ignore_missing: true + - foreach: + field: json.resource.ebsVolumeDetails.skippedVolumeDetails + if: ctx.json?.resource?.ebsVolumeDetails?.skippedVolumeDetails instanceof List + processor: + rename: + field: _ingest._value.deviceName + target_field: _ingest._value.device_name + ignore_missing: true + - foreach: + field: json.resource.ebsVolumeDetails.skippedVolumeDetails + if: ctx.json?.resource?.ebsVolumeDetails?.skippedVolumeDetails instanceof List + processor: + rename: + field: _ingest._value.encryptionType + target_field: _ingest._value.encryption_type + ignore_missing: true + - foreach: + field: json.resource.ebsVolumeDetails.skippedVolumeDetails + if: ctx.json?.resource?.ebsVolumeDetails?.skippedVolumeDetails instanceof List + processor: + rename: + field: _ingest._value.kmsKeyArn + target_field: _ingest._value.kmskey_arn + ignore_missing: true + - foreach: + field: json.resource.ebsVolumeDetails.skippedVolumeDetails + if: ctx.json?.resource?.ebsVolumeDetails?.skippedVolumeDetails instanceof List + processor: + rename: + field: _ingest._value.snapshotArn + target_field: _ingest._value.snapshot_arn + ignore_missing: true + - foreach: + field: json.resource.ebsVolumeDetails.skippedVolumeDetails + if: ctx.json?.resource?.ebsVolumeDetails?.skippedVolumeDetails instanceof List + processor: + rename: + field: _ingest._value.volumeArn + target_field: _ingest._value.volume.arn + ignore_missing: true + - foreach: + field: json.resource.ebsVolumeDetails.skippedVolumeDetails + if: ctx.json?.resource?.ebsVolumeDetails?.skippedVolumeDetails instanceof List + processor: + convert: + field: _ingest._value.volumeSizeInGB + target_field: _ingest._value.volume.size_in_gb + type: long + ignore_missing: true + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - foreach: + field: json.resource.ebsVolumeDetails.skippedVolumeDetails + if: ctx.json?.resource?.ebsVolumeDetails?.skippedVolumeDetails instanceof List + processor: + rename: + field: _ingest._value.volumeType + target_field: _ingest._value.volume.type + ignore_missing: true + - foreach: + field: json.resource.ebsVolumeDetails.skippedVolumeDetails + if: ctx.json?.resource?.ebsVolumeDetails?.skippedVolumeDetails instanceof List + processor: + remove: + field: _ingest._value.volumeSizeInGB + ignore_missing: true + - rename: + field: json.resource.ebsVolumeDetails.skippedVolumeDetails + target_field: aws.guardduty.resource.ebs_volume_details.skipped_volume_details + ignore_missing: true + - convert: + field: json.resource.ecsClusterDetails.activeServicesCount + target_field: aws.guardduty.resource.ecs_cluster_details.active_services_count + type: long + ignore_missing: true + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - rename: + field: json.resource.ecsClusterDetails.arn + target_field: aws.guardduty.resource.ecs_cluster_details.arn + ignore_missing: true + - rename: + field: json.resource.ecsClusterDetails.name + target_field: aws.guardduty.resource.ecs_cluster_details.name + ignore_missing: true + - convert: + field: json.resource.ecsClusterDetails.registeredContainerInstancesCount + target_field: aws.guardduty.resource.ecs_cluster_details.registered_container_instances_count + type: long + ignore_missing: true + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - convert: + field: json.resource.ecsClusterDetails.runningTasksCount + target_field: aws.guardduty.resource.ecs_cluster_details.running_tasks_count + type: long + ignore_missing: true + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - rename: + field: json.resource.ecsClusterDetails.status + target_field: aws.guardduty.resource.ecs_cluster_details.status + ignore_missing: true + - rename: + field: json.resource.ecsClusterDetails.tags + target_field: aws.guardduty.resource.ecs_cluster_details.tags + ignore_missing: true + - rename: + field: json.resource.ecsClusterDetails.taskDetails.arn + target_field: aws.guardduty.resource.ecs_cluster_details.task_details.arn + ignore_missing: true + - foreach: + field: json.resource.ecsClusterDetails.taskDetails.containers + if: ctx.json?.resource?.ecsClusterDetails?.taskDetails?.containers instanceof List + processor: + rename: + field: _ingest._value.containerRuntime + target_field: _ingest._value.container_runtime + ignore_missing: true + - foreach: + field: json.resource.ecsClusterDetails.taskDetails.containers + if: ctx.json?.resource?.ecsClusterDetails?.taskDetails?.containers instanceof List + processor: + rename: + field: _ingest._value.image + target_field: _ingest._value.image.value + ignore_missing: true + - foreach: + field: json.resource.ecsClusterDetails.taskDetails.containers + if: ctx.json?.resource?.ecsClusterDetails?.taskDetails?.containers instanceof List + processor: + rename: + field: _ingest._value.imagePrefix + target_field: _ingest._value.image.prefix + ignore_missing: true + - foreach: + field: json.resource.ecsClusterDetails.taskDetails.containers + if: ctx.json?.resource?.ecsClusterDetails?.taskDetails?.containers instanceof List + processor: + convert: + field: _ingest._value.securityContext.privileged + target_field: _ingest._value.security_context.privileged + type: boolean + ignore_missing: true + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - foreach: + field: json.resource.ecsClusterDetails.taskDetails.containers + if: ctx.json?.resource?.ecsClusterDetails?.taskDetails?.containers instanceof List + processor: + foreach: + field: _ingest._value.volumeMounts + ignore_missing: true + processor: + rename: + field: _ingest._value.mountPath + target_field: _ingest._value.mount_path + ignore_missing: true + - foreach: + field: json.resource.ecsClusterDetails.taskDetails.containers + if: ctx.json?.resource?.ecsClusterDetails?.taskDetails?.containers instanceof List + processor: + rename: + field: _ingest._value.volumeMounts + target_field: _ingest._value.volume_mounts + ignore_missing: true + - foreach: + field: json.resource.ecsClusterDetails.taskDetails.containers + if: ctx.json?.resource?.ecsClusterDetails?.taskDetails?.containers instanceof List + processor: + remove: + field: _ingest._value.securityContext.privileged + ignore_missing: true + - rename: + field: json.resource.ecsClusterDetails.taskDetails.containers + target_field: aws.guardduty.resource.ecs_cluster_details.task_details.containers + ignore_missing: true + - rename: + field: json.resource.ecsClusterDetails.taskDetails.definitionArn + target_field: aws.guardduty.resource.ecs_cluster_details.task_details.definitionarn + ignore_missing: true + - rename: + field: json.resource.ecsClusterDetails.taskDetails.group + target_field: aws.guardduty.resource.ecs_cluster_details.task_details.group + ignore_missing: true + - date: + field: json.resource.ecsClusterDetails.taskDetails.startedAt + target_field: aws.guardduty.resource.ecs_cluster_details.task_details.started_at + formats: + - ISO8601 + - UNIX + - yyyy-MM-dd'T'HH:mm:ss.SSS'Z' + if: ctx.json?.resource?.ecsClusterDetails?.taskDetails?.startedAt != null + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - rename: + field: json.resource.ecsClusterDetails.taskDetails.startedBy + target_field: aws.guardduty.resource.ecs_cluster_details.task_details.started_by + ignore_missing: true + - rename: + field: json.resource.ecsClusterDetails.taskDetails.tags + target_field: aws.guardduty.resource.ecs_cluster_details.task_details.tags + ignore_missing: true + - date: + field: json.resource.ecsClusterDetails.taskDetails.createdAt + target_field: aws.guardduty.resource.ecs_cluster_details.task_details.created_at + formats: + - ISO8601 + - UNIX + - yyyy-MM-dd'T'HH:mm:ss.SSS'Z' + if: ctx.json?.resource?.ecsClusterDetails?.taskDetails?.createdAt != null + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - rename: + field: json.resource.ecsClusterDetails.taskDetails.version + target_field: aws.guardduty.resource.ecs_cluster_details.task_details.version + ignore_missing: true + - foreach: + field: json.resource.ecsClusterDetails.taskDetails.volumes + if: ctx.json?.resource?.ecsClusterDetails?.taskDetails?.volumes instanceof List + processor: + rename: + field: _ingest._value.hostPath + target_field: _ingest._value.host_path + ignore_missing: true + - rename: + field: json.resource.ecsClusterDetails.taskDetails.volumes + target_field: aws.guardduty.resource.ecs_cluster_details.task_details.volumes + ignore_missing: true + - rename: + field: json.resource.eksClusterDetails.arn + target_field: aws.guardduty.resource.eks_cluster_details.arn + ignore_missing: true + - date: + field: json.resource.eksClusterDetails.createdAt + target_field: aws.guardduty.resource.eks_cluster_details.created_at + formats: + - ISO8601 + - UNIX + - yyyy-MM-dd'T'HH:mm:ss.SSS'Z' + if: ctx.json?.resource?.eksClusterDetails?.createdAt != null + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - rename: + field: json.resource.eksClusterDetails.name + target_field: aws.guardduty.resource.eks_cluster_details.name + ignore_missing: true + - rename: + field: json.resource.eksClusterDetails.status + target_field: aws.guardduty.resource.eks_cluster_details.status + ignore_missing: true + - rename: + field: json.resource.eksClusterDetails.tags + target_field: aws.guardduty.resource.eks_cluster_details.tags + ignore_missing: true + - rename: + field: json.resource.eksClusterDetails.vpcId + target_field: aws.guardduty.resource.eks_cluster_details.vpcid + ignore_missing: true + - rename: + field: json.resource.instanceDetails.availabilityZone + target_field: aws.guardduty.resource.instance_details.availability_zone + ignore_missing: true + - rename: + field: json.resource.instanceDetails.iamInstanceProfile + target_field: aws.guardduty.resource.instance_details.iaminstance_profile + ignore_missing: true + - rename: + field: json.resource.instanceDetails.imageDescription + target_field: aws.guardduty.resource.instance_details.image.description + ignore_missing: true + - rename: + field: json.resource.instanceDetails.imageId + target_field: aws.guardduty.resource.instance_details.image.id + ignore_missing: true + - rename: + field: json.resource.instanceDetails.instanceId + target_field: aws.guardduty.resource.instance_details.instance.id + ignore_missing: true + - rename: + field: json.resource.instanceDetails.instanceState + target_field: aws.guardduty.resource.instance_details.instance.state + ignore_missing: true + - rename: + field: json.resource.instanceDetails.instanceType + target_field: aws.guardduty.resource.instance_details.instance.type + ignore_missing: true + - date: + field: json.resource.instanceDetails.launchTime + target_field: aws.guardduty.resource.instance_details.launch_time + formats: + - ISO8601 + - UNIX + - yyyy-MM-dd'T'HH:mm:ss.SSS'Z' + if: ctx.json?.resource?.instanceDetails?.launchTime != null + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - foreach: + field: json.resource.instanceDetails.networkInterfaces + if: ctx.json?.resource?.instanceDetails?.networkInterfaces instanceof List + processor: + foreach: + field: _ingest._value.ipv6Addresses + ignore_missing: true + processor: + convert: + field: _ingest._value + type: ip + ignore_missing: true + on_failure: + - remove: + field: _ingest._value + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - foreach: + field: json.resource.instanceDetails.networkInterfaces + if: ctx.json?.resource?.instanceDetails?.networkInterfaces instanceof List + processor: + foreach: + field: _ingest._value.ipv6Addresses + ignore_missing: true + processor: + append: + field: related.ip + value: '{{{_ingest._value}}}' + allow_duplicates: false + - foreach: + field: json.resource.instanceDetails.networkInterfaces + if: ctx.json?.resource?.instanceDetails?.networkInterfaces instanceof List + processor: + rename: + field: _ingest._value.ipv6Addresses + target_field: _ingest._value.ipv6_addresses + ignore_missing: true + - foreach: + field: json.resource.instanceDetails.networkInterfaces + if: ctx.json?.resource?.instanceDetails?.networkInterfaces instanceof List + processor: + rename: + field: _ingest._value.networkInterfaceId + target_field: _ingest._value.network_interface_id + ignore_missing: true + - foreach: + field: json.resource.instanceDetails.networkInterfaces + if: ctx.json?.resource?.instanceDetails?.networkInterfaces instanceof List + processor: + rename: + field: _ingest._value.privateDnsName + target_field: _ingest._value.private.dns_name + ignore_missing: true + - foreach: + field: json.resource.instanceDetails.networkInterfaces + if: ctx.json?.resource?.instanceDetails?.networkInterfaces instanceof List + processor: + convert: + field: _ingest._value.privateIpAddress + target_field: _ingest._value.private.ip_address + type: ip + ignore_missing: true + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - foreach: + field: json.resource.instanceDetails.networkInterfaces + if: ctx.json?.resource?.instanceDetails?.networkInterfaces instanceof List + processor: + append: + field: related.ip + value: '{{{_ingest._value.private.ip_address}}}' + allow_duplicates: false + - foreach: + field: json.resource.instanceDetails.networkInterfaces + if: ctx.json?.resource?.instanceDetails?.networkInterfaces instanceof List + processor: + foreach: + field: _ingest._value.privateIpAddresses + ignore_missing: true + processor: + convert: + field: _ingest._value.privateIpAddress + target_field: _ingest._value.private.ip_address + type: ip + ignore_missing: true + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - foreach: + field: json.resource.instanceDetails.networkInterfaces + if: ctx.json?.resource?.instanceDetails?.networkInterfaces instanceof List + processor: + foreach: + field: _ingest._value.privateIpAddresses + ignore_missing: true + processor: + append: + field: related.ip + value: '{{{_ingest._value.private.ip_address}}}' + allow_duplicates: false + - foreach: + field: json.resource.instanceDetails.networkInterfaces + if: ctx.json?.resource?.instanceDetails?.networkInterfaces instanceof List + processor: + foreach: + field: _ingest._value.privateIpAddresses + ignore_missing: true + processor: + rename: + field: _ingest._value.privateDnsName + target_field: _ingest._value.private.dns_name + ignore_missing: true + - foreach: + field: json.resource.instanceDetails.networkInterfaces + if: ctx.json?.resource?.instanceDetails?.networkInterfaces instanceof List + processor: + foreach: + field: _ingest._value.privateIpAddresses + ignore_missing: true + processor: + remove: + field: _ingest._value.privateIpAddress + ignore_missing: true + - foreach: + field: json.resource.instanceDetails.networkInterfaces + if: ctx.json?.resource?.instanceDetails?.networkInterfaces instanceof List + processor: + rename: + field: _ingest._value.privateIpAddresses + target_field: _ingest._value.private.ip_addresses + ignore_missing: true + - foreach: + field: json.resource.instanceDetails.networkInterfaces + if: ctx.json?.resource?.instanceDetails?.networkInterfaces instanceof List + processor: + rename: + field: _ingest._value.publicDnsName + target_field: _ingest._value.public.dns_name + ignore_missing: true + - foreach: + field: json.resource.instanceDetails.networkInterfaces + if: ctx.json?.resource?.instanceDetails?.networkInterfaces instanceof List + processor: + convert: + field: _ingest._value.publicIp + target_field: _ingest._value.public.ip + type: ip + ignore_missing: true + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - foreach: + field: json.resource.instanceDetails.networkInterfaces + if: ctx.json?.resource?.instanceDetails?.networkInterfaces instanceof List + processor: + append: + field: related.ip + value: '{{{_ingest._value.public.ip}}}' + allow_duplicates: false + - foreach: + field: json.resource.instanceDetails.networkInterfaces + if: ctx.json?.resource?.instanceDetails?.networkInterfaces instanceof List + processor: + foreach: + field: _ingest._value.securityGroups + ignore_missing: true + processor: + rename: + field: _ingest._value.groupId + target_field: _ingest._value.group.id + ignore_missing: true + - foreach: + field: json.resource.instanceDetails.networkInterfaces + if: ctx.json?.resource?.instanceDetails?.networkInterfaces instanceof List + processor: + foreach: + field: _ingest._value.securityGroups + ignore_missing: true + processor: + rename: + field: _ingest._value.groupName + target_field: _ingest._value.group.name + ignore_missing: true + - foreach: + field: json.resource.instanceDetails.networkInterfaces + if: ctx.json?.resource?.instanceDetails?.networkInterfaces instanceof List + processor: + rename: + field: _ingest._value.securityGroups + target_field: _ingest._value.security_groups + ignore_missing: true + - foreach: + field: json.resource.instanceDetails.networkInterfaces + if: ctx.json?.resource?.instanceDetails?.networkInterfaces instanceof List + processor: + rename: + field: _ingest._value.subnetId + target_field: _ingest._value.subnet_id + ignore_missing: true + - foreach: + field: json.resource.instanceDetails.networkInterfaces + if: ctx.json?.resource?.instanceDetails?.networkInterfaces instanceof List + processor: + rename: + field: _ingest._value.vpcId + target_field: _ingest._value.vpc_id + ignore_missing: true + - foreach: + field: json.resource.instanceDetails.networkInterfaces + if: ctx.json?.resource?.instanceDetails?.networkInterfaces instanceof List + processor: + remove: + field: + - _ingest._value.privateIpAddress + - _ingest._value.publicIp + ignore_missing: true + - rename: + field: json.resource.instanceDetails.networkInterfaces + target_field: aws.guardduty.resource.instance_details.network_interfaces + ignore_missing: true + - rename: + field: json.resource.instanceDetails.outpostArn + target_field: aws.guardduty.resource.instance_details.outpost_arn + ignore_missing: true + - rename: + field: json.resource.instanceDetails.platform + target_field: aws.guardduty.resource.instance_details.platform + ignore_missing: true + - foreach: + field: json.resource.instanceDetails.productCodes + if: ctx.json?.resource?.instanceDetails?.productCodes instanceof List + processor: + rename: + field: _ingest._value.productCodeId + target_field: _ingest._value.product_code.id + ignore_missing: true + - foreach: + field: json.resource.instanceDetails.productCodes + if: ctx.json?.resource?.instanceDetails?.productCodes instanceof List + processor: + rename: + field: _ingest._value.productCodeType + target_field: _ingest._value.product_code.type + ignore_missing: true + - rename: + field: json.resource.instanceDetails.productCodes + target_field: aws.guardduty.resource.instance_details.product_codes + ignore_missing: true + - rename: + field: json.resource.instanceDetails.tags + target_field: aws.guardduty.resource.instance_details.tags + ignore_missing: true + - rename: + field: json.resource.kubernetesDetails.kubernetesUserDetails.uid + target_field: aws.guardduty.resource.kubernetes_details.kubernetes_user_details.uid + ignore_missing: true + - append: + field: related.user + value: '{{{aws.guardduty.resource.kubernetes_details.kubernetes_user_details.uid}}}' + if: ctx.aws?.guardduty?.resource?.kubernetes_details?.kubernetes_user_details?.uid != null + allow_duplicates: false + - rename: + field: json.resource.kubernetesDetails.kubernetesUserDetails.username + target_field: aws.guardduty.resource.kubernetes_details.kubernetes_user_details.user_name + ignore_missing: true + - append: + field: related.user + value: '{{{aws.guardduty.resource.kubernetes_details.kubernetes_user_details.user_name}}}' + if: ctx.aws?.guardduty?.resource?.kubernetes_details?.kubernetes_user_details?.user_name != null + allow_duplicates: false + - rename: + field: json.resource.kubernetesDetails.kubernetesUserDetails.groups + target_field: aws.guardduty.resource.kubernetes_details.kubernetes_user_details.groups + ignore_missing: true + - foreach: + field: json.resource.kubernetesDetails.kubernetesWorkloadDetails.containers + if: ctx.json?.resource?.kubernetesDetails?.kubernetesWorkloadDetails?.containers instanceof List + processor: + rename: + field: _ingest._value.containerRuntime + target_field: _ingest._value.container_runtime + ignore_missing: true + - foreach: + field: json.resource.kubernetesDetails.kubernetesWorkloadDetails.containers + if: ctx.json?.resource?.kubernetesDetails?.kubernetesWorkloadDetails?.containers instanceof List + processor: + rename: + field: _ingest._value.image + target_field: _ingest._value.image.value + ignore_missing: true + - foreach: + field: json.resource.kubernetesDetails.kubernetesWorkloadDetails.containers + if: ctx.json?.resource?.kubernetesDetails?.kubernetesWorkloadDetails?.containers instanceof List + processor: + rename: + field: _ingest._value.imagePrefix + target_field: _ingest._value.image.prefix + ignore_missing: true + - foreach: + field: json.resource.kubernetesDetails.kubernetesWorkloadDetails.containers + if: ctx.json?.resource?.kubernetesDetails?.kubernetesWorkloadDetails?.containers instanceof List + processor: + convert: + field: _ingest._value.securityContext.privileged + target_field: _ingest._value.security_context.privileged + type: boolean + ignore_missing: true + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - foreach: + field: json.resource.kubernetesDetails.kubernetesWorkloadDetails.containers + if: ctx.json?.resource?.kubernetesDetails?.kubernetesWorkloadDetails?.containers instanceof List + processor: + foreach: + field: _ingest._value.volumeMounts + ignore_missing: true + processor: + rename: + field: _ingest._value.mountPath + target_field: _ingest._value.mount_path + ignore_missing: true + - foreach: + field: json.resource.kubernetesDetails.kubernetesWorkloadDetails.containers + if: ctx.json?.resource?.kubernetesDetails?.kubernetesWorkloadDetails?.containers instanceof List + processor: + rename: + field: _ingest._value.volumeMounts + target_field: _ingest._value.volume_mounts + ignore_missing: true + - foreach: + field: json.resource.kubernetesDetails.kubernetesWorkloadDetails.containers + if: ctx.json?.resource?.kubernetesDetails?.kubernetesWorkloadDetails?.containers instanceof List + processor: + remove: + field: _ingest._value.securityContext.privileged + ignore_missing: true + - rename: + field: json.resource.kubernetesDetails.kubernetesWorkloadDetails.containers + target_field: aws.guardduty.resource.kubernetes_details.kubernetes_workload_details.containers + ignore_missing: true + - convert: + field: json.resource.kubernetesDetails.kubernetesWorkloadDetails.hostNetwork + target_field: aws.guardduty.resource.kubernetes_details.kubernetes_workload_details.host_network + type: boolean + ignore_missing: true + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - rename: + field: json.resource.kubernetesDetails.kubernetesWorkloadDetails.name + target_field: aws.guardduty.resource.kubernetes_details.kubernetes_workload_details.name + ignore_missing: true + - rename: + field: json.resource.kubernetesDetails.kubernetesWorkloadDetails.namespace + target_field: aws.guardduty.resource.kubernetes_details.kubernetes_workload_details.name_space + ignore_missing: true + - rename: + field: json.resource.kubernetesDetails.kubernetesWorkloadDetails.type + target_field: aws.guardduty.resource.kubernetes_details.kubernetes_workload_details.type + ignore_missing: true + - rename: + field: json.resource.kubernetesDetails.kubernetesWorkloadDetails.uid + target_field: aws.guardduty.resource.kubernetes_details.kubernetes_workload_details.uid + ignore_missing: true + - foreach: + field: json.resource.kubernetesDetails.kubernetesWorkloadDetails.volumes + if: ctx.json?.resource?.kubernetesDetails?.kubernetesWorkloadDetails?.volumes instanceof List + processor: + rename: + field: _ingest._value.hostPath + target_field: _ingest._value.host_path + ignore_missing: true + - rename: + field: json.resource.kubernetesDetails.kubernetesWorkloadDetails.volumes + target_field: aws.guardduty.resource.kubernetes_details.kubernetes_workload_details.volumes + ignore_missing: true + - rename: + field: json.resource.rdsDbInstanceDetails.dbInstanceIdentifier + target_field: aws.guardduty.resource.rdsdb_instance_details.instance_identifier + ignore_missing: true + - rename: + field: json.resource.rdsDbInstanceDetails.engine + target_field: aws.guardduty.resource.rdsdb_instance_details.engine + ignore_missing: true + - convert: + field: json.resource.rdsDbInstanceDetails.engineVersion + target_field: aws.guardduty.resource.rdsdb_instance_details.engine_version + type: string + ignore_missing: true + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - rename: + field: json.resource.rdsDbInstanceDetails.dbClusterIdentifier + target_field: aws.guardduty.resource.rdsdb_instance_details.cluster_identifier + ignore_missing: true + - rename: + field: json.resource.rdsDbInstanceDetails.dbInstanceArn + target_field: aws.guardduty.resource.rdsdb_instance_details.instance_arn + ignore_missing: true + - rename: + field: json.resource.rdsDbUserDetails.user + target_field: aws.guardduty.resource.rdsdb_user_details.user + ignore_missing: true + - append: + field: related.user + value: '{{{aws.guardduty.resource.rdsdb_user_details.user}}}' + if: ctx.aws?.guardduty?.resource?.rdsdb_user_details?.user != null + allow_duplicates: false + - rename: + field: json.resource.rdsDbUserDetails.application + target_field: aws.guardduty.resource.rdsdb_user_details.application + ignore_missing: true + - rename: + field: json.resource.rdsDbUserDetails.database + target_field: aws.guardduty.resource.rdsdb_user_details.database + ignore_missing: true + - rename: + field: json.resource.rdsDbUserDetails.ssl + target_field: aws.guardduty.resource.rdsdb_user_details.ssl + ignore_missing: true + - rename: + field: json.resource.rdsDbUserDetails.authMethod + target_field: aws.guardduty.resource.rdsdb_user_details.auth_method + ignore_missing: true + - rename: + field: json.resource.resourceType + target_field: aws.guardduty.resource.type + ignore_missing: true + - foreach: + field: json.resource.s3BucketDetails + if: ctx.json?.resource?.s3BucketDetails instanceof List + processor: + date: + field: _ingest._value.createdAt + target_field: _ingest._value.created_at + formats: + - ISO8601 + - UNIX + - yyyy-MM-dd'T'HH:mm:ss.SSS'Z' + ignore_failure: true + - foreach: + field: json.resource.s3BucketDetails + if: ctx.json?.resource?.s3BucketDetails instanceof List + processor: + rename: + field: _ingest._value.defaultServerSideEncryption.encryptionType + target_field: _ingest._value.default_server_side_encryption.encryption_type + ignore_missing: true + - foreach: + field: json.resource.s3BucketDetails + if: ctx.json?.resource?.s3BucketDetails instanceof List + processor: + rename: + field: _ingest._value.defaultServerSideEncryption.kmsMasterKeyArn + target_field: _ingest._value.default_server_side_encryption.kms_masterkey_arn + ignore_missing: true + - foreach: + field: json.resource.s3BucketDetails + if: ctx.json?.resource?.s3BucketDetails instanceof List + processor: + rename: + field: _ingest._value.publicAccess + target_field: _ingest._value.public_access + ignore_missing: true + - foreach: + field: json.resource.s3BucketDetails + if: ctx.json?.resource?.s3BucketDetails instanceof List + processor: + append: + field: related.user + value: '{{{_ingest._value.owner.id}}}' + allow_duplicates: false + - foreach: + field: json.resource.s3BucketDetails + if: ctx.json?.resource?.s3BucketDetails instanceof List + processor: + remove: + field: _ingest._value.createdAt + ignore_missing: true + - rename: + field: json.resource.s3BucketDetails + target_field: aws.guardduty.resource.s3_bucket_details + ignore_missing: true + - convert: + field: json.schemaVersion + target_field: aws.guardduty.schema_version + type: string + ignore_missing: true + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - rename: + field: json.service.action.actionType + target_field: aws.guardduty.service.action.type + ignore_missing: true + - rename: + field: json.service.action.awsApiCallAction.affectedResources + target_field: aws.guardduty.service.action.aws_api_call_action.affected_resources + ignore_missing: true + - rename: + field: json.service.action.awsApiCallAction.api + target_field: aws.guardduty.service.action.aws_api_call_action.api + ignore_missing: true + - rename: + field: json.service.action.awsApiCallAction.callerType + target_field: aws.guardduty.service.action.aws_api_call_action.caller_type + ignore_missing: true + - rename: + field: json.service.action.awsApiCallAction.domainDetails.domain + target_field: aws.guardduty.service.action.aws_api_call_action.domain_details.domain + ignore_missing: true + - append: + field: related.hosts + value: '{{{aws.guardduty.service.action.aws_api_call_action.domain_details.domain}}}' + if: ctx.aws?.guardduty?.service?.action?.aws_api_call_action?.domain_details?.domain != null + allow_duplicates: false + - rename: + field: json.service.action.awsApiCallAction.errorCode + target_field: aws.guardduty.service.action.aws_api_call_action.error_code + ignore_missing: true + - rename: + field: json.service.action.awsApiCallAction.remoteAccountDetails.accountId + target_field: aws.guardduty.service.action.aws_api_call_action.remote_account_details.account_id + ignore_missing: true + - convert: + field: json.service.action.awsApiCallAction.remoteAccountDetails.affiliated + target_field: aws.guardduty.service.action.aws_api_call_action.remote_account_details.affiliated + type: boolean + ignore_missing: true + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - rename: + field: json.service.action.awsApiCallAction.remoteIpDetails.city.cityName + target_field: aws.guardduty.service.action.aws_api_call_action.remote_ip_details.city.name + ignore_missing: true + - rename: + field: json.service.action.awsApiCallAction.remoteIpDetails.country.countryCode + target_field: aws.guardduty.service.action.aws_api_call_action.remote_ip_details.country.code + ignore_missing: true + - rename: + field: json.service.action.awsApiCallAction.remoteIpDetails.country.countryName + target_field: aws.guardduty.service.action.aws_api_call_action.remote_ip_details.country.name + ignore_missing: true + - rename: + field: json.service.action.awsApiCallAction.remoteIpDetails.geoLocation + target_field: aws.guardduty.service.action.aws_api_call_action.remote_ip_details.geo_location + ignore_missing: true + - convert: + field: json.service.action.awsApiCallAction.remoteIpDetails.ipAddressV4 + target_field: aws.guardduty.service.action.aws_api_call_action.remote_ip_details.ip_address_v4 + type: ip + ignore_missing: true + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - append: + field: related.ip + value: '{{{aws.guardduty.service.action.aws_api_call_action.remote_ip_details.ip_address_v4}}}' + if: ctx.aws?.guardduty?.service?.action?.aws_api_call_action?.remote_ip_details?.ip_address_v4 != null + allow_duplicates: false + - rename: + field: json.service.action.awsApiCallAction.remoteIpDetails.organization.asn + target_field: aws.guardduty.service.action.aws_api_call_action.remote_ip_details.organization.asn + ignore_missing: true + - rename: + field: json.service.action.awsApiCallAction.remoteIpDetails.organization.asnOrg + target_field: aws.guardduty.service.action.aws_api_call_action.remote_ip_details.organization.asnorg + ignore_missing: true + - rename: + field: json.service.action.awsApiCallAction.remoteIpDetails.organization.isp + target_field: aws.guardduty.service.action.aws_api_call_action.remote_ip_details.organization.isp + ignore_missing: true + - rename: + field: json.service.action.awsApiCallAction.remoteIpDetails.organization.org + target_field: aws.guardduty.service.action.aws_api_call_action.remote_ip_details.organization.org + ignore_missing: true + - rename: + field: json.service.action.awsApiCallAction.serviceName + target_field: aws.guardduty.service.action.aws_api_call_action.service_name + ignore_missing: true + - rename: + field: json.service.action.awsApiCallAction.userAgent + target_field: aws.guardduty.service.action.aws_api_call_action.user_agent + ignore_missing: true + - convert: + field: json.service.action.dnsRequestAction.blocked + target_field: aws.guardduty.service.action.dns_request_action.blocked + type: boolean + ignore_missing: true + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - rename: + field: json.service.action.dnsRequestAction.domain + target_field: aws.guardduty.service.action.dns_request_action.domain + ignore_missing: true + - append: + field: related.hosts + value: '{{{aws.guardduty.service.action.dns_request_action.domain}}}' + if: ctx.aws?.guardduty?.service?.action?.dns_request_action?.domain != null + allow_duplicates: false + - rename: + field: json.service.action.dnsRequestAction.protocol + target_field: aws.guardduty.service.action.dns_request_action.protocol + ignore_missing: true + - rename: + field: json.service.action.kubernetesApiCallAction.parameters + target_field: aws.guardduty.service.action.kubernetes_api_call_action.parameters + ignore_missing: true + - rename: + field: json.service.action.kubernetesApiCallAction.remoteIpDetails.city.cityName + target_field: aws.guardduty.service.action.kubernetes_api_call_action.remote_ip_details.city.name + ignore_missing: true + - rename: + field: json.service.action.kubernetesApiCallAction.remoteIpDetails.country.countryCode + target_field: aws.guardduty.service.action.kubernetes_api_call_action.remote_ip_details.country.code + ignore_missing: true + - rename: + field: json.service.action.kubernetesApiCallAction.remoteIpDetails.country.countryName + target_field: aws.guardduty.service.action.kubernetes_api_call_action.remote_ip_details.country.name + ignore_missing: true + - rename: + field: json.service.action.kubernetesApiCallAction.remoteIpDetails.geoLocation + target_field: aws.guardduty.service.action.kubernetes_api_call_action.remote_ip_details.geo_location + ignore_missing: true + - convert: + field: json.service.action.kubernetesApiCallAction.remoteIpDetails.ipAddressV4 + target_field: aws.guardduty.service.action.kubernetes_api_call_action.remote_ip_details.ip_address_v4 + type: ip + ignore_missing: true + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - append: + field: related.ip + value: '{{{aws.guardduty.service.action.kubernetes_api_call_action.remote_ip_details.ip_address_v4}}}' + if: ctx.aws?.guardduty?.service?.action?.kubernetes_api_call_action?.remote_ip_details?.ip_address_v4 != null + allow_duplicates: false + - rename: + field: json.service.action.kubernetesApiCallAction.remoteIpDetails.organization.asn + target_field: aws.guardduty.service.action.kubernetes_api_call_action.remote_ip_details.organization.asn + ignore_missing: true + - rename: + field: json.service.action.kubernetesApiCallAction.remoteIpDetails.organization.asnOrg + target_field: aws.guardduty.service.action.kubernetes_api_call_action.remote_ip_details.organization.asnorg + ignore_missing: true + - rename: + field: json.service.action.kubernetesApiCallAction.remoteIpDetails.organization.isp + target_field: aws.guardduty.service.action.kubernetes_api_call_action.remote_ip_details.organization.isp + ignore_missing: true + - rename: + field: json.service.action.kubernetesApiCallAction.remoteIpDetails.organization.org + target_field: aws.guardduty.service.action.kubernetes_api_call_action.remote_ip_details.organization.org + ignore_missing: true + - rename: + field: json.service.action.kubernetesApiCallAction.requestUri + target_field: aws.guardduty.service.action.kubernetes_api_call_action.request_uri + ignore_missing: true + - foreach: + field: json.service.action.kubernetesApiCallAction.sourceIPs + if: ctx.json?.service?.action?.kubernetesApiCallAction?.sourceIPs instanceof List + processor: + convert: + field: _ingest._value + type: ip + ignore_missing: true + on_failure: + - remove: + field: _ingest._value + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - foreach: + field: json.service.action.kubernetesApiCallAction.sourceIPs + if: ctx.json?.service?.action?.kubernetesApiCallAction?.sourceIPs instanceof List + processor: + append: + field: related.ip + value: '{{{_ingest._value}}}' + allow_duplicates: false + - rename: + field: json.service.action.kubernetesApiCallAction.sourceIPs + target_field: aws.guardduty.service.action.kubernetes_api_call_action.source_ips + ignore_missing: true + - convert: + field: json.service.action.kubernetesApiCallAction.statusCode + target_field: aws.guardduty.service.action.kubernetes_api_call_action.status_code + type: long + ignore_missing: true + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - rename: + field: json.service.action.kubernetesApiCallAction.userAgent + target_field: aws.guardduty.service.action.kubernetes_api_call_action.user_agent + ignore_missing: true + - rename: + field: json.service.action.kubernetesApiCallAction.verb + target_field: aws.guardduty.service.action.kubernetes_api_call_action.verb + ignore_missing: true + - convert: + field: json.service.action.networkConnectionAction.blocked + target_field: aws.guardduty.service.action.network_connection_action.blocked + type: boolean + ignore_missing: true + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - rename: + field: json.service.action.networkConnectionAction.connectionDirection + target_field: aws.guardduty.service.action.network_connection_action.connection_direction + ignore_missing: true + - convert: + field: json.service.action.networkConnectionAction.localIpDetails.ipAddressV4 + target_field: aws.guardduty.service.action.network_connection_action.local_ip_details.ip_address_v4 + type: ip + ignore_missing: true + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - append: + field: related.ip + value: '{{{aws.guardduty.service.action.network_connection_action.local_ip_details.ip_address_v4}}}' + if: ctx.aws?.guardduty?.service?.action?.network_connection_action?.local_ip_details?.ip_address_v4 != null + allow_duplicates: false + - convert: + field: json.service.action.networkConnectionAction.localPortDetails.port + target_field: aws.guardduty.service.action.network_connection_action.local_port_details.port.value + type: long + ignore_missing: true + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - rename: + field: json.service.action.networkConnectionAction.localPortDetails.portName + target_field: aws.guardduty.service.action.network_connection_action.local_port_details.port.name + ignore_missing: true + - rename: + field: json.service.action.networkConnectionAction.protocol + target_field: aws.guardduty.service.action.network_connection_action.transport + ignore_missing: true + - rename: + field: json.service.action.networkConnectionAction.remoteIpDetails.city.cityName + target_field: aws.guardduty.service.action.network_connection_action.remote_ip_details.city.name + ignore_missing: true + - rename: + field: json.service.action.networkConnectionAction.remoteIpDetails.country.countryCode + target_field: aws.guardduty.service.action.network_connection_action.remote_ip_details.country.code + ignore_missing: true + - rename: + field: json.service.action.networkConnectionAction.remoteIpDetails.country.countryName + target_field: aws.guardduty.service.action.network_connection_action.remote_ip_details.country.name + ignore_missing: true + - rename: + field: json.service.action.networkConnectionAction.remoteIpDetails.geoLocation + target_field: aws.guardduty.service.action.network_connection_action.remote_ip_details.geo_location + ignore_missing: true + - convert: + field: json.service.action.networkConnectionAction.remoteIpDetails.ipAddressV4 + target_field: aws.guardduty.service.action.network_connection_action.remote_ip_details.ip_address_v4 + type: ip + ignore_missing: true + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - append: + field: related.ip + value: '{{{aws.guardduty.service.action.network_connection_action.remote_ip_details.ip_address_v4}}}' + if: ctx.aws?.guardduty?.service?.action?.network_connection_action?.remote_ip_details?.ip_address_v4 != null + allow_duplicates: false + - rename: + field: json.service.action.networkConnectionAction.remoteIpDetails.organization.asn + target_field: aws.guardduty.service.action.network_connection_action.remote_ip_details.organization.asn + ignore_missing: true + - rename: + field: json.service.action.networkConnectionAction.remoteIpDetails.organization.asnOrg + target_field: aws.guardduty.service.action.network_connection_action.remote_ip_details.organization.asnorg + ignore_missing: true + - rename: + field: json.service.action.networkConnectionAction.remoteIpDetails.organization.isp + target_field: aws.guardduty.service.action.network_connection_action.remote_ip_details.organization.isp + ignore_missing: true + - rename: + field: json.service.action.networkConnectionAction.remoteIpDetails.organization.org + target_field: aws.guardduty.service.action.network_connection_action.remote_ip_details.organization.org + ignore_missing: true + - convert: + field: json.service.action.networkConnectionAction.remotePortDetails.port + target_field: aws.guardduty.service.action.network_connection_action.remote_port_details.port.value + type: long + ignore_missing: true + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - rename: + field: json.service.action.networkConnectionAction.remotePortDetails.portName + target_field: aws.guardduty.service.action.network_connection_action.remote_port_details.port.name + ignore_missing: true + - convert: + field: json.service.action.portProbeAction.blocked + target_field: aws.guardduty.service.action.port_probe_action.blocked + type: boolean + ignore_missing: true + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - foreach: + field: json.service.action.portProbeAction.portProbeDetails + if: ctx.json?.service?.action?.portProbeAction?.portProbeDetails instanceof List + processor: + convert: + field: _ingest._value.localIpDetails.ipAddressV4 + target_field: _ingest._value.local_ip_details.ip_address_v4 + type: ip + ignore_missing: true + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - foreach: + field: json.service.action.portProbeAction.portProbeDetails + if: ctx.json?.service?.action?.portProbeAction?.portProbeDetails instanceof List + processor: + append: + field: related.ip + value: '{{{_ingest._value.local_ip_details.ip_address_v4}}}' + allow_duplicates: false + - foreach: + field: json.service.action.portProbeAction.portProbeDetails + if: ctx.json?.service?.action?.portProbeAction?.portProbeDetails instanceof List + processor: + convert: + field: _ingest._value.localPortDetails.port + target_field: _ingest._value.local_port_details.port.value + type: long + ignore_missing: true + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - foreach: + field: json.service.action.portProbeAction.portProbeDetails + if: ctx.json?.service?.action?.portProbeAction?.portProbeDetails instanceof List + processor: + rename: + field: _ingest._value.localPortDetails.portName + target_field: _ingest._value.local_port_details.port.name + ignore_missing: true + - foreach: + field: json.service.action.portProbeAction.portProbeDetails + if: ctx.json?.service?.action?.portProbeAction?.portProbeDetails instanceof List + processor: + rename: + field: _ingest._value.remoteIpDetails.city.cityName + target_field: _ingest._value.remote_ip_details.city.name + ignore_missing: true + - foreach: + field: json.service.action.portProbeAction.portProbeDetails + if: ctx.json?.service?.action?.portProbeAction?.portProbeDetails instanceof List + processor: + rename: + field: _ingest._value.remoteIpDetails.country.countryCode + target_field: _ingest._value.remote_ip_details.country.code + ignore_missing: true + - foreach: + field: json.service.action.portProbeAction.portProbeDetails + if: ctx.json?.service?.action?.portProbeAction?.portProbeDetails instanceof List + processor: + rename: + field: _ingest._value.remoteIpDetails.country.countryName + target_field: _ingest._value.remote_ip_details.country.name + ignore_missing: true + - foreach: + field: json.service.action.portProbeAction.portProbeDetails + if: ctx.json?.service?.action?.portProbeAction?.portProbeDetails instanceof List + processor: + rename: + field: _ingest._value.remoteIpDetails.geoLocation + target_field: _ingest._value.remote_ip_details.geo_location + ignore_missing: true + - foreach: + field: json.service.action.portProbeAction.portProbeDetails + if: ctx.json?.service?.action?.portProbeAction?.portProbeDetails instanceof List + processor: + convert: + field: _ingest._value.remoteIpDetails.ipAddressV4 + target_field: _ingest._value.remote_ip_details.ip_address_v4 + type: ip + ignore_missing: true + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - foreach: + field: json.service.action.portProbeAction.portProbeDetails + if: ctx.json?.service?.action?.portProbeAction?.portProbeDetails instanceof List + processor: + append: + field: related.ip + value: '{{{_ingest._value.remote_ip_details.ip_address_v4}}}' + allow_duplicates: false + - foreach: + field: json.service.action.portProbeAction.portProbeDetails + if: ctx.json?.service?.action?.portProbeAction?.portProbeDetails instanceof List + processor: + rename: + field: _ingest._value.remoteIpDetails.organization.isp + target_field: _ingest._value.remote_ip_details.organization.isp + ignore_missing: true + - foreach: + field: json.service.action.portProbeAction.portProbeDetails + if: ctx.json?.service?.action?.portProbeAction?.portProbeDetails instanceof List + processor: + rename: + field: _ingest._value.remoteIpDetails.organization.org + target_field: _ingest._value.remote_ip_details.organization.org + ignore_missing: true + - foreach: + field: json.service.action.portProbeAction.portProbeDetails + if: ctx.json?.service?.action?.portProbeAction?.portProbeDetails instanceof List + processor: + rename: + field: _ingest._value.remoteIpDetails.organization.asn + target_field: _ingest._value.remote_ip_details.organization.asn + ignore_missing: true + - foreach: + field: json.service.action.portProbeAction.portProbeDetails + if: ctx.json?.service?.action?.portProbeAction?.portProbeDetails instanceof List + processor: + rename: + field: _ingest._value.remoteIpDetails.organization.asnOrg + target_field: _ingest._value.remote_ip_details.organization.asnorg + ignore_missing: true + - foreach: + field: json.service.action.portProbeAction.portProbeDetails + if: ctx.json?.service?.action?.portProbeAction?.portProbeDetails instanceof List + processor: + remove: + field: + - _ingest._value.localIpDetails.ipAddressV4 + - _ingest._value.localPortDetails.port + - _ingest._value.remoteIpDetails.ipAddressV4 + ignore_missing: true + - rename: + field: json.service.action.portProbeAction.portProbeDetails + target_field: aws.guardduty.service.action.port_probe_action.port_probe_details + ignore_missing: true + - rename: + field: json.service.action.rdsLoginAttemptAction.remoteIpDetails.city.cityName + target_field: aws.guardduty.service.action.rds_login_attempt_action.remote_ip_details.city.name + ignore_missing: true + - rename: + field: json.service.action.rdsLoginAttemptAction.remoteIpDetails.country.countryCode + target_field: aws.guardduty.service.action.rds_login_attempt_action.remote_ip_details.country.code + ignore_missing: true + - rename: + field: json.service.action.rdsLoginAttemptAction.remoteIpDetails.country.countryName + target_field: aws.guardduty.service.action.rds_login_attempt_action.remote_ip_details.country.name + ignore_missing: true + - rename: + field: json.service.action.rdsLoginAttemptAction.remoteIpDetails.geoLocation + target_field: aws.guardduty.service.action.rds_login_attempt_action.remote_ip_details.geo_location + ignore_missing: true + - convert: + field: json.service.action.rdsLoginAttemptAction.remoteIpDetails.ipAddressV4 + target_field: aws.guardduty.service.action.rds_login_attempt_action.remote_ip_details.ip_address_v4 + type: ip + ignore_missing: true + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - append: + field: related.ip + value: '{{{aws.guardduty.service.action.rds_login_attempt_action.remote_ip_details.ip_address_v4}}}' + if: ctx.aws?.guardduty?.service?.action?.rds_login_attempt_action?.remote_ip_details?.ip_address_v4 != null + allow_duplicates: false + - rename: + field: json.service.action.rdsLoginAttemptAction.remoteIpDetails.organization.asn + target_field: aws.guardduty.service.action.rds_login_attempt_action.remote_ip_details.organization.asn + ignore_missing: true + - rename: + field: json.service.action.rdsLoginAttemptAction.remoteIpDetails.organization.asnOrg + target_field: aws.guardduty.service.action.rds_login_attempt_action.remote_ip_details.organization.asnorg + ignore_missing: true + - rename: + field: json.service.action.rdsLoginAttemptAction.remoteIpDetails.organization.isp + target_field: aws.guardduty.service.action.rds_login_attempt_action.remote_ip_details.organization.isp + ignore_missing: true + - rename: + field: json.service.action.rdsLoginAttemptAction.remoteIpDetails.organization.org + target_field: aws.guardduty.service.action.rds_login_attempt_action.remote_ip_details.organization.org + ignore_missing: true + - rename: + field: json.service.additionalInfo + target_field: aws.guardduty.service.additional_info + ignore_missing: true + - convert: + field: json.service.archived + target_field: aws.guardduty.service.archived + type: boolean + ignore_missing: true + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - convert: + field: json.service.count + target_field: aws.guardduty.service.count + type: long + ignore_missing: true + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - rename: + field: json.service.detectorId + target_field: aws.guardduty.service.detector_id + ignore_missing: true + - date: + field: json.service.ebsVolumeScanDetails.scanCompletedAt + target_field: aws.guardduty.service.ebs_volume_scan_details.scan.completed_at + formats: + - ISO8601 + - UNIX + - yyyy-MM-dd'T'HH:mm:ss.SSS'Z' + if: ctx.json?.service?.ebsVolumeScanDetails?.scanCompletedAt != null + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - convert: + field: json.service.ebsVolumeScanDetails.scanDetections.highestSeverityThreatDetails.count + target_field: aws.guardduty.service.ebs_volume_scan_details.scan.detections.highest_severity_threat_details.count + type: long + ignore_missing: true + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - rename: + field: json.service.ebsVolumeScanDetails.scanDetections.highestSeverityThreatDetails.severity + target_field: aws.guardduty.service.ebs_volume_scan_details.scan.detections.highest_severity_threat_details.severity + ignore_missing: true + - rename: + field: json.service.ebsVolumeScanDetails.scanDetections.highestSeverityThreatDetails.threatName + target_field: aws.guardduty.service.ebs_volume_scan_details.scan.detections.highest_severity_threat_details.threat_name + ignore_missing: true + - convert: + field: json.service.ebsVolumeScanDetails.scanDetections.scannedItemCount.files + target_field: aws.guardduty.service.ebs_volume_scan_details.scan.detections.scanned_item_count.files + type: long + ignore_missing: true + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - convert: + field: json.service.ebsVolumeScanDetails.scanDetections.scannedItemCount.totalGb + target_field: aws.guardduty.service.ebs_volume_scan_details.scan.detections.scanned_item_count.total_gb + type: long + ignore_missing: true + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - convert: + field: json.service.ebsVolumeScanDetails.scanDetections.scannedItemCount.volumes + target_field: aws.guardduty.service.ebs_volume_scan_details.scan.detections.scanned_item_count.volumes + type: long + ignore_missing: true + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - convert: + field: json.service.ebsVolumeScanDetails.scanDetections.threatDetectedByName.itemCount + target_field: aws.guardduty.service.ebs_volume_scan_details.scan.detections.threat_detected_by_name.item_count + type: long + ignore_missing: true + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - convert: + field: json.service.ebsVolumeScanDetails.scanDetections.threatDetectedByName.shortened + target_field: aws.guardduty.service.ebs_volume_scan_details.scan.detections.threat_detected_by_name.shortened + type: boolean + ignore_missing: true + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - foreach: + field: json.service.ebsVolumeScanDetails.scanDetections.threatDetectedByName.threatNames + if: ctx.json?.service?.ebsVolumeScanDetails?.scanDetections?.threatDetectedByName?.threatNames instanceof List + processor: + foreach: + field: _ingest._value.filePaths + ignore_missing: true + processor: + rename: + field: _ingest._value.fileName + target_field: _ingest._value.file.name + ignore_missing: true + - foreach: + field: json.service.ebsVolumeScanDetails.scanDetections.threatDetectedByName.threatNames + if: ctx.json?.service?.ebsVolumeScanDetails?.scanDetections?.threatDetectedByName?.threatNames instanceof List + processor: + foreach: + field: _ingest._value.filePaths + ignore_missing: true + processor: + rename: + field: _ingest._value.filePath + target_field: _ingest._value.file.path + ignore_missing: true + - foreach: + field: json.service.ebsVolumeScanDetails.scanDetections.threatDetectedByName.threatNames + if: ctx.json?.service?.ebsVolumeScanDetails?.scanDetections?.threatDetectedByName?.threatNames instanceof List + processor: + foreach: + field: _ingest._value.filePaths + ignore_missing: true + processor: + append: + field: related.hash + value: '{{{_ingest._value.hash}}}' + allow_duplicates: false + - foreach: + field: json.service.ebsVolumeScanDetails.scanDetections.threatDetectedByName.threatNames + if: ctx.json?.service?.ebsVolumeScanDetails?.scanDetections?.threatDetectedByName?.threatNames instanceof List + processor: + foreach: + field: _ingest._value.filePaths + ignore_missing: true + processor: + rename: + field: _ingest._value.volumeArn + target_field: _ingest._value.volume_arn + ignore_missing: true + - foreach: + field: json.service.ebsVolumeScanDetails.scanDetections.threatDetectedByName.threatNames + if: ctx.json?.service?.ebsVolumeScanDetails?.scanDetections?.threatDetectedByName?.threatNames instanceof List + processor: + rename: + field: _ingest._value.filePaths + target_field: _ingest._value.file_paths + ignore_missing: true + - foreach: + field: json.service.ebsVolumeScanDetails.scanDetections.threatDetectedByName.threatNames + if: ctx.json?.service?.ebsVolumeScanDetails?.scanDetections?.threatDetectedByName?.threatNames instanceof List + processor: + convert: + field: _ingest._value.itemCount + target_field: _ingest._value.item_count + type: long + ignore_missing: true + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - foreach: + field: json.service.ebsVolumeScanDetails.scanDetections.threatDetectedByName.threatNames + if: ctx.json?.service?.ebsVolumeScanDetails?.scanDetections?.threatDetectedByName?.threatNames instanceof List + processor: + remove: + field: + - _ingest._value.itemCount + ignore_missing: true + - rename: + field: json.service.ebsVolumeScanDetails.scanDetections.threatDetectedByName.threatNames + target_field: aws.guardduty.service.ebs_volume_scan_details.scan.detections.threat_detected_by_name.threat_names + ignore_missing: true + - convert: + field: json.service.ebsVolumeScanDetails.scanDetections.threatDetectedByName.uniqueThreatNameCount + target_field: aws.guardduty.service.ebs_volume_scan_details.scan.detections.threat_detected_by_name.unique_threat_name_count + type: long + ignore_missing: true + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - convert: + field: json.service.ebsVolumeScanDetails.scanDetections.threatsDetectedItemCount.files + target_field: aws.guardduty.service.ebs_volume_scan_details.scan.detections.threats_detected_item_count.files + type: long + ignore_missing: true + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - rename: + field: json.service.ebsVolumeScanDetails.scanId + target_field: aws.guardduty.service.ebs_volume_scan_details.scan.id + ignore_missing: true + - date: + field: json.service.ebsVolumeScanDetails.scanStartedAt + target_field: aws.guardduty.service.ebs_volume_scan_details.scan.started_at + formats: + - ISO8601 + - UNIX + - yyyy-MM-dd'T'HH:mm:ss.SSS'Z' + if: ctx.json?.service?.ebsVolumeScanDetails?.scanStartedAt != null + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - rename: + field: json.service.ebsVolumeScanDetails.sources + target_field: aws.guardduty.service.ebs_volume_scan_details.sources + ignore_missing: true + - rename: + field: json.service.ebsVolumeScanDetails.triggerFindingId + target_field: aws.guardduty.service.ebs_volume_scan_details.trigger_finding_id + ignore_missing: true + - date: + field: json.service.eventFirstSeen + target_field: aws.guardduty.service.event.first_seen + formats: + - ISO8601 + - UNIX + - yyyy-MM-dd'T'HH:mm:ss.SSS'Z' + if: ctx.json?.service?.eventFirstSeen != null + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - date: + field: json.service.eventLastSeen + target_field: aws.guardduty.service.event.last_seen + formats: + - ISO8601 + - UNIX + - yyyy-MM-dd'T'HH:mm:ss.SSS'Z' + if: ctx.json?.service?.eventLastSeen != null + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - foreach: + field: json.service.evidence.threatIntelligenceDetails + if: ctx.json?.service?.evidence?.threatIntelligenceDetails instanceof List + processor: + rename: + field: _ingest._value.threatListName + target_field: _ingest._value.threat.list_name + ignore_missing: true + - foreach: + field: json.service.evidence.threatIntelligenceDetails + if: ctx.json?.service?.evidence?.threatIntelligenceDetails instanceof List + processor: + rename: + field: _ingest._value.threatNames + target_field: _ingest._value.threat.names + ignore_missing: true + - rename: + field: json.service.evidence.threatIntelligenceDetails + target_field: aws.guardduty.service.evidence.threat_intelligence_details + ignore_missing: true + - rename: + field: json.service.featureName + target_field: aws.guardduty.service.feature_name + ignore_missing: true + - rename: + field: json.service.resourceRole + target_field: aws.guardduty.service.resource_role + ignore_missing: true + - rename: + field: json.service.serviceName + target_field: aws.guardduty.service.service_name + ignore_missing: true + - rename: + field: json.service.userFeedback + target_field: aws.guardduty.service.user_feedback + ignore_missing: true + - convert: + field: json.severity + target_field: aws.guardduty.severity.code + type: double + ignore_missing: true + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - set: + field: aws.guardduty.severity.value + value: 'High' + if: ctx.aws?.guardduty?.severity?.code != null && ctx.aws.guardduty.severity.code <= 8.9 && ctx.aws.guardduty.severity.code >= 7.0 + - set: + field: aws.guardduty.severity.value + value: 'Medium' + if: ctx.aws?.guardduty?.severity?.code != null && ctx.aws.guardduty.severity.code <= 6.9 && ctx.aws.guardduty.severity.code >= 4.0 + - set: + field: aws.guardduty.severity.value + value: 'Low' + if: ctx.aws?.guardduty?.severity?.code != null && ctx.aws.guardduty.severity.code <= 3.9 && ctx.aws.guardduty.severity.code >= 1.0 + - rename: + field: json.title + target_field: aws.guardduty.title + ignore_missing: true + - rename: + field: json.type + target_field: aws.guardduty.type + ignore_missing: true + - date: + field: json.updatedAt + target_field: aws.guardduty.updated_at + formats: + - ISO8601 + - UNIX + - yyyy-MM-dd'T'HH:mm:ss.SSS'Z' + if: ctx.json?.updatedAt != null + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - set: + field: '@timestamp' + copy_from: aws.guardduty.updated_at + ignore_empty_value: true + - set: + field: message + copy_from: aws.guardduty.description + ignore_empty_value: true + - set: + field: cloud.account.id + copy_from: aws.guardduty.account_id + ignore_empty_value: true + - set: + field: cloud.provider + copy_from: aws.guardduty.partition + ignore_empty_value: true + - set: + field: cloud.region + copy_from: aws.guardduty.region + ignore_empty_value: true + - set: + field: cloud.service.name + copy_from: aws.guardduty.service.service_name + ignore_empty_value: true + - foreach: + field: aws.guardduty.resource.ecs_cluster_details.task_details.containers + if: ctx.aws?.guardduty?.resource?.ecs_cluster_details?.task_details?.containers instanceof List + processor: + append: + field: container.id + value: '{{{_ingest._value.id}}}' + allow_duplicates: false + - foreach: + field: aws.guardduty.resource.ecs_cluster_details.task_details.containers + if: ctx.aws?.guardduty?.resource?.ecs_cluster_details?.task_details?.containers instanceof List + processor: + append: + field: container.name + value: '{{{_ingest._value.name}}}' + allow_duplicates: false + - foreach: + field: aws.guardduty.resource.ecs_cluster_details.task_details.containers + if: ctx.aws?.guardduty?.resource?.ecs_cluster_details?.task_details?.containers instanceof List + processor: + append: + field: container.runtime + value: '{{{_ingest._value.container_runtime}}}' + allow_duplicates: false + - append: + field: source.address + value: '{{{aws.guardduty.service.action.aws_api_call_action.remote_ip_details.ip_address_v4}}}' + if: ctx.aws?.guardduty?.service?.action?.aws_api_call_action?.remote_ip_details?.ip_address_v4 != null + allow_duplicates: false + - append: + field: source.address + value: '{{{aws.guardduty.service.action.kubernetes_api_call_action.remote_ip_details.ip_address_v4}}}' + if: ctx.aws?.guardduty?.service?.action?.kubernetes_api_call_action?.remote_ip_details?.ip_address_v4 != null + allow_duplicates: false + - append: + field: source.address + value: '{{{aws.guardduty.service.action.network_connection_action.remote_ip_details.ip_address_v4}}}' + if: ctx.aws?.guardduty?.service?.action?.network_connection_action?.connection_direction != null && ctx.aws.guardduty.service.action.network_connection_action.connection_direction.toLowerCase() == 'inbound' + allow_duplicates: false + - append: + field: destination.address + value: '{{{aws.guardduty.service.action.network_connection_action.remote_ip_details.ip_address_v4}}}' + if: ctx.aws?.guardduty?.service?.action?.network_connection_action?.connection_direction != null && ctx.aws.guardduty.service.action.network_connection_action.connection_direction.toLowerCase() == 'outbound' + allow_duplicates: false + - append: + field: source.address + value: '{{{aws.guardduty.service.action.network_connection_action.local_ip_details.ip_address_v4}}}' + if: ctx.aws?.guardduty?.service?.action?.network_connection_action?.connection_direction != null && ctx.aws.guardduty.service.action.network_connection_action.connection_direction.toLowerCase() == 'outbound' + allow_duplicates: false + - append: + field: destination.address + value: '{{{aws.guardduty.service.action.network_connection_action.local_ip_details.ip_address_v4}}}' + if: ctx.aws?.guardduty?.service?.action?.network_connection_action?.connection_direction != null && ctx.aws.guardduty.service.action.network_connection_action.connection_direction.toLowerCase() == 'inbound' + allow_duplicates: false + - foreach: + field: aws.guardduty.service.action.port_probe_action.port_probe_details + if: ctx.aws?.guardduty?.service?.action?.port_probe_action?.port_probe_details instanceof List + processor: + append: + field: source.address + value: '{{{_ingest._value.remote_ip_details.ip_address_v4}}}' + allow_duplicates: false + - append: + field: source.address + value: '{{{aws.guardduty.service.action.rds_login_attempt_action.remote_ip_details.ip_address_v4}}}' + if: ctx.aws?.guardduty?.service?.action?.rds_login_attempt_action?.remote_ip_details?.ip_address_v4 != null + allow_duplicates: false + - append: + field: source.as.number + value: '{{{aws.guardduty.service.action.aws_api_call_action.remote_ip_details.organization.asn}}}' + if: ctx.aws?.guardduty?.service?.action?.aws_api_call_action?.remote_ip_details?.organization?.asn != null + allow_duplicates: false + - append: + field: source.as.number + value: '{{{aws.guardduty.service.action.kubernetes_api_call_action.remote_ip_details.organization.asn}}}' + if: ctx.aws?.guardduty?.service?.action?.kubernetes_api_call_action?.remote_ip_details?.organization?.asn != null + allow_duplicates: false + - append: + field: source.as.number + value: '{{{aws.guardduty.service.action.network_connection_action.remote_ip_details.organization.asn}}}' + if: ctx.aws?.guardduty?.service?.action?.network_connection_action?.remote_ip_details?.organization?.asn != null + allow_duplicates: false + - foreach: + field: aws.guardduty.service.action.port_probe_action.port_probe_details + if: ctx.aws?.guardduty?.service?.action?.port_probe_action?.port_probe_details instanceof List + processor: + append: + field: source.as.number + value: '{{{_ingest._value.remote_ip_details.organization.asn}}}' + allow_duplicates: false + - append: + field: source.as.number + value: '{{{aws.guardduty.service.action.rds_login_attempt_action.remote_ip_details.organization.asn}}}' + if: ctx.aws?.guardduty?.service?.action?.rds_login_attempt_action?.remote_ip_details?.organization?.asn != null + allow_duplicates: false + - foreach: + field: source.as.number + if: ctx.source?.as?.number instanceof List + processor: + convert: + field: _ingest._value + type: long + ignore_missing: true + on_failure: + - remove: + field: _ingest._value + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - append: + field: source.as.organization.name + value: '{{{aws.guardduty.service.action.aws_api_call_action.remote_ip_details.organization.asnorg}}}' + if: ctx.aws?.guardduty?.service?.action?.aws_api_call_action?.remote_ip_details?.organization?.asnorg != null + allow_duplicates: false + - append: + field: source.as.organization.name + value: '{{{aws.guardduty.service.action.kubernetes_api_call_action.remote_ip_details.organization.asnorg}}}' + if: ctx.aws?.guardduty?.service?.action?.kubernetes_api_call_action?.remote_ip_details?.organization?.asnorg != null + allow_duplicates: false + - append: + field: source.as.organization.name + value: '{{{aws.guardduty.service.action.network_connection_action.remote_ip_details.organization.asnorg}}}' + if: ctx.aws?.guardduty?.service?.action?.network_connection_action?.remote_ip_details?.organization?.asnorg != null + allow_duplicates: false + - foreach: + field: aws.guardduty.service.action.port_probe_action.port_probe_details + if: ctx.aws?.guardduty?.service?.action?.port_probe_action?.port_probe_details instanceof List + processor: + append: + field: source.as.organization.name + value: '{{{_ingest._value.remote_ip_details.organization.asnorg}}}' + allow_duplicates: false + - append: + field: source.as.organization.name + value: '{{{aws.guardduty.service.action.rds_login_attempt_action.remote_ip_details.organization.asnorg}}}' + if: ctx.aws?.guardduty?.service?.action?.rds_login_attempt_action?.remote_ip_details?.organization?.asnorg != null + allow_duplicates: false + - append: + field: source.geo.city_name + value: '{{{aws.guardduty.service.action.aws_api_call_action.remote_ip_details.city.name}}}' + if: ctx.aws?.guardduty?.service?.action?.aws_api_call_action?.remote_ip_details?.city?.name != null + allow_duplicates: false + - append: + field: source.geo.city_name + value: '{{{aws.guardduty.service.action.kubernetes_api_call_action.remote_ip_details.city.name}}}' + if: ctx.aws?.guardduty?.service?.action?.kubernetes_api_call_action?.remote_ip_details?.city?.name != null + allow_duplicates: false + - append: + field: source.geo.city_name + value: '{{{aws.guardduty.service.action.network_connection_action.remote_ip_details.city.name}}}' + if: ctx.aws?.guardduty?.service?.action?.network_connection_action?.remote_ip_details?.city?.name != null + allow_duplicates: false + - foreach: + field: aws.guardduty.service.action.port_probe_action.port_probe_details + if: ctx.aws?.guardduty?.service?.action?.port_probe_action?.port_probe_details instanceof List + processor: + append: + field: source.geo.city_name + value: '{{{_ingest._value.remote_ip_details.city.name}}}' + allow_duplicates: false + - append: + field: source.geo.city_name + value: '{{{aws.guardduty.service.action.rds_login_attempt_action.remote_ip_details.city.name}}}' + if: ctx.aws?.guardduty?.service?.action?.rds_login_attempt_action?.remote_ip_details?.city?.name != null + allow_duplicates: false + - append: + field: source.geo.country_iso_code + value: '{{{aws.guardduty.service.action.aws_api_call_action.remote_ip_details.country.code}}}' + if: ctx.aws?.guardduty?.service?.action?.aws_api_call_action?.remote_ip_details?.country?.code != null + allow_duplicates: false + - append: + field: source.geo.country_iso_code + value: '{{{aws.guardduty.service.action.kubernetes_api_call_action.remote_ip_details.country.code}}}' + if: ctx.aws?.guardduty?.service?.action?.kubernetes_api_call_action?.remote_ip_details?.country?.code != null + allow_duplicates: false + - append: + field: source.geo.country_iso_code + value: '{{{aws.guardduty.service.action.network_connection_action.remote_ip_details.country.code}}}' + if: ctx.aws?.guardduty?.service?.action?.network_connection_action?.remote_ip_details?.country?.code != null + allow_duplicates: false + - foreach: + field: aws.guardduty.service.action.port_probe_action.port_probe_details + if: ctx.aws?.guardduty?.service?.action?.port_probe_action?.port_probe_details instanceof List + processor: + append: + field: source.geo.country_iso_code + value: '{{{_ingest._value.remote_ip_details.country.code}}}' + allow_duplicates: false + - append: + field: source.geo.country_iso_code + value: '{{{aws.guardduty.service.action.rds_login_attempt_action.remote_ip_details.country.code}}}' + if: ctx.aws?.guardduty?.service?.action?.rds_login_attempt_action?.remote_ip_details?.country?.code != null + allow_duplicates: false + - append: + field: source.geo.country_name + value: '{{{aws.guardduty.service.action.aws_api_call_action.remote_ip_details.country.name}}}' + if: ctx.aws?.guardduty?.service?.action?.aws_api_call_action?.remote_ip_details?.country?.name != null + allow_duplicates: false + - append: + field: source.geo.country_name + value: '{{{aws.guardduty.service.action.kubernetes_api_call_action.remote_ip_details.country.name}}}' + if: ctx.aws?.guardduty?.service?.action?.kubernetes_api_call_action?.remote_ip_details?.country?.name != null + allow_duplicates: false + - append: + field: source.geo.country_name + value: '{{{aws.guardduty.service.action.network_connection_action.remote_ip_details.country.name}}}' + if: ctx.aws?.guardduty?.service?.action?.network_connection_action?.remote_ip_details?.country?.name != null + allow_duplicates: false + - foreach: + field: aws.guardduty.service.action.port_probe_action.port_probe_details + if: ctx.aws?.guardduty?.service?.action?.port_probe_action?.port_probe_details instanceof List + processor: + append: + field: source.geo.country_name + value: '{{{_ingest._value.remote_ip_details.country.name}}}' + allow_duplicates: false + - append: + field: source.geo.country_name + value: '{{{aws.guardduty.service.action.rds_login_attempt_action.remote_ip_details.country.name}}}' + if: ctx.aws?.guardduty?.service?.action?.rds_login_attempt_action?.remote_ip_details?.country?.name != null + allow_duplicates: false + - script: + description: Map source.geo.location field. + lang: painless + source: + def locationList = new ArrayList(); + if (ctx.aws?.guardduty?.service?.action?.aws_api_call_action?.remote_ip_details?.geo_location != null) { + locationList.add(ctx.aws.guardduty.service.action.aws_api_call_action.remote_ip_details.geo_location); + } + if (ctx.aws?.guardduty?.service?.action?.kubernetes_api_call_action?.remote_ip_details?.geo_location != null) { + locationList.add(ctx.aws.guardduty.service.action.kubernetes_api_call_action.remote_ip_details.geo_location); + } + if (ctx.aws?.guardduty?.service?.action?.network_connection_action?.remote_ip_details?.geo_location != null) { + locationList.add(ctx.aws.guardduty.service.action.network_connection_action.remote_ip_details.geo_location); + } + if (ctx.aws?.guardduty?.service?.action?.port_probe_action?.port_probe_details instanceof List) { + for (list in ctx.aws.guardduty.service.action.port_probe_action.port_probe_details) { + locationList.add(list.remote_ip_details.geo_location); + } + } + if (ctx.aws?.guardduty?.service?.action?.rds_login_attempt_action?.remote_ip_details?.geo_location != null) { + locationList.add(ctx.aws.guardduty.service.action.rds_login_attempt_action.remote_ip_details.geo_location); + } + if (!(ctx.source instanceof HashMap)) { + ctx.source = new HashMap(); + } + if (!(ctx.source.geo instanceof HashMap)) { + ctx.source.geo = new HashMap(); + } + ctx.source.geo.location = locationList; + - set: + field: dns.question.name + copy_from: aws.guardduty.service.action.dns_request_action.domain + ignore_empty_value: true + - set: + field: event.action + copy_from: aws.guardduty.service.action.type + ignore_empty_value: true + - set: + field: event.created + copy_from: aws.guardduty.created_at + ignore_empty_value: true + - set: + field: event.end + copy_from: aws.guardduty.service.event.last_seen + ignore_empty_value: true + - set: + field: event.id + copy_from: aws.guardduty.id + ignore_empty_value: true + - set: + field: event.provider + copy_from: aws.guardduty.service.action.aws_api_call_action.service_name + ignore_empty_value: true + - convert: + field: json.severity + target_field: event.severity + type: long + ignore_missing: true + on_failure: + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - set: + field: event.start + copy_from: aws.guardduty.service.event.first_seen + ignore_empty_value: true + - foreach: + field: aws.guardduty.service.ebs_volume_scan_details.scan.detections.threat_detected_by_name.threat_names + if: ctx.aws?.guardduty?.service?.ebs_volume_scan_details?.scan?.detections?.threat_detected_by_name?.threat_names instanceof List + processor: + foreach: + field: _ingest._value.file_paths + ignore_missing: true + processor: + append: + field: file.hash.sha256 + value: '{{{_ingest._value.hash}}}' + allow_duplicates: false + - foreach: + field: aws.guardduty.service.ebs_volume_scan_details.scan.detections.threat_detected_by_name.threat_names + if: ctx.aws?.guardduty?.service?.ebs_volume_scan_details?.scan?.detections?.threat_detected_by_name?.threat_names instanceof List + processor: + foreach: + field: _ingest._value.file_paths + ignore_missing: true + processor: + append: + field: file.name + value: '{{{_ingest._value.file.name}}}' + allow_duplicates: false + - foreach: + field: aws.guardduty.service.ebs_volume_scan_details.scan.detections.threat_detected_by_name.threat_names + if: ctx.aws?.guardduty?.service?.ebs_volume_scan_details?.scan?.detections?.threat_detected_by_name?.threat_names instanceof List + processor: + foreach: + field: _ingest._value.file_paths + ignore_missing: true + processor: + append: + field: file.path + value: '{{{_ingest._value.file.path}}}' + allow_duplicates: false + - set: + field: cloud.instance.id + copy_from: aws.guardduty.resource.instance_details.instance.id + ignore_empty_value: true + - set: + field: host.id + copy_from: aws.guardduty.resource.instance_details.instance.id + ignore_empty_value: true + - set: + field: host.os.platform + copy_from: aws.guardduty.resource.instance_details.platform + ignore_empty_value: true + - set: + field: cloud.machine.type + copy_from: aws.guardduty.resource.instance_details.instance.type + ignore_empty_value: true + - set: + field: host.type + copy_from: aws.guardduty.resource.instance_details.instance.type + ignore_empty_value: true + - lowercase: + field: aws.guardduty.service.action.network_connection_action.connection_direction + target_field: network.direction + ignore_missing: true + - append: + field: network.transport + value: '{{{aws.guardduty.service.action.network_connection_action.transport}}}' + if: ctx.aws?.guardduty?.service?.action?.network_connection_action?.transport != null + allow_duplicates: false + - append: + field: network.transport + value: '{{{aws.guardduty.service.action.dns_request_action.protocol}}}' + if: ctx.aws?.guardduty?.service?.action?.dns_request_action?.protocol != null + allow_duplicates: false + - lowercase: + field: network.transport + ignore_missing: true + - set: + field: orchestrator.namespace + copy_from: aws.guardduty.resource.kubernetes_details.kubernetes_workload_details.name_space + ignore_empty_value: true + - set: + field: orchestrator.resource.name + copy_from: aws.guardduty.resource.kubernetes_details.kubernetes_workload_details.name + ignore_empty_value: true + - set: + field: orchestrator.resource.type + copy_from: aws.guardduty.resource.kubernetes_details.kubernetes_workload_details.type + ignore_empty_value: true + - set: + field: rule.name + copy_from: aws.guardduty.type + ignore_empty_value: true + - grok: + field: rule.name + patterns: + - '%{RULESET:rule.ruleset}' + pattern_definitions: + RULESET: '%{WORD:rule.category}:%{WORD}' + ignore_missing: true + - foreach: + field: aws.guardduty.service.action.port_probe_action.port_probe_details + if: ctx.aws?.guardduty?.service?.action?.port_probe_action?.port_probe_details instanceof List + processor: + append: + field: source.address + value: '{{{_ingest._value.local_ip_details.ip_address_v4}}}' + allow_duplicates: false + - foreach: + field: aws.guardduty.service.action.kubernetes_api_call_action.source_ips + if: ctx.aws?.guardduty?.service?.action?.kubernetes_api_call_action?.source_ips instanceof List + processor: + append: + field: source.ip + value: '{{{_ingest._value}}}' + allow_duplicates: false + - append: + field: source.port + value: '{{{aws.guardduty.service.action.network_connection_action.local_port_details.port.value}}}' + if: ctx.aws?.guardduty?.service?.action?.network_connection_action?.local_port_details?.port?.value != null + allow_duplicates: false + - foreach: + field: aws.guardduty.service.action.port_probe_action.port_probe_details + if: ctx.aws?.guardduty?.service?.action?.port_probe_action?.port_probe_details instanceof List + processor: + append: + field: source.port + value: '{{{_ingest._value.local_port_details.port.value}}}' + allow_duplicates: false + - foreach: + field: source.port + if: ctx.source?.port instanceof List + processor: + convert: + field: _ingest._value + type: long + ignore_failure: true + - append: + field: user.id + value: '{{{aws.guardduty.resource.access_key_details.principal_id}}}' + if: ctx.aws?.guardduty?.resource?.access_key_details?.principal_id != null + allow_duplicates: false + - append: + field: user.id + value: '{{{aws.guardduty.resource.kubernetes_details.kubernetes_user_details.uid}}}' + if: ctx.aws?.guardduty?.resource?.kubernetes_details?.kubernetes_user_details?.uid != null + allow_duplicates: false + - append: + field: user.name + value: '{{{aws.guardduty.resource.access_key_details.user.name}}}' + if: ctx.aws?.guardduty?.resource?.access_key_details?.user?.name != null + allow_duplicates: false + - append: + field: user.name + value: '{{{aws.guardduty.resource.kubernetes_details.kubernetes_user_details.user_name}}}' + if: ctx.aws?.guardduty?.resource?.kubernetes_details?.kubernetes_user_details?.user_name != null + allow_duplicates: false + - append: + field: user.name + value: '{{{aws.guardduty.resource.rdsdb_user_details.user}}}' + if: ctx.aws?.guardduty?.resource?.rdsdb_user_details?.user != null + allow_duplicates: false + - set: + field: user.roles + copy_from: aws.guardduty.resource.kubernetes_details.kubernetes_user_details.groups + ignore_empty_value: true + - remove: + field: json + ignore_missing: true + - remove: + if: ctx.tags == null || !(ctx.tags.contains('preserve_duplicate_custom_fields')) + field: + - aws.guardduty.account_id + - aws.guardduty.created_at + - aws.guardduty.description + - aws.guardduty.id + - aws.guardduty.partition + - aws.guardduty.region + - aws.guardduty.resource.access_key_details.principal_id + - aws.guardduty.resource.access_key_details.user.name + - aws.guardduty.resource.instance_details.instance.id + - aws.guardduty.resource.instance_details.instance.type + - aws.guardduty.resource.instance_details.platform + - aws.guardduty.resource.kubernetes_details.kubernetes_user_details.groups + - aws.guardduty.resource.kubernetes_details.kubernetes_user_details.uid + - aws.guardduty.resource.kubernetes_details.kubernetes_user_details.user_name + - aws.guardduty.resource.kubernetes_details.kubernetes_workload_details.name + - aws.guardduty.resource.kubernetes_details.kubernetes_workload_details.name_space + - aws.guardduty.resource.kubernetes_details.kubernetes_workload_details.type + - aws.guardduty.resource.rdsdb_user_details.user + - aws.guardduty.service.action.aws_api_call_action.remote_ip_details.city.name + - aws.guardduty.service.action.aws_api_call_action.remote_ip_details.country.code + - aws.guardduty.service.action.aws_api_call_action.remote_ip_details.country.name + - aws.guardduty.service.action.aws_api_call_action.remote_ip_details.geo_location + - aws.guardduty.service.action.aws_api_call_action.remote_ip_details.ip_address_v4 + - aws.guardduty.service.action.aws_api_call_action.remote_ip_details.organization.asn + - aws.guardduty.service.action.aws_api_call_action.remote_ip_details.organization.asnorg + - aws.guardduty.service.action.aws_api_call_action.service_name + - aws.guardduty.service.action.dns_request_action.domain + - aws.guardduty.service.action.dns_request_action.protocol + - aws.guardduty.service.action.kubernetes_api_call_action.remote_ip_details.city.name + - aws.guardduty.service.action.kubernetes_api_call_action.remote_ip_details.country.code + - aws.guardduty.service.action.kubernetes_api_call_action.remote_ip_details.country.name + - aws.guardduty.service.action.kubernetes_api_call_action.remote_ip_details.geo_location + - aws.guardduty.service.action.kubernetes_api_call_action.remote_ip_details.ip_address_v4 + - aws.guardduty.service.action.kubernetes_api_call_action.remote_ip_details.organization.asn + - aws.guardduty.service.action.kubernetes_api_call_action.remote_ip_details.organization.asnorg + - aws.guardduty.service.action.kubernetes_api_call_action.source_ips + - aws.guardduty.service.action.network_connection_action.connection_direction + - aws.guardduty.service.action.network_connection_action.local_ip_details.ip_address_v4 + - aws.guardduty.service.action.network_connection_action.local_port_details.port.value + - aws.guardduty.service.action.network_connection_action.remote_ip_details.city.name + - aws.guardduty.service.action.network_connection_action.remote_ip_details.country.code + - aws.guardduty.service.action.network_connection_action.remote_ip_details.country.name + - aws.guardduty.service.action.network_connection_action.remote_ip_details.geo_location + - aws.guardduty.service.action.network_connection_action.remote_ip_details.ip_address_v4 + - aws.guardduty.service.action.network_connection_action.remote_ip_details.organization.asn + - aws.guardduty.service.action.network_connection_action.remote_ip_details.organization.asnorg + - aws.guardduty.service.action.network_connection_action.transport + - aws.guardduty.service.action.rds_login_attempt_action.remote_ip_details.ip_address_v4 + - aws.guardduty.service.action.rds_login_attempt_action.remote_ip_details.organization.asn + - aws.guardduty.service.action.rds_login_attempt_action.remote_ip_details.organization.asnorg + - aws.guardduty.service.action.rds_login_attempt_action.remote_ip_details.country.code + - aws.guardduty.service.action.rds_login_attempt_action.remote_ip_details.country.name + - aws.guardduty.service.action.rds_login_attempt_action.remote_ip_details.city.name + - aws.guardduty.service.action.rds_login_attempt_action.remote_ip_details.geo_location + - aws.guardduty.service.action.type + - aws.guardduty.service.event.first_seen + - aws.guardduty.service.event.last_seen + - aws.guardduty.service.service_name + - aws.guardduty.type + - aws.guardduty.updated_at + ignore_missing: true + - foreach: + field: aws.guardduty.resource.ecs_cluster_details.task_details.containers + if: ctx.aws?.guardduty?.resource?.ecs_cluster_details?.task_details?.containers instanceof List && (ctx.tags == null || !(ctx.tags.contains('preserve_duplicate_custom_fields'))) + processor: + remove: + field: + - _ingest._value.container_runtime + - _ingest._value.id + - _ingest._value.name + ignore_missing: true + - foreach: + field: aws.guardduty.service.action.port_probe_action.port_probe_details + if: ctx.aws?.guardduty?.service?.action?.port_probe_action?.port_probe_details instanceof List && (ctx.tags == null || !(ctx.tags.contains('preserve_duplicate_custom_fields'))) + processor: + remove: + field: + - _ingest._value.local_ip_details.ip_address_v4 + - _ingest._value.local_port_details.port.value + - _ingest._value.remote_ip_details.city.name + - _ingest._value.remote_ip_details.country.code + - _ingest._value.remote_ip_details.country.name + - _ingest._value.remote_ip_details.geo_location + - _ingest._value.remote_ip_details.ip_address_v4 + - _ingest._value.remote_ip_details.organization.asn + - _ingest._value.remote_ip_details.organization.asnorg + ignore_missing: true + - foreach: + field: aws.guardduty.service.ebs_volume_scan_details.scan.detections.threat_detected_by_name.threat_names + if: ctx.aws?.guardduty?.service?.ebs_volume_scan_details?.scan?.detections?.threat_detected_by_name?.threat_names instanceof List && (ctx.tags == null || !(ctx.tags.contains('preserve_duplicate_custom_fields'))) + processor: + foreach: + field: _ingest._value.file_paths + ignore_missing: true + processor: + remove: + field: + - _ingest._value.file.name + - _ingest._value.file.path + - _ingest._value.hash + ignore_missing: true + - remove: + field: event.original + if: ctx.tags == null || !(ctx.tags.contains('preserve_original_event')) + ignore_missing: true + - script: + description: Drops null/empty values recursively. + lang: painless + source: + boolean dropEmptyFields(Object object) { + if (object == null || object == "") { + return true; + } else if (object instanceof Map) { + ((Map) object).values().removeIf(value -> dropEmptyFields(value)); + return (((Map) object).size() == 0); + } else if (object instanceof List) { + ((List) object).removeIf(value -> dropEmptyFields(value)); + return (((List) object).length == 0); + } + return false; + } + dropEmptyFields(ctx); + - append: + field: event.kind + value: pipeline_error + if: ctx.error?.message != null + allow_duplicates: false +on_failure: + - append: + field: error.message + value: '{{{ _ingest.on_failure_message }}}' + - append: + field: event.kind + value: pipeline_error + allow_duplicates: false diff --git a/packages/aws/data_stream/guardduty/fields/agent.yml b/packages/aws/data_stream/guardduty/fields/agent.yml new file mode 100644 index 00000000000..7573d81577c --- /dev/null +++ b/packages/aws/data_stream/guardduty/fields/agent.yml @@ -0,0 +1,41 @@ +- name: cloud + title: Cloud + group: 2 + description: Fields related to the cloud or infrastructure the events are coming from. + footnote: 'Examples: If Metricbeat is running on an EC2 host and fetches data from its host, the cloud info contains the data about this machine. If Metricbeat runs on a remote machine outside the cloud and fetches data from a service running in the cloud, the field contains cloud data from the machine the service is running on.' + type: group + fields: + - name: image.id + type: keyword + description: Image ID for the cloud instance. +- name: host + title: Host + group: 2 + description: 'A host is defined as a general computing instance. + + ECS host.* fields should be populated with details about the host on which the event happened, or from which the measurement was taken. Host types include hardware, virtual machines, Docker containers, and Kubernetes nodes.' + type: group + fields: + - name: containerized + type: boolean + description: > + If the host is a container. + + - name: os.build + type: keyword + example: "18D109" + description: > + OS build information. + + - name: os.codename + type: keyword + example: "stretch" + description: > + OS codename, if any. + +- name: input.type + type: keyword + description: Input type +- name: log.offset + type: long + description: Log offset diff --git a/packages/aws/data_stream/guardduty/fields/base-fields.yml b/packages/aws/data_stream/guardduty/fields/base-fields.yml new file mode 100644 index 00000000000..958f1941af0 --- /dev/null +++ b/packages/aws/data_stream/guardduty/fields/base-fields.yml @@ -0,0 +1,20 @@ +- name: data_stream.type + type: constant_keyword + description: Data stream type. +- name: data_stream.dataset + type: constant_keyword + description: Data stream dataset. +- name: data_stream.namespace + type: constant_keyword + description: Data stream namespace. +- name: event.module + type: constant_keyword + description: Event module. + value: aws +- name: event.dataset + type: constant_keyword + description: Event dataset. + value: aws.guardduty +- name: '@timestamp' + type: date + description: Event timestamp. diff --git a/packages/aws/data_stream/guardduty/fields/ecs.yml b/packages/aws/data_stream/guardduty/fields/ecs.yml new file mode 100644 index 00000000000..fab99c72390 --- /dev/null +++ b/packages/aws/data_stream/guardduty/fields/ecs.yml @@ -0,0 +1,140 @@ +- external: ecs + name: cloud.account.id +- external: ecs + name: cloud.account.name +- external: ecs + name: cloud.availability_zone +- external: ecs + name: cloud.instance.id +- external: ecs + name: cloud.instance.name +- external: ecs + name: cloud.machine.type +- external: ecs + name: cloud.project.id +- external: ecs + name: cloud.provider +- external: ecs + name: cloud.region +- external: ecs + name: cloud.service.name +- external: ecs + name: container.id +- external: ecs + name: container.image.name +- external: ecs + name: container.labels +- external: ecs + name: container.name +- external: ecs + name: container.runtime +- external: ecs + name: destination.address +- external: ecs + name: dns.question.name +- external: ecs + name: ecs.version +- external: ecs + name: event.action +- external: ecs + name: event.created +- external: ecs + name: event.end +- external: ecs + name: event.id +- external: ecs + name: event.kind +- external: ecs + name: event.original +- external: ecs + name: event.provider +- external: ecs + name: event.severity +- external: ecs + name: event.start +- external: ecs + name: event.type +- external: ecs + name: file.hash.sha256 +- external: ecs + name: file.name +- external: ecs + name: file.path +- external: ecs + name: host.architecture +- external: ecs + name: host.domain +- external: ecs + name: host.hostname +- external: ecs + name: host.id +- external: ecs + name: host.ip +- external: ecs + name: host.mac +- external: ecs + name: host.name +- external: ecs + name: host.os.family +- external: ecs + name: host.os.kernel +- external: ecs + name: host.os.name +- external: ecs + name: host.os.platform +- external: ecs + name: host.os.version +- external: ecs + name: host.type +- external: ecs + name: message +- external: ecs + name: network.direction +- external: ecs + name: network.transport +- external: ecs + name: orchestrator.namespace +- external: ecs + name: orchestrator.resource.name +- external: ecs + name: orchestrator.resource.type +- external: ecs + name: related.hash +- external: ecs + name: related.hosts +- external: ecs + name: related.ip +- external: ecs + name: related.user +- external: ecs + name: rule.category +- external: ecs + name: rule.name +- external: ecs + name: rule.ruleset +- external: ecs + name: source.address +- external: ecs + name: source.as.number +- external: ecs + name: source.as.organization.name +- external: ecs + name: source.geo.city_name +- external: ecs + name: source.geo.country_iso_code +- external: ecs + name: source.geo.country_name +- external: ecs + name: source.geo.location +- external: ecs + name: source.ip +- external: ecs + name: source.port +- external: ecs + name: tags +- external: ecs + name: user.id +- external: ecs + name: user.name +- external: ecs + name: user.roles diff --git a/packages/aws/data_stream/guardduty/fields/fields.yml b/packages/aws/data_stream/guardduty/fields/fields.yml new file mode 100644 index 00000000000..e89921cc0e5 --- /dev/null +++ b/packages/aws/data_stream/guardduty/fields/fields.yml @@ -0,0 +1,1064 @@ +- name: aws.guardduty + type: group + fields: + - name: account_id + type: keyword + description: The ID of the account in which the finding was generated. + - name: arn + type: keyword + description: The ARN of the finding. + - name: confidence + type: double + description: The confidence score for the finding. + - name: created_at + type: date + description: The time and date when the finding was created. + - name: description + type: text + description: The description of the finding. + - name: id + type: keyword + description: The ID of the finding. + - name: partition + type: keyword + description: The partition associated with the finding. + - name: region + type: keyword + description: The Region where the finding was generated. + - name: resource + type: group + fields: + - name: access_key_details + type: group + fields: + - name: accesskey_id + type: keyword + description: The access key ID of the user. + - name: principal_id + type: keyword + description: The principal ID of the user. + - name: user + type: group + fields: + - name: name + type: keyword + description: The name of the user. + - name: type + type: keyword + description: The type of the user. + - name: container_details + type: group + fields: + - name: container_runtime + type: keyword + description: The container runtime (such as, Docker or containerd) used to run the container. + - name: id + type: keyword + description: Container ID. + - name: image + type: group + fields: + - name: prefix + type: keyword + description: Part of the image name before the last slash. For example, imagePrefix for public.ecr.aws/amazonlinux/amazonlinux:latest would be public.ecr.aws/amazonlinux. If the image name is relative and does not have a slash, this field is empty. + - name: value + type: keyword + description: Container image. + - name: name + type: keyword + description: Container name. + - name: security_context + type: group + fields: + - name: privileged + type: boolean + description: Whether the container is privileged. + - name: volume_mounts + type: group + fields: + - name: mount_path + type: keyword + description: Volume mount path. + - name: name + type: keyword + description: Volume mount name. + - name: ebs_volume_details + type: group + fields: + - name: scanned_volume_details + type: group + fields: + - name: device_name + type: keyword + description: The device name for the EBS volume. + - name: encryption_type + type: keyword + description: EBS volume encryption type. + - name: kmskey_arn + type: keyword + description: KMS key Arn used to encrypt the EBS volume. + - name: snapshot_arn + type: keyword + description: Snapshot Arn of the EBS volume. + - name: volume + type: group + fields: + - name: arn + type: keyword + description: EBS volume Arn information. + - name: size_in_gb + type: long + description: EBS volume size in GB. + - name: type + type: keyword + description: The EBS volume type. + - name: skipped_volume_details + type: group + fields: + - name: device_name + type: keyword + description: The device name for the EBS volume. + - name: encryption_type + type: keyword + description: EBS volume encryption type. + - name: kmskey_arn + type: keyword + description: KMS key Arn used to encrypt the EBS volume. + - name: snapshot_arn + type: keyword + description: Snapshot Arn of the EBS volume. + - name: volume + type: group + fields: + - name: arn + type: keyword + description: EBS volume Arn information. + - name: size_in_gb + type: long + description: EBS volume size in GB. + - name: type + type: keyword + description: The EBS volume type. + - name: ecs_cluster_details + type: group + fields: + - name: active_services_count + type: long + description: The number of services that are running on the cluster in an ACTIVE state. + - name: arn + type: keyword + description: The Amazon Resource Name (ARN) that identifies the cluster. + - name: name + type: keyword + description: The name of the ECS Cluster. + - name: registered_container_instances_count + type: long + description: The number of container instances registered into the cluster. + - name: running_tasks_count + type: long + description: The number of tasks in the cluster that are in the RUNNING state. + - name: status + type: keyword + description: The status of the ECS cluster. + - name: tags + type: group + fields: + - name: key + type: keyword + description: The EC2 instance tag key. + - name: value + type: keyword + description: The EC2 instance tag value. + - name: task_details + type: group + fields: + - name: arn + type: keyword + description: The Amazon Resource Name (ARN) of the task. + - name: containers + type: group + fields: + - name: container_runtime + type: keyword + description: The container runtime (such as, Docker or containerd) used to run the container. + - name: id + type: keyword + description: Container ID. + - name: image + type: group + fields: + - name: prefix + type: keyword + description: Part of the image name before the last slash. For example, imagePrefix for public.ecr.aws/amazonlinux/amazonlinux:latest would be public.ecr.aws/amazonlinux. If the image name is relative and does not have a slash, this field is empty. + - name: value + type: keyword + description: Container image. + - name: name + type: keyword + description: Container name. + - name: security_context + type: group + fields: + - name: privileged + type: boolean + description: Whether the container is privileged. + - name: volume_mounts + type: group + fields: + - name: mount_path + type: keyword + description: Volume mount path. + - name: name + type: keyword + description: Volume mount name. + - name: created_at + type: date + description: The Unix timestamp for the time when the task was created. + - name: definitionarn + type: keyword + description: The ARN of the task definition that creates the task. + - name: group + type: keyword + description: The name of the task group that's associated with the task. + - name: started_at + type: date + description: The Unix timestamp for the time when the task started. + - name: started_by + type: keyword + description: Contains the tag specified when a task is started. + - name: tags + type: group + fields: + - name: key + type: keyword + description: The EC2 instance tag key. + - name: value + type: keyword + description: The EC2 instance tag value. + - name: version + type: keyword + description: The version counter for the task. + - name: volumes + type: group + fields: + - name: host_path + type: group + fields: + - name: path + type: keyword + description: Path of the file or directory on the host that the volume maps to. + - name: name + type: keyword + description: Volume name. + - name: eks_cluster_details + type: group + fields: + - name: arn + type: keyword + description: EKS cluster ARN. + - name: created_at + type: date + description: The timestamp when the EKS cluster was created. + - name: name + type: keyword + description: EKS cluster name. + - name: status + type: keyword + description: The EKS cluster status. + - name: tags + type: group + fields: + - name: key + type: keyword + description: The EC2 instance tag key. + - name: value + type: keyword + description: The EC2 instance tag value. + - name: vpcid + type: keyword + description: The VPC ID to which the EKS cluster is attached. + - name: instance_details + type: group + fields: + - name: availability_zone + type: keyword + description: The Availability Zone of the EC2 instance. + - name: iaminstance_profile + type: group + fields: + - name: arn + type: keyword + description: The profile ARN of the EC2 instance. + - name: id + type: keyword + description: The profile ID of the EC2 instance. + - name: image + type: group + fields: + - name: description + type: keyword + description: The image description of the EC2 instance. + - name: id + type: keyword + description: The image ID of the EC2 instance. + - name: instance + type: group + fields: + - name: id + type: keyword + description: The ID of the EC2 instance. + - name: state + type: keyword + description: The state of the EC2 instance. + - name: type + type: keyword + description: The type of the EC2 instance. + - name: launch_time + type: date + description: The launch time of the EC2 instance. + - name: network_interfaces + type: group + fields: + - name: ipv6_addresses + type: ip + description: A list of IPv6 addresses for the EC2 instance. + - name: network_interface_id + type: keyword + description: The ID of the network interface. + - name: private + type: group + fields: + - name: dns_name + type: keyword + description: The private DNS name of the EC2 instance. + - name: ip_address + type: ip + description: The private IP address of the EC2 instance. + - name: ip_addresses + type: group + fields: + - name: private + type: group + fields: + - name: dns_name + type: keyword + description: The private DNS name of the EC2 instance. + - name: ip_address + type: ip + description: The private IP address of the EC2 instance. + - name: public + type: group + fields: + - name: dns_name + type: keyword + description: The public DNS name of the EC2 instance. + - name: ip + type: ip + description: The public IP address of the EC2 instance. + - name: security_groups + type: group + fields: + - name: group + type: group + fields: + - name: id + type: keyword + description: The security group ID of the EC2 instance. + - name: name + type: keyword + description: The security group name of the EC2 instance. + - name: subnet_id + type: keyword + description: The subnet ID of the EC2 instance. + - name: vpc_id + type: keyword + description: The VPC ID of the EC2 instance. + - name: outpost_arn + type: keyword + description: The Amazon Resource Name (ARN) of the AWS Outpost. Only applicable to AWS Outposts instances. + - name: platform + type: keyword + description: The platform of the EC2 instance. + - name: product_codes + type: group + fields: + - name: product_code + type: group + fields: + - name: id + type: keyword + description: The product code information. + - name: type + type: keyword + description: The product code type. + - name: tags + type: group + fields: + - name: key + type: keyword + description: The EC2 instance tag key. + - name: value + type: keyword + description: The EC2 instance tag value. + - name: kubernetes_details + type: group + fields: + - name: kubernetes_user_details + type: group + fields: + - name: groups + type: keyword + description: The groups that include the user who called the Kubernetes API. + - name: uid + type: keyword + description: The user ID of the user who called the Kubernetes API. + - name: user_name + type: keyword + description: The username of the user who called the Kubernetes API. + - name: kubernetes_workload_details + type: group + fields: + - name: containers + type: group + fields: + - name: container_runtime + type: keyword + description: The container runtime (such as, Docker or containerd) used to run the container. + - name: id + type: keyword + description: Container ID. + - name: image + type: group + fields: + - name: prefix + type: keyword + description: Part of the image name before the last slash. For example, imagePrefix for public.ecr.aws/amazonlinux/amazonlinux:latest would be public.ecr.aws/amazonlinux. If the image name is relative and does not have a slash, this field is empty. + - name: value + type: keyword + description: Container image. + - name: name + type: keyword + description: Container name. + - name: security_context + type: group + fields: + - name: privileged + type: boolean + description: Whether the container is privileged. + - name: volume_mounts + type: group + fields: + - name: mount_path + type: keyword + description: Volume mount path. + - name: name + type: keyword + description: Volume mount name. + - name: host_network + type: boolean + description: Whether the hostNetwork flag is enabled for the pods included in the workload. + - name: name + type: keyword + description: Kubernetes workload name. + - name: name_space + type: keyword + description: Kubernetes namespace that the workload is part of. + - name: type + type: keyword + description: Kubernetes workload type (e.g. Pod, Deployment, etc.). + - name: uid + type: keyword + description: Kubernetes workload ID. + - name: volumes + type: group + fields: + - name: host_path + type: group + fields: + - name: path + type: keyword + description: Path of the file or directory on the host that the volume maps to. + - name: name + type: keyword + description: Volume name. + - name: rdsdb_instance_details + type: group + fields: + - name: instance_identifier + type: keyword + - name: engine + type: keyword + - name: engine_version + type: keyword + - name: cluster_identifier + type: keyword + - name: instance_arn + type: keyword + - name: rdsdb_user_details + type: group + fields: + - name: user + type: keyword + - name: application + type: keyword + - name: database + type: keyword + - name: ssl + type: keyword + - name: auth_method + type: keyword + - name: s3_bucket_details + type: group + fields: + - name: arn + type: keyword + description: The Amazon Resource Name (ARN) of the S3 bucket. + - name: created_at + type: date + description: The date and time the bucket was created at. + - name: default_server_side_encryption + type: group + fields: + - name: encryption_type + type: keyword + description: The type of encryption used for objects within the S3 bucket. + - name: kms_masterkey_arn + type: keyword + description: The Amazon Resource Name (ARN) of the KMS encryption key. Only available if the bucket EncryptionType is aws:kms. + - name: name + type: keyword + description: The name of the S3 bucket. + - name: owner + type: group + fields: + - name: id + type: keyword + description: The canonical user ID of the bucket owner. For information about locating your canonical user ID see Finding Your Account Canonical User ID. + - name: public_access + type: flattened + description: Describes the public access policies that apply to the S3 bucket. + - name: tags + type: group + fields: + - name: key + type: keyword + description: The EC2 instance tag key. + - name: value + type: keyword + description: The EC2 instance tag value. + - name: type + type: keyword + description: Describes whether the bucket is a source or destination bucket. + - name: type + type: keyword + description: The type of AWS resource. + - name: schema_version + type: keyword + description: The version of the schema used for the finding. + - name: service + type: group + fields: + - name: action + type: group + fields: + - name: aws_api_call_action + type: group + fields: + - name: affected_resources + type: flattened + description: The details of the AWS account that made the API call. This field identifies the resources that were affected by this API call. + - name: api + type: keyword + description: The AWS API name. + - name: caller_type + type: keyword + description: The AWS API caller type. + - name: domain_details + type: group + fields: + - name: domain + type: keyword + description: The domain information for the AWS API call. + - name: error_code + type: keyword + description: The error code of the failed AWS API action. + - name: remote_account_details + type: group + fields: + - name: account_id + type: keyword + description: The AWS account ID of the remote API caller. + - name: affiliated + type: boolean + description: Details on whether the AWS account of the remote API caller is related to your GuardDuty environment. If this value is True the API caller is affiliated to your account in some way. If it is False the API caller is from outside your environment. + - name: remote_ip_details + type: group + fields: + - name: city + type: group + fields: + - name: name + type: keyword + description: The city name of the remote IP address. + - name: country + type: group + fields: + - name: code + type: keyword + description: The country code of the remote IP address. + - name: name + type: keyword + description: The country name of the remote IP address. + - name: geo_location + type: geo_point + description: The location information of the remote IP address. + - name: ip_address_v4 + type: ip + description: The IPv4 remote address of the connection. + - name: organization + type: group + fields: + - name: asn + type: keyword + description: The Autonomous System Number (ASN) of the internet provider of the remote IP address. + - name: asnorg + type: keyword + description: The organization that registered this ASN. + - name: isp + type: keyword + description: The ISP information for the internet provider. + - name: org + type: keyword + description: The name of the internet provider. + - name: service_name + type: keyword + description: The name of the AWS service (GuardDuty) that generated a finding. + - name: user_agent + type: keyword + description: The agent through which the API request was made. + - name: dns_request_action + type: group + fields: + - name: blocked + type: boolean + description: Indicates whether the targeted port is blocked. + - name: domain + type: keyword + description: The domain information for the API request. + - name: protocol + type: keyword + description: The network connection protocol observed in the activity that prompted GuardDuty to generate the finding. + - name: kubernetes_api_call_action + type: group + fields: + - name: parameters + type: keyword + description: Parameters related to the Kubernetes API call action. + - name: remote_ip_details + type: group + fields: + - name: city + type: group + fields: + - name: name + type: keyword + description: The city name of the remote IP address. + - name: country + type: group + fields: + - name: code + type: keyword + description: The country code of the remote IP address. + - name: name + type: keyword + description: The country name of the remote IP address. + - name: geo_location + type: geo_point + description: The location information of the remote IP address. + - name: ip_address_v4 + type: ip + description: The IPv4 remote address of the connection. + - name: organization + type: group + fields: + - name: asn + type: keyword + description: The Autonomous System Number (ASN) of the internet provider of the remote IP address. + - name: asnorg + type: keyword + description: The organization that registered this ASN. + - name: isp + type: keyword + description: The ISP information for the internet provider. + - name: org + type: keyword + description: The name of the internet provider. + - name: request_uri + type: keyword + description: The Kubernetes API request URI. + - name: source_ips + type: ip + description: The IP of the Kubernetes API caller and the IPs of any proxies or load balancers between the caller and the API endpoint. + - name: status_code + type: long + description: The resulting HTTP response code of the Kubernetes API call action. + - name: user_agent + type: keyword + description: The user agent of the caller of the Kubernetes API. + - name: verb + type: keyword + description: The Kubernetes API request HTTP verb. + - name: network_connection_action + type: group + fields: + - name: blocked + type: boolean + description: Indicates whether EC2 blocked the network connection to your instance. + - name: connection_direction + type: keyword + description: The network connection direction. + - name: local_ip_details + type: group + fields: + - name: ip_address_v4 + type: keyword + description: The IPv4 local address of the connection. + - name: local_port_details + type: group + fields: + - name: port + type: group + fields: + - name: name + type: keyword + description: The port name of the local connection. + - name: value + type: long + description: The port number of the local connection. + - name: remote_ip_details + type: group + fields: + - name: city + type: group + fields: + - name: name + type: keyword + description: The city name of the remote IP address. + - name: country + type: group + fields: + - name: code + type: keyword + description: The country code of the remote IP address. + - name: name + type: keyword + description: The country name of the remote IP address. + - name: geo_location + type: geo_point + description: The location information of the remote IP address. + - name: ip_address_v4 + type: ip + description: The IPv4 remote address of the connection. + - name: organization + type: group + fields: + - name: asn + type: keyword + description: The Autonomous System Number (ASN) of the internet provider of the remote IP address. + - name: asnorg + type: keyword + description: The organization that registered this ASN. + - name: isp + type: keyword + description: The ISP information for the internet provider. + - name: org + type: keyword + description: The name of the internet provider. + - name: remote_port_details + type: group + fields: + - name: port + type: group + fields: + - name: name + type: keyword + description: The port name of the remote connection. + - name: value + type: long + description: The port number of the remote connection. + - name: transport + type: keyword + description: The network connection protocol. + - name: port_probe_action + type: group + fields: + - name: blocked + type: boolean + description: Indicates whether EC2 blocked the port probe to the instance, such as with an ACL. + - name: port_probe_details + type: group + fields: + - name: local_ip_details + type: group + fields: + - name: ip_address_v4 + type: keyword + description: The IPv4 local address of the connection. + - name: local_port_details + type: group + fields: + - name: port + type: group + fields: + - name: name + type: keyword + description: The port name of the local connection. + - name: value + type: long + description: The port number of the local connection. + - name: remote_ip_details + type: group + fields: + - name: city + type: group + fields: + - name: name + type: keyword + description: The city name of the remote IP address. + - name: country + type: group + fields: + - name: code + type: keyword + description: The country code of the remote IP address. + - name: name + type: keyword + description: The country name of the remote IP address. + - name: geo_location + type: geo_point + description: The location information of the remote IP address. + - name: ip_address_v4 + type: ip + description: The IPv4 remote address of the connection. + - name: organization + type: group + fields: + - name: asn + type: keyword + description: The Autonomous System Number (ASN) of the internet provider of the remote IP address. + - name: asnorg + type: keyword + description: The organization that registered this ASN. + - name: isp + type: keyword + description: The ISP information for the internet provider. + - name: org + type: keyword + description: The name of the internet provider. + - name: rds_login_attempt_action + type: group + fields: + - name: remote_ip_details + type: group + fields: + - name: city + type: group + fields: + - name: name + type: keyword + description: The city name of the remote IP address. + - name: country + type: group + fields: + - name: code + type: keyword + description: The country code of the remote IP address. + - name: name + type: keyword + description: The country name of the remote IP address. + - name: geo_location + type: geo_point + description: The location information of the remote IP address. + - name: ip_address_v4 + type: ip + description: The IPv4 remote address of the connection. + - name: organization + type: group + fields: + - name: asn + type: keyword + description: The Autonomous System Number (ASN) of the internet provider of the remote IP address. + - name: asnorg + type: keyword + description: The organization that registered this ASN. + - name: isp + type: keyword + description: The ISP information for the internet provider. + - name: org + type: keyword + description: The name of the internet provider. + - name: type + type: keyword + description: The GuardDuty finding activity type. + - name: additional_info + type: flattened + description: Contains additional information about the generated finding. + - name: archived + type: boolean + description: Indicates whether this finding is archived. + - name: count + type: long + description: The total count of the occurrences of this finding type. + - name: detector_id + type: keyword + description: The detector ID for the GuardDuty service. + - name: ebs_volume_scan_details + type: group + fields: + - name: scan + type: group + fields: + - name: completed_at + type: date + description: Returns the completion date and time of the malware scan. + - name: detections + type: group + fields: + - name: highest_severity_threat_details + type: group + fields: + - name: count + type: long + description: Total number of infected files with the highest severity threat detected. + - name: severity + type: keyword + description: Severity level of the highest severity threat detected. + - name: threat_name + type: keyword + description: Threat name of the highest severity threat detected as part of the malware scan. + - name: scanned_item_count + type: group + fields: + - name: files + type: long + description: Number of files scanned. + - name: total_gb + type: long + description: Total GB of files scanned for malware. + - name: volumes + type: long + description: Total number of scanned volumes. + - name: threat_detected_by_name + type: group + fields: + - name: item_count + type: long + description: Total number of infected files identified. + - name: shortened + type: boolean + description: Flag to determine if the finding contains every single infected file-path and/or every threat. + - name: threat_names + type: group + fields: + - name: file_paths + type: group + fields: + - name: file + type: group + fields: + - name: name + type: keyword + description: File name of the infected file. + - name: path + type: keyword + description: The file path of the infected file. + - name: hash + type: keyword + description: The hash value of the infected file. + - name: volume_arn + type: keyword + description: EBS volume Arn details of the infected file. + - name: item_count + type: long + description: Total number of files infected with given threat. + - name: name + type: keyword + description: The name of the identified threat. + - name: severity + type: keyword + description: Severity of threat identified as part of the malware scan. + - name: unique_threat_name_count + type: long + description: Total number of unique threats by name identified, as part of the malware scan. + - name: threats_detected_item_count + type: group + fields: + - name: files + type: long + description: Total number of infected files. + - name: id + type: keyword + description: Unique Id of the malware scan that generated the finding. + - name: started_at + type: date + description: Returns the start date and time of the malware scan. + - name: sources + type: keyword + description: Contains list of threat intelligence sources used to detect threats. + - name: trigger_finding_id + type: keyword + description: GuardDuty finding ID that triggered a malware scan. + - name: event + type: group + fields: + - name: first_seen + type: date + description: The first-seen timestamp of the activity that prompted GuardDuty to generate this finding. + - name: last_seen + type: date + description: The last-seen timestamp of the activity that prompted GuardDuty to generate this finding. + - name: evidence + type: group + fields: + - name: threat_intelligence_details + type: group + fields: + - name: threat + type: group + fields: + - name: list_name + type: keyword + description: The name of the threat intelligence list that triggered the finding. + - name: names + type: keyword + description: A list of names of the threats in the threat intelligence list that triggered the finding. + - name: feature_name + type: keyword + description: The name of the feature that generated a finding. + - name: resource_role + type: keyword + description: The resource role information for this finding. + - name: service_name + type: keyword + description: The AWS service name whose API was invoked. + - name: user_feedback + type: keyword + description: Feedback that was submitted about the finding. + - name: severity + type: group + fields: + - name: code + type: double + description: The severity of the finding in double. + - name: value + type: keyword + description: The severity of the finding. + - name: title + type: keyword + description: The title of the finding. + - name: type + type: keyword + description: The type of finding. + - name: updated_at + type: date + description: The time and date when the finding was last updated. diff --git a/packages/aws/data_stream/guardduty/manifest.yml b/packages/aws/data_stream/guardduty/manifest.yml new file mode 100644 index 00000000000..c179833da9b --- /dev/null +++ b/packages/aws/data_stream/guardduty/manifest.yml @@ -0,0 +1,227 @@ +title: Collect Amazon GuardDuty Findings logs from AWS +type: logs +streams: + - input: httpjson + title: Collect Amazon GuardDuty Findings from AWS + description: Collect Amazon GuardDuty Findings from AWS. + template_path: httpjson.yml.hbs + vars: + - name: interval + type: text + title: Interval + description: "Interval to fetch Amazon GuardDuty Findings from AWS. NOTE: Supported units for this parameter are h/m/s." + multi: false + required: true + show_user: true + default: 1m + - name: initial_interval + type: text + title: Initial Interval + description: "How far back to pull the Amazon GuardDuty Findings from AWS. NOTE: Supported units for this parameter are h/m/s." + default: 24h + multi: false + required: true + show_user: true + - name: detector_id + type: text + title: Detector ID + description: Unique ID of the object that represents the GuardDuty service. Detector ID of the master account. + multi: false + required: true + show_user: true + - name: http_client_timeout + type: text + title: HTTP Client Timeout + description: "Duration of the time limit on HTTP requests. Note: Valid time units are ns, us, ms, s, m, h." + multi: false + required: true + show_user: false + default: 30s + - name: tags + type: text + title: Tags + multi: true + required: true + show_user: false + default: + - forwarded + - aws-guardduty + - name: aws_region + type: text + title: AWS Region + description: AWS Region. + required: true + - name: ssl + type: yaml + title: SSL Configuration + description: i.e. certificate_authorities, supported_protocols, verification_mode etc. + multi: false + required: false + show_user: false + default: | + #certificate_authorities: + # - | + # -----BEGIN CERTIFICATE----- + # MIIDCjCCAfKgAwIBAgITJ706Mu2wJlKckpIvkWxEHvEyijANBgkqhkiG9w0BAQsF + # ADAUMRIwEAYDVQQDDAlsb2NhbGhvc3QwIBcNMTkwNzIyMTkyOTA0WhgPMjExOTA2 + # MjgxOTI5MDRaMBQxEjAQBgNVBAMMCWxvY2FsaG9zdDCCASIwDQYJKoZIhvcNAQEB + # BQADggEPADCCAQoCggEBANce58Y/JykI58iyOXpxGfw0/gMvF0hUQAcUrSMxEO6n + # fZRA49b4OV4SwWmA3395uL2eB2NB8y8qdQ9muXUdPBWE4l9rMZ6gmfu90N5B5uEl + # 94NcfBfYOKi1fJQ9i7WKhTjlRkMCgBkWPkUokvBZFRt8RtF7zI77BSEorHGQCk9t + # /D7BS0GJyfVEhftbWcFEAG3VRcoMhF7kUzYwp+qESoriFRYLeDWv68ZOvG7eoWnP + # PsvZStEVEimjvK5NSESEQa9xWyJOmlOKXhkdymtcUd/nXnx6UTCFgnkgzSdTWV41 + # CI6B6aJ9svCTI2QuoIq2HxX/ix7OvW1huVmcyHVxyUECAwEAAaNTMFEwHQYDVR0O + # BBYEFPwN1OceFGm9v6ux8G+DZ3TUDYxqMB8GA1UdIwQYMBaAFPwN1OceFGm9v6ux + # 8G+DZ3TUDYxqMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAG5D + # 874A4YI7YUwOVsVAdbWtgp1d0zKcPRR+r2OdSbTAV5/gcS3jgBJ3i1BN34JuDVFw + # 3DeJSYT3nxy2Y56lLnxDeF8CUTUtVQx3CuGkRg1ouGAHpO/6OqOhwLLorEmxi7tA + # H2O8mtT0poX5AnOAhzVy7QW0D/k4WaoLyckM5hUa6RtvgvLxOwA0U+VGurCDoctu + # 8F4QOgTAWyh8EZIwaKCliFRSynDpv3JTUwtfZkxo6K6nce1RhCWFAsMvDZL8Dgc0 + # yvgJ38BRsFOtkRuAGSf6ZUwTO8JJRRIFnpUzXflAnGivK9M13D5GEQMmIl6U9Pvk + # sxSmbIUfc2SGJGCJD4I= + # -----END CERTIFICATE----- + - name: preserve_original_event + required: true + show_user: true + title: Preserve original event + description: Preserves a raw copy of the original event, added to the field `event.original`. + type: bool + multi: false + default: false + - name: preserve_duplicate_custom_fields + required: true + show_user: false + title: Preserve duplicate custom fields + description: Preserve aws.guardduty fields that were copied to Elastic Common Schema (ECS) fields. + type: bool + multi: false + default: false + - name: processors + type: yaml + title: Processors + multi: false + required: false + show_user: false + description: >- + Processors are used to reduce the number of fields in the exported event or to enhance the event with metadata. This executes in the agent before the logs are parsed. See [Processors](https://www.elastic.co/guide/en/beats/filebeat/current/filtering-and-enhancing-data.html) for details. + - input: aws-s3 + title: Collect Amazon GuardDuty Findings from AWS + description: Collect Amazon GuardDuty Findings from AWS. + template_path: aws-s3.yml.hbs + vars: + - name: collect_s3_logs + required: true + show_user: true + title: Collect logs via S3 Bucket + description: To Collect logs via S3 bucket enable the toggle switch. By default, it will collect logs via SQS Queue. + type: bool + multi: false + default: false + - name: bucket_arn + type: text + title: "[S3] Bucket ARN" + multi: false + required: false + show_user: true + description: It is a required parameter for collecting logs via the AWS S3 Bucket. + - name: bucket_list_prefix + type: text + title: "[S3] Bucket Prefix" + multi: false + required: false + show_user: true + description: Prefix to apply for the list request to the S3 bucket. + - name: interval + type: text + title: "[S3] Interval" + multi: false + required: false + show_user: true + default: 1m + description: "Time interval for polling listing of the S3 bucket. NOTE: Supported units for this parameter are h/m/s." + - name: number_of_workers + type: integer + title: "[S3] Number of Workers" + multi: false + required: false + show_user: true + default: 5 + description: Number of workers that will process the S3 objects listed. + - name: queue_url + type: text + title: "[SQS] Queue URL" + multi: false + required: false + show_user: true + description: URL of the AWS SQS queue that messages will be received from. It is a required parameter for collecting logs via the AWS SQS. + - name: visibility_timeout + type: text + title: "[SQS] Visibility Timeout" + multi: false + required: false + show_user: true + default: 300s + description: "The duration that the received messages are hidden from subsequent retrieve requests after being retrieved by a ReceiveMessage request. The maximum is 12 hours. NOTE: Supported units for this parameter are h/m/s." + - name: api_timeout + type: text + title: "[SQS] API Timeout" + multi: false + required: false + show_user: true + default: 120s + description: "The maximum duration of AWS API can take. The maximum is half of the visibility timeout value. NOTE: Supported units for this parameter are h/m/s." + - name: max_number_of_messages + type: integer + title: "[SQS] Maximum Concurrent SQS Messages" + required: false + show_user: true + default: 5 + description: The maximum number of SQS messages that can be inflight at any time. + - name: file_selectors + type: yaml + title: "[SQS] File Selectors" + multi: false + required: false + show_user: false + description: If the SQS queue will have events that correspond to files that this integration shouldn’t process, file_selectors can be used to limit the files that are downloaded. This is a list of selectors which are made up of regex and expand_event_list_from_field options. The regex should match the S3 object key in the SQS message, and the optional expand_event_list_from_field is the same as the global setting. If file_selectors is given, then any global expand_event_list_from_field value is ignored in favor of the ones specified in the file_selectors. Regexes use [RE2 syntax](https://pkg.go.dev/regexp/syntax). Files that don’t match one of the regexes will not be processed. + - name: fips_enabled + type: bool + title: Enable S3 FIPS + default: false + multi: false + required: false + show_user: false + description: Enabling this option changes the service name from `s3` to `s3-fips` for connecting to the correct service endpoint. + - name: tags + type: text + title: Tags + multi: true + required: true + show_user: false + default: + - forwarded + - aws-guardduty + - name: preserve_original_event + required: true + show_user: true + title: Preserve original event + description: Preserves a raw copy of the original event, added to the field `event.original`. + type: bool + multi: false + default: false + - name: preserve_duplicate_custom_fields + required: true + show_user: false + title: Preserve duplicate custom fields + description: Preserve aws.guardduty fields that were copied to Elastic Common Schema (ECS) fields. + type: bool + multi: false + default: false + - name: processors + type: yaml + title: Processors + multi: false + required: false + show_user: false + description: >- + Processors are used to reduce the number of fields in the exported event or to enhance the event with metadata. This executes in the agent before the logs are parsed. See [Processors](https://www.elastic.co/guide/en/beats/filebeat/current/filtering-and-enhancing-data.html) for details. diff --git a/packages/aws/data_stream/guardduty/sample_event.json b/packages/aws/data_stream/guardduty/sample_event.json new file mode 100644 index 00000000000..e7bd397b78f --- /dev/null +++ b/packages/aws/data_stream/guardduty/sample_event.json @@ -0,0 +1,240 @@ +{ + "@timestamp": "2022-11-22T12:22:20.938Z", + "agent": { + "ephemeral_id": "869cd846-8c49-4002-94b9-891ba6f9cd85", + "id": "a7b5ed34-8788-4a63-9ec2-cfb7e7c091d3", + "name": "docker-fleet-agent", + "type": "filebeat", + "version": "8.6.0" + }, + "aws": { + "guardduty": { + "account_id": "123412341234", + "arn": "arn:aws:guardduty:us-east-1:123412341234:detector/12341234e19ce5461eabcd1234abcd1234/finding/43b6abcdeabcdeabcde1234562176924", + "created_at": "2022-11-17T09:33:19.228Z", + "description": "Kubernetes API commonly used in Discovery tactics was invoked on cluster GeneratedFindingEKSClusterName from Tor exit node IP address 175.16.199.1.", + "id": "e0c22973b012f3af67ac593443e920ff", + "partition": "aws", + "region": "us-east-1", + "resource": { + "access_key_details": { + "accesskey_id": "GeneratedFindingAccessKeyId", + "principal_id": "GeneratedFindingPrincipalId", + "user": { + "name": "GeneratedFindingUserName", + "type": "Role" + } + }, + "eks_cluster_details": { + "arn": "GeneratedFindingEKSClusterArn", + "created_at": "2021-11-03T18:00:10.342Z", + "name": "GeneratedFindingEKSClusterName", + "status": "ACTIVE", + "tags": [ + { + "key": "GeneratedFindingEKSClusterTag1", + "value": "GeneratedFindingEKSClusterTagValue1" + }, + { + "key": "GeneratedFindingEKSClusterTag2", + "value": "GeneratedFindingEKSClusterTagValue2" + }, + { + "key": "GeneratedFindingEKSClusterTag3", + "value": "GeneratedFindingEKSClusterTagValue3" + } + ], + "vpcid": "GeneratedFindingEKSClusterVpcId" + }, + "kubernetes_details": { + "kubernetes_user_details": { + "groups": [ + "GeneratedFindingUserGroup" + ], + "uid": "GeneratedFindingUID", + "user_name": "GeneratedFindingUserName" + } + }, + "type": "EKSCluster" + }, + "schema_version": "2.0", + "service": { + "action": { + "kubernetes_api_call_action": { + "remote_ip_details": { + "city": { + "name": "GeneratedFindingCityName" + }, + "country": { + "name": "GeneratedFindingCountryName" + }, + "geo_location": { + "lat": 0, + "lon": 0 + }, + "ip_address_v4": "175.16.199.1", + "organization": { + "asn": "0", + "asnorg": "GeneratedFindingASNOrg", + "isp": "GeneratedFindingISP", + "org": "GeneratedFindingORG" + } + }, + "request_uri": "GeneratedFindingRequestURI", + "source_ips": [ + "175.16.199.1" + ], + "status_code": 200, + "verb": "list" + }, + "type": "KUBERNETES_API_CALL" + }, + "additional_info": { + "sample": true, + "threatListName": "GeneratedFindingThreatListName", + "threatName": "GeneratedFindingThreatName", + "type": "default", + "value": "{\"threatName\":\"GeneratedFindingThreatName\",\"threatListName\":\"GeneratedFindingThreatListName\",\"sample\":true}" + }, + "archived": false, + "count": 2, + "detector_id": "12341234e19ce5461eabcd1234abcd1234", + "event": { + "first_seen": "2022-11-17T09:33:19.000Z", + "last_seen": "2022-11-22T12:22:20.000Z" + }, + "evidence": { + "threat_intelligence_details": [ + { + "threat": { + "list_name": "GeneratedFindingThreatListName", + "names": [ + "GeneratedFindingThreatName" + ] + } + } + ] + }, + "resource_role": "TARGET", + "service_name": "guardduty" + }, + "severity": { + "code": 5, + "value": "Medium" + }, + "title": "Kubernetes API commonly used in Discovery tactics invoked from a Tor exit node IP address.", + "type": "Discovery:Kubernetes/TorIPCaller", + "updated_at": "2022-11-22T12:22:20.938Z" + } + }, + "cloud": { + "account": { + "id": "123412341234" + }, + "provider": "aws", + "region": "us-east-1", + "service": { + "name": "guardduty" + } + }, + "data_stream": { + "dataset": "aws.guardduty", + "namespace": "ep", + "type": "logs" + }, + "ecs": { + "version": "8.2.0" + }, + "elastic_agent": { + "id": "a7b5ed34-8788-4a63-9ec2-cfb7e7c091d3", + "snapshot": false, + "version": "8.6.0" + }, + "event": { + "action": "KUBERNETES_API_CALL", + "agent_id_status": "verified", + "created": "2022-11-17T09:33:19.228Z", + "dataset": "aws.guardduty", + "end": "2022-11-22T12:22:20.000Z", + "id": "e0c22973b012f3af67ac593443e920ff", + "ingested": "2023-01-18T05:29:38Z", + "kind": [ + "event" + ], + "original": "{\"accountId\":\"123412341234\",\"arn\":\"arn:aws:guardduty:us-east-1:123412341234:detector/12341234e19ce5461eabcd1234abcd1234/finding/43b6abcdeabcdeabcde1234562176924\",\"createdAt\":\"2022-11-17T09:33:19.228Z\",\"description\":\"Kubernetes API commonly used in Discovery tactics was invoked on cluster GeneratedFindingEKSClusterName from Tor exit node IP address 175.16.199.1.\",\"id\":\"e0c22973b012f3af67ac593443e920ff\",\"partition\":\"aws\",\"region\":\"us-east-1\",\"resource\":{\"accessKeyDetails\":{\"accessKeyId\":\"GeneratedFindingAccessKeyId\",\"principalId\":\"GeneratedFindingPrincipalId\",\"userName\":\"GeneratedFindingUserName\",\"userType\":\"Role\"},\"eksClusterDetails\":{\"arn\":\"GeneratedFindingEKSClusterArn\",\"createdAt\":1635962410.342,\"name\":\"GeneratedFindingEKSClusterName\",\"status\":\"ACTIVE\",\"tags\":[{\"key\":\"GeneratedFindingEKSClusterTag1\",\"value\":\"GeneratedFindingEKSClusterTagValue1\"},{\"key\":\"GeneratedFindingEKSClusterTag2\",\"value\":\"GeneratedFindingEKSClusterTagValue2\"},{\"key\":\"GeneratedFindingEKSClusterTag3\",\"value\":\"GeneratedFindingEKSClusterTagValue3\"}],\"vpcId\":\"GeneratedFindingEKSClusterVpcId\"},\"kubernetesDetails\":{\"kubernetesUserDetails\":{\"groups\":[\"GeneratedFindingUserGroup\"],\"uid\":\"GeneratedFindingUID\",\"username\":\"GeneratedFindingUserName\"},\"kubernetesWorkloadDetails\":null},\"resourceType\":\"EKSCluster\"},\"schemaVersion\":\"2.0\",\"service\":{\"action\":{\"actionType\":\"KUBERNETES_API_CALL\",\"kubernetesApiCallAction\":{\"remoteIpDetails\":{\"city\":{\"cityName\":\"GeneratedFindingCityName\"},\"country\":{\"countryName\":\"GeneratedFindingCountryName\"},\"geoLocation\":{\"lat\":0,\"lon\":0},\"ipAddressV4\":\"175.16.199.1\",\"organization\":{\"asn\":\"0\",\"asnOrg\":\"GeneratedFindingASNOrg\",\"isp\":\"GeneratedFindingISP\",\"org\":\"GeneratedFindingORG\"}},\"requestUri\":\"GeneratedFindingRequestURI\",\"sourceIPs\":[\"175.16.199.1\"],\"statusCode\":200,\"userAgent\":\"\",\"verb\":\"list\"}},\"additionalInfo\":{\"sample\":true,\"threatListName\":\"GeneratedFindingThreatListName\",\"threatName\":\"GeneratedFindingThreatName\",\"type\":\"default\",\"value\":\"{\\\"threatName\\\":\\\"GeneratedFindingThreatName\\\",\\\"threatListName\\\":\\\"GeneratedFindingThreatListName\\\",\\\"sample\\\":true}\"},\"archived\":false,\"count\":2,\"detectorId\":\"12341234e19ce5461eabcd1234abcd1234\",\"eventFirstSeen\":\"2022-11-17T09:33:19.000Z\",\"eventLastSeen\":\"2022-11-22T12:22:20.000Z\",\"evidence\":{\"threatIntelligenceDetails\":[{\"threatListName\":\"GeneratedFindingThreatListName\",\"threatNames\":[\"GeneratedFindingThreatName\"]}]},\"resourceRole\":\"TARGET\",\"serviceName\":\"guardduty\"},\"severity\":5,\"title\":\"Kubernetes API commonly used in Discovery tactics invoked from a Tor exit node IP address.\",\"type\":\"Discovery:Kubernetes/TorIPCaller\",\"updatedAt\":\"2022-11-22T12:22:20.938Z\"}", + "severity": 5, + "start": "2022-11-17T09:33:19.000Z", + "type": [ + "info" + ] + }, + "input": { + "type": "httpjson" + }, + "message": "Kubernetes API commonly used in Discovery tactics was invoked on cluster GeneratedFindingEKSClusterName from Tor exit node IP address 175.16.199.1.", + "related": { + "ip": [ + "175.16.199.1" + ], + "user": [ + "GeneratedFindingPrincipalId", + "GeneratedFindingUserName", + "GeneratedFindingUID" + ] + }, + "rule": { + "category": "Discovery", + "name": "Discovery:Kubernetes/TorIPCaller", + "ruleset": "Discovery:Kubernetes" + }, + "source": { + "address": [ + "175.16.199.1" + ], + "as": { + "number": [ + 0 + ], + "organization": { + "name": [ + "GeneratedFindingASNOrg" + ] + } + }, + "geo": { + "city_name": [ + "GeneratedFindingCityName" + ], + "country_name": [ + "GeneratedFindingCountryName" + ], + "location": [ + { + "lat": 0, + "lon": 0 + } + ] + }, + "ip": [ + "175.16.199.1" + ] + }, + "tags": [ + "preserve_original_event", + "preserve_duplicate_custom_fields", + "forwarded", + "aws-guardduty" + ], + "user": { + "id": [ + "GeneratedFindingPrincipalId", + "GeneratedFindingUID" + ], + "name": [ + "GeneratedFindingUserName" + ], + "roles": [ + "GeneratedFindingUserGroup" + ] + } +} \ No newline at end of file diff --git a/packages/aws/docs/guardduty.md b/packages/aws/docs/guardduty.md new file mode 100644 index 00000000000..4f88df2f81d --- /dev/null +++ b/packages/aws/docs/guardduty.md @@ -0,0 +1,669 @@ +# GuardDuty + +## Overview + +The [Amazon GuardDuty](https://aws.amazon.com/guardduty/) integration collects and parses data from Amazon GuardDuty [Findings](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_GetFindings.html) REST APIs. + +The Amazon GuardDuty integration can be used in three different modes to collect data: +- HTTP REST API - Amazon GuardDuty pushes logs directly to an HTTP REST API. +- AWS S3 polling - Amazon GuardDuty writes data to S3 and Elastic Agent polls the S3 bucket by listing its contents and reading new files. +- AWS S3 SQS - Amazon GuardDuty writes data to S3, S3 pushes a new object notification to SQS, Elastic Agent receives the notification from SQS, and then reads the S3 object. Multiple Agents can be used in this mode. + +## Requirements + +You need Elasticsearch for storing and searching your data and Kibana for visualizing and managing it. You can use our hosted Elasticsearch Service on Elastic Cloud, which is recommended, or self-manage the Elastic Stack on your own hardware. + +**Note**: It is recommended to use AWS SQS for Amazon GuardDuty. + +## Compatibility + + 1. The minimum compatible version of this module is **Elastic Agent 8.6.0**. + + 2. Following GuardDuty Resource types have been supported in the current integration version: + + | Sr. No. | Resource types | + |---------|----------------------| + | 1 | accessKeyDetails | + | 2 | containerDetails | + | 3 | ebsVolumeDetails | + | 4 | ecsClusterDetails | + | 5 | eksClusterDetails | + | 6 | instanceDetails | + | 7 | kubernetesDetails | + | 8 | s3BucketDetails | + | 9 | rdsDbInstanceDetails | + | 10 | rdsDbUserDetails | + + 3. Following GuardDuty Service action types have been supported in the current integration version: + + | Sr. No. | Service action types | + |---------|--------------------------| + | 1 | awsApiCallAction | + | 2 | dnsRequestAction | + | 3 | kubernetesApiCallAction | + | 4 | networkConnectionAction | + | 5 | portProbeAction | + | 6 | rdsLoginAttemptAction | + +## Setup + +### To collect data from AWS S3 Bucket, follow the steps below: +- Configure the [Data Forwarder](https://docs.aws.amazon.com/guardduty/latest/ug/guardduty_exportfindings.html) to ingest data into an AWS S3 bucket. However, the user can set the parameter "Bucket List Prefix" according to the requirement. + +### To collect data from AWS SQS, follow the steps below: +1. If data forwarding to an AWS S3 bucket hasn't been configured, then first setup an AWS S3 bucket as mentioned in the documentation above. +2. To setup an SQS queue, follow "Step 1: Create an Amazon SQS queue" mentioned in the [Documentation](https://docs.aws.amazon.com/AmazonS3/latest/userguide/ways-to-add-notification-config-to-bucket.html). + - While creating an SQS queue, please provide the same bucket ARN that has been generated after creating the AWS S3 bucket. +3. Setup event notification for an S3 bucket. Follow this [guide](https://docs.aws.amazon.com/AmazonS3/latest/userguide/enable-event-notifications.html). + - The user has to perform Step 3 for the guardduty data-stream, and the prefix parameter should be set the same as the S3 Bucket List Prefix as created earlier. For example, `logs/` for guardduty data stream. + - For all the event notifications that have been created, select the event type as s3:ObjectCreated:*, select the destination type SQS Queue, and select the queue that has been created in Step 2. + +**Note**: + - Credentials for the above AWS S3 and SQS input types should be configured according to the [input configuration guide](https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-input-aws-s3.html#aws-credentials-config). + - Data collection via AWS S3 Bucket and AWS SQS are mutually exclusive in this case. + +## To collect data from Amazon GuardDuty API, users must have an Access Key and a Secret Key. To create an API token follow the steps below: + + 1. Login to https://console.aws.amazon.com/. + 2. Go to https://console.aws.amazon.com/iam/ to access the IAM console. + 3. On the navigation menu, choose Users. + 4. Choose your IAM user name. + 5. Select Create access key from the Security Credentials tab. + 6. To see the new access key, choose Show. + +## Note + + - The Secret Access Key and Access Key ID are required for the current integration package. + +## Logs + +### GuardDuty + +This is the [`GuardDuty`](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_GetFindings.html#guardduty-GetFindings-response-findings) data stream. + +An example event for `guardduty` looks as following: + +```json +{ + "@timestamp": "2022-11-22T12:22:20.938Z", + "agent": { + "ephemeral_id": "869cd846-8c49-4002-94b9-891ba6f9cd85", + "id": "a7b5ed34-8788-4a63-9ec2-cfb7e7c091d3", + "name": "docker-fleet-agent", + "type": "filebeat", + "version": "8.6.0" + }, + "aws": { + "guardduty": { + "account_id": "123412341234", + "arn": "arn:aws:guardduty:us-east-1:123412341234:detector/12341234e19ce5461eabcd1234abcd1234/finding/43b6abcdeabcdeabcde1234562176924", + "created_at": "2022-11-17T09:33:19.228Z", + "description": "Kubernetes API commonly used in Discovery tactics was invoked on cluster GeneratedFindingEKSClusterName from Tor exit node IP address 175.16.199.1.", + "id": "e0c22973b012f3af67ac593443e920ff", + "partition": "aws", + "region": "us-east-1", + "resource": { + "access_key_details": { + "accesskey_id": "GeneratedFindingAccessKeyId", + "principal_id": "GeneratedFindingPrincipalId", + "user": { + "name": "GeneratedFindingUserName", + "type": "Role" + } + }, + "eks_cluster_details": { + "arn": "GeneratedFindingEKSClusterArn", + "created_at": "2021-11-03T18:00:10.342Z", + "name": "GeneratedFindingEKSClusterName", + "status": "ACTIVE", + "tags": [ + { + "key": "GeneratedFindingEKSClusterTag1", + "value": "GeneratedFindingEKSClusterTagValue1" + }, + { + "key": "GeneratedFindingEKSClusterTag2", + "value": "GeneratedFindingEKSClusterTagValue2" + }, + { + "key": "GeneratedFindingEKSClusterTag3", + "value": "GeneratedFindingEKSClusterTagValue3" + } + ], + "vpcid": "GeneratedFindingEKSClusterVpcId" + }, + "kubernetes_details": { + "kubernetes_user_details": { + "groups": [ + "GeneratedFindingUserGroup" + ], + "uid": "GeneratedFindingUID", + "user_name": "GeneratedFindingUserName" + } + }, + "type": "EKSCluster" + }, + "schema_version": "2.0", + "service": { + "action": { + "kubernetes_api_call_action": { + "remote_ip_details": { + "city": { + "name": "GeneratedFindingCityName" + }, + "country": { + "name": "GeneratedFindingCountryName" + }, + "geo_location": { + "lat": 0, + "lon": 0 + }, + "ip_address_v4": "175.16.199.1", + "organization": { + "asn": "0", + "asnorg": "GeneratedFindingASNOrg", + "isp": "GeneratedFindingISP", + "org": "GeneratedFindingORG" + } + }, + "request_uri": "GeneratedFindingRequestURI", + "source_ips": [ + "175.16.199.1" + ], + "status_code": 200, + "verb": "list" + }, + "type": "KUBERNETES_API_CALL" + }, + "additional_info": { + "sample": true, + "threatListName": "GeneratedFindingThreatListName", + "threatName": "GeneratedFindingThreatName", + "type": "default", + "value": "{\"threatName\":\"GeneratedFindingThreatName\",\"threatListName\":\"GeneratedFindingThreatListName\",\"sample\":true}" + }, + "archived": false, + "count": 2, + "detector_id": "12341234e19ce5461eabcd1234abcd1234", + "event": { + "first_seen": "2022-11-17T09:33:19.000Z", + "last_seen": "2022-11-22T12:22:20.000Z" + }, + "evidence": { + "threat_intelligence_details": [ + { + "threat": { + "list_name": "GeneratedFindingThreatListName", + "names": [ + "GeneratedFindingThreatName" + ] + } + } + ] + }, + "resource_role": "TARGET", + "service_name": "guardduty" + }, + "severity": { + "code": 5, + "value": "Medium" + }, + "title": "Kubernetes API commonly used in Discovery tactics invoked from a Tor exit node IP address.", + "type": "Discovery:Kubernetes/TorIPCaller", + "updated_at": "2022-11-22T12:22:20.938Z" + } + }, + "cloud": { + "account": { + "id": "123412341234" + }, + "provider": "aws", + "region": "us-east-1", + "service": { + "name": "guardduty" + } + }, + "data_stream": { + "dataset": "aws.guardduty", + "namespace": "ep", + "type": "logs" + }, + "ecs": { + "version": "8.2.0" + }, + "elastic_agent": { + "id": "a7b5ed34-8788-4a63-9ec2-cfb7e7c091d3", + "snapshot": false, + "version": "8.6.0" + }, + "event": { + "action": "KUBERNETES_API_CALL", + "agent_id_status": "verified", + "created": "2022-11-17T09:33:19.228Z", + "dataset": "aws.guardduty", + "end": "2022-11-22T12:22:20.000Z", + "id": "e0c22973b012f3af67ac593443e920ff", + "ingested": "2023-01-18T05:29:38Z", + "kind": [ + "event" + ], + "original": "{\"accountId\":\"123412341234\",\"arn\":\"arn:aws:guardduty:us-east-1:123412341234:detector/12341234e19ce5461eabcd1234abcd1234/finding/43b6abcdeabcdeabcde1234562176924\",\"createdAt\":\"2022-11-17T09:33:19.228Z\",\"description\":\"Kubernetes API commonly used in Discovery tactics was invoked on cluster GeneratedFindingEKSClusterName from Tor exit node IP address 175.16.199.1.\",\"id\":\"e0c22973b012f3af67ac593443e920ff\",\"partition\":\"aws\",\"region\":\"us-east-1\",\"resource\":{\"accessKeyDetails\":{\"accessKeyId\":\"GeneratedFindingAccessKeyId\",\"principalId\":\"GeneratedFindingPrincipalId\",\"userName\":\"GeneratedFindingUserName\",\"userType\":\"Role\"},\"eksClusterDetails\":{\"arn\":\"GeneratedFindingEKSClusterArn\",\"createdAt\":1635962410.342,\"name\":\"GeneratedFindingEKSClusterName\",\"status\":\"ACTIVE\",\"tags\":[{\"key\":\"GeneratedFindingEKSClusterTag1\",\"value\":\"GeneratedFindingEKSClusterTagValue1\"},{\"key\":\"GeneratedFindingEKSClusterTag2\",\"value\":\"GeneratedFindingEKSClusterTagValue2\"},{\"key\":\"GeneratedFindingEKSClusterTag3\",\"value\":\"GeneratedFindingEKSClusterTagValue3\"}],\"vpcId\":\"GeneratedFindingEKSClusterVpcId\"},\"kubernetesDetails\":{\"kubernetesUserDetails\":{\"groups\":[\"GeneratedFindingUserGroup\"],\"uid\":\"GeneratedFindingUID\",\"username\":\"GeneratedFindingUserName\"},\"kubernetesWorkloadDetails\":null},\"resourceType\":\"EKSCluster\"},\"schemaVersion\":\"2.0\",\"service\":{\"action\":{\"actionType\":\"KUBERNETES_API_CALL\",\"kubernetesApiCallAction\":{\"remoteIpDetails\":{\"city\":{\"cityName\":\"GeneratedFindingCityName\"},\"country\":{\"countryName\":\"GeneratedFindingCountryName\"},\"geoLocation\":{\"lat\":0,\"lon\":0},\"ipAddressV4\":\"175.16.199.1\",\"organization\":{\"asn\":\"0\",\"asnOrg\":\"GeneratedFindingASNOrg\",\"isp\":\"GeneratedFindingISP\",\"org\":\"GeneratedFindingORG\"}},\"requestUri\":\"GeneratedFindingRequestURI\",\"sourceIPs\":[\"175.16.199.1\"],\"statusCode\":200,\"userAgent\":\"\",\"verb\":\"list\"}},\"additionalInfo\":{\"sample\":true,\"threatListName\":\"GeneratedFindingThreatListName\",\"threatName\":\"GeneratedFindingThreatName\",\"type\":\"default\",\"value\":\"{\\\"threatName\\\":\\\"GeneratedFindingThreatName\\\",\\\"threatListName\\\":\\\"GeneratedFindingThreatListName\\\",\\\"sample\\\":true}\"},\"archived\":false,\"count\":2,\"detectorId\":\"12341234e19ce5461eabcd1234abcd1234\",\"eventFirstSeen\":\"2022-11-17T09:33:19.000Z\",\"eventLastSeen\":\"2022-11-22T12:22:20.000Z\",\"evidence\":{\"threatIntelligenceDetails\":[{\"threatListName\":\"GeneratedFindingThreatListName\",\"threatNames\":[\"GeneratedFindingThreatName\"]}]},\"resourceRole\":\"TARGET\",\"serviceName\":\"guardduty\"},\"severity\":5,\"title\":\"Kubernetes API commonly used in Discovery tactics invoked from a Tor exit node IP address.\",\"type\":\"Discovery:Kubernetes/TorIPCaller\",\"updatedAt\":\"2022-11-22T12:22:20.938Z\"}", + "severity": 5, + "start": "2022-11-17T09:33:19.000Z", + "type": [ + "info" + ] + }, + "input": { + "type": "httpjson" + }, + "message": "Kubernetes API commonly used in Discovery tactics was invoked on cluster GeneratedFindingEKSClusterName from Tor exit node IP address 175.16.199.1.", + "related": { + "ip": [ + "175.16.199.1" + ], + "user": [ + "GeneratedFindingPrincipalId", + "GeneratedFindingUserName", + "GeneratedFindingUID" + ] + }, + "rule": { + "category": "Discovery", + "name": "Discovery:Kubernetes/TorIPCaller", + "ruleset": "Discovery:Kubernetes" + }, + "source": { + "address": [ + "175.16.199.1" + ], + "as": { + "number": [ + 0 + ], + "organization": { + "name": [ + "GeneratedFindingASNOrg" + ] + } + }, + "geo": { + "city_name": [ + "GeneratedFindingCityName" + ], + "country_name": [ + "GeneratedFindingCountryName" + ], + "location": [ + { + "lat": 0, + "lon": 0 + } + ] + }, + "ip": [ + "175.16.199.1" + ] + }, + "tags": [ + "preserve_original_event", + "preserve_duplicate_custom_fields", + "forwarded", + "aws-guardduty" + ], + "user": { + "id": [ + "GeneratedFindingPrincipalId", + "GeneratedFindingUID" + ], + "name": [ + "GeneratedFindingUserName" + ], + "roles": [ + "GeneratedFindingUserGroup" + ] + } +} +``` + +**Exported fields** + +| Field | Description | Type | +|---|---|---| +| @timestamp | Event timestamp. | date | +| aws.guardduty.account_id | The ID of the account in which the finding was generated. | keyword | +| aws.guardduty.arn | The ARN of the finding. | keyword | +| aws.guardduty.confidence | The confidence score for the finding. | double | +| aws.guardduty.created_at | The time and date when the finding was created. | date | +| aws.guardduty.description | The description of the finding. | text | +| aws.guardduty.id | The ID of the finding. | keyword | +| aws.guardduty.partition | The partition associated with the finding. | keyword | +| aws.guardduty.region | The Region where the finding was generated. | keyword | +| aws.guardduty.resource.access_key_details.accesskey_id | The access key ID of the user. | keyword | +| aws.guardduty.resource.access_key_details.principal_id | The principal ID of the user. | keyword | +| aws.guardduty.resource.access_key_details.user.name | The name of the user. | keyword | +| aws.guardduty.resource.access_key_details.user.type | The type of the user. | keyword | +| aws.guardduty.resource.container_details.container_runtime | The container runtime (such as, Docker or containerd) used to run the container. | keyword | +| aws.guardduty.resource.container_details.id | Container ID. | keyword | +| aws.guardduty.resource.container_details.image.prefix | Part of the image name before the last slash. For example, imagePrefix for public.ecr.aws/amazonlinux/amazonlinux:latest would be public.ecr.aws/amazonlinux. If the image name is relative and does not have a slash, this field is empty. | keyword | +| aws.guardduty.resource.container_details.image.value | Container image. | keyword | +| aws.guardduty.resource.container_details.name | Container name. | keyword | +| aws.guardduty.resource.container_details.security_context.privileged | Whether the container is privileged. | boolean | +| aws.guardduty.resource.container_details.volume_mounts.mount_path | Volume mount path. | keyword | +| aws.guardduty.resource.container_details.volume_mounts.name | Volume mount name. | keyword | +| aws.guardduty.resource.ebs_volume_details.scanned_volume_details.device_name | The device name for the EBS volume. | keyword | +| aws.guardduty.resource.ebs_volume_details.scanned_volume_details.encryption_type | EBS volume encryption type. | keyword | +| aws.guardduty.resource.ebs_volume_details.scanned_volume_details.kmskey_arn | KMS key Arn used to encrypt the EBS volume. | keyword | +| aws.guardduty.resource.ebs_volume_details.scanned_volume_details.snapshot_arn | Snapshot Arn of the EBS volume. | keyword | +| aws.guardduty.resource.ebs_volume_details.scanned_volume_details.volume.arn | EBS volume Arn information. | keyword | +| aws.guardduty.resource.ebs_volume_details.scanned_volume_details.volume.size_in_gb | EBS volume size in GB. | long | +| aws.guardduty.resource.ebs_volume_details.scanned_volume_details.volume.type | The EBS volume type. | keyword | +| aws.guardduty.resource.ebs_volume_details.skipped_volume_details.device_name | The device name for the EBS volume. | keyword | +| aws.guardduty.resource.ebs_volume_details.skipped_volume_details.encryption_type | EBS volume encryption type. | keyword | +| aws.guardduty.resource.ebs_volume_details.skipped_volume_details.kmskey_arn | KMS key Arn used to encrypt the EBS volume. | keyword | +| aws.guardduty.resource.ebs_volume_details.skipped_volume_details.snapshot_arn | Snapshot Arn of the EBS volume. | keyword | +| aws.guardduty.resource.ebs_volume_details.skipped_volume_details.volume.arn | EBS volume Arn information. | keyword | +| aws.guardduty.resource.ebs_volume_details.skipped_volume_details.volume.size_in_gb | EBS volume size in GB. | long | +| aws.guardduty.resource.ebs_volume_details.skipped_volume_details.volume.type | The EBS volume type. | keyword | +| aws.guardduty.resource.ecs_cluster_details.active_services_count | The number of services that are running on the cluster in an ACTIVE state. | long | +| aws.guardduty.resource.ecs_cluster_details.arn | The Amazon Resource Name (ARN) that identifies the cluster. | keyword | +| aws.guardduty.resource.ecs_cluster_details.name | The name of the ECS Cluster. | keyword | +| aws.guardduty.resource.ecs_cluster_details.registered_container_instances_count | The number of container instances registered into the cluster. | long | +| aws.guardduty.resource.ecs_cluster_details.running_tasks_count | The number of tasks in the cluster that are in the RUNNING state. | long | +| aws.guardduty.resource.ecs_cluster_details.status | The status of the ECS cluster. | keyword | +| aws.guardduty.resource.ecs_cluster_details.tags.key | The EC2 instance tag key. | keyword | +| aws.guardduty.resource.ecs_cluster_details.tags.value | The EC2 instance tag value. | keyword | +| aws.guardduty.resource.ecs_cluster_details.task_details.arn | The Amazon Resource Name (ARN) of the task. | keyword | +| aws.guardduty.resource.ecs_cluster_details.task_details.containers.container_runtime | The container runtime (such as, Docker or containerd) used to run the container. | keyword | +| aws.guardduty.resource.ecs_cluster_details.task_details.containers.id | Container ID. | keyword | +| aws.guardduty.resource.ecs_cluster_details.task_details.containers.image.prefix | Part of the image name before the last slash. For example, imagePrefix for public.ecr.aws/amazonlinux/amazonlinux:latest would be public.ecr.aws/amazonlinux. If the image name is relative and does not have a slash, this field is empty. | keyword | +| aws.guardduty.resource.ecs_cluster_details.task_details.containers.image.value | Container image. | keyword | +| aws.guardduty.resource.ecs_cluster_details.task_details.containers.name | Container name. | keyword | +| aws.guardduty.resource.ecs_cluster_details.task_details.containers.security_context.privileged | Whether the container is privileged. | boolean | +| aws.guardduty.resource.ecs_cluster_details.task_details.containers.volume_mounts.mount_path | Volume mount path. | keyword | +| aws.guardduty.resource.ecs_cluster_details.task_details.containers.volume_mounts.name | Volume mount name. | keyword | +| aws.guardduty.resource.ecs_cluster_details.task_details.created_at | The Unix timestamp for the time when the task was created. | date | +| aws.guardduty.resource.ecs_cluster_details.task_details.definitionarn | The ARN of the task definition that creates the task. | keyword | +| aws.guardduty.resource.ecs_cluster_details.task_details.group | The name of the task group that's associated with the task. | keyword | +| aws.guardduty.resource.ecs_cluster_details.task_details.started_at | The Unix timestamp for the time when the task started. | date | +| aws.guardduty.resource.ecs_cluster_details.task_details.started_by | Contains the tag specified when a task is started. | keyword | +| aws.guardduty.resource.ecs_cluster_details.task_details.tags.key | The EC2 instance tag key. | keyword | +| aws.guardduty.resource.ecs_cluster_details.task_details.tags.value | The EC2 instance tag value. | keyword | +| aws.guardduty.resource.ecs_cluster_details.task_details.version | The version counter for the task. | keyword | +| aws.guardduty.resource.ecs_cluster_details.task_details.volumes.host_path.path | Path of the file or directory on the host that the volume maps to. | keyword | +| aws.guardduty.resource.ecs_cluster_details.task_details.volumes.name | Volume name. | keyword | +| aws.guardduty.resource.eks_cluster_details.arn | EKS cluster ARN. | keyword | +| aws.guardduty.resource.eks_cluster_details.created_at | The timestamp when the EKS cluster was created. | date | +| aws.guardduty.resource.eks_cluster_details.name | EKS cluster name. | keyword | +| aws.guardduty.resource.eks_cluster_details.status | The EKS cluster status. | keyword | +| aws.guardduty.resource.eks_cluster_details.tags.key | The EC2 instance tag key. | keyword | +| aws.guardduty.resource.eks_cluster_details.tags.value | The EC2 instance tag value. | keyword | +| aws.guardduty.resource.eks_cluster_details.vpcid | The VPC ID to which the EKS cluster is attached. | keyword | +| aws.guardduty.resource.instance_details.availability_zone | The Availability Zone of the EC2 instance. | keyword | +| aws.guardduty.resource.instance_details.iaminstance_profile.arn | The profile ARN of the EC2 instance. | keyword | +| aws.guardduty.resource.instance_details.iaminstance_profile.id | The profile ID of the EC2 instance. | keyword | +| aws.guardduty.resource.instance_details.image.description | The image description of the EC2 instance. | keyword | +| aws.guardduty.resource.instance_details.image.id | The image ID of the EC2 instance. | keyword | +| aws.guardduty.resource.instance_details.instance.id | The ID of the EC2 instance. | keyword | +| aws.guardduty.resource.instance_details.instance.state | The state of the EC2 instance. | keyword | +| aws.guardduty.resource.instance_details.instance.type | The type of the EC2 instance. | keyword | +| aws.guardduty.resource.instance_details.launch_time | The launch time of the EC2 instance. | date | +| aws.guardduty.resource.instance_details.network_interfaces.ipv6_addresses | A list of IPv6 addresses for the EC2 instance. | ip | +| aws.guardduty.resource.instance_details.network_interfaces.network_interface_id | The ID of the network interface. | keyword | +| aws.guardduty.resource.instance_details.network_interfaces.private.dns_name | The private DNS name of the EC2 instance. | keyword | +| aws.guardduty.resource.instance_details.network_interfaces.private.ip_address | The private IP address of the EC2 instance. | ip | +| aws.guardduty.resource.instance_details.network_interfaces.private.ip_addresses.private.dns_name | The private DNS name of the EC2 instance. | keyword | +| aws.guardduty.resource.instance_details.network_interfaces.private.ip_addresses.private.ip_address | The private IP address of the EC2 instance. | ip | +| aws.guardduty.resource.instance_details.network_interfaces.public.dns_name | The public DNS name of the EC2 instance. | keyword | +| aws.guardduty.resource.instance_details.network_interfaces.public.ip | The public IP address of the EC2 instance. | ip | +| aws.guardduty.resource.instance_details.network_interfaces.security_groups.group.id | The security group ID of the EC2 instance. | keyword | +| aws.guardduty.resource.instance_details.network_interfaces.security_groups.group.name | The security group name of the EC2 instance. | keyword | +| aws.guardduty.resource.instance_details.network_interfaces.subnet_id | The subnet ID of the EC2 instance. | keyword | +| aws.guardduty.resource.instance_details.network_interfaces.vpc_id | The VPC ID of the EC2 instance. | keyword | +| aws.guardduty.resource.instance_details.outpost_arn | The Amazon Resource Name (ARN) of the AWS Outpost. Only applicable to AWS Outposts instances. | keyword | +| aws.guardduty.resource.instance_details.platform | The platform of the EC2 instance. | keyword | +| aws.guardduty.resource.instance_details.product_codes.product_code.id | The product code information. | keyword | +| aws.guardduty.resource.instance_details.product_codes.product_code.type | The product code type. | keyword | +| aws.guardduty.resource.instance_details.tags.key | The EC2 instance tag key. | keyword | +| aws.guardduty.resource.instance_details.tags.value | The EC2 instance tag value. | keyword | +| aws.guardduty.resource.kubernetes_details.kubernetes_user_details.groups | The groups that include the user who called the Kubernetes API. | keyword | +| aws.guardduty.resource.kubernetes_details.kubernetes_user_details.uid | The user ID of the user who called the Kubernetes API. | keyword | +| aws.guardduty.resource.kubernetes_details.kubernetes_user_details.user_name | The username of the user who called the Kubernetes API. | keyword | +| aws.guardduty.resource.kubernetes_details.kubernetes_workload_details.containers.container_runtime | The container runtime (such as, Docker or containerd) used to run the container. | keyword | +| aws.guardduty.resource.kubernetes_details.kubernetes_workload_details.containers.id | Container ID. | keyword | +| aws.guardduty.resource.kubernetes_details.kubernetes_workload_details.containers.image.prefix | Part of the image name before the last slash. For example, imagePrefix for public.ecr.aws/amazonlinux/amazonlinux:latest would be public.ecr.aws/amazonlinux. If the image name is relative and does not have a slash, this field is empty. | keyword | +| aws.guardduty.resource.kubernetes_details.kubernetes_workload_details.containers.image.value | Container image. | keyword | +| aws.guardduty.resource.kubernetes_details.kubernetes_workload_details.containers.name | Container name. | keyword | +| aws.guardduty.resource.kubernetes_details.kubernetes_workload_details.containers.security_context.privileged | Whether the container is privileged. | boolean | +| aws.guardduty.resource.kubernetes_details.kubernetes_workload_details.containers.volume_mounts.mount_path | Volume mount path. | keyword | +| aws.guardduty.resource.kubernetes_details.kubernetes_workload_details.containers.volume_mounts.name | Volume mount name. | keyword | +| aws.guardduty.resource.kubernetes_details.kubernetes_workload_details.host_network | Whether the hostNetwork flag is enabled for the pods included in the workload. | boolean | +| aws.guardduty.resource.kubernetes_details.kubernetes_workload_details.name | Kubernetes workload name. | keyword | +| aws.guardduty.resource.kubernetes_details.kubernetes_workload_details.name_space | Kubernetes namespace that the workload is part of. | keyword | +| aws.guardduty.resource.kubernetes_details.kubernetes_workload_details.type | Kubernetes workload type (e.g. Pod, Deployment, etc.). | keyword | +| aws.guardduty.resource.kubernetes_details.kubernetes_workload_details.uid | Kubernetes workload ID. | keyword | +| aws.guardduty.resource.kubernetes_details.kubernetes_workload_details.volumes.host_path.path | Path of the file or directory on the host that the volume maps to. | keyword | +| aws.guardduty.resource.kubernetes_details.kubernetes_workload_details.volumes.name | Volume name. | keyword | +| aws.guardduty.resource.rdsdb_instance_details.cluster_identifier | | keyword | +| aws.guardduty.resource.rdsdb_instance_details.engine | | keyword | +| aws.guardduty.resource.rdsdb_instance_details.engine_version | | keyword | +| aws.guardduty.resource.rdsdb_instance_details.instance_arn | | keyword | +| aws.guardduty.resource.rdsdb_instance_details.instance_identifier | | keyword | +| aws.guardduty.resource.rdsdb_user_details.application | | keyword | +| aws.guardduty.resource.rdsdb_user_details.auth_method | | keyword | +| aws.guardduty.resource.rdsdb_user_details.database | | keyword | +| aws.guardduty.resource.rdsdb_user_details.ssl | | keyword | +| aws.guardduty.resource.rdsdb_user_details.user | | keyword | +| aws.guardduty.resource.s3_bucket_details.arn | The Amazon Resource Name (ARN) of the S3 bucket. | keyword | +| aws.guardduty.resource.s3_bucket_details.created_at | The date and time the bucket was created at. | date | +| aws.guardduty.resource.s3_bucket_details.default_server_side_encryption.encryption_type | The type of encryption used for objects within the S3 bucket. | keyword | +| aws.guardduty.resource.s3_bucket_details.default_server_side_encryption.kms_masterkey_arn | The Amazon Resource Name (ARN) of the KMS encryption key. Only available if the bucket EncryptionType is aws:kms. | keyword | +| aws.guardduty.resource.s3_bucket_details.name | The name of the S3 bucket. | keyword | +| aws.guardduty.resource.s3_bucket_details.owner.id | The canonical user ID of the bucket owner. For information about locating your canonical user ID see Finding Your Account Canonical User ID. | keyword | +| aws.guardduty.resource.s3_bucket_details.public_access | Describes the public access policies that apply to the S3 bucket. | flattened | +| aws.guardduty.resource.s3_bucket_details.tags.key | The EC2 instance tag key. | keyword | +| aws.guardduty.resource.s3_bucket_details.tags.value | The EC2 instance tag value. | keyword | +| aws.guardduty.resource.s3_bucket_details.type | Describes whether the bucket is a source or destination bucket. | keyword | +| aws.guardduty.resource.type | The type of AWS resource. | keyword | +| aws.guardduty.schema_version | The version of the schema used for the finding. | keyword | +| aws.guardduty.service.action.aws_api_call_action.affected_resources | The details of the AWS account that made the API call. This field identifies the resources that were affected by this API call. | flattened | +| aws.guardduty.service.action.aws_api_call_action.api | The AWS API name. | keyword | +| aws.guardduty.service.action.aws_api_call_action.caller_type | The AWS API caller type. | keyword | +| aws.guardduty.service.action.aws_api_call_action.domain_details.domain | The domain information for the AWS API call. | keyword | +| aws.guardduty.service.action.aws_api_call_action.error_code | The error code of the failed AWS API action. | keyword | +| aws.guardduty.service.action.aws_api_call_action.remote_account_details.account_id | The AWS account ID of the remote API caller. | keyword | +| aws.guardduty.service.action.aws_api_call_action.remote_account_details.affiliated | Details on whether the AWS account of the remote API caller is related to your GuardDuty environment. If this value is True the API caller is affiliated to your account in some way. If it is False the API caller is from outside your environment. | boolean | +| aws.guardduty.service.action.aws_api_call_action.remote_ip_details.city.name | The city name of the remote IP address. | keyword | +| aws.guardduty.service.action.aws_api_call_action.remote_ip_details.country.code | The country code of the remote IP address. | keyword | +| aws.guardduty.service.action.aws_api_call_action.remote_ip_details.country.name | The country name of the remote IP address. | keyword | +| aws.guardduty.service.action.aws_api_call_action.remote_ip_details.geo_location | The location information of the remote IP address. | geo_point | +| aws.guardduty.service.action.aws_api_call_action.remote_ip_details.ip_address_v4 | The IPv4 remote address of the connection. | ip | +| aws.guardduty.service.action.aws_api_call_action.remote_ip_details.organization.asn | The Autonomous System Number (ASN) of the internet provider of the remote IP address. | keyword | +| aws.guardduty.service.action.aws_api_call_action.remote_ip_details.organization.asnorg | The organization that registered this ASN. | keyword | +| aws.guardduty.service.action.aws_api_call_action.remote_ip_details.organization.isp | The ISP information for the internet provider. | keyword | +| aws.guardduty.service.action.aws_api_call_action.remote_ip_details.organization.org | The name of the internet provider. | keyword | +| aws.guardduty.service.action.aws_api_call_action.service_name | The name of the AWS service (GuardDuty) that generated a finding. | keyword | +| aws.guardduty.service.action.aws_api_call_action.user_agent | The agent through which the API request was made. | keyword | +| aws.guardduty.service.action.dns_request_action.blocked | Indicates whether the targeted port is blocked. | boolean | +| aws.guardduty.service.action.dns_request_action.domain | The domain information for the API request. | keyword | +| aws.guardduty.service.action.dns_request_action.protocol | The network connection protocol observed in the activity that prompted GuardDuty to generate the finding. | keyword | +| aws.guardduty.service.action.kubernetes_api_call_action.parameters | Parameters related to the Kubernetes API call action. | keyword | +| aws.guardduty.service.action.kubernetes_api_call_action.remote_ip_details.city.name | The city name of the remote IP address. | keyword | +| aws.guardduty.service.action.kubernetes_api_call_action.remote_ip_details.country.code | The country code of the remote IP address. | keyword | +| aws.guardduty.service.action.kubernetes_api_call_action.remote_ip_details.country.name | The country name of the remote IP address. | keyword | +| aws.guardduty.service.action.kubernetes_api_call_action.remote_ip_details.geo_location | The location information of the remote IP address. | geo_point | +| aws.guardduty.service.action.kubernetes_api_call_action.remote_ip_details.ip_address_v4 | The IPv4 remote address of the connection. | ip | +| aws.guardduty.service.action.kubernetes_api_call_action.remote_ip_details.organization.asn | The Autonomous System Number (ASN) of the internet provider of the remote IP address. | keyword | +| aws.guardduty.service.action.kubernetes_api_call_action.remote_ip_details.organization.asnorg | The organization that registered this ASN. | keyword | +| aws.guardduty.service.action.kubernetes_api_call_action.remote_ip_details.organization.isp | The ISP information for the internet provider. | keyword | +| aws.guardduty.service.action.kubernetes_api_call_action.remote_ip_details.organization.org | The name of the internet provider. | keyword | +| aws.guardduty.service.action.kubernetes_api_call_action.request_uri | The Kubernetes API request URI. | keyword | +| aws.guardduty.service.action.kubernetes_api_call_action.source_ips | The IP of the Kubernetes API caller and the IPs of any proxies or load balancers between the caller and the API endpoint. | ip | +| aws.guardduty.service.action.kubernetes_api_call_action.status_code | The resulting HTTP response code of the Kubernetes API call action. | long | +| aws.guardduty.service.action.kubernetes_api_call_action.user_agent | The user agent of the caller of the Kubernetes API. | keyword | +| aws.guardduty.service.action.kubernetes_api_call_action.verb | The Kubernetes API request HTTP verb. | keyword | +| aws.guardduty.service.action.network_connection_action.blocked | Indicates whether EC2 blocked the network connection to your instance. | boolean | +| aws.guardduty.service.action.network_connection_action.connection_direction | The network connection direction. | keyword | +| aws.guardduty.service.action.network_connection_action.local_ip_details.ip_address_v4 | The IPv4 local address of the connection. | keyword | +| aws.guardduty.service.action.network_connection_action.local_port_details.port.name | The port name of the local connection. | keyword | +| aws.guardduty.service.action.network_connection_action.local_port_details.port.value | The port number of the local connection. | long | +| aws.guardduty.service.action.network_connection_action.remote_ip_details.city.name | The city name of the remote IP address. | keyword | +| aws.guardduty.service.action.network_connection_action.remote_ip_details.country.code | The country code of the remote IP address. | keyword | +| aws.guardduty.service.action.network_connection_action.remote_ip_details.country.name | The country name of the remote IP address. | keyword | +| aws.guardduty.service.action.network_connection_action.remote_ip_details.geo_location | The location information of the remote IP address. | geo_point | +| aws.guardduty.service.action.network_connection_action.remote_ip_details.ip_address_v4 | The IPv4 remote address of the connection. | ip | +| aws.guardduty.service.action.network_connection_action.remote_ip_details.organization.asn | The Autonomous System Number (ASN) of the internet provider of the remote IP address. | keyword | +| aws.guardduty.service.action.network_connection_action.remote_ip_details.organization.asnorg | The organization that registered this ASN. | keyword | +| aws.guardduty.service.action.network_connection_action.remote_ip_details.organization.isp | The ISP information for the internet provider. | keyword | +| aws.guardduty.service.action.network_connection_action.remote_ip_details.organization.org | The name of the internet provider. | keyword | +| aws.guardduty.service.action.network_connection_action.remote_port_details.port.name | The port name of the remote connection. | keyword | +| aws.guardduty.service.action.network_connection_action.remote_port_details.port.value | The port number of the remote connection. | long | +| aws.guardduty.service.action.network_connection_action.transport | The network connection protocol. | keyword | +| aws.guardduty.service.action.port_probe_action.blocked | Indicates whether EC2 blocked the port probe to the instance, such as with an ACL. | boolean | +| aws.guardduty.service.action.port_probe_action.port_probe_details.local_ip_details.ip_address_v4 | The IPv4 local address of the connection. | keyword | +| aws.guardduty.service.action.port_probe_action.port_probe_details.local_port_details.port.name | The port name of the local connection. | keyword | +| aws.guardduty.service.action.port_probe_action.port_probe_details.local_port_details.port.value | The port number of the local connection. | long | +| aws.guardduty.service.action.port_probe_action.port_probe_details.remote_ip_details.city.name | The city name of the remote IP address. | keyword | +| aws.guardduty.service.action.port_probe_action.port_probe_details.remote_ip_details.country.code | The country code of the remote IP address. | keyword | +| aws.guardduty.service.action.port_probe_action.port_probe_details.remote_ip_details.country.name | The country name of the remote IP address. | keyword | +| aws.guardduty.service.action.port_probe_action.port_probe_details.remote_ip_details.geo_location | The location information of the remote IP address. | geo_point | +| aws.guardduty.service.action.port_probe_action.port_probe_details.remote_ip_details.ip_address_v4 | The IPv4 remote address of the connection. | ip | +| aws.guardduty.service.action.port_probe_action.port_probe_details.remote_ip_details.organization.asn | The Autonomous System Number (ASN) of the internet provider of the remote IP address. | keyword | +| aws.guardduty.service.action.port_probe_action.port_probe_details.remote_ip_details.organization.asnorg | The organization that registered this ASN. | keyword | +| aws.guardduty.service.action.port_probe_action.port_probe_details.remote_ip_details.organization.isp | The ISP information for the internet provider. | keyword | +| aws.guardduty.service.action.port_probe_action.port_probe_details.remote_ip_details.organization.org | The name of the internet provider. | keyword | +| aws.guardduty.service.action.rds_login_attempt_action.remote_ip_details.city.name | The city name of the remote IP address. | keyword | +| aws.guardduty.service.action.rds_login_attempt_action.remote_ip_details.country.code | The country code of the remote IP address. | keyword | +| aws.guardduty.service.action.rds_login_attempt_action.remote_ip_details.country.name | The country name of the remote IP address. | keyword | +| aws.guardduty.service.action.rds_login_attempt_action.remote_ip_details.geo_location | The location information of the remote IP address. | geo_point | +| aws.guardduty.service.action.rds_login_attempt_action.remote_ip_details.ip_address_v4 | The IPv4 remote address of the connection. | ip | +| aws.guardduty.service.action.rds_login_attempt_action.remote_ip_details.organization.asn | The Autonomous System Number (ASN) of the internet provider of the remote IP address. | keyword | +| aws.guardduty.service.action.rds_login_attempt_action.remote_ip_details.organization.asnorg | The organization that registered this ASN. | keyword | +| aws.guardduty.service.action.rds_login_attempt_action.remote_ip_details.organization.isp | The ISP information for the internet provider. | keyword | +| aws.guardduty.service.action.rds_login_attempt_action.remote_ip_details.organization.org | The name of the internet provider. | keyword | +| aws.guardduty.service.action.type | The GuardDuty finding activity type. | keyword | +| aws.guardduty.service.additional_info | Contains additional information about the generated finding. | flattened | +| aws.guardduty.service.archived | Indicates whether this finding is archived. | boolean | +| aws.guardduty.service.count | The total count of the occurrences of this finding type. | long | +| aws.guardduty.service.detector_id | The detector ID for the GuardDuty service. | keyword | +| aws.guardduty.service.ebs_volume_scan_details.scan.completed_at | Returns the completion date and time of the malware scan. | date | +| aws.guardduty.service.ebs_volume_scan_details.scan.detections.highest_severity_threat_details.count | Total number of infected files with the highest severity threat detected. | long | +| aws.guardduty.service.ebs_volume_scan_details.scan.detections.highest_severity_threat_details.severity | Severity level of the highest severity threat detected. | keyword | +| aws.guardduty.service.ebs_volume_scan_details.scan.detections.highest_severity_threat_details.threat_name | Threat name of the highest severity threat detected as part of the malware scan. | keyword | +| aws.guardduty.service.ebs_volume_scan_details.scan.detections.scanned_item_count.files | Number of files scanned. | long | +| aws.guardduty.service.ebs_volume_scan_details.scan.detections.scanned_item_count.total_gb | Total GB of files scanned for malware. | long | +| aws.guardduty.service.ebs_volume_scan_details.scan.detections.scanned_item_count.volumes | Total number of scanned volumes. | long | +| aws.guardduty.service.ebs_volume_scan_details.scan.detections.threat_detected_by_name.item_count | Total number of infected files identified. | long | +| aws.guardduty.service.ebs_volume_scan_details.scan.detections.threat_detected_by_name.shortened | Flag to determine if the finding contains every single infected file-path and/or every threat. | boolean | +| aws.guardduty.service.ebs_volume_scan_details.scan.detections.threat_detected_by_name.threat_names.file_paths.file.name | File name of the infected file. | keyword | +| aws.guardduty.service.ebs_volume_scan_details.scan.detections.threat_detected_by_name.threat_names.file_paths.file.path | The file path of the infected file. | keyword | +| aws.guardduty.service.ebs_volume_scan_details.scan.detections.threat_detected_by_name.threat_names.file_paths.hash | The hash value of the infected file. | keyword | +| aws.guardduty.service.ebs_volume_scan_details.scan.detections.threat_detected_by_name.threat_names.file_paths.volume_arn | EBS volume Arn details of the infected file. | keyword | +| aws.guardduty.service.ebs_volume_scan_details.scan.detections.threat_detected_by_name.threat_names.item_count | Total number of files infected with given threat. | long | +| aws.guardduty.service.ebs_volume_scan_details.scan.detections.threat_detected_by_name.threat_names.name | The name of the identified threat. | keyword | +| aws.guardduty.service.ebs_volume_scan_details.scan.detections.threat_detected_by_name.threat_names.severity | Severity of threat identified as part of the malware scan. | keyword | +| aws.guardduty.service.ebs_volume_scan_details.scan.detections.threat_detected_by_name.unique_threat_name_count | Total number of unique threats by name identified, as part of the malware scan. | long | +| aws.guardduty.service.ebs_volume_scan_details.scan.detections.threats_detected_item_count.files | Total number of infected files. | long | +| aws.guardduty.service.ebs_volume_scan_details.scan.id | Unique Id of the malware scan that generated the finding. | keyword | +| aws.guardduty.service.ebs_volume_scan_details.scan.started_at | Returns the start date and time of the malware scan. | date | +| aws.guardduty.service.ebs_volume_scan_details.sources | Contains list of threat intelligence sources used to detect threats. | keyword | +| aws.guardduty.service.ebs_volume_scan_details.trigger_finding_id | GuardDuty finding ID that triggered a malware scan. | keyword | +| aws.guardduty.service.event.first_seen | The first-seen timestamp of the activity that prompted GuardDuty to generate this finding. | date | +| aws.guardduty.service.event.last_seen | The last-seen timestamp of the activity that prompted GuardDuty to generate this finding. | date | +| aws.guardduty.service.evidence.threat_intelligence_details.threat.list_name | The name of the threat intelligence list that triggered the finding. | keyword | +| aws.guardduty.service.evidence.threat_intelligence_details.threat.names | A list of names of the threats in the threat intelligence list that triggered the finding. | keyword | +| aws.guardduty.service.feature_name | The name of the feature that generated a finding. | keyword | +| aws.guardduty.service.resource_role | The resource role information for this finding. | keyword | +| aws.guardduty.service.service_name | The AWS service name whose API was invoked. | keyword | +| aws.guardduty.service.user_feedback | Feedback that was submitted about the finding. | keyword | +| aws.guardduty.severity.code | The severity of the finding in double. | double | +| aws.guardduty.severity.value | The severity of the finding. | keyword | +| aws.guardduty.title | The title of the finding. | keyword | +| aws.guardduty.type | The type of finding. | keyword | +| aws.guardduty.updated_at | The time and date when the finding was last updated. | date | +| cloud.account.id | The cloud account or organization id used to identify different entities in a multi-tenant environment. Examples: AWS account id, Google Cloud ORG Id, or other unique identifier. | keyword | +| cloud.account.name | The cloud account name or alias used to identify different entities in a multi-tenant environment. Examples: AWS account name, Google Cloud ORG display name. | keyword | +| cloud.availability_zone | Availability zone in which this host, resource, or service is located. | keyword | +| cloud.image.id | Image ID for the cloud instance. | keyword | +| cloud.instance.id | Instance ID of the host machine. | keyword | +| cloud.instance.name | Instance name of the host machine. | keyword | +| cloud.machine.type | Machine type of the host machine. | keyword | +| cloud.project.id | The cloud project identifier. Examples: Google Cloud Project id, Azure Project id. | keyword | +| cloud.provider | Name of the cloud provider. Example values are aws, azure, gcp, or digitalocean. | keyword | +| cloud.region | Region in which this host, resource, or service is located. | keyword | +| cloud.service.name | The cloud service name is intended to distinguish services running on different platforms within a provider, eg AWS EC2 vs Lambda, GCP GCE vs App Engine, Azure VM vs App Server. Examples: app engine, app service, cloud run, fargate, lambda. | keyword | +| container.id | Unique container id. | keyword | +| container.image.name | Name of the image the container was built on. | keyword | +| container.labels | Image labels. | object | +| container.name | Container name. | keyword | +| container.runtime | Runtime managing this container. | keyword | +| data_stream.dataset | Data stream dataset. | constant_keyword | +| data_stream.namespace | Data stream namespace. | constant_keyword | +| data_stream.type | Data stream type. | constant_keyword | +| destination.address | Some event destination addresses are defined ambiguously. The event will sometimes list an IP, a domain or a unix socket. You should always store the raw address in the `.address` field. Then it should be duplicated to `.ip` or `.domain`, depending on which one it is. | keyword | +| dns.question.name | The name being queried. If the name field contains non-printable characters (below 32 or above 126), those characters should be represented as escaped base 10 integers (\DDD). Back slashes and quotes should be escaped. Tabs, carriage returns, and line feeds should be converted to \t, \r, and \n respectively. | keyword | +| ecs.version | ECS version this event conforms to. `ecs.version` is a required field and must exist in all events. When querying across multiple indices -- which may conform to slightly different ECS versions -- this field lets integrations adjust to the schema version of the events. | keyword | +| event.action | The action captured by the event. This describes the information in the event. It is more specific than `event.category`. Examples are `group-add`, `process-started`, `file-created`. The value is normally defined by the implementer. | keyword | +| event.created | event.created contains the date/time when the event was first read by an agent, or by your pipeline. This field is distinct from @timestamp in that @timestamp typically contain the time extracted from the original event. In most situations, these two timestamps will be slightly different. The difference can be used to calculate the delay between your source generating an event, and the time when your agent first processed it. This can be used to monitor your agent's or pipeline's ability to keep up with your event source. In case the two timestamps are identical, @timestamp should be used. | date | +| event.dataset | Event dataset. | constant_keyword | +| event.end | event.end contains the date when the event ended or when the activity was last observed. | date | +| event.id | Unique ID to describe the event. | keyword | +| event.kind | This is one of four ECS Categorization Fields, and indicates the highest level in the ECS category hierarchy. `event.kind` gives high-level information about what type of information the event contains, without being specific to the contents of the event. For example, values of this field distinguish alert events from metric events. The value of this field can be used to inform how these kinds of events should be handled. They may warrant different retention, different access control, it may also help understand whether the data coming in at a regular interval or not. | keyword | +| event.module | Event module. | constant_keyword | +| event.original | Raw text message of entire event. Used to demonstrate log integrity or where the full log message (before splitting it up in multiple parts) may be required, e.g. for reindex. This field is not indexed and doc_values are disabled. It cannot be searched, but it can be retrieved from `_source`. If users wish to override this and index this field, please see `Field data types` in the `Elasticsearch Reference`. | keyword | +| event.provider | Source of the event. Event transports such as Syslog or the Windows Event Log typically mention the source of an event. It can be the name of the software that generated the event (e.g. Sysmon, httpd), or of a subsystem of the operating system (kernel, Microsoft-Windows-Security-Auditing). | keyword | +| event.severity | The numeric severity of the event according to your event source. What the different severity values mean can be different between sources and use cases. It's up to the implementer to make sure severities are consistent across events from the same source. The Syslog severity belongs in `log.syslog.severity.code`. `event.severity` is meant to represent the severity according to the event source (e.g. firewall, IDS). If the event source does not publish its own severity, you may optionally copy the `log.syslog.severity.code` to `event.severity`. | long | +| event.start | event.start contains the date when the event started or when the activity was first observed. | date | +| event.type | This is one of four ECS Categorization Fields, and indicates the third level in the ECS category hierarchy. `event.type` represents a categorization "sub-bucket" that, when used along with the `event.category` field values, enables filtering events down to a level appropriate for single visualization. This field is an array. This will allow proper categorization of some events that fall in multiple event types. | keyword | +| file.hash.sha256 | SHA256 hash. | keyword | +| file.name | Name of the file including the extension, without the directory. | keyword | +| file.path | Full path to the file, including the file name. It should include the drive letter, when appropriate. | keyword | +| file.path.text | Multi-field of `file.path`. | match_only_text | +| host.architecture | Operating system architecture. | keyword | +| host.containerized | If the host is a container. | boolean | +| host.domain | Name of the domain of which the host is a member. For example, on Windows this could be the host's Active Directory domain or NetBIOS domain name. For Linux this could be the domain of the host's LDAP provider. | keyword | +| host.hostname | Hostname of the host. It normally contains what the `hostname` command returns on the host machine. | keyword | +| host.id | Unique host id. As hostname is not always unique, use values that are meaningful in your environment. Example: The current usage of `beat.name`. | keyword | +| host.ip | Host ip addresses. | ip | +| host.mac | Host MAC addresses. The notation format from RFC 7042 is suggested: Each octet (that is, 8-bit byte) is represented by two [uppercase] hexadecimal digits giving the value of the octet as an unsigned integer. Successive octets are separated by a hyphen. | keyword | +| host.name | Name of the host. It can contain what `hostname` returns on Unix systems, the fully qualified domain name, or a name specified by the user. The sender decides which value to use. | keyword | +| host.os.build | OS build information. | keyword | +| host.os.codename | OS codename, if any. | keyword | +| host.os.family | OS family (such as redhat, debian, freebsd, windows). | keyword | +| host.os.kernel | Operating system kernel version as a raw string. | keyword | +| host.os.name | Operating system name, without the version. | keyword | +| host.os.name.text | Multi-field of `host.os.name`. | match_only_text | +| host.os.platform | Operating system platform (such centos, ubuntu, windows). | keyword | +| host.os.version | Operating system version as a raw string. | keyword | +| host.type | Type of host. For Cloud providers this can be the machine type like `t2.medium`. If vm, this could be the container, for example, or other information meaningful in your environment. | keyword | +| input.type | Input type | keyword | +| log.offset | Log offset | long | +| message | For log events the message field contains the log message, optimized for viewing in a log viewer. For structured logs without an original message field, other fields can be concatenated to form a human-readable summary of the event. If multiple messages exist, they can be combined into one message. | match_only_text | +| network.direction | Direction of the network traffic. Recommended values are: \* ingress \* egress \* inbound \* outbound \* internal \* external \* unknown When mapping events from a host-based monitoring context, populate this field from the host's point of view, using the values "ingress" or "egress". When mapping events from a network or perimeter-based monitoring context, populate this field from the point of view of the network perimeter, using the values "inbound", "outbound", "internal" or "external". Note that "internal" is not crossing perimeter boundaries, and is meant to describe communication between two hosts within the perimeter. Note also that "external" is meant to describe traffic between two hosts that are external to the perimeter. This could for example be useful for ISPs or VPN service providers. | keyword | +| network.transport | Same as network.iana_number, but instead using the Keyword name of the transport layer (udp, tcp, ipv6-icmp, etc.) The field value must be normalized to lowercase for querying. | keyword | +| orchestrator.namespace | Namespace in which the action is taking place. | keyword | +| orchestrator.resource.name | Name of the resource being acted upon. | keyword | +| orchestrator.resource.type | Type of resource being acted upon. | keyword | +| related.hash | All the hashes seen on your event. Populating this field, then using it to search for hashes can help in situations where you're unsure what the hash algorithm is (and therefore which key name to search). | keyword | +| related.hosts | All hostnames or other host identifiers seen on your event. Example identifiers include FQDNs, domain names, workstation names, or aliases. | keyword | +| related.ip | All of the IPs seen on your event. | ip | +| related.user | All the user names or other user identifiers seen on the event. | keyword | +| rule.category | A categorization value keyword used by the entity using the rule for detection of this event. | keyword | +| rule.name | The name of the rule or signature generating the event. | keyword | +| rule.ruleset | Name of the ruleset, policy, group, or parent category in which the rule used to generate this event is a member. | keyword | +| source.address | Some event source addresses are defined ambiguously. The event will sometimes list an IP, a domain or a unix socket. You should always store the raw address in the `.address` field. Then it should be duplicated to `.ip` or `.domain`, depending on which one it is. | keyword | +| source.as.number | Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet. | long | +| source.as.organization.name | Organization name. | keyword | +| source.as.organization.name.text | Multi-field of `source.as.organization.name`. | match_only_text | +| source.geo.city_name | City name. | keyword | +| source.geo.country_iso_code | Country ISO code. | keyword | +| source.geo.country_name | Country name. | keyword | +| source.geo.location | Longitude and latitude. | geo_point | +| source.ip | IP address of the source (IPv4 or IPv6). | ip | +| source.port | Port of the source. | long | +| tags | List of keywords used to tag each event. | keyword | +| user.id | Unique identifier of the user. | keyword | +| user.name | Short name or login of the user. | keyword | +| user.name.text | Multi-field of `user.name`. | match_only_text | +| user.roles | Array of user roles at the time of the event. | keyword | + diff --git a/packages/aws/img/guardduty-screenshot.png b/packages/aws/img/guardduty-screenshot.png new file mode 100644 index 00000000000..026864a86e6 Binary files /dev/null and b/packages/aws/img/guardduty-screenshot.png differ diff --git a/packages/aws/img/logo_guardduty.svg b/packages/aws/img/logo_guardduty.svg new file mode 100644 index 00000000000..20c5a59a2ce --- /dev/null +++ b/packages/aws/img/logo_guardduty.svg @@ -0,0 +1,352 @@ + + + + diff --git a/packages/aws/kibana/dashboard/aws-401261a0-6a39-11ed-b880-2f1b70138655.json b/packages/aws/kibana/dashboard/aws-401261a0-6a39-11ed-b880-2f1b70138655.json new file mode 100644 index 00000000000..d89971ca52c --- /dev/null +++ b/packages/aws/kibana/dashboard/aws-401261a0-6a39-11ed-b880-2f1b70138655.json @@ -0,0 +1,847 @@ +{ + "attributes": { + "controlGroupInput": { + "chainingSystem": "HIERARCHICAL", + "controlStyle": "oneLine", + "ignoreParentSettingsJSON": "{\"ignoreFilters\":false,\"ignoreQuery\":false,\"ignoreTimerange\":false,\"ignoreValidations\":false}", + "panelsJSON": "{\"dc3d0169-d74f-4562-a5fc-0a3aa3b88a66\":{\"order\":0,\"width\":\"large\",\"grow\":true,\"type\":\"optionsListControl\",\"explicitInput\":{\"fieldName\":\"aws.guardduty.severity.value\",\"parentFieldName\":\"aws.guardduty.severity.value\",\"title\":\"Findings Severity\",\"id\":\"dc3d0169-d74f-4562-a5fc-0a3aa3b88a66\",\"enhancements\":{}}},\"5c292aab-3ebf-4d28-8de8-409c4e8f3964\":{\"order\":1,\"width\":\"large\",\"grow\":true,\"type\":\"optionsListControl\",\"explicitInput\":{\"fieldName\":\"cloud.account.id\",\"title\":\"Cloud Account ID\",\"id\":\"5c292aab-3ebf-4d28-8de8-409c4e8f3964\",\"enhancements\":{}}},\"92f50669-315a-4090-bb9a-6aa4ccd23236\":{\"order\":2,\"width\":\"large\",\"grow\":true,\"type\":\"optionsListControl\",\"explicitInput\":{\"fieldName\":\"cloud.region\",\"title\":\"Cloud Region\",\"id\":\"92f50669-315a-4090-bb9a-6aa4ccd23236\",\"enhancements\":{}}},\"afdfd48f-9238-4bc0-824e-9c24cea54a0d\":{\"order\":3,\"width\":\"large\",\"grow\":true,\"type\":\"optionsListControl\",\"explicitInput\":{\"fieldName\":\"cloud.provider\",\"title\":\"Cloud Provider\",\"id\":\"afdfd48f-9238-4bc0-824e-9c24cea54a0d\",\"enhancements\":{}}}}" + }, + "description": "Overview of Amazon Guardduty Severity.", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": { + "filter": [ + { + "$state": { + "store": "appState" + }, + "meta": { + "alias": null, + "disabled": false, + "indexRefName": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "key": "data_stream.dataset", + "negate": false, + "params": { + "query": "aws.guardduty" + }, + "type": "phrase" + }, + "query": { + "match_phrase": { + "data_stream.dataset": "aws.guardduty" + } + } + } + ], + "query": { + "language": "kuery", + "query": "" + } + } + }, + "optionsJSON": { + "hidePanelTitles": false, + "syncColors": false, + "syncTooltips": false, + "useMargins": true + }, + "panelsJSON": [ + { + "embeddableConfig": { + "attributes": { + "references": [ + { + "id": "logs-*", + "name": "indexpattern-datasource-layer-e11cbb3d-97ae-40c9-9e40-f22edae179a8", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "12d46c5c-2f5c-4cc8-bbe8-99d02061ca2d", + "type": "index-pattern" + } + ], + "state": { + "datasourceStates": { + "indexpattern": { + "layers": { + "e11cbb3d-97ae-40c9-9e40-f22edae179a8": { + "columnOrder": [ + "576fd823-f299-403a-bf8e-50a8907aa24c" + ], + "columns": { + "576fd823-f299-403a-bf8e-50a8907aa24c": { + "customLabel": true, + "dataType": "number", + "isBucketed": false, + "label": "Total Findings Severity", + "operationType": "count", + "params": { + "emptyAsNull": true + }, + "scale": "ratio", + "sourceField": "___records___" + } + }, + "incompleteColumns": {} + } + } + } + }, + "filters": [ + { + "$state": { + "store": "appState" + }, + "meta": { + "alias": null, + "disabled": false, + "index": "12d46c5c-2f5c-4cc8-bbe8-99d02061ca2d", + "key": "aws.guardduty.severity.value", + "negate": false, + "type": "exists", + "value": "exists" + }, + "query": { + "exists": { + "field": "aws.guardduty.severity.value" + } + } + } + ], + "query": { + "language": "kuery", + "query": "" + }, + "visualization": { + "accessor": "576fd823-f299-403a-bf8e-50a8907aa24c", + "layerId": "e11cbb3d-97ae-40c9-9e40-f22edae179a8", + "layerType": "data" + } + }, + "title": "", + "type": "lens", + "visualizationType": "lnsMetric" + }, + "enhancements": {}, + "hidePanelTitles": false + }, + "gridData": { + "h": 15, + "i": "e5323905-bbca-4cba-9743-62f51e089c4e", + "w": 24, + "x": 0, + "y": 0 + }, + "panelIndex": "e5323905-bbca-4cba-9743-62f51e089c4e", + "title": "Total Findings Severity [Logs Guardduty]", + "type": "lens", + "version": "8.4.0" + }, + { + "embeddableConfig": { + "attributes": { + "references": [ + { + "id": "logs-*", + "name": "indexpattern-datasource-layer-cd79dd95-938b-476c-b299-87e08b27babf", + "type": "index-pattern" + } + ], + "state": { + "datasourceStates": { + "indexpattern": { + "layers": { + "cd79dd95-938b-476c-b299-87e08b27babf": { + "columnOrder": [ + "f422e4a2-19b6-43f5-84ab-04c0a1e93884", + "c8d4b79c-7d41-4961-b026-c98aa675c6a2" + ], + "columns": { + "c8d4b79c-7d41-4961-b026-c98aa675c6a2": { + "customLabel": true, + "dataType": "number", + "isBucketed": false, + "label": "Count", + "operationType": "count", + "params": { + "emptyAsNull": true + }, + "scale": "ratio", + "sourceField": "___records___" + }, + "f422e4a2-19b6-43f5-84ab-04c0a1e93884": { + "customLabel": true, + "dataType": "string", + "isBucketed": true, + "label": "Severity", + "operationType": "terms", + "params": { + "missingBucket": false, + "orderBy": { + "columnId": "c8d4b79c-7d41-4961-b026-c98aa675c6a2", + "type": "column" + }, + "orderDirection": "desc", + "otherBucket": true, + "parentFormat": { + "id": "terms" + }, + "size": 5 + }, + "scale": "ordinal", + "sourceField": "aws.guardduty.severity.value" + } + }, + "incompleteColumns": {} + } + } + } + }, + "filters": [], + "query": { + "language": "kuery", + "query": "" + }, + "visualization": { + "layers": [ + { + "categoryDisplay": "default", + "groups": [ + "f422e4a2-19b6-43f5-84ab-04c0a1e93884" + ], + "layerId": "cd79dd95-938b-476c-b299-87e08b27babf", + "layerType": "data", + "legendDisplay": "show", + "metric": "c8d4b79c-7d41-4961-b026-c98aa675c6a2", + "nestedLegend": false, + "numberDisplay": "percent", + "truncateLegend": false + } + ], + "shape": "pie" + } + }, + "title": "", + "type": "lens", + "visualizationType": "lnsPie" + }, + "enhancements": {}, + "hidePanelTitles": false + }, + "gridData": { + "h": 15, + "i": "9bf4750b-f97a-4cfe-8043-20c060ec0e6b", + "w": 24, + "x": 24, + "y": 15 + }, + "panelIndex": "9bf4750b-f97a-4cfe-8043-20c060ec0e6b", + "title": "Distribution of Findings by Severity [Logs Guardduty]", + "type": "lens", + "version": "8.4.0" + }, + { + "embeddableConfig": { + "attributes": { + "references": [ + { + "id": "logs-*", + "name": "indexpattern-datasource-layer-a4a2e3f4-5526-4a49-917d-c0da13a3c59b", + "type": "index-pattern" + } + ], + "state": { + "datasourceStates": { + "indexpattern": { + "layers": { + "a4a2e3f4-5526-4a49-917d-c0da13a3c59b": { + "columnOrder": [ + "5802de81-101d-4230-afd8-5cf9b46536b1", + "e0af7986-42a7-41b4-9c99-8f3f27c91cef", + "72d33bd8-ee6b-43ea-97e4-bfbc2a75403e" + ], + "columns": { + "5802de81-101d-4230-afd8-5cf9b46536b1": { + "customLabel": true, + "dataType": "string", + "isBucketed": true, + "label": "Resource Type", + "operationType": "terms", + "params": { + "missingBucket": false, + "orderBy": { + "columnId": "72d33bd8-ee6b-43ea-97e4-bfbc2a75403e", + "type": "column" + }, + "orderDirection": "desc", + "otherBucket": false, + "parentFormat": { + "id": "terms" + }, + "secondaryFields": [], + "size": 10 + }, + "scale": "ordinal", + "sourceField": "aws.guardduty.resource.type" + }, + "72d33bd8-ee6b-43ea-97e4-bfbc2a75403e": { + "customLabel": true, + "dataType": "number", + "isBucketed": false, + "label": "Count", + "operationType": "count", + "params": { + "emptyAsNull": true + }, + "scale": "ratio", + "sourceField": "___records___" + }, + "e0af7986-42a7-41b4-9c99-8f3f27c91cef": { + "customLabel": true, + "dataType": "string", + "isBucketed": true, + "label": "Severity", + "operationType": "terms", + "params": { + "missingBucket": false, + "orderBy": { + "columnId": "72d33bd8-ee6b-43ea-97e4-bfbc2a75403e", + "type": "column" + }, + "orderDirection": "desc", + "otherBucket": true, + "parentFormat": { + "id": "terms" + }, + "size": 10 + }, + "scale": "ordinal", + "sourceField": "aws.guardduty.severity.value" + } + }, + "incompleteColumns": {} + } + } + } + }, + "filters": [], + "query": { + "language": "kuery", + "query": "" + }, + "visualization": { + "layers": [ + { + "accessors": [ + "72d33bd8-ee6b-43ea-97e4-bfbc2a75403e" + ], + "layerId": "a4a2e3f4-5526-4a49-917d-c0da13a3c59b", + "layerType": "data", + "position": "top", + "seriesType": "bar_stacked", + "showGridlines": false, + "splitAccessor": "e0af7986-42a7-41b4-9c99-8f3f27c91cef", + "xAccessor": "5802de81-101d-4230-afd8-5cf9b46536b1" + } + ], + "legend": { + "isVisible": true, + "position": "right", + "shouldTruncate": false, + "showSingleSeries": true + }, + "preferredSeriesType": "bar_stacked", + "title": "Empty XY chart", + "valueLabels": "hide" + } + }, + "title": "", + "type": "lens", + "visualizationType": "lnsXY" + }, + "enhancements": {}, + "hidePanelTitles": false + }, + "gridData": { + "h": 15, + "i": "4e6dad73-8053-466e-988f-9d7402bc2296", + "w": 24, + "x": 0, + "y": 15 + }, + "panelIndex": "4e6dad73-8053-466e-988f-9d7402bc2296", + "title": "Findings Resource Type by Severity [Logs Guardduty]", + "type": "lens", + "version": "8.4.0" + }, + { + "embeddableConfig": { + "attributes": { + "references": [ + { + "id": "logs-*", + "name": "indexpattern-datasource-layer-bf5155c0-44e9-4b25-bfcf-5b6519f5642b", + "type": "index-pattern" + } + ], + "state": { + "datasourceStates": { + "indexpattern": { + "layers": { + "bf5155c0-44e9-4b25-bfcf-5b6519f5642b": { + "columnOrder": [ + "b9ce93d0-4d06-4609-b49f-722b3966d8bf", + "c8bfcf2b-4b66-4c71-8da3-760785897184", + "bc53461a-e612-48b2-a271-961db2a20a46" + ], + "columns": { + "b9ce93d0-4d06-4609-b49f-722b3966d8bf": { + "customLabel": true, + "dataType": "string", + "isBucketed": true, + "label": "Region", + "operationType": "terms", + "params": { + "missingBucket": false, + "orderBy": { + "columnId": "bc53461a-e612-48b2-a271-961db2a20a46", + "type": "column" + }, + "orderDirection": "desc", + "otherBucket": true, + "parentFormat": { + "id": "terms" + }, + "secondaryFields": [], + "size": 10 + }, + "scale": "ordinal", + "sourceField": "cloud.region" + }, + "bc53461a-e612-48b2-a271-961db2a20a46": { + "customLabel": true, + "dataType": "number", + "isBucketed": false, + "label": "Count", + "operationType": "count", + "params": { + "emptyAsNull": true + }, + "scale": "ratio", + "sourceField": "___records___" + }, + "c8bfcf2b-4b66-4c71-8da3-760785897184": { + "customLabel": true, + "dataType": "string", + "isBucketed": true, + "label": "Severity", + "operationType": "terms", + "params": { + "missingBucket": false, + "orderBy": { + "columnId": "bc53461a-e612-48b2-a271-961db2a20a46", + "type": "column" + }, + "orderDirection": "desc", + "otherBucket": true, + "parentFormat": { + "id": "terms" + }, + "size": 10 + }, + "scale": "ordinal", + "sourceField": "aws.guardduty.severity.value" + } + }, + "incompleteColumns": {} + } + } + } + }, + "filters": [], + "query": { + "language": "kuery", + "query": "" + }, + "visualization": { + "layers": [ + { + "accessors": [ + "bc53461a-e612-48b2-a271-961db2a20a46" + ], + "layerId": "bf5155c0-44e9-4b25-bfcf-5b6519f5642b", + "layerType": "data", + "position": "top", + "seriesType": "bar_stacked", + "showGridlines": false, + "splitAccessor": "c8bfcf2b-4b66-4c71-8da3-760785897184", + "xAccessor": "b9ce93d0-4d06-4609-b49f-722b3966d8bf" + } + ], + "legend": { + "isVisible": true, + "position": "right", + "shouldTruncate": false, + "showSingleSeries": true + }, + "preferredSeriesType": "bar_stacked", + "title": "Empty XY chart", + "valueLabels": "hide" + } + }, + "title": "", + "type": "lens", + "visualizationType": "lnsXY" + }, + "enhancements": {}, + "hidePanelTitles": false + }, + "gridData": { + "h": 15, + "i": "620e666f-80a6-435d-8c05-451cc4638526", + "w": 24, + "x": 24, + "y": 30 + }, + "panelIndex": "620e666f-80a6-435d-8c05-451cc4638526", + "title": "Findings Region by Severity [Logs Guardduty]", + "type": "lens", + "version": "8.4.0" + }, + { + "embeddableConfig": { + "attributes": { + "references": [ + { + "id": "logs-*", + "name": "indexpattern-datasource-layer-937499d4-2b05-43ca-9c9b-14cc04d12e59", + "type": "index-pattern" + } + ], + "state": { + "datasourceStates": { + "indexpattern": { + "layers": { + "937499d4-2b05-43ca-9c9b-14cc04d12e59": { + "columnOrder": [ + "5229a27f-0738-40c5-9a85-019fc21dc0e8", + "601fc88c-dc78-4b52-977e-007e8c241e86", + "b9e13f4b-8371-4415-acc5-8dec7ae71b46" + ], + "columns": { + "5229a27f-0738-40c5-9a85-019fc21dc0e8": { + "customLabel": true, + "dataType": "string", + "isBucketed": true, + "label": "Severity", + "operationType": "terms", + "params": { + "missingBucket": false, + "orderBy": { + "columnId": "b9e13f4b-8371-4415-acc5-8dec7ae71b46", + "type": "column" + }, + "orderDirection": "desc", + "otherBucket": true, + "parentFormat": { + "id": "terms" + }, + "size": 10 + }, + "scale": "ordinal", + "sourceField": "aws.guardduty.severity.value" + }, + "601fc88c-dc78-4b52-977e-007e8c241e86": { + "dataType": "date", + "isBucketed": true, + "label": "@timestamp", + "operationType": "date_histogram", + "params": { + "dropPartials": false, + "includeEmptyRows": true, + "interval": "auto" + }, + "scale": "interval", + "sourceField": "@timestamp" + }, + "b9e13f4b-8371-4415-acc5-8dec7ae71b46": { + "customLabel": true, + "dataType": "number", + "isBucketed": false, + "label": "Unique count", + "operationType": "unique_count", + "params": { + "emptyAsNull": true + }, + "scale": "ratio", + "sourceField": "_id" + } + }, + "incompleteColumns": {} + } + } + } + }, + "filters": [], + "query": { + "language": "kuery", + "query": "" + }, + "visualization": { + "layers": [ + { + "accessors": [ + "b9e13f4b-8371-4415-acc5-8dec7ae71b46" + ], + "layerId": "937499d4-2b05-43ca-9c9b-14cc04d12e59", + "layerType": "data", + "position": "top", + "seriesType": "line", + "showGridlines": false, + "splitAccessor": "5229a27f-0738-40c5-9a85-019fc21dc0e8", + "xAccessor": "601fc88c-dc78-4b52-977e-007e8c241e86", + "yConfig": [ + { + "axisMode": "auto", + "forAccessor": "b9e13f4b-8371-4415-acc5-8dec7ae71b46" + } + ] + } + ], + "legend": { + "isVisible": true, + "position": "right", + "shouldTruncate": false, + "showSingleSeries": true + }, + "preferredSeriesType": "line", + "title": "Empty XY chart", + "valueLabels": "hide" + } + }, + "title": "", + "type": "lens", + "visualizationType": "lnsXY" + }, + "enhancements": {}, + "hidePanelTitles": false + }, + "gridData": { + "h": 15, + "i": "8ef41930-65db-4dee-924c-4a05a891729d", + "w": 24, + "x": 0, + "y": 30 + }, + "panelIndex": "8ef41930-65db-4dee-924c-4a05a891729d", + "title": "Severity Over Time [Logs Guardduty]", + "type": "lens", + "version": "8.4.0" + }, + { + "embeddableConfig": { + "attributes": { + "references": [ + { + "id": "logs-*", + "name": "indexpattern-datasource-layer-bfc64f98-e13e-4bed-9b00-3c73223c5964", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "c68bdca0-e526-4375-92b9-db2c02d55fd1", + "type": "index-pattern" + } + ], + "state": { + "datasourceStates": { + "indexpattern": { + "layers": { + "bfc64f98-e13e-4bed-9b00-3c73223c5964": { + "columnOrder": [ + "72cee35b-e3d2-4b89-93f7-2ff2fc23034f", + "dabd934c-7800-4ce3-89e6-4be852b387d1" + ], + "columns": { + "72cee35b-e3d2-4b89-93f7-2ff2fc23034f": { + "dataType": "string", + "isBucketed": true, + "label": "Filters", + "operationType": "filters", + "params": { + "filters": [ + { + "input": { + "language": "kuery", + "query": "aws.guardduty.severity.value : \"High\" " + }, + "label": "High" + }, + { + "input": { + "language": "kuery", + "query": "aws.guardduty.severity.value : Medium" + }, + "label": "Medium" + }, + { + "input": { + "language": "kuery", + "query": "aws.guardduty.severity.value : Low" + }, + "label": "Low" + } + ] + }, + "scale": "ordinal" + }, + "dabd934c-7800-4ce3-89e6-4be852b387d1": { + "customLabel": true, + "dataType": "number", + "isBucketed": false, + "label": "Severity Count", + "operationType": "count", + "params": { + "emptyAsNull": true + }, + "scale": "ratio", + "sourceField": "___records___" + } + }, + "incompleteColumns": {} + } + } + } + }, + "filters": [ + { + "$state": { + "store": "appState" + }, + "meta": { + "alias": null, + "disabled": false, + "index": "c68bdca0-e526-4375-92b9-db2c02d55fd1", + "key": "aws.guardduty.severity.value", + "negate": false, + "type": "exists", + "value": "exists" + }, + "query": { + "exists": { + "field": "aws.guardduty.severity.value" + } + } + } + ], + "query": { + "language": "kuery", + "query": "" + }, + "visualization": { + "breakdownByAccessor": "72cee35b-e3d2-4b89-93f7-2ff2fc23034f", + "layerId": "bfc64f98-e13e-4bed-9b00-3c73223c5964", + "layerType": "data", + "maxCols": 3, + "metricAccessor": "dabd934c-7800-4ce3-89e6-4be852b387d1" + } + }, + "title": "", + "type": "lens", + "visualizationType": "lnsMetricNew" + }, + "enhancements": {}, + "hidePanelTitles": false + }, + "gridData": { + "h": 15, + "i": "154adc56-6d50-48ce-8363-fc1227c918c3", + "w": 24, + "x": 24, + "y": 0 + }, + "panelIndex": "154adc56-6d50-48ce-8363-fc1227c918c3", + "title": "Total Findings Count Based on Severity [Logs Guardduty]", + "type": "lens", + "version": "8.4.0" + } + ], + "timeRestore": false, + "title": "[Logs AWS] Guardduty Findings Severity", + "version": 1 + }, + "coreMigrationVersion": "8.4.0", + "id": "aws-401261a0-6a39-11ed-b880-2f1b70138655", + "migrationVersion": { + "dashboard": "8.4.0" + }, + "references": [ + { + "id": "logs-*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "e5323905-bbca-4cba-9743-62f51e089c4e:indexpattern-datasource-layer-e11cbb3d-97ae-40c9-9e40-f22edae179a8", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "e5323905-bbca-4cba-9743-62f51e089c4e:12d46c5c-2f5c-4cc8-bbe8-99d02061ca2d", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "9bf4750b-f97a-4cfe-8043-20c060ec0e6b:indexpattern-datasource-layer-cd79dd95-938b-476c-b299-87e08b27babf", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "4e6dad73-8053-466e-988f-9d7402bc2296:indexpattern-datasource-layer-a4a2e3f4-5526-4a49-917d-c0da13a3c59b", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "620e666f-80a6-435d-8c05-451cc4638526:indexpattern-datasource-layer-bf5155c0-44e9-4b25-bfcf-5b6519f5642b", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "8ef41930-65db-4dee-924c-4a05a891729d:indexpattern-datasource-layer-937499d4-2b05-43ca-9c9b-14cc04d12e59", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "154adc56-6d50-48ce-8363-fc1227c918c3:indexpattern-datasource-layer-bfc64f98-e13e-4bed-9b00-3c73223c5964", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "154adc56-6d50-48ce-8363-fc1227c918c3:c68bdca0-e526-4375-92b9-db2c02d55fd1", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "controlGroup_dc3d0169-d74f-4562-a5fc-0a3aa3b88a66:optionsListDataView", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "controlGroup_5c292aab-3ebf-4d28-8de8-409c4e8f3964:optionsListDataView", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "controlGroup_92f50669-315a-4090-bb9a-6aa4ccd23236:optionsListDataView", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "controlGroup_afdfd48f-9238-4bc0-824e-9c24cea54a0d:optionsListDataView", + "type": "index-pattern" + } + ], + "type": "dashboard" +} \ No newline at end of file diff --git a/packages/aws/kibana/dashboard/aws-9d21f520-6a36-11ed-b880-2f1b70138655.json b/packages/aws/kibana/dashboard/aws-9d21f520-6a36-11ed-b880-2f1b70138655.json new file mode 100644 index 00000000000..71f9d350db1 --- /dev/null +++ b/packages/aws/kibana/dashboard/aws-9d21f520-6a36-11ed-b880-2f1b70138655.json @@ -0,0 +1,545 @@ +{ + "attributes": { + "controlGroupInput": { + "chainingSystem": "HIERARCHICAL", + "controlStyle": "oneLine", + "ignoreParentSettingsJSON": "{\"ignoreFilters\":false,\"ignoreQuery\":false,\"ignoreTimerange\":false,\"ignoreValidations\":false}", + "panelsJSON": "{\"50ad3275-2e9f-4fb5-86f7-2abb13053d60\":{\"order\":0,\"width\":\"large\",\"grow\":true,\"type\":\"optionsListControl\",\"explicitInput\":{\"fieldName\":\"aws.guardduty.severity.value\",\"parentFieldName\":\"aws.guardduty.severity.value\",\"title\":\"Findings Severity\",\"id\":\"50ad3275-2e9f-4fb5-86f7-2abb13053d60\",\"enhancements\":{},\"selectedOptions\":[]}},\"b1defe1a-26e0-4ec4-86fe-9506c27734a9\":{\"order\":1,\"width\":\"large\",\"grow\":true,\"type\":\"optionsListControl\",\"explicitInput\":{\"fieldName\":\"cloud.account.id\",\"title\":\"Cloud Account ID\",\"id\":\"b1defe1a-26e0-4ec4-86fe-9506c27734a9\",\"enhancements\":{}}},\"cee8fa25-e40b-43d6-be3f-4fa1d86da1ef\":{\"order\":2,\"width\":\"large\",\"grow\":true,\"type\":\"optionsListControl\",\"explicitInput\":{\"fieldName\":\"cloud.region\",\"title\":\"Cloud Region\",\"id\":\"cee8fa25-e40b-43d6-be3f-4fa1d86da1ef\",\"enhancements\":{}}},\"77b15205-772d-492d-9a35-1311d1b95bd2\":{\"order\":3,\"width\":\"large\",\"grow\":true,\"type\":\"optionsListControl\",\"explicitInput\":{\"fieldName\":\"cloud.provider\",\"title\":\"Cloud Provider\",\"id\":\"77b15205-772d-492d-9a35-1311d1b95bd2\",\"enhancements\":{},\"selectedOptions\":[]}}}" + }, + "description": "Overview of Amazon Guardduty Findings logs.", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": { + "filter": [ + { + "$state": { + "store": "appState" + }, + "meta": { + "alias": null, + "disabled": false, + "indexRefName": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "key": "data_stream.dataset", + "negate": false, + "params": { + "query": "aws.guardduty" + }, + "type": "phrase" + }, + "query": { + "match_phrase": { + "data_stream.dataset": "aws.guardduty" + } + } + } + ], + "query": { + "language": "kuery", + "query": "" + } + } + }, + "optionsJSON": { + "hidePanelTitles": false, + "syncColors": false, + "syncTooltips": false, + "useMargins": true + }, + "panelsJSON": [ + { + "embeddableConfig": { + "attributes": { + "references": [ + { + "id": "logs-*", + "name": "indexpattern-datasource-layer-38c44a96-07c8-4b58-99a2-e29ae95408e4", + "type": "index-pattern" + } + ], + "state": { + "datasourceStates": { + "indexpattern": { + "layers": { + "38c44a96-07c8-4b58-99a2-e29ae95408e4": { + "columnOrder": [ + "c09646ef-de2b-4763-9a8c-5d638e7e87ca", + "8552a4c3-4a33-4b7f-a6a1-37ea256ed0e7" + ], + "columns": { + "8552a4c3-4a33-4b7f-a6a1-37ea256ed0e7": { + "customLabel": true, + "dataType": "number", + "isBucketed": false, + "label": "Count", + "operationType": "count", + "params": { + "emptyAsNull": true + }, + "scale": "ratio", + "sourceField": "___records___" + }, + "c09646ef-de2b-4763-9a8c-5d638e7e87ca": { + "customLabel": true, + "dataType": "string", + "isBucketed": true, + "label": "Action Type", + "operationType": "terms", + "params": { + "missingBucket": false, + "orderBy": { + "columnId": "8552a4c3-4a33-4b7f-a6a1-37ea256ed0e7", + "type": "column" + }, + "orderDirection": "desc", + "otherBucket": true, + "parentFormat": { + "id": "terms" + }, + "size": 10 + }, + "scale": "ordinal", + "sourceField": "event.action" + } + }, + "incompleteColumns": {} + } + } + } + }, + "filters": [], + "query": { + "language": "kuery", + "query": "" + }, + "visualization": { + "layers": [ + { + "accessors": [ + "8552a4c3-4a33-4b7f-a6a1-37ea256ed0e7" + ], + "layerId": "38c44a96-07c8-4b58-99a2-e29ae95408e4", + "layerType": "data", + "position": "top", + "seriesType": "bar_stacked", + "showGridlines": false, + "xAccessor": "c09646ef-de2b-4763-9a8c-5d638e7e87ca", + "yConfig": [ + { + "axisMode": "auto", + "forAccessor": "8552a4c3-4a33-4b7f-a6a1-37ea256ed0e7" + } + ] + } + ], + "legend": { + "isVisible": true, + "position": "right", + "shouldTruncate": false, + "showSingleSeries": true + }, + "preferredSeriesType": "bar_stacked", + "title": "Empty XY chart", + "valueLabels": "hide" + } + }, + "title": "", + "type": "lens", + "visualizationType": "lnsXY" + }, + "enhancements": {}, + "hidePanelTitles": false + }, + "gridData": { + "h": 15, + "i": "e54ffa6b-51d6-4d63-a5fe-6e0ccd3e38c5", + "w": 24, + "x": 0, + "y": 0 + }, + "panelIndex": "e54ffa6b-51d6-4d63-a5fe-6e0ccd3e38c5", + "title": "Distribution of Findings by Action Type [Logs Guardduty]", + "type": "lens", + "version": "8.4.0" + }, + { + "embeddableConfig": { + "attributes": { + "references": [ + { + "id": "logs-*", + "name": "indexpattern-datasource-layer-d3e3da2f-07a4-42fe-b7cb-c95949158b5d", + "type": "index-pattern" + } + ], + "state": { + "datasourceStates": { + "indexpattern": { + "layers": { + "d3e3da2f-07a4-42fe-b7cb-c95949158b5d": { + "columnOrder": [ + "be6d076f-1f09-4396-a1cc-c0c008fb2cf4", + "329a84e3-c949-45e6-9087-0b3703d5c17c" + ], + "columns": { + "329a84e3-c949-45e6-9087-0b3703d5c17c": { + "customLabel": true, + "dataType": "number", + "isBucketed": false, + "label": "Count", + "operationType": "count", + "params": { + "emptyAsNull": true + }, + "scale": "ratio", + "sourceField": "___records___" + }, + "be6d076f-1f09-4396-a1cc-c0c008fb2cf4": { + "customLabel": true, + "dataType": "string", + "isBucketed": true, + "label": "Account ID", + "operationType": "terms", + "params": { + "missingBucket": false, + "orderBy": { + "columnId": "329a84e3-c949-45e6-9087-0b3703d5c17c", + "type": "column" + }, + "orderDirection": "desc", + "otherBucket": false, + "parentFormat": { + "id": "terms" + }, + "size": 10 + }, + "scale": "ordinal", + "sourceField": "cloud.account.id" + } + }, + "incompleteColumns": {} + } + } + } + }, + "filters": [], + "query": { + "language": "kuery", + "query": "" + }, + "visualization": { + "columns": [ + { + "columnId": "be6d076f-1f09-4396-a1cc-c0c008fb2cf4", + "isTransposed": false + }, + { + "alignment": "left", + "columnId": "329a84e3-c949-45e6-9087-0b3703d5c17c", + "isTransposed": false + } + ], + "layerId": "d3e3da2f-07a4-42fe-b7cb-c95949158b5d", + "layerType": "data" + } + }, + "title": "", + "type": "lens", + "visualizationType": "lnsDatatable" + }, + "enhancements": {}, + "hidePanelTitles": false + }, + "gridData": { + "h": 15, + "i": "dddf31a0-8b26-4bb6-b226-6ca4aeb0c8de", + "w": 24, + "x": 24, + "y": 0 + }, + "panelIndex": "dddf31a0-8b26-4bb6-b226-6ca4aeb0c8de", + "title": "Top 10 Account ID [Logs Guardduty]", + "type": "lens", + "version": "8.4.0" + }, + { + "embeddableConfig": { + "attributes": { + "references": [ + { + "id": "logs-*", + "name": "indexpattern-datasource-layer-d3e3da2f-07a4-42fe-b7cb-c95949158b5d", + "type": "index-pattern" + } + ], + "state": { + "datasourceStates": { + "indexpattern": { + "layers": { + "d3e3da2f-07a4-42fe-b7cb-c95949158b5d": { + "columnOrder": [ + "be6d076f-1f09-4396-a1cc-c0c008fb2cf4", + "329a84e3-c949-45e6-9087-0b3703d5c17c" + ], + "columns": { + "329a84e3-c949-45e6-9087-0b3703d5c17c": { + "customLabel": true, + "dataType": "number", + "isBucketed": false, + "label": "Count", + "operationType": "count", + "params": { + "emptyAsNull": true + }, + "scale": "ratio", + "sourceField": "___records___" + }, + "be6d076f-1f09-4396-a1cc-c0c008fb2cf4": { + "customLabel": true, + "dataType": "string", + "isBucketed": true, + "label": "Type", + "operationType": "terms", + "params": { + "missingBucket": false, + "orderBy": { + "columnId": "329a84e3-c949-45e6-9087-0b3703d5c17c", + "type": "column" + }, + "orderDirection": "desc", + "otherBucket": false, + "parentFormat": { + "id": "terms" + }, + "secondaryFields": [], + "size": 10 + }, + "scale": "ordinal", + "sourceField": "rule.name" + } + }, + "incompleteColumns": {} + } + } + } + }, + "filters": [], + "query": { + "language": "kuery", + "query": "" + }, + "visualization": { + "columns": [ + { + "columnId": "be6d076f-1f09-4396-a1cc-c0c008fb2cf4", + "isTransposed": false + }, + { + "alignment": "left", + "columnId": "329a84e3-c949-45e6-9087-0b3703d5c17c", + "isTransposed": false + } + ], + "layerId": "d3e3da2f-07a4-42fe-b7cb-c95949158b5d", + "layerType": "data" + } + }, + "title": "", + "type": "lens", + "visualizationType": "lnsDatatable" + }, + "enhancements": {}, + "hidePanelTitles": false + }, + "gridData": { + "h": 15, + "i": "affec3f3-1392-4022-8ef4-2c9205b410de", + "w": 24, + "x": 0, + "y": 15 + }, + "panelIndex": "affec3f3-1392-4022-8ef4-2c9205b410de", + "title": "Top 10 Highest Findings by Type [Logs Guardduty]", + "type": "lens", + "version": "8.4.0" + }, + { + "embeddableConfig": { + "attributes": { + "references": [ + { + "id": "logs-*", + "name": "indexpattern-datasource-layer-d3e3da2f-07a4-42fe-b7cb-c95949158b5d", + "type": "index-pattern" + } + ], + "state": { + "datasourceStates": { + "indexpattern": { + "layers": { + "d3e3da2f-07a4-42fe-b7cb-c95949158b5d": { + "columnOrder": [ + "be6d076f-1f09-4396-a1cc-c0c008fb2cf4", + "329a84e3-c949-45e6-9087-0b3703d5c17c" + ], + "columns": { + "329a84e3-c949-45e6-9087-0b3703d5c17c": { + "customLabel": true, + "dataType": "number", + "isBucketed": false, + "label": "Confidence Score", + "operationType": "max", + "params": { + "emptyAsNull": true + }, + "scale": "ratio", + "sourceField": "aws.guardduty.confidence" + }, + "be6d076f-1f09-4396-a1cc-c0c008fb2cf4": { + "customLabel": true, + "dataType": "string", + "isBucketed": true, + "label": "Findings ARN", + "operationType": "terms", + "params": { + "missingBucket": false, + "orderBy": { + "columnId": "329a84e3-c949-45e6-9087-0b3703d5c17c", + "type": "column" + }, + "orderDirection": "desc", + "otherBucket": false, + "parentFormat": { + "id": "terms" + }, + "secondaryFields": [], + "size": 10 + }, + "scale": "ordinal", + "sourceField": "aws.guardduty.arn" + } + }, + "incompleteColumns": {} + } + } + } + }, + "filters": [], + "query": { + "language": "kuery", + "query": "" + }, + "visualization": { + "columns": [ + { + "columnId": "be6d076f-1f09-4396-a1cc-c0c008fb2cf4", + "isTransposed": false + }, + { + "alignment": "left", + "columnId": "329a84e3-c949-45e6-9087-0b3703d5c17c", + "isTransposed": false + } + ], + "layerId": "d3e3da2f-07a4-42fe-b7cb-c95949158b5d", + "layerType": "data" + } + }, + "title": "", + "type": "lens", + "visualizationType": "lnsDatatable" + }, + "enhancements": {}, + "hidePanelTitles": false + }, + "gridData": { + "h": 15, + "i": "14a16e94-f5b1-403c-9087-d90b8891acf5", + "w": 24, + "x": 24, + "y": 15 + }, + "panelIndex": "14a16e94-f5b1-403c-9087-d90b8891acf5", + "title": "Top 10 Findings ARN with Highest Confidence Score [Logs Guardduty]", + "type": "lens", + "version": "8.4.0" + }, + { + "embeddableConfig": { + "enhancements": {} + }, + "gridData": { + "h": 15, + "i": "8c9bbda7-ee27-43a2-b815-656ae730bb01", + "w": 48, + "x": 0, + "y": 30 + }, + "panelIndex": "8c9bbda7-ee27-43a2-b815-656ae730bb01", + "panelRefName": "panel_8c9bbda7-ee27-43a2-b815-656ae730bb01", + "type": "search", + "version": "8.4.0" + } + ], + "timeRestore": false, + "title": "[Logs AWS] Guardduty Findings Overview", + "version": 1 + }, + "coreMigrationVersion": "8.4.0", + "id": "aws-9d21f520-6a36-11ed-b880-2f1b70138655", + "migrationVersion": { + "dashboard": "8.4.0" + }, + "references": [ + { + "id": "logs-*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "e54ffa6b-51d6-4d63-a5fe-6e0ccd3e38c5:indexpattern-datasource-layer-38c44a96-07c8-4b58-99a2-e29ae95408e4", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "dddf31a0-8b26-4bb6-b226-6ca4aeb0c8de:indexpattern-datasource-layer-d3e3da2f-07a4-42fe-b7cb-c95949158b5d", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "affec3f3-1392-4022-8ef4-2c9205b410de:indexpattern-datasource-layer-d3e3da2f-07a4-42fe-b7cb-c95949158b5d", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "14a16e94-f5b1-403c-9087-d90b8891acf5:indexpattern-datasource-layer-d3e3da2f-07a4-42fe-b7cb-c95949158b5d", + "type": "index-pattern" + }, + { + "id": "aws-df758050-6a49-11ed-b880-2f1b70138655", + "name": "8c9bbda7-ee27-43a2-b815-656ae730bb01:panel_8c9bbda7-ee27-43a2-b815-656ae730bb01", + "type": "search" + }, + { + "id": "logs-*", + "name": "controlGroup_50ad3275-2e9f-4fb5-86f7-2abb13053d60:optionsListDataView", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "controlGroup_b1defe1a-26e0-4ec4-86fe-9506c27734a9:optionsListDataView", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "controlGroup_cee8fa25-e40b-43d6-be3f-4fa1d86da1ef:optionsListDataView", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "controlGroup_77b15205-772d-492d-9a35-1311d1b95bd2:optionsListDataView", + "type": "index-pattern" + } + ], + "type": "dashboard" +} \ No newline at end of file diff --git a/packages/aws/kibana/dashboard/aws-f890a5b0-6a3a-11ed-b880-2f1b70138655.json b/packages/aws/kibana/dashboard/aws-f890a5b0-6a3a-11ed-b880-2f1b70138655.json new file mode 100644 index 00000000000..1e30b0290e8 --- /dev/null +++ b/packages/aws/kibana/dashboard/aws-f890a5b0-6a3a-11ed-b880-2f1b70138655.json @@ -0,0 +1,353 @@ +{ + "attributes": { + "controlGroupInput": { + "chainingSystem": "HIERARCHICAL", + "controlStyle": "oneLine", + "ignoreParentSettingsJSON": "{\"ignoreFilters\":false,\"ignoreQuery\":false,\"ignoreTimerange\":false,\"ignoreValidations\":false}", + "panelsJSON": "{\"ca2b6a90-582d-4564-a0b0-1e41d59a3354\":{\"order\":0,\"width\":\"large\",\"grow\":true,\"type\":\"optionsListControl\",\"explicitInput\":{\"fieldName\":\"aws.guardduty.severity.value\",\"parentFieldName\":\"aws.guardduty.severity.value\",\"title\":\"Findings Severity\",\"id\":\"ca2b6a90-582d-4564-a0b0-1e41d59a3354\",\"enhancements\":{}}},\"7baf430f-c5f2-41b3-9759-bcc954c83f5a\":{\"order\":1,\"width\":\"large\",\"grow\":true,\"type\":\"optionsListControl\",\"explicitInput\":{\"fieldName\":\"cloud.account.id\",\"title\":\"Cloud Account ID\",\"id\":\"7baf430f-c5f2-41b3-9759-bcc954c83f5a\",\"enhancements\":{}}},\"a8f4f8e8-fdc9-46a1-9875-87b5ac0b1f55\":{\"order\":2,\"width\":\"large\",\"grow\":true,\"type\":\"optionsListControl\",\"explicitInput\":{\"fieldName\":\"cloud.region\",\"title\":\"Cloud Region\",\"id\":\"a8f4f8e8-fdc9-46a1-9875-87b5ac0b1f55\",\"enhancements\":{}}},\"1bda4437-a500-4db2-a965-9bf9457099b3\":{\"order\":3,\"width\":\"large\",\"grow\":true,\"type\":\"optionsListControl\",\"explicitInput\":{\"fieldName\":\"cloud.provider\",\"title\":\"Cloud Provider\",\"id\":\"1bda4437-a500-4db2-a965-9bf9457099b3\",\"enhancements\":{}}}}" + }, + "description": "Overview of Amazon Guardduty Threat.", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": { + "filter": [ + { + "$state": { + "store": "appState" + }, + "meta": { + "alias": null, + "disabled": false, + "indexRefName": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "key": "data_stream.dataset", + "negate": false, + "params": { + "query": "aws.guardduty" + }, + "type": "phrase" + }, + "query": { + "match_phrase": { + "data_stream.dataset": "aws.guardduty" + } + } + } + ], + "query": { + "language": "kuery", + "query": "" + } + } + }, + "optionsJSON": { + "hidePanelTitles": false, + "syncColors": false, + "syncTooltips": false, + "useMargins": true + }, + "panelsJSON": [ + { + "embeddableConfig": { + "attributes": { + "references": [ + { + "id": "logs-*", + "name": "indexpattern-datasource-layer-ae36b619-b48f-4c2c-9488-529c1d556a45", + "type": "index-pattern" + } + ], + "state": { + "datasourceStates": { + "indexpattern": { + "layers": { + "ae36b619-b48f-4c2c-9488-529c1d556a45": { + "columnOrder": [ + "f4d5b22b-fd83-4008-863c-ae1ca6c1b6c7", + "cccccc67-3390-4055-9d65-af9da8413fc3", + "146dba13-563a-41c0-aca7-74c8b5d61d5f" + ], + "columns": { + "146dba13-563a-41c0-aca7-74c8b5d61d5f": { + "customLabel": true, + "dataType": "number", + "isBucketed": false, + "label": "Count", + "operationType": "count", + "params": { + "emptyAsNull": true + }, + "scale": "ratio", + "sourceField": "___records___" + }, + "cccccc67-3390-4055-9d65-af9da8413fc3": { + "customLabel": true, + "dataType": "string", + "isBucketed": true, + "label": "Resource Type", + "operationType": "terms", + "params": { + "missingBucket": false, + "orderBy": { + "columnId": "146dba13-563a-41c0-aca7-74c8b5d61d5f", + "type": "column" + }, + "orderDirection": "desc", + "otherBucket": true, + "parentFormat": { + "id": "terms" + }, + "size": 10 + }, + "scale": "ordinal", + "sourceField": "rule.ruleset" + }, + "f4d5b22b-fd83-4008-863c-ae1ca6c1b6c7": { + "customLabel": true, + "dataType": "string", + "isBucketed": true, + "label": "Threat Purpose", + "operationType": "terms", + "params": { + "missingBucket": false, + "orderBy": { + "columnId": "146dba13-563a-41c0-aca7-74c8b5d61d5f", + "type": "column" + }, + "orderDirection": "desc", + "otherBucket": true, + "parentFormat": { + "id": "terms" + }, + "size": 10 + }, + "scale": "ordinal", + "sourceField": "rule.category" + } + }, + "incompleteColumns": {} + } + } + } + }, + "filters": [], + "query": { + "language": "kuery", + "query": "" + }, + "visualization": { + "columns": [ + { + "columnId": "f4d5b22b-fd83-4008-863c-ae1ca6c1b6c7", + "isTransposed": false + }, + { + "alignment": "left", + "columnId": "146dba13-563a-41c0-aca7-74c8b5d61d5f", + "hidden": false, + "isTransposed": false + }, + { + "columnId": "cccccc67-3390-4055-9d65-af9da8413fc3", + "isTransposed": false + } + ], + "layerId": "ae36b619-b48f-4c2c-9488-529c1d556a45", + "layerType": "data" + } + }, + "title": "", + "type": "lens", + "visualizationType": "lnsDatatable" + }, + "enhancements": {}, + "hidePanelTitles": false + }, + "gridData": { + "h": 15, + "i": "61a40814-9dd1-4831-afe7-c890f0d577ef", + "w": 24, + "x": 0, + "y": 0 + }, + "panelIndex": "61a40814-9dd1-4831-afe7-c890f0d577ef", + "title": "Threats by Threat Purpose, Resource Type [Logs Guardduty]", + "type": "lens", + "version": "8.4.0" + }, + { + "embeddableConfig": { + "enhancements": {} + }, + "gridData": { + "h": 16, + "i": "609f0379-b003-41e8-9c10-eb62a4ec31bf", + "w": 48, + "x": 0, + "y": 15 + }, + "panelIndex": "609f0379-b003-41e8-9c10-eb62a4ec31bf", + "panelRefName": "panel_609f0379-b003-41e8-9c10-eb62a4ec31bf", + "type": "search", + "version": "8.4.0" + }, + { + "embeddableConfig": { + "attributes": { + "references": [ + { + "id": "logs-*", + "name": "indexpattern-datasource-layer-f28ae8c1-640f-4d79-8e2e-ce78d5b2baf3", + "type": "index-pattern" + } + ], + "state": { + "datasourceStates": { + "indexpattern": { + "layers": { + "f28ae8c1-640f-4d79-8e2e-ce78d5b2baf3": { + "columnOrder": [ + "017ea05f-da86-49d8-8dda-de0459fdd312", + "dbea28c7-a444-4ae7-a39e-1f3a9e247714" + ], + "columns": { + "017ea05f-da86-49d8-8dda-de0459fdd312": { + "customLabel": true, + "dataType": "string", + "isBucketed": true, + "label": "Threat Name", + "operationType": "terms", + "params": { + "missingBucket": false, + "orderBy": { + "columnId": "dbea28c7-a444-4ae7-a39e-1f3a9e247714", + "type": "column" + }, + "orderDirection": "desc", + "otherBucket": true, + "parentFormat": { + "id": "terms" + }, + "size": 25 + }, + "scale": "ordinal", + "sourceField": "aws.guardduty.service.evidence.threat_intelligence_details.threat.names" + }, + "dbea28c7-a444-4ae7-a39e-1f3a9e247714": { + "customLabel": true, + "dataType": "number", + "isBucketed": false, + "label": "Count", + "operationType": "count", + "params": { + "emptyAsNull": true + }, + "scale": "ratio", + "sourceField": "___records___" + } + }, + "incompleteColumns": {} + } + } + } + }, + "filters": [], + "query": { + "language": "kuery", + "query": "" + }, + "visualization": { + "layers": [ + { + "accessors": [ + "dbea28c7-a444-4ae7-a39e-1f3a9e247714" + ], + "layerId": "f28ae8c1-640f-4d79-8e2e-ce78d5b2baf3", + "layerType": "data", + "position": "top", + "seriesType": "bar_horizontal_stacked", + "showGridlines": false, + "xAccessor": "017ea05f-da86-49d8-8dda-de0459fdd312" + } + ], + "legend": { + "isVisible": true, + "position": "right" + }, + "preferredSeriesType": "bar_horizontal_stacked", + "title": "Empty XY chart", + "valueLabels": "hide" + } + }, + "title": "", + "type": "lens", + "visualizationType": "lnsXY" + }, + "enhancements": {}, + "hidePanelTitles": false + }, + "gridData": { + "h": 15, + "i": "54628857-cd79-42c3-932b-7e8df3759e45", + "w": 24, + "x": 24, + "y": 0 + }, + "panelIndex": "54628857-cd79-42c3-932b-7e8df3759e45", + "title": "Distribution of Findings by Threat Name [Logs Guardduty]", + "type": "lens", + "version": "8.4.0" + } + ], + "timeRestore": false, + "title": "[Logs AWS] Guardduty Findings Threat", + "version": 1 + }, + "coreMigrationVersion": "8.4.0", + "id": "aws-f890a5b0-6a3a-11ed-b880-2f1b70138655", + "migrationVersion": { + "dashboard": "8.4.0" + }, + "references": [ + { + "id": "logs-*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "61a40814-9dd1-4831-afe7-c890f0d577ef:indexpattern-datasource-layer-ae36b619-b48f-4c2c-9488-529c1d556a45", + "type": "index-pattern" + }, + { + "id": "aws-b3169d70-6a38-11ed-b880-2f1b70138655", + "name": "609f0379-b003-41e8-9c10-eb62a4ec31bf:panel_609f0379-b003-41e8-9c10-eb62a4ec31bf", + "type": "search" + }, + { + "id": "logs-*", + "name": "54628857-cd79-42c3-932b-7e8df3759e45:indexpattern-datasource-layer-f28ae8c1-640f-4d79-8e2e-ce78d5b2baf3", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "controlGroup_ca2b6a90-582d-4564-a0b0-1e41d59a3354:optionsListDataView", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "controlGroup_7baf430f-c5f2-41b3-9759-bcc954c83f5a:optionsListDataView", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "controlGroup_a8f4f8e8-fdc9-46a1-9875-87b5ac0b1f55:optionsListDataView", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "controlGroup_1bda4437-a500-4db2-a965-9bf9457099b3:optionsListDataView", + "type": "index-pattern" + } + ], + "type": "dashboard" +} \ No newline at end of file diff --git a/packages/aws/kibana/search/aws-b3169d70-6a38-11ed-b880-2f1b70138655.json b/packages/aws/kibana/search/aws-b3169d70-6a38-11ed-b880-2f1b70138655.json new file mode 100644 index 00000000000..29d2924f7ec --- /dev/null +++ b/packages/aws/kibana/search/aws-b3169d70-6a38-11ed-b880-2f1b70138655.json @@ -0,0 +1,98 @@ +{ + "attributes": { + "columns": [ + "aws.guardduty.service.evidence.threat_intelligence_details.threat.names", + "aws.guardduty.resource.type", + "cloud.account.id", + "cloud.region", + "message" + ], + "description": "", + "grid": {}, + "hideChart": false, + "isTextBasedQuery": false, + "kibanaSavedObjectMeta": { + "searchSourceJSON": { + "filter": [ + { + "$state": { + "store": "appState" + }, + "meta": { + "alias": null, + "disabled": false, + "indexRefName": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "key": "data_stream.dataset", + "negate": false, + "params": { + "query": "aws.guardduty" + }, + "type": "phrase" + }, + "query": { + "match_phrase": { + "data_stream.dataset": "aws.guardduty" + } + } + }, + { + "$state": { + "store": "appState" + }, + "meta": { + "alias": null, + "disabled": false, + "indexRefName": "kibanaSavedObjectMeta.searchSourceJSON.filter[1].meta.index", + "key": "aws.guardduty.severity.value", + "negate": false, + "params": { + "query": "High" + }, + "type": "phrase" + }, + "query": { + "match_phrase": { + "aws.guardduty.severity.value": "High" + } + } + } + ], + "indexRefName": "kibanaSavedObjectMeta.searchSourceJSON.index", + "query": { + "language": "kuery", + "query": "" + } + } + }, + "sort": [ + [ + "@timestamp", + "desc" + ] + ], + "title": "High Severity Threat Details [Logs Guardduty]" + }, + "coreMigrationVersion": "8.4.0", + "id": "aws-b3169d70-6a38-11ed-b880-2f1b70138655", + "migrationVersion": { + "search": "8.0.0" + }, + "references": [ + { + "id": "logs-*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[1].meta.index", + "type": "index-pattern" + } + ], + "type": "search" +} \ No newline at end of file diff --git a/packages/aws/kibana/search/aws-df758050-6a49-11ed-b880-2f1b70138655.json b/packages/aws/kibana/search/aws-df758050-6a49-11ed-b880-2f1b70138655.json new file mode 100644 index 00000000000..00009f88da1 --- /dev/null +++ b/packages/aws/kibana/search/aws-df758050-6a49-11ed-b880-2f1b70138655.json @@ -0,0 +1,72 @@ +{ + "attributes": { + "columns": [ + "cloud.account.id", + "cloud.provider", + "cloud.region", + "event.action", + "event.id" + ], + "description": "", + "grid": {}, + "hideChart": false, + "isTextBasedQuery": false, + "kibanaSavedObjectMeta": { + "searchSourceJSON": { + "filter": [ + { + "$state": { + "store": "appState" + }, + "meta": { + "alias": null, + "disabled": false, + "indexRefName": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "key": "data_stream.dataset", + "negate": false, + "params": { + "query": "aws.guardduty" + }, + "type": "phrase" + }, + "query": { + "match_phrase": { + "data_stream.dataset": "aws.guardduty" + } + } + } + ], + "indexRefName": "kibanaSavedObjectMeta.searchSourceJSON.index", + "query": { + "language": "kuery", + "query": "" + } + } + }, + "sort": [ + [ + "@timestamp", + "desc" + ] + ], + "title": "Findings Essential Details [Logs Guardduty]" + }, + "coreMigrationVersion": "8.4.0", + "id": "aws-df758050-6a49-11ed-b880-2f1b70138655", + "migrationVersion": { + "search": "8.0.0" + }, + "references": [ + { + "id": "logs-*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "type": "index-pattern" + } + ], + "type": "search" +} \ No newline at end of file diff --git a/packages/aws/manifest.yml b/packages/aws/manifest.yml index f46a7de1e55..35af54ab3f7 100644 --- a/packages/aws/manifest.yml +++ b/packages/aws/manifest.yml @@ -1,7 +1,7 @@ format_version: 1.0.0 name: aws title: AWS -version: 1.30.0 +version: 1.31.0 license: basic description: Collect logs and metrics from Amazon Web Services with Elastic Agent. type: integration @@ -676,5 +676,27 @@ policy_templates: title: AWS Inspector logo size: 33x39 type: image/svg+xml + - name: guardduty + title: Amazon GuardDuty + description: Collect Amazon GuardDuty logs with Elastic Agent. + data_streams: + - guardduty + inputs: + - type: httpjson + title: Collect Amazon GuardDuty logs via API + description: Collecting Amazon GuardDuty logs via API. + - type: aws-s3 + title: Collect Amazon GuardDuty logs via AWS S3 or SQS + description: Collecting Amazon GuardDuty logs via AWS S3 or SQS input. + screenshots: + - src: /img/guardduty-screenshot.png + title: GuardDuty dashboard screenshot + size: 600x600 + type: image/png + icons: + - src: /img/logo_guardduty.svg + title: Amazon GuardDuty logo + size: 33x39 + type: image/svg+xml owner: github: elastic/obs-cloud-monitoring