Scenario 2: Compromised IAM credentials
You have completed the first attack simulator and are back with your cup of coffee. However, you continue to receive new notifications about Findings related to AWS IAM services. The body of the first message indicates that using IAM credentials, some API calls were made from the IP address that was added to the Threat List (in this post). before).
No individual IAM credentials have ever been exposed or disclosed in any way.
Content
Go to GuardDuty Console
To conduct a review of the Findings:
Recon:IAMUser
.UnauthorizedAccess:IAMUser
.If there isn’t any Finding, proceed to press the Refresh button and wait.
From Finding - Recon:IAMUser/MaliciousIPCaller.Custom
, we can easily retrieve the following information:
Under the Resource Affected section, you will find the User Name
related to this Finding.
Based on the format reviewed in detail in the previous section, what security incident can you pinpoint through the Finding style?
This finding indicates that the IAM credential of the above User Name
could have been exposed by API calls derived from an IP address that was previously added to the Threat List.
What actions were taken by this IAM User?
In the Action section, we see that the DescribeParameters
action has been performed.
How can we see all the remaining actions, taken by this IAM User, within the last 1 hour or 1 day ago?
GuardDuty is capable of analyzing large amounts of data to pinpoint the hazards present in your environment. However, during the investigation and remediation steps, we also need to combine many different data sources to have the most correlated view possible.
In this case, the analyst can use insights that can be found in user behavior logs through CloudTrail.
IAM Findings generated by EC2 malicious instance that made API calls and the EIP of this instance are in Custom Threat List.
Check EventBridge Event Rule
GuardDuty-Event.
.GuardDuty-Event-IAMUser-MaliciousIPCaller
.As it turned out, Alice had never set up a Lambda Function to perform the Remediation process because the Security team decided that they would proceed manually with this Finding.
The combination of GuardDuty and EventBridge Events provides flexibility that makes it easy to create an automated Remediation process. Lambda functions or solutions from AWS partners are the top choices.
For certain Findings, we may end up configuring notifications and resolving issues manually, rather than automatically. Because when designing the automation process, we will have to pay attention to and evaluate the results that the Remediation process brings, including advantages and disadvantages.
In addition, we can set Target to some other AWS resources like SSM Run Commands or Step Function State Machine.
Resolve the situation
Since Alice has never set up the Remediation process for this Finding, we need to do it manually. While the Security team is analyzing the behavior of this IAM user to better define the scope of the vulnerability, we need to take some steps to disable Access Key to prevent programming. the next actions.
GuardDuty-Example-Compromised-Simulated
.GuardDuty-Example-Compromised-Simulated
, we select the Security Credentials bar.Make Inactive
button.