Skip to content
KitploitKITPLOIT
उपकरणब्लॉग
जमा करें
उपकरणब्लॉग
जमा करें

हैकिंग, पेनटेस्ट और साइबर सुरक्षा उपकरण आपके सुरक्षा शस्त्रागार के लिए!

Kitploit हैकिंग, साइबर सुरक्षा और पेंटेस्टिंग टूल्स की एक निर्देशिका है। कमजोरियों को खोजने, सिस्टम का विश्लेषण करने, परीक्षण को स्वचालित करने और अपनी सुरक्षा को मजबूत करने के लिए नवीनतम प्रोजेक्ट अपडेट खोजें।

··फ़ीड·संपर्क·गोपनीयता·© 2026 Kitploit

टूल निर्देशिका

श्रेणियाँ

सभी श्रेणियाँ देखें
Loading categories
LOAD — Lord Of Active Directory - AWS पर स्वचालित असुरक्षित एक्टिव डायरेक्टरी | Kitploit
उपकरण/GitHubGitHub/0xballpoint/load
क्लाउड इन्फ्रास्ट्रक्चर सुरक्षासुरक्षा वर्चुअलाइजेशनपेनिट्रेशन टेस्टिंगलर्निंग और शिक्षारेड टीमिंगलैब और अभ्यास
GitHub0xballpoint/load

LOAD

Lord Of Active Directory - AWS पर स्वचालित असुरक्षित एक्टिव डायरेक्टरी

रिपॉजिटरी देखें
1561362 साल पहलेKitploit द्वारा समीक्षित

सबसे लोकप्रिय

सभी देखें →

हमारे समुदाय द्वारा सबसे अधिक उपयोग किए जाने वाले उपकरण खोजें।

सभी उपकरण खोजें

हमारे उपकरणों का संग्रह ब्राउज़ करें

सभी उपकरण देखें →
वेबसाइट
साझा करें

load.jpg

परिचय

AWS-Redteam-Lab और OCD GOAD पर आधारित

एक महीने में 125 घंटे लैब चलाने की लागत लगभग 14$ है। Free Tier के साथ आपको प्रति माह 750h EC2 मिलता है, वहाँ 6 मशीनें हैं इसलिए 125h। लेकिन आपको केवल 30Gb स्टोरेज मिलता है। इसलिए आपको बाकी 5 VMs के लिए स्टोरेज चाहिए: 30Gb * 5 = 150Gb = 14$ / माह

स्थापना

GOAD प्रोजेक्ट की तरह ही, स्थापना दो भागों में है:

  • providing : यह terraform से बनाया गया है, यह आपके AWS VPC, नेटवर्क और EC2 (वर्चुअल मशीनों) को कॉन्फ़िगर करता है
  • provisioning : यह ansible से बनाया गया है, यह लैब को एक Active Directory नेटवर्क की तरह चलाने के लिए सभी चीज़ें स्थापित करेगा

प्रोविज़निंग

आवश्यकताएँ

अब तक लैब का परीक्षण केवल Linux मशीन पर किया गया है, लेकिन यह macOS पर भी काम करना चाहिए। Ansible को Windows होस्ट्स के साथ कुछ समस्याएँ हैं, इसलिए मुझे उसके बारे में नहीं पता।

सेटअप को ठीक से काम करने के लिए आपको इंस्टॉल करना होगा:

Ansible

Docker के साथ Ansible

यदि आप docker कंटेनर से प्रोविज़निंग करना चाहते हैं, तो कंटेनर तैयार करने के लिए आप निम्न कमांड चला सकते हैं

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

अपने होस्ट पर Ansible

यदि आप अपने होस्ट से ansible चलाना चाहते हैं, तो आपको निम्न कमांड चलानी चाहिए:

  1. python >= 3.8 वाला virtualenv बनाएँ
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 के लिए अपनी access keys कॉन्फ़िगर करने हेतु आपको 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 होगा, subnet 10.0.1.0/24 पर, और प्रत्येक मशीन को केवल 1CPU और 1024MB मेमोरी (t2.micro) आवंटित की गई है। यदि आप इनमें से कुछ performance सेटिंग्स बदलना चाहते हैं, तो आप फ़ाइल: terraform/ami-instance.tf संशोधित कर सकते हैं

लैब को चालू और कार्यशील करने के लिए आपको ये कमांड चलानी चाहिए:

VMs निर्माण

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

अगले चरण दिखाते हैं कि AWS पर अपने VMs को कैसे कॉन्फ़िगर करें:

  1. var.tf.example को var.tf में कॉपी करें और मान बदलें:

    • REGION: अपने पसंदीदा region के अनुसार बदलें
    • MANAGEMENT_IPS: अपने IPv4 पते जोड़ें जो आपके लैब तक पहुँच सकते हैं
  2. अपने AWS console पर, आपको एक terraform यूज़र बनाना चाहिए और अपनी AWS keys प्राप्त करनी चाहिए:

    • https://us-east-1.console.aws.amazon.com/iamv2/home#/users पर जाएँ
    • User name में: terraform
    • AWS credential type चुनें: Access key - Programmatic access
    • जो permissions चाहिए जोड़ें
    • यूज़र बनाएँ
    • Access key ID और Secret access key कॉपी करें
  3. AWS CLI के साथ अपनी मशीन पर keys जोड़ें:

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 keys बनाएँ:
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

यदि आप अपना लैब destroy करना चाहते हैं:

root@kitploit:~
terraform destroy

VMs प्रोविज़निंग

जब भी आपके EC2 instances शुरू हों, आपको ansible/hosts फ़ाइल में उनका public 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))"]"};'

VMs को कॉन्फ़िगर करने के लिए ansible-playbook कमांड का उपयोग करें। सामान्य चलने का समय: 1h30

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

इंस्टॉल के दौरान कभी-कभी कोई त्रुटि हो सकती है। अधिकतर बार, आप प्लेबुक को फिर से चला सकते हैं और यह काम कर जानी चाहिए। प्लेबुक्स को एक-एक करके चलाने के लिए:

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

यदि आप प्लेबुक का केवल एक विशेष भाग चलाना चाहते हैं, तो आप tags का उपयोग कर सकते हैं (हमेशा data को tag के रूप में रखें):

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 सर्वर जोड़ सकते हैं, और अपनी इच्छानुसार जितने चाहें clients कॉन्फ़िगर कर सकते हैं। VPN सर्वर के लिए keys बनाकर शुरू करें और clients की संख्या बदलें:

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 प्लेबुक को इस कमांड के साथ चलाएँ (यह हर बार कमांड चलाने पर clients की keys बदल देगा):

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

यदि आपको यह त्रुटि मिले Timeout (12s) waiting for privilege escalation prompt, तो बस कमांड को फिर से चलाएँ।

आपको अपनी client configuration फ़ाइल ansible/wireguard/lab_client[0-9].conf में मिलेगी।

VPN से कनेक्ट करने के लिए, आपको client फ़ाइलों को private key सहित अपने local होस्ट में /etc/wireguard/ पर कॉपी करना होगा।

पहले client के लिए 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:

कार्य सूची

  • SSH के लिए linux सर्वर को AD से कनेक्ट करें
  • sam पर RemotePotato0
  • GLPI क्रेडेंशियल्स स्वचालित रूप से बदलें
  • LAPS
टूल डाउनलोड करें