Skip to content

Commit

Permalink
updated lab to remove util
Browse files Browse the repository at this point in the history
  • Loading branch information
sussurro committed Oct 3, 2021
1 parent e8eb097 commit 471528e
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 120 deletions.
28 changes: 0 additions & 28 deletions ch07/Lab/ansible/roles/util_customizations/tasks/main.yml

This file was deleted.

26 changes: 0 additions & 26 deletions ch07/Lab/fixup.sh

This file was deleted.

11 changes: 0 additions & 11 deletions ch07/Lab/terminate-util.sh

This file was deleted.

26 changes: 0 additions & 26 deletions ch07/Lab/terraform/aws_hosts.tf
Original file line number Diff line number Diff line change
Expand Up @@ -88,29 +88,3 @@ resource "aws_instance" "ghh_target" {
}


resource "aws_instance" "ghh_util" {
ami = data.aws_ami.ghh-2016.id
instance_type = "t2.large"


key_name = var.key_name

subnet_id = aws_subnet.this.id

vpc_security_group_ids = [aws_security_group.ghh_windows.id]
associate_public_ip_address = true
get_password_data = "true"
private_ip = "10.0.0.30"
user_data_base64 = base64encode(local.dc-userdata)


root_block_device {
volume_size = 200
}



tags = {
Name = "ghh-target"
}
}
19 changes: 0 additions & 19 deletions ch07/Lab/terraform/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
output "dc_password" { value = rsadecrypt(aws_instance.ghh_dc.password_data, file(var.key_path)) }
output "target_password" { value = rsadecrypt(aws_instance.ghh_target.password_data, file(var.key_path)) }
output "util_password" { value = rsadecrypt(aws_instance.ghh_util.password_data, file(var.key_path)) }

output "dc_ip" { value = try(aws_instance.ghh_dc.public_ip,null) }
output "target_ip" { value = try(aws_instance.ghh_target.public_ip,null) }
output "util_ip" { value = try(aws_instance.ghh_util.public_ip,null) }
output "kali_ip" { value = try(aws_instance.kali.public_ip,null) }


Expand Down Expand Up @@ -44,23 +42,6 @@ resource "local_file" "target_inv" {
)
filename = "../ansible/inventory/target.yml"
}
resource "local_file" "util_inv" {
content = templatefile("./inventory.tmpl",
{
cat = "util",
ip_addrs = [aws_instance.ghh_util.public_ip]
vars = ["ansible_connection: winrm",
"ansible_user: Administrator",
"ansible_winrm_scheme: http",
"ansible_winrm_transport: basic",
"ansible_winrm_server_cert_validation: ignore",
"ansible_winrm_port: 5985",
"ansible_password: ${var.dc_password}"
]
}
)
filename = "../ansible/inventory/util.yml"
}
resource "local_file" "kali_inv" {
content = templatefile("./inventory.tmpl",
{
Expand Down
10 changes: 0 additions & 10 deletions ch07/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ The following VMs will be setup for this lab:
- IP: 10.0.0.20
- Target User: target
- Target Password: Winter2021!
- Util Computer
- IP: 10.0.0.30
- User: Administrator
- Password: GrayHathack1ing!
- Kali Computer
- IP: 10.0.0.40
- User: kali
Expand Down Expand Up @@ -49,12 +45,6 @@ This is the system you will be attacking during the lab. It should be the only s
the Kali box that you would need to interact with in the lab environment unless you
do additional work on your own.

### Util box
This box builds a number of tools that we will build in the lab so you can have
experience with the latest versions of the tools. If you do not want to use this box
for experimentation, building tools, or other tasks it can be destroyed after
the lab is provisioned. There is a terminate-util.sh script for this task.

### Kali box
This is the Kali attack system that will be used in the lab.

Expand Down

0 comments on commit 471528e

Please sign in to comment.