Skip to content
KitploitKITPLOIT
도구블로그
제출
도구블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

··피드·문의·개인정보·© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
LOAD — Lord Of Active Directory - AWS에서 취약한 Active Directory 자동 구축 | Kitploit
도구/GitHubGitHub/0xballpoint/load
Cloud Infrastructure SecuritySecurity VirtualizationPenetration TestingLearning & EducationRed TeamingLabs & Practice
GitHub0xballpoint/load

LOAD

Lord Of Active Directory - AWS에서 취약한 Active Directory 자동 구축

저장소 보기
156132년 전Kitploit 검토 완료

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유
웹사이트

load.jpg

소개

AWS-Redteam-Lab 및 OCD GOAD 기반

한 달 동안 125시간 동안 랩을 실행하는 비용은 약 $14입니다. Free Tier에서는 월 750시간의 EC2를 제공하며, 머신이 6대이므로 125시간입니다. 하지만 스토리지는 30GB만 제공됩니다. 따라서 나머지 5개 VM을 위한 스토리지가 필요합니다: 30GB * 5 = 150GB = 월 14달러

설치

GOAD 프로젝트와 마찬가지로 설치도 두 부분으로 나뉩니다:

  • providing : terraform으로 만들어지며 AWS VPC, 네트워크 및 EC2(가상 머신)를 구성합니다.
  • provisioning : ansible으로 만들어지며 액티브 디렉터리 네트워크처럼 랩을 실행하기 위한 모든 것을 설치합니다.

프로비저닝

요구 사항

지금까지 랩은 Linux 머신에서만 테스트되었지만 macOS에서도 작동할 것입니다. Ansible은 Windows 호스트에서 문제가 있으므로 그것에 대해서는 잘 모르겠습니다.

설정이 제대로 작동하려면 다음을 설치해야 합니다:

Ansible

Docker로 Ansible 사용

Docker 컨테이너에서 프로비저닝을 수행하려면 다음 명령을 실행하여 컨테이너를 준비할 수 있습니다.

root@kitploit:~
sudo docker build -t loadansible .

호스트에서 Ansible 사용

호스트에서 Ansible을 실행하려면 다음 명령을 실행해야 합니다:

  1. Python >= 3.8 가상 환경 생성
root@kitploit:~
sudo apt install git
git clone [email protected]:0xBallpoint/LOAD.git
cd LOAD/ansible
sudo apt install python3.8-venv
python3.8 -m virtualenv .venv
source .venv/bin/activate
  1. .venv에 ansible 및 pywinrm 설치
    • ansible은 공식 웹사이트의 자세한 가이드 ansible를 따르세요.
    • ansible-core (2.12)로 테스트됨
    • pywinrm: pywinrm 패키지가 설치되어 있는지 확인하세요.
root@kitploit:~
python3 -m pip install --upgrade pip
python3 -m pip install ansible-core==2.12.6
python3 -m pip install pywinrm
  1. 모든 ansible-galaxy 요구 사항 설치
    • ansible windows
    • ansible community.windows
    • ansible community.general
root@kitploit:~
ansible-galaxy install -r requirements.yml

Terraform

Terraform을 설치하려면 공식 웹사이트의 가이드 hashicorp.com를 따라야 합니다.

Linux에 Terraform을 수동으로 설치하려면:

root@kitploit:~
sudo apt-get update && sudo apt-get install -y gnupg software-properties-common

# Install the HasiCorp GPG key
wget -O- https://apt.releases.hashicorp.com/gpg | \
    gpg --dearmor | \
    sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg

# Verify the key's fingerprint
gpg --no-default-keyring \
    --keyring /usr/share/keyrings/hashicorp-archive-keyring.gpg \
    --fingerprint
# It must match E8A0 32E0 94D8 EB4E A189 D270 DA41 8C88 A321 9F7B (from https://www.hashicorp.com/security)

# Add the official HashiCorp repository to your system
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] \
    https://apt.releases.hashicorp.com $(lsb_release -cs) main" | \
    sudo tee /etc/apt/sources.list.d/hashicorp.list

# Update, install, verify
sudo apt update
sudo apt install terraform
terraform -help

AWS CLI

AWS에 액세스 키를 구성하려면 AWS CLI가 필요합니다. 공식 웹사이트의 설치 가이드 docs.aws.amazon.com를 따르세요.

Linux의 경우:

root@kitploit:~
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install

시작 / 설정

기본 도메인은 middle-earth.local이며, 서브넷은 10.0.1.0/24입니다. 각 머신에는 1CPU와 1024MB 메모리(t2.micro)만 할당되었습니다. 이러한 성능 설정 중 일부를 변경하려면 terraform/ami-instance.tf 파일을 수정할 수 있습니다.

랩을 실행하려면 다음 명령을 수행하세요:

VM 생성

root@kitploit:~
pwd
/opt/LOAD  # place yourself in the LOAD folder (where you cloned the project)
cd terraform # start with AWS configuration

