Project: KICS (Provisioning / Security & Compliance)
File: eda7301d-1f3e-47cf-8d4e-976debc64341.md

title: Remote Desktop Port Open To Internet hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: eda7301d-1f3e-47cf-8d4e-976debc64341 Query name: Remote Desktop Port Open To Internet Platform: Ansible Severity: <span style="color:#bb2124">High</span> Category: Networking and Firewall URL: The Remote Desktop port is open to the internet in a Security Group<br> ```yaml title="Positive test num. 1 - yaml file" hl_lines="64 36 9 79 49 23 93" name: example ec2 group1 amazon.aws.ec2_group: name: example description: an example EC2 group vpc_id: 12345 region: eu-west-1 awssecretkey: SECRET awsaccesskey: ACCESS rules: proto: tcp from_port: 3380 to_port: 3450 cidr_ip: 0.0.0.0/0 name: example ec2 group2 amazon.aws.ec2_group: name: example2 description: an example EC2 group vpc_id: 12345 region: eu-west-1 awssecretkey: SECRET awsaccesskey: ACCESS rules: proto: tcp ports: 3389 cidr_ip: 0.0.0.0/0 name: example ec2 group3 amazon.aws.ec2_group: name: example3 description: an example EC2 group vpc_id: 12345 region: eu-west-1 awssecretkey: SECRET awsaccesskey: ACCESS rules: proto: tcp ports: 3380-3450 cidr_ip: 0.0.0.0/0 name: example ec2 group4 amazon.aws.ec2_group: name: example4 description: an example EC2 group vpc_id: 12345 region: eu-west-1 awssecretkey: SECRET awsaccesskey: ACCESS rules: proto: tcp ports: 80 3380-3450 cidr_ip: 0.0.0.0/0 name: example ec2 group5 amazon.aws.ec2_group: name: example5 description: an example EC2 group vpc_id: 12345 region: eu-west-1 awssecretkey: SECRET awsaccesskey: ACCESS rules: proto: tcp ports: 3389 10-50 cidr_ip: 0.0.0.0/0 name: example ec2 group6 amazon.aws.ec2_group: name: example1 description: an example EC2 group vpc_id: 12345 region: eu-west-1 awssecretkey: SECRET awsaccesskey: ACCESS rules: proto: tcp from_port: -1 to_port: 25 cidr_ip: 0.0.0.0/0 name: example ec2 group7 amazon.aws.ec2_group: name: example1 description: an example EC2 group vpc_id: 12345 region: eu-west-1 awssecretkey: SECRET awsaccesskey: ACCESS rules: proto: tcp from_port: 15 to_port: -1 cidr_ip: 0.0.0.0/0 ``` ```yaml title="Negative test num. 1 - yaml file" name: example ec2 group1 amazon.aws.ec2_group: name: example description: an example EC2 group vpc_id: 12345 region: eu-west-1 awssecretkey: SECRET awsaccesskey: ACCESS rules: proto: tcp from_port: 3380 to_port: 3450 cidr_ip: 0.0.0.0/1 name: example ec2 group2 amazon.aws.ec2_group: name: example2 description: an example EC2 group vpc_id: 12345 region: eu-west-1 awssecretkey: SECRET awsaccesskey: ACCESS rules: proto: tcp ports: 3389 cidr_ip: 0.0.1.0/0 name: example ec2 group3 amazon.aws.ec2_group: name: example3 description: an example EC2 group vpc_id: 12345 region: eu-west-1 awssecretkey: SECRET awsaccesskey: ACCESS rules: proto: tcp ports: 3380-3450 cidr_ip: 0.1.0.0/0 name: example ec2 group4 amazon.aws.ec2_group: name: example4 description: an example EC2 group vpc_id: 12345 region: eu-west-1 awssecretkey: SECRET awsaccesskey: ACCESS rules: proto: tcp ports: 80 3380-3450 cidr_ip: 10.0.0.0/0 name: example ec2 group5 amazon.aws.ec2_group: name: example5 description: an example EC2 group vpc_id: 12345 region: eu-west-1 awssecretkey: SECRET awsaccesskey: ACCESS rules: proto: tcp ports: 3389 10-50 cidr_ip: 10.0.0.0/0 name: example ec2 group6 amazon.aws.ec2_group: name: example1 description: an example EC2 group vpc_id: 12345 region: eu-west-1 awssecretkey: SECRET awsaccesskey: ACCESS rules: proto: tcp from_port: -1 to_port: 25 cidr_ip: 0.1.0.0/0 name: example ec2 group7 amazon.aws.ec2_group: name: example1 description: an example EC2 group vpc_id: 12345 region: eu-west-1 awssecretkey: SECRET awsaccesskey: ACCESS rules: proto: tcp from_port: 15 to_port: -1 cidr_ip: 0.0.0.1/0 ```