Answers for the TryHackMe Advent of Cyber Day 7: Oh, no. I’M SPEAKING IN CLOUDTRAIL room. In today’s room, we learn AWS CloudWatch and how AWS logs data in and from the cloud.
- What is the other activity made by the user glitch aside from the ListObject action?
Answer: PutObject
From the command: jq -r ‘[“Event_Time”, “Event_Name”, “User_Name”, “Bucket_Name”, “Key”, “Source_IP”],(.Records[] | select(.eventSource == “s3.amazonaws.com” and .requestParameters.bucketName==”wareville-care4wares”) | [.eventTime, .eventName, .userIdentity.userName // “N/A”,.requestParameters.bucketName // “N/A”, .requestParameters.key // “N/A”, .sourceIPAddress // “N/A”]) | @tsv’ cloudtrail_log.json | column -t

2. What is the source IP related to the S3 bucket activities of the user glitch?
Answer: 53.94.201.69
From the command: jq -r ‘[“Event_Time”, “Event_Name”, “User_Name”, “Bucket_Name”, “Key”, “Source_IP”],(.Records[] | select(.eventSource == “s3.amazonaws.com” and .requestParameters.bucketName==”wareville-care4wares”) | [.eventTime, .eventName, .userIdentity.userName // “N/A”,.requestParameters.bucketName // “N/A”, .requestParameters.key // “N/A”, .sourceIPAddress // “N/A”]) | @tsv’ cloudtrail_log.json | column -t

3. Based on the eventSource field, what AWS service generates the ConsoleLogin event?
Answer: signin.amazonaws.com
From the command: jq -r ‘[“Event_Time”, “Event_Source”, “Event_Name”, “User_Name”, “Source_IP”],(.Records[] | select(.userIdentity.userName == “glitch”) | [.eventTime, .eventSource, .eventName, .userIdentity.userName // “N/A”, .sourceIPAddress // “N/A”]) | @tsv’ cloudtrail_log.json | column -t -s $’\t’

4. When did the anomalous user trigger the ConsoleLogin event?
Answer: 2024-11-28T15:21:54Z
From the command: jq -r ‘[“Event_Time”, “Event_Source”, “Event_Name”, “User_Name”, “Source_IP”],(.Records[] | select(.userIdentity.userName == “glitch”) | [.eventTime, .eventSource, .eventName, .userIdentity.userName // “N/A”, .sourceIPAddress // “N/A”]) | @tsv’ cloudtrail_log.json | column -t -s $’\t’

5. What was the name of the user that was created by the mcskidy user?
Answer: glitch
From the command: jq ‘.Records[] |select(.eventSource==”iam.amazonaws.com” and .eventName== “CreateUser”)’ cloudtrail_log.json

6. What type of access was assigned to the anomalous user?
Answer: AdministratorAccess
From the command: jq ‘.Records[] | select(.eventSource==”iam.amazonaws.com” and .eventName== “AttachUserPolicy”)’ cloudtrail_log.json

7. Which IP does Mayor Malware typically use to log into AWS?
Answer: 53.94.201.69
From the command: jq -r ‘[“Event_Time”,”Event_Source”,”Event_Name”, “User_Name”,”User_Agent”,”Source_IP”],(.Records[] | select(.userIdentity.userName==”mayor_malware”) | [.eventTime, .eventSource, .eventName, .userIdentity.userName // “N/A”,.userAgent // “N/A”,.sourceIPAddress // “N/A”]) | @tsv’ cloudtrail_log.json | column -t -s $’\t’

8. What is McSkidy’s actual IP address?
Answer: 31.210.15.79
From the command: jq -r ‘[“Event_Time”,”Event_Source”,”Event_Name”, “User_Name”,”User_Agent”,”Source_IP”],(.Records[] | select(.userIdentity.userName==”mcskidy”) | [.eventTime, .eventSource, .eventName, .userIdentity.userName // “N/A”,.userAgent // “N/A”,.sourceIPAddress // “N/A”]) | @tsv’ cloudtrail_log.json | column -t -s $’\t’

9. What is the bank account number owned by Mayor Malware?
Answer: 2394 6912 7723 1294′
From the command: grep INSERT rds.log

Advent of Cyber ’24 Side Quest
LikeLike
Will post after January 1st 2025
LikeLike