다음 단계는 AWS에서 VM을 구성하는 방법을 보여줍니다:

  1. var.tf.example을 var.tf로 복사하고 값을 변경합니다:

    • REGION : 원하는 리전에 따라 변경
    • MANAGEMENT_IPS : 랩에 접근할 수 있는 IPv4 주소 추가
  2. AWS 콘솔에서 terraform 사용자를 생성하고 AWS 키를 받아야 합니다:

    • https://us-east-1.console.aws.amazon.com/iamv2/home#/users 로 이동
    • 사용자 이름: terraform
    • AWS 자격 증명 유형 선택: Access key - Programmatic access
    • 원하는 권한 추가
    • 사용자 생성
    • Access key ID 및 Secret access key 복사
  3. AWS CLI를 사용하여 머신에 키를 추가합니다:

root@kitploit:~
aws configure --profile terraform
    AWS Access Key ID [None]: <access_key_id>
    AWS Secret Access Key [None]: <secret_access_key>
  1. terraform용 SSH 키를 생성합니다:
root@kitploit:~
cd LOAD
ssh-keygen -t rsa -N "" -b 2048 -C "TerraformKey" -f ./terraform/keys/TerraformKey.pem
  1. Terraform 실행
root@kitploit:~
terraform init
terraform apply

랩을 삭제하려면:

root@kitploit:~
terraform destroy

VM 프로비저닝

EC2 인스턴스가 시작될 때마다 ansible/hosts 파일에서 공용 IP를 변경해야 합니다. 이 명령의 출력을 파일 끝에 추가하세요:

root@kitploit:~
aws ec2 describe-instances --profile terraform --region eu-central-1 --query "Reservations[*].Instances[*].{Name:Tags[?Key=='Name'].Value|[],PublicIP:PublicIpAddress}" --filters "Name=instance-state-name,Values=running" --output text |tac |awk 'NR%2 ==0 {print $0}; NR%2 != 0 {print "["tolower(substr($2,5))"]"};'

VM을 구성하려면 ansible-playbook 명령을 사용하세요. 일반적인 실행 시간: 1시간 30분

root@kitploit:~
ansible-playbook main.yml # this will configure the vms in order to play ansible when the vms are ready

Docker 컨테이너에서 프로비저닝을 실행하려면 다음을 실행하세요(Dockerfile과 같은 폴더에 있어야 합니다. 아직 테스트되지 않음):

root@kitploit:~
sudo docker run -ti --rm --network host -h loadansible -v $(pwd):/load -w /load/ansible loadansible ansible-playbook main.yml

설치 중에 오류가 발생할 수 있습니다. 대부분의 경우 플레이북을 다시 실행하면 작동합니다.

플레이북을 하나씩 실행하려면:

root@kitploit:~
# The main.yml playbook is build in multiples parts. each parts can be re-run independently but the play order must be keep in cas you want to play one by one :

ansible-playbook prepare.yml         # updates, passwords, dns settings...
ansible-playbook ad-servers.yml      # create servers configuration
ansible-playbook ad-trusts.yml       # create the trust relationships
ansible-playbook ad-data.yml         # import the ad datas : users/groups...
ansible-playbook ad-groups.yml       # set the rights and the group domains relations
ansible-playbook servers.yml         # create IIS and MSSQL
ansible-playbook adcs.yml            # add adcs and adcs templates
ansible-playbook ad-acl.yml          # set ACL
ansible-playbook linux.yml           # configure linux entrypoint with GLPI

ansible-playbook security.yml        # enable or disable windows defender here
ansible-playbook vulnerabilities.yml # specifics vulns linked to the scenario are here

# You can also install wireguard VPN on the linux host, for that check the VPN paragraph

플레이북의 특정 부분만 실행하려면 태그를 사용할 수 있습니다(항상 data를 태그로 넣으세요):

root@kitploit:~
ansible-playbook servers.yml
ansible-playbook servers.yml --tags data,iis
ansible-playbook linux.yml --tags data,glpi

AWS CLI

AWS 랩을 관리하는 데 도움이 되는 몇 가지 명령(지저분하지만 작동합니다):

root@kitploit:~
# aws cli profile : terraform
# region : eu-central-1 

# Disable instance metadata
for i in $(aws ec2 --profile terraform --region eu-central-1 describe-instances --filters "Name=tag:Name,Values=lab-*" --query 'Reservations[].Instances[].InstanceId' |cut -d '"' -f2); do aws ec2 --profile terraform --region eu-central-1 modify-instance-metadata-options --http-endpoint disabled --instance-id $i --output json --no-cli-pager;done

# Start instances
aws ec2 --profile terraform --region eu-central-1 start-instances --instance-ids `aws ec2 --profile terraform --region eu-central-1 describe-instances --filters "Name=tag:Name,Values=lab-*" "Name=instance-state-name,Values=stopping,stopped" --query 'Reservations[].Instances[].InstanceId' --output text`

# Get running instance and output it to ansible format
aws ec2 describe-instances --profile terraform --region eu-central-1 --query "Reservations[*].Instances[*].{Name:Tags[?Key=='Name'].Value|[],PublicIP:PublicIpAddress}" --filters "Name=instance-state-name,Values=running" --output text |tac |awk 'NR%2 ==0 {print $0}; NR%2 != 0 {print "["tolower(substr($2,5))"]"};'

VPN 서버

선택적으로 Linux 호스트에 VPN 서버를 추가하고 원하는 만큼 많은 클라이언트를 구성할 수 있습니다.

VPN 서버용 키를 생성하고 클라이언트 수를 변경하는 것부터 시작합니다:

root@kitploit:~
apt install wireguard

# generate wireguard keys
privkey=$(wg genkey) sh -c 'echo "
    server_privkey: $privkey
    server_pubkey: $(echo $privkey | wg pubkey)"'

# encrypt server_privkey with ansible-vault and 
ansible-vault encrypt_string --ask-vault-password --stdin-name server_privkey

# Add the result to group_vars/all.yml
# You can change the number of client configuration files it will create. By default it creates 6 clients.

다음 명령으로 VPN 플레이북을 실행합니다(명령을 실행할 때마다 클라이언트 키가 변경됩니다):

root@kitploit:~
ansible-playbook --ask-vault-password vpn.yml

Timeout (12s) waiting for privilege escalation prompt 오류가 발생하면 명령을 다시 실행하세요.

클라이언트 구성 파일은 ansible/wireguard/lab_client[0-9].conf에서 찾을 수 있습니다.

VPN에 연결하려면 개인 키가 포함된 클라이언트 파일을 로컬 호스트의 /etc/wireguard/에 복사해야 합니다.

첫 번째 클라이언트의 VPN 연결은 다음과 같이 시작합니다:

root@kitploit:~
sudo wg-quick up lab_client1

10.0.20.0/24 대역의 IP를 받게 됩니다.

취약점

schema

LINUX

root@kitploit:~
SHIRE (srv02)
    - GLPI SQLi
    - GLPI-htmlawed-CVE-2022-35914

USERS
    - privesc user with vulnerable crontab
    - privesc root with password in bash_history and sudo nopasswd for /bin/systemctl

ERIADOR.MIDDLE-EARTH.LOCAL

root@kitploit:~
RIVENDELL (dc02)
    - anonymous RPC (enum users, pass pol, groups / rpcclient)
    - brute force users names

ELF
    - celebrian    Responder crack hash (bot 3min)
    - elrond:      Responder with NTLM relay domain admin (bot 5min)

HOBBIT
    - bilbo:       password in description
    - pippin:      ASREPROAST 
    - merry:       Constrained delegation with protocol transition / Kerberoasting
    - froddo:
    - sam:

MIDDLE-EARTH.LOCAL

root@kitploit:~
MINAS-TIRITH(dc01)
    - Open share RW, LNK exploit
    - khamul.easterling : Open backup share, with GPO with cpassword, password increment

MORIA (srv01)
    - MSSQL trusted link : donPapi to get sql_svc password
    - mitm6 SRV01 -> DC01

MEN
    - denethor:    DOMAIN ADMIN
    - theoden:     ACL self-self-membership-on-group DOMAIN ADMIN
    - faramir:     ACL genericwrite-on-user Denethor
    - boromir:     ACL genericall-on-user Denethor
                   ACL forcechangepassword on Faramir 
                   WriteDACL MEN 

FELLOWSHIP
    - legolas:     execute as user on MSSQL
                   KERBEROASTING 
    - gimli:       ACL genericall-on-computer MORIA
                   ACL writeproperty-self-membership DOMAIN ADMIN
    - aragorn:     execute as login on mssql / administrator
    - gandalf:     mssql admin
                   group cross domain
                   mssql trusted link
                   ACL writeproperty-self-membership Domain Admins #TODO change for someone who is not administrator, he has DCSYNC (administrator?)

ENTS
    - treebeard:   ACL writeproperty-on-group DOMAIN ADMIN
    - skinbark:    ACL genericall-on-group DOMAIN ADMIN
    - ginglas:     ACL write owner on group DOMAIN ADMIN

MORDOR.LOCAL

컴퓨터

root@kitploit:~
BARAD-DUR (dc03)
    - Coerced DC + ntlmrelayx to ldaps
    - ADCS ESC1, ESC2, ESC3, ESC4, ESC8
    - NTLM downgrade attack

MINAS-MORGL (srv03)
    - IIS upload webshell
    - Privilege escalation Windows 2016 : SeImpersontePrivilege

DARKFORCE
    - sauron:     domain admin MORDOR
    - saruman:    mssql admin / GenericAll on gothmog (shadow credentials) / GenericAll on ECS4
    - balrog:

PRISONER
    - gollum:     mssql trusted link
                  password spray -> user=pwd
ORC
    - gothmog:    DOMAIN ADMIN
    - lurtz:
    - ugluk:
    - guritz:

NAZGUL
    - angmar:

할 일

  • Linux 서버를 AD에 연결하여 SSH 사용
  • sam에서 RemotePotato0
  • GLPI 자격 증명 자동 변경
  • LAPS
도구 다운로드