diff --git a/envs/monkey_maker/README.md b/envs/monkey_maker/README.md new file mode 100644 index 000000000..d80a211e1 --- /dev/null +++ b/envs/monkey_maker/README.md @@ -0,0 +1,57 @@ +# Monkey maker + +## About + +Monkey maker is an environment on AWS that +is designed for monkey binary building. +This environment is deployed using terraform scripts +located in this directory. + +## Setup + +To setup you need to put `accessKeys` file into `./aws_keys` directory. + +Contents of `accessKeys` file should be as follows: + +```ini +[default] +aws_access_key_id = <...> +aws_secret_access_key = <...> +``` +Also review `./terraform/config.tf` file. + +Launch the environment by going into `terraform` folder and running +``` +terraform init +terraform apply +``` + +## Usage + +To login to windows use Administrator: %HwuzI!Uzsyfa=cB*XaQ6xxHqopfj)h) credentials + +You'll find docker files in `/home/ubuntu/docker_envs/linux/...` + +To build docker image for 32 bit linux: +``` +cd /home/ubuntu/docker_envs/linux/py3-32 +sudo docker build -t builder32 . +``` + +To build docker image for 64 bit linux: +``` +cd /home/ubuntu/docker_envs/linux/py3-64 +sudo docker build -t builder64 . +``` + +To build 32 bit monkey binary: +``` +cd /home/ubuntu/monkey_folder/monkey +sudo docker run -v "$(pwd):/src" builder32 -c "export SRCDIR=/src/infection_monkey && /entrypoint.sh" +``` + +To build 64 bit monkey binary: +``` +cd /home/ubuntu/monkey_folder/monkey +sudo docker run -v "$(pwd):/src" builder64 -c "export SRCDIR=/src/infection_monkey && /entrypoint.sh" +``` diff --git a/envs/monkey_maker/aws_keys/.gitignore b/envs/monkey_maker/aws_keys/.gitignore new file mode 100644 index 000000000..5e7d2734c --- /dev/null +++ b/envs/monkey_maker/aws_keys/.gitignore @@ -0,0 +1,4 @@ +# Ignore everything in this directory +* +# Except this file +!.gitignore diff --git a/envs/monkey_maker/terraform/config.tf b/envs/monkey_maker/terraform/config.tf new file mode 100644 index 000000000..9884c24a2 --- /dev/null +++ b/envs/monkey_maker/terraform/config.tf @@ -0,0 +1,5 @@ +provider "aws" { + version = "~> 2.0" + region = "eu-central-1" + shared_credentials_file = "../aws_keys/accessKeys" +} diff --git a/envs/monkey_maker/terraform/infra.tf b/envs/monkey_maker/terraform/infra.tf new file mode 100644 index 000000000..39937f974 --- /dev/null +++ b/envs/monkey_maker/terraform/infra.tf @@ -0,0 +1,61 @@ +resource "aws_vpc" "monkey_maker" { + cidr_block = "10.0.0.0/24" + enable_dns_support = true + tags = { + Name = "monkey_maker_vpc" + } +} + +resource "aws_internet_gateway" "monkey_maker_gateway" { + vpc_id = "${aws_vpc.monkey_maker.id}" + + tags = { + Name = "monkey_maker_gateway" + } +} + +// create routing table which points to the internet gateway +resource "aws_route_table" "monkey_maker_route" { + vpc_id = "${aws_vpc.monkey_maker.id}" + + route { + cidr_block = "0.0.0.0/0" + gateway_id = "${aws_internet_gateway.monkey_maker_gateway.id}" + } + + tags = { + Name = "monkey_maker_route" + } +} + +// associate the routing table with the subnet +resource "aws_route_table_association" "subnet-association" { + subnet_id = "${aws_subnet.main.id}" + route_table_id = "${aws_route_table.monkey_maker_route.id}" +} + +resource "aws_subnet" "main" { + vpc_id = "${aws_vpc.monkey_maker.id}" + cidr_block = "10.0.0.0/24" + + tags = { + Name = "Main" + } +} + +resource "aws_security_group" "monkey_maker_sg" { + name = "monkey_maker_sg" + description = "Allow remote access to the island" + vpc_id = "${aws_vpc.monkey_maker.id}" + + egress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } + + tags = { + Name = "monkey_maker_sg" + } +} diff --git a/envs/monkey_maker/terraform/instances.tf b/envs/monkey_maker/terraform/instances.tf new file mode 100644 index 000000000..b46f04910 --- /dev/null +++ b/envs/monkey_maker/terraform/instances.tf @@ -0,0 +1,25 @@ +resource "aws_instance" "island_windows" { + ami = "ami-033b3ef27f8d1881d" + instance_type = "t2.micro" + private_ip = "10.0.0.251" + subnet_id = "${aws_subnet.main.id}" + key_name = "monkey_maker" + tags = { + Name = "monkey_maker_windows" + } + vpc_security_group_ids = ["${aws_security_group.monkey_maker_sg.id}"] + associate_public_ip_address = true +} + +resource "aws_instance" "island_linux" { + ami = "ami-0495203541087740a" + instance_type = "t2.micro" + private_ip = "10.0.0.252" + subnet_id = "${aws_subnet.main.id}" + key_name = "monkey_maker" + tags = { + Name = "monkey_maker_linux" + } + vpc_security_group_ids = ["${aws_security_group.monkey_maker_sg.id}"] + associate_public_ip_address = true +} diff --git a/envs/monkey_zoo/docs/fullDocs.md b/envs/monkey_zoo/docs/fullDocs.md index a8c0687fc..e788bb36c 100644 --- a/envs/monkey_zoo/docs/fullDocs.md +++ b/envs/monkey_zoo/docs/fullDocs.md @@ -546,6 +546,38 @@ fullTest.conf is a good config to start, because it covers all machines. +
Nr. 12 Tunneling M4 +(10.2.0.12) |
+(Exploitable) | +
---|---|
OS: | +Windows server 2019 x64 | +
Default service’s port: | +445 | +
Root password: | +t67TC5ZDmz | +
Server’s config: | +Default | +
Notes: | +Accessible only trough Nr.10 | +
Operating System | -{asset.os.charAt(0).toUpperCase() + asset.os.slice(1)} | -||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
IP Addresses | -{asset.ip_addresses.map(val => {val} )} |
- ||||||||||||||||||||||||||||
Services | -{asset.services.map(val => {val} )} |
- ||||||||||||||||||||||||||||
- Accessible From - {this.generateToolTip('List of machine which can access this one using a network protocol')} - | -{asset.accessible_from_nodes.map(val => {val} )} |
- ||||||||||||||||||||||||||||
Status | -{(asset.dead) ? 'Dead' : 'Alive'} | -||||||||||||||||||||||||||||
- Force Kill - {this.generateToolTip('If this is on, monkey will die next time it communicates')} - | -
- |
- ||||||||||||||||||||||||||||
- Download Log - | -- this.downloadLog(asset)}>Download - | -
Operating System | -{edge.os.type} | -
---|---|
IP Address | -{edge.ip_address} | -
Services | -{edge.services.map(val => {val} )} |
-
Hostname | -{asset.hostname} | -
---|---|
IP Addresses | -{asset.ips.map(val => {val} )} |
-
Services | -{asset.services.map(val => {val} )} |
-
Compromised Users | -{asset.users.map(val => {val} )} |
-
Compromised Users | -{edge.users.map(val => {val} )} |
-
---|