From 723a0c67ccc29743efeac46d542188c1c74a4526 Mon Sep 17 00:00:00 2001 From: Yoavast <98748304+Yoavast@users.noreply.github.com> Date: Wed, 31 May 2023 16:25:52 +0300 Subject: [PATCH 1/2] Delete Dockerfile --- Dockerfile | 38 -------------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index b04b9f7..0000000 --- a/Dockerfile +++ /dev/null @@ -1,38 +0,0 @@ -FROM debian:9.2 - -LABEL maintainer "opsxcq@strm.sh" - -RUN apt-get update && \ - apt-get upgrade -y && \ - DEBIAN_FRONTEND=noninteractive apt-get install -y \ - debconf-utils && \ - echo mariadb-server mysql-server/root_password password vulnerables | debconf-set-selections && \ - echo mariadb-server mysql-server/root_password_again password vulnerables | debconf-set-selections && \ - DEBIAN_FRONTEND=noninteractive apt-get install -y \ - apache2 \ - mariadb-server \ - php \ - php-mysql \ - php-pgsql \ - php-pear \ - php-gd \ - && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* - -COPY php.ini /etc/php5/apache2/php.ini -COPY dvwa /var/www/html - -COPY config.inc.php /var/www/html/config/ - -RUN chown www-data:www-data -R /var/www/html && \ - rm /var/www/html/index.html - -RUN service mysql start && \ - sleep 3 && \ - mysql -uroot -pvulnerables -e "CREATE USER app@localhost IDENTIFIED BY 'vulnerables';CREATE DATABASE dvwa;GRANT ALL privileges ON dvwa.* TO 'app'@localhost;" - -EXPOSE 80 - -COPY main.sh / -ENTRYPOINT ["/main.sh"] From e3721370ae88ae2fa14ab4817b4c1b08b3732d57 Mon Sep 17 00:00:00 2001 From: Yoavast <98748304+Yoavast@users.noreply.github.com> Date: Wed, 31 May 2023 16:26:21 +0300 Subject: [PATCH 2/2] Delete terraform_examples directory --- terraform_examples/negative1.tf | 20 ------ terraform_examples/negative2.tf | 114 -------------------------------- terraform_examples/positive1.tf | 20 ------ terraform_examples/positive2.tf | 113 ------------------------------- 4 files changed, 267 deletions(-) delete mode 100644 terraform_examples/negative1.tf delete mode 100644 terraform_examples/negative2.tf delete mode 100644 terraform_examples/positive1.tf delete mode 100644 terraform_examples/positive2.tf diff --git a/terraform_examples/negative1.tf b/terraform_examples/negative1.tf deleted file mode 100644 index 1c10336..0000000 --- a/terraform_examples/negative1.tf +++ /dev/null @@ -1,20 +0,0 @@ -resource "aws_lb_listener" "listener55" { - load_balancer_arn = aws_lb.test33.arn - port = 80 - default_action { - type = "redirect" - - redirect { - port = "80" - protocol = "HTTPS" - status_code = "HTTPS_301" - } - } -} - -resource "aws_lb" "test33" { - name = "test123" - load_balancer_type = "application" - subnets = [aws_subnet.subnet1.id, aws_subnet.subnet2.id] - internal = true -} diff --git a/terraform_examples/negative2.tf b/terraform_examples/negative2.tf deleted file mode 100644 index 925e6d0..0000000 --- a/terraform_examples/negative2.tf +++ /dev/null @@ -1,114 +0,0 @@ -provider "aws2" { - profile = "default" - region = "us-west-2" -} - -data "aws_availability_zones" "available2" { - state = "available" -} - -data "aws_ami" "ubuntu2" { - most_recent = true - - filter { - name = "name" - values = ["ubuntu/images/hvm-ssd/ubuntu-xenial-16.04-amd64-server-*"] - } - - filter { - name = "virtualization-type" - values = ["hvm"] - } - - owners = ["099720109477"] # Canonical -} - -resource "aws_vpc" "vpc1" { - cidr_block = "10.10.0.0/16" -} - -resource "aws_subnet" "subnet12" { - vpc_id = aws_vpc.vpc1.id - cidr_block = "10.10.10.0/24" - availability_zone_id = data.aws_availability_zones.available2.zone_ids[0] - tags = { - Name = "subnet1" - } -} - -resource "aws_subnet" "subnet22" { - vpc_id = aws_vpc.vpc1.id - cidr_block = "10.10.11.0/24" - availability_zone_id = data.aws_availability_zones.available2.zone_ids[1] - - tags = { - Name = "subnet2" - } -} - -resource "aws_lb" "test2" { - name = "test123" - load_balancer_type = "application" - subnets = [aws_subnet.subnet12.id, aws_subnet.subnet22.id] - internal = true -} - -resource "aws_lb_target_group" "test2" { - port = 80 - protocol = "HTTP" - target_type = "instance" - vpc_id = aws_vpc.vpc1.id -} - -resource "aws_default_security_group" "dsg2" { - vpc_id = aws_vpc.vpc1.id -} - -resource "aws_lb_listener" "listener2" { - load_balancer_arn = aws_lb.test2.arn - protocol = "HTTPS" - port = 80 - default_action { - type = "forward" - target_group_arn = aws_lb_target_group.test2.arn - } -} - -resource "aws_lb_target_group_attachment" "attach12" { - target_group_arn = aws_lb_target_group.test2.arn - target_id = aws_instance.inst12.id - port = 80 -} - -resource "aws_instance" "inst12" { - vpc_security_group_ids = [aws_default_security_group.dsg2.id] - subnet_id = aws_subnet.subnet12.id - ami = data.aws_ami.ubuntu2.id - instance_type = "t3.micro" -} - -resource "aws_lb_target_group_attachment" "attach22" { - target_group_arn = aws_lb_target_group.test2.arn - target_id = aws_instance.inst22.id - port = 80 -} - -resource "aws_instance" "inst22" { - vpc_security_group_ids = [aws_default_security_group.dsg2.id] - subnet_id = aws_subnet.subnet12.id - ami = data.aws_ami.ubuntu2.id - instance_type = "t3.micro" -} - -resource "aws_lb_target_group_attachment" "attach32" { - target_group_arn = aws_lb_target_group.test2.arn - target_id = aws_instance.inst32.id - port = 80 -} - -resource "aws_instance" "inst32" { - vpc_security_group_ids = [aws_default_security_group.dsg2.id] - subnet_id = aws_subnet.subnet12.id - ami = data.aws_ami.ubuntu2.id - instance_type = "t3.micro" -} diff --git a/terraform_examples/positive1.tf b/terraform_examples/positive1.tf deleted file mode 100644 index 532c415..0000000 --- a/terraform_examples/positive1.tf +++ /dev/null @@ -1,20 +0,0 @@ -resource "aws_lb_listener" "listener5" { - load_balancer_arn = aws_lb.test3.arn - port = 80 - default_action { - type = "redirect" - - redirect { - port = "80" - protocol = "HTTP" - status_code = "HTTP_301" - } - } -} - -resource "aws_lb" "test3" { - name = "test123" - load_balancer_type = "application" - subnets = [aws_subnet.subnet1.id, aws_subnet.subnet2.id] - internal = true -} diff --git a/terraform_examples/positive2.tf b/terraform_examples/positive2.tf deleted file mode 100644 index dcac590..0000000 --- a/terraform_examples/positive2.tf +++ /dev/null @@ -1,113 +0,0 @@ -provider "aws" { - profile = "default" - region = "us-west-2" -} - -data "aws_availability_zones" "available" { - state = "available" -} - -data "aws_ami" "ubuntu" { - most_recent = true - - filter { - name = "name" - values = ["ubuntu/images/hvm-ssd/ubuntu-xenial-16.04-amd64-server-*"] - } - - filter { - name = "virtualization-type" - values = ["hvm"] - } - - owners = ["099720109477"] # Canonical -} - -resource "aws_vpc" "vpc1" { - cidr_block = "10.10.0.0/16" -} - -resource "aws_subnet" "subnet1" { - vpc_id = aws_vpc.vpc1.id - cidr_block = "10.10.10.0/24" - availability_zone_id = data.aws_availability_zones.available.zone_ids[0] - tags = { - Name = "subnet1" - } -} - -resource "aws_subnet" "subnet2" { - vpc_id = aws_vpc.vpc1.id - cidr_block = "10.10.11.0/24" - availability_zone_id = data.aws_availability_zones.available.zone_ids[1] - - tags = { - Name = "subnet2" - } -} - -resource "aws_lb" "test" { - name = "test123" - load_balancer_type = "application" - subnets = [aws_subnet.subnet1.id, aws_subnet.subnet2.id] - internal = true -} - -resource "aws_lb_target_group" "test" { - port = 80 - protocol = "HTTP" - target_type = "instance" - vpc_id = aws_vpc.vpc1.id -} - -resource "aws_default_security_group" "dsg" { - vpc_id = aws_vpc.vpc1.id -} - -resource "aws_lb_listener" "listener" { - load_balancer_arn = aws_lb.test.arn - port = 80 - default_action { - type = "forward" - target_group_arn = aws_lb_target_group.test.arn - } -} - -resource "aws_lb_target_group_attachment" "attach1" { - target_group_arn = aws_lb_target_group.test.arn - target_id = aws_instance.inst1.id - port = 80 -} - -resource "aws_instance" "inst1" { - vpc_security_group_ids = [aws_default_security_group.dsg.id] - subnet_id = aws_subnet.subnet1.id - ami = data.aws_ami.ubuntu.id - instance_type = "t3.micro" -} - -resource "aws_lb_target_group_attachment" "attach2" { - target_group_arn = aws_lb_target_group.test.arn - target_id = aws_instance.inst2.id - port = 80 -} - -resource "aws_instance" "inst2" { - vpc_security_group_ids = [aws_default_security_group.dsg.id] - subnet_id = aws_subnet.subnet1.id - ami = data.aws_ami.ubuntu.id - instance_type = "t3.micro" -} - -resource "aws_lb_target_group_attachment" "attach3" { - target_group_arn = aws_lb_target_group.test.arn - target_id = aws_instance.inst3.id - port = 80 -} - -resource "aws_instance" "inst3" { - vpc_security_group_ids = [aws_default_security_group.dsg.id] - subnet_id = aws_subnet.subnet1.id - ami = data.aws_ami.ubuntu.id - instance_type = "t3.micro" -}