Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
LOAD — Lord Of Active Directory - 在 AWS 上自动部署存在漏洞的 Active Directory 环境 | Kitploit
工具/GitHubGitHub/0xballpoint/load
云基础设施安全安全虚拟化渗透测试学习与教育红队实验室与实践
GitHub0xballpoint/load

LOAD

Lord Of Active Directory - 在 AWS 上自动部署存在漏洞的 Active Directory 环境

查看仓库
156132年前Kitploit 审核通过

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享
网站

load.jpg

简介

基于 AWS-Redteam-Lab 和 OCD GOAD

每月运行该实验环境 125 小时的费用约为 14 美元。 使用免费套餐,你每月可获得 750 小时的 EC2 使用时间,因为有 6 台机器,所以每台 125 小时。但你只有 30GB 的存储空间。因此,你还需要为其他 5 台虚拟机购买存储空间:30GB * 5 = 150GB = 14 美元/月

安装

与 GOAD 项目一样,安装分为两部分:

  • providing:它使用 terraform 完成,配置你的 AWS VPC、网络和 EC2(虚拟机)
  • provisioning:它使用 ansible 完成,将安装所有组件,使实验环境像活动目录网络一样运行

配置(Provisioning)

要求

到目前为止,该实验环境仅在 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 CLI 来配置访问 AWS 的访问密钥。请按照官网上的安装指南操作: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

要让实验环境启动并运行,你应该执行以下命令:

创建虚拟机

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

接下来的步骤将展示如何在 AWS 上配置你的虚拟机:

  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

虚拟机配置(Provisioning)

每次你的 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))"]"};'

要配置虚拟机,请使用 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 容器中运行 provisioning,请执行(你应该与 Dockerfile 位于同一文件夹中。尚未测试):

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

安装过程中有时会出现错误。大多数情况下,你只需重新运行 playbook 即可正常。 若要逐个运行 playbook:

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

如果你只想运行 playbook 的特定部分,可以使用标签(始终将 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 playbook(每次运行该命令时,它都会更改客户端的密钥):

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
下载工具