Amazon EC2 Instance Connect AWS-ec2-instance-connect

3 operations, identified by eventName in the audit log.

eventNameDescription
_catch_allCatch-all entry for AWS-ec2-instance-connect rules that match the service but not a specific eventName.
SendSerialConsoleSSHPublicKeyPushes an SSH public key to the specified EC2 instance to allow SSH access over the instance's serial console port.
SendSSHPublicKeyPushes an SSH public key to the specified EC2 instance so it is available for a short period for SSH authentication.

_catch_all: AWS-ec2-instance-connect (catch-all)

#
Service
AWS-ec2-instance-connect

Description

Catch-all entry for AWS-ec2-instance-connect rules that match the service but not a specific eventName.

Fields #

NameDescription
eventNameThe name of the API action that was called.
eventSourceThe AWS service endpoint that received the request (e.g. iam.amazonaws.com).
eventTypeCloudTrail event category: AwsApiCall, AwsConsoleSignIn, AwsConsoleAction, AwsServiceEvent, or AwsVpceEvents.
userIdentityThe IAM entity that made the request (type, principalId, arn, accountId, sessionContext).
sourceIPAddressIP address of the caller, or the AWS service principal for service-initiated calls.
awsRegionAWS Region the request was made to.
requestParametersParameters sent with the request. Shape is action-specific; null when none.
responseElementsResponse elements. Shape is action-specific; null for reads or when absent.
errorCodeAWS service error code when the request failed. Absent on success.
errorMessageDescription of the error when errorCode is present.

SendSerialConsoleSSHPublicKey

#
Service
AWS-ec2-instance-connect

Description

Pushes an SSH public key to the specified EC2 instance to allow SSH access over the instance's serial console port.

Fields #

NameDescription
eventNameThe name of the API action that was called.
eventSourceThe AWS service endpoint that received the request (e.g. iam.amazonaws.com).
eventTypeCloudTrail event category: AwsApiCall, AwsConsoleSignIn, AwsConsoleAction, AwsServiceEvent, or AwsVpceEvents.
userIdentityThe IAM entity that made the request (type, principalId, arn, accountId, sessionContext).
sourceIPAddressIP address of the caller, or the AWS service principal for service-initiated calls.
awsRegionAWS Region the request was made to.
requestParametersParameters sent with the request. Shape is action-specific; null when none.
responseElementsResponse elements. Shape is action-specific; null for reads or when absent.
errorCodeAWS service error code when the request failed. Absent on success.
errorMessageDescription of the error when errorCode is present.

Detection Rules #

View all rules referencing this event →

Elastic #

  • AWS EC2 Instance Connect SSH Public Key Uploaded source medium: Identifies when a new SSH public key is uploaded to an AWS EC2 instance using the EC2 Instance Connect service. This action could indicate an adversary attempting to maintain access to the instance. The rule detects the SendSerialConsoleSSHPublicKey or SendSSHPublicKey API actions, which are logged when manually uploading an SSH key to an EC2 instance or serial connection. It is important to know that this API call happens automatically by the EC2 Instance Connect service when a user connects to an EC2 instance using the EC2 Instance Connect service via the CLI or AWS Management Console.↳ also matches SendSSHPublicKey

SendSSHPublicKey

#
Service
AWS-ec2-instance-connect

Description

Pushes an SSH public key to the specified EC2 instance so it is available for a short period for SSH authentication.

Fields #

NameDescription
eventNameThe name of the API action that was called.
eventSourceThe AWS service endpoint that received the request (e.g. iam.amazonaws.com).
eventTypeCloudTrail event category: AwsApiCall, AwsConsoleSignIn, AwsConsoleAction, AwsServiceEvent, or AwsVpceEvents.
userIdentityThe IAM entity that made the request (type, principalId, arn, accountId, sessionContext).
sourceIPAddressIP address of the caller, or the AWS service principal for service-initiated calls.
awsRegionAWS Region the request was made to.
requestParametersParameters sent with the request. Shape is action-specific; null when none.
responseElementsResponse elements. Shape is action-specific; null for reads or when absent.
errorCodeAWS service error code when the request failed. Absent on success.
errorMessageDescription of the error when errorCode is present.

Detection Rules #

View all rules referencing this event →

Elastic #

  • AWS EC2 Instance Connect SSH Public Key Uploaded source medium: Identifies when a new SSH public key is uploaded to an AWS EC2 instance using the EC2 Instance Connect service. This action could indicate an adversary attempting to maintain access to the instance. The rule detects the SendSerialConsoleSSHPublicKey or SendSSHPublicKey API actions, which are logged when manually uploading an SSH key to an EC2 instance or serial connection. It is important to know that this API call happens automatically by the EC2 Instance Connect service when a user connects to an EC2 instance using the EC2 Instance Connect service via the CLI or AWS Management Console.↳ also matches SendSerialConsoleSSHPublicKey