VPC logs queries
This page contains examples for VPC Flow logs and VPC DNS logs.
VPC Flow Logs queries
Show VPC Flowlog activity for SSH and RDP
Remote shells typically have a human at one end. During an investigation, isolating sessions from SSH and RDP is often a standard procedure to identify specific actor activity.
Show VPC Flowlog activity for an IP address
During an investigation often particular IP addresses are identified as being of interest (e.g, a known command and control node). Once the role of an IP address is identified, isolating and explaining that activity is of interest. This can indicate which resources are likely to be compromised.
Show VPC Flowlog Activity Related to CloudTrail sourceIPAddresses Doing Console Signins
If there are concerns of a credential breach, then accounting for all AWS console activity is of critical importance. This query will find all the CloudTrail sourceIPaddresses involved in console signins and then return all the VPC Flow activity related. This will show if there are common IP addresses. Of particular interest are IP addresses outside of your organization communicating with the instances as well as logging into the console. This may indicate a compromise where an unauthorized actor is accessing account resources.
VPC DNS query examples
The queries below are for VPC DNS logs, but could be adapted for other DNS logs.
Sources with most queries in past 1 week
Rare queries in past 4 weeks
List queries, remove AWS internal queries
Split and list the top 10 TLDs
Last updated