Skip to content
KitploitKITPLOIT
HerramientasBlog
Enviar
HerramientasBlog
Enviar

¡Herramientas de Hacking, PenTest y Ciberseguridad para tu Arsenal de Seguridad!

Kitploit es un directorio de herramientas de hacking, ciberseguridad y pentesting. Descubre las últimas actualizaciones de proyectos para encontrar vulnerabilidades, analizar sistemas, automatizar pruebas y fortalecer tu seguridad.

··Feeds·Contacto·Privacidad·© 2026 Kitploit

Directorio de Herramientas

Categorías

Ver todas las categorías
Loading categories
Herramientas/GitHubGitHub/xbufu/adlab
Pruebas de PenetraciónAprendizaje y EducaciónLabs y Práctica
GitHubxbufu/adlab

ADLab

Módulo personalizado de PowerShell para configurar un entorno de laboratorio de Active Directory para practicar pruebas de penetración.

Ver Repositorio
183351hace 1 añoRevisado por Kitploit

Más Populares

Ver todos →

Descubre las herramientas más usadas por nuestra comunidad.

Explora todas las herramientas

Explora nuestra colección de herramientas

Ver todas las herramientas →
Compartir

Módulo PowerShell de ADLab

Introducción

El propósito de este módulo es automatizar el despliegue de un laboratorio de Active Directory para practicar pruebas de penetración interna.

Créditos a Joe Helle y a su curso de PowerShell para Pentesters respecto a la generación de los vectores de ataque.


Instrucciones

Preparación

Opcional pero recomendado: Mover el Módulo a PSModulePath

root@kitploit:~
# Display PSModulePath
$env:PSModulePath.split(";")

# Move module to path
Move-Item .\ADLab\ "C:\Windows\system32\WindowsPowerShell\v1.0\Modules\"

Import-Module

root@kitploit:~
# Import global module
Import-Module ADLab

# Import local module
Import-Module .\ADLab.psm1

Configuración Inicial del Laboratorio

Invoke-DCPrep

Esta función prepara la máquina virtual/ordenador actual para ser utilizado como controlador de dominio del nuevo bosque. Establece una dirección IP estática, configura el servidor DNS como localhost y renombra el ordenador.

root@kitploit:~
# Prepare the current VM with all default values while displaying verbose output
Invoke-DCPrep -Verbose

# Set custom hostname and use Google DNS for Internet access
Invoke-DCPrep -Hostname "DC" -NewIPv4DNSServer "8.8.8.8"

# Use custom IP and default gateway and display verbose output
Invoke-DCPrep -Verbose -NewIPv4Address "192.168.1.99" -NewIPv4Gateway "192.168.1.1"

Invoke-ForestDeploy

La función instala la característica AD DS y configura un nuevo bosque de Active Directory, sin requerir ninguna entrada del usuario. Reinicia el ordenador al finalizar.

root@kitploit:~
# Installs a new forest with FQDN of "bufu-sec.local" with default DSRM password of "Password!"
Invoke-ForestDeploy -Domain bufu-sec.local

# Installs a new forest with FQDN of "bufu-sec.local" with the DSRM password set to "P@ssword!" and displaying debug messages
Invoke-ForestDeploy -Domain "bufu-sec.local" -DSRMPassword "P@ssword!" -Verbose

Invoke-DNSDeploy

La función comienza instalando la característica DNS. Luego agrega la zona primaria y configura el reenviador del servidor.

root@kitploit:~
# Install and configure DNS on the current host and display verbose output.
Invoke-DNSDeploy -Verbose -NetworkID 192.168.47.0/24 -ZoneFile "47.168.192.in-addr.arpa.dns" -ServerForwarder 1.1.1.1

Invoke-DHCPDeploy

La función comienza instalando la característica DHCP en la máquina actual. Luego agrega los grupos de seguridad necesarios y autoriza el nuevo servidor DHCP con el controlador de dominio. Finalmente, configura el nuevo ámbito DHCP con los valores proporcionados.

root@kitploit:~
# Install and configure DHCP on the local DC.
Invoke-DHCPDeploy -Verbose -ScopeName "Default" -ScopeID 192.168.47.0 -StartIP 192.168.47.100 -EndIP 192.168.47.200 -SubnetMask 255.255.255.0 -DNSServer 192.168.47.10 -Router 192.168.47.10

# Install and configure DHCP on the specified DC.
Invoke-DHCPDeploy -Verbose -ScopeName "Default" -ScopeID 192.168.47.0 -StartIP 192.168.47.100 -EndIP 192.168.47.200 -SubnetMask 255.255.255.0 -DNSServer 192.168.47.10 -Router 192.168.47.10 -DCFQDN DC01.bufu-sec.local

Contenido

Invoke-ADLabFill

La función comienza creando los grupos y UOs definidos en la variable global Groups. Luego genera 10 objetos de usuario para cada UO por defecto.

root@kitploit:~
# Fill forest with objects and display verbose output
Invoke-ADLabConfig -Verbose

# Create 50 users for each OU and display verbose output
Invoke-ADLabConfig -Verbose -UserCount 50

Vectores de Ataque

Set-ASREPRoasting

La función obtiene una cantidad determinada de usuarios aleatorios del dominio y establece la marca DoesNotRequirePreAuth para cada uno. Excluye cuentas predeterminadas como Administrator y krbtgt. Hace que el 5% de los usuarios sean ASREP-Roastable por defecto.

root@kitploit:~
# Make 5% of users ASREP-Roastable and display verbose output
Set-ASREPRoasting -Verbose

# Make 10 random users in the domain ASREP-Roastable
Set-ASREPRoasting -VulnerableUsersCount 10

# Make user bufu ASREP-Roastable and display verbose output
Set-ASREPRoasting -Users bufu -Verbose

# Make supplied list of users ASREP-roastable and display verbose output
Set-ASREPRoasting -Users ("bufu", "pepe") -Verbose

Set-Kerberoasting

La función obtiene una cantidad determinada de usuarios aleatorios del dominio y agrega un SPN para cada uno. Excluye cuentas predeterminadas como Administrator y krbtgt. Hace que el 5% de los usuarios sean kerberoasteables por defecto.

root@kitploit:~
# Make 5% of users ASREP-Roastable and display verbose output
Set-Kerberoasting -Verbose

# Make 10 random users in the domain ASREP-Roastable
Set-Kerberoasting -VulnerableUsersCount 10

# Make user bufu ASREP-Roastable and display verbose output
Set-Kerberoasting -Users bufu -Verbose

# Make supplied list of users ASREP-roastable and display verbose output
Set-Kerberoasting -Users ("bufu", "pepe") -Verbose

Set-BadACLs

La función comienza otorgando al grupo Chads derechos GenericAll sobre los Administradores del Dominio. Luego otorga al grupo Degens derechos GenericAll sobre el grupo Chads. Finalmente, otorga derechos GenericAll sobre algunos usuarios del grupo Degens a algunos usuarios del grupo Normies.

root@kitploit:~
# Create vulnerable ACLs and display verbose output
Set-BadACLs -Verbose

Set-PSRemoting

La función primero configura la GPO para permitir WinRM a través del puerto TCP 5985 hacia sistemas unidos al dominio. Luego habilita PS Remoting a través de la GPO.

root@kitploit:~
# Enable PS Remoting and display verbose output
Set-PSRemoting -Verbose
Descargar herramienta