attack_range icon indicating copy to clipboard operation
attack_range copied to clipboard

Default whitelist parameter opens everything to the world we should force users to put in their public IP

Open josehelps opened this issue 6 years ago • 5 comments

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 .

josehelps avatar Aug 17 '20 16:08 josehelps

Suggest a 2-pronged approach.

  1. 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.
  2. 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..

rvaldez617 avatar Aug 17 '20 16:08 rvaldez617

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"])
  }

ghoto avatar Aug 17 '20 16:08 ghoto

  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]
  }

ghoto avatar Aug 17 '20 17:08 ghoto

created a PR for https://github.com/splunk/attack_range/pull/332 : not allowed anymore!

patel-bhavin avatar Aug 18 '20 00:08 patel-bhavin

Should be improved with the latest changes

P4T12ICK avatar Aug 26 '20 12:08 P4T12ICK