Default whitelist parameter opens everything to the world we should force users to put in their public IP
https://github.com/splunk/attack_range/blob/9c1e032244422f50d85ff44c5911c91a3f6be939/attack_range.conf#L17
We have had multiple AWS abuse complains that due to port 389 on windows machine is left open on instances that the default was not changes, it gets abused by attackers for UDP amplification attacks when ranges are left running longer than 24h with everything open.
An alternative solution is to tighten down the ACLs and only allow in publicly ssh and http ports for splunk .
Suggest a 2-pronged approach.
- add a parameter so that customers can specify a security group to apply to the attack_range instances. The theory is that customers who use this will probably create their own and can then just assign it in the conf file.
- If no security group is defined by the customer, and the default 0.0.0.0/0 hasn't been changed, we restrict incoming ports to ssh/rdp/splunk ports/caldera? Maybe we do that anyway..
Perhaps we can just let external Splunk ports open, SSH and RDP. For inter-machine communication they just use local ip addresses 10.0.0.0/16
Current code attack_range/terraform/modules/network/resources.tf
resource "aws_security_group" "default" {
name = "sg_public_subnets_${var.config.key_name}"
vpc_id = module.vpc.vpc_id
ingress {
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = concat([var.config.ip_whitelist], ["10.0.0.0/16"])
}
ingress {
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = ["10.0.0.0/16"]
}
ingress {
from_port = 0
to_port = 22
protocol = "tcp"
cidr_blocks = [var.config.ip_whitelist]
}
ingress {
from_port = 0
to_port = 8000
protocol = "tcp"
cidr_blocks = [var.config.ip_whitelist]
}
ingress {
from_port = 0
to_port = 3389
protocol = "-1"
cidr_blocks = [var.config.ip_whitelist]
}
created a PR for https://github.com/splunk/attack_range/pull/332 : not allowed anymore!
Should be improved with the latest changes