Network Configuration Query Examples
The following examples show you how to use Network Configuration Query Attributes in RQL for investigating network and container exposure issues.
AWS Use Cases
RQL
Find all AWS EC2 instances that are accessible from any untrusted Internet source on administrative ports via SSH/RDP.
Find all AWS EC2 instances that are accessible from any untrusted Internet source other than HTTP/HTTPS.
Find all AWS Redshift managed ENI that are accessible from any untrusted Internet source on any port/protocol.
Find all AWS RDS managed ENI that are accessible from any untrusted Internet source on DB port/protocol 3306.
Find all AWS RDS managed ENI that are accessible from any untrusted Internet source on any port/protocol.
Find all AWS ELB managed ENI that are accessible from any untrusted Internet source on any port/protocol other than HTTP/HTTPS.
Find all AWS VPCs that have EC2 Instances that are accessible from any untrusted Internet source on any port/protocol other than web traffic (HTTP/HTTPs).
If you use the alert.on RQL attribute, it is only applicable for policies and alerts and has no effect on investigate queries.
Find all AWS EC2 instances with outbound access to any untrusted Internet destination.
Find if instance A in VPC-1 (staging environment) can communicate with instance A in VPC-2 (production environment).
For E-W network analysis, specify at least one specific source and destination VPC.
Find all AWS EC2 instances that are accessible from any untrusted Internet source where routing exists, however effective security policy is ‘Deny’.
Find if instance A in VPC-1 (staging environment) can communicate with a private S3 bucket using VPC endpoint that contains sensitive information.
For E-W network analysis, specify at least one specific source and destination VPC.
To find out all supported service.name in your environment, use the following RQL:
Find all Amazon ELB (load balancer) interfaces that are accessible on the Internet on port TCP/22.
Find all AWS EC2 Instances with unrestricted access (0.0.0.0/0) from the Internet other than the Web traffic.
Find all AWS EC2 Instances with network access from any IP in the range 20.0.0.0/24 other than the Web traffic.
Azure Use Cases
RQL
Find Azure PostgreSQL (PaaS) instance reachable from untrust Internet source on TCP port 5432.
Find Azure VM instance in running state that is Internet reachable with unrestricted access (0.0.0.0/0) other than HTTP/HTTPS port.
Find Azure MySQL (PaaS) instance reachable from untrust internet source on TCP port 3306.
Kubernetes Use Cases
RQL
Find K8s Services that are Internet Facing on EKS clusters on AWS.
Find K8s Services that are Internet Facing on AKS clusters in Azure.
Find K8s Services that are Internet Facing on GKE clusters in GCP.
Scope down searches on a specific cluster and namespace.
Search by using tags.
Identify K8s Services that are Internet Facing over a non-standard port.
Find if a specific container image is associated with deployed pods that are Internet exposed.
Last updated
Was this helpful?

