Git Product home page Git Product logo

adgenerator's Introduction

MayorSec ko-fi

ADGenerator

This script will auto-generate the required users, groups, and permissions necessary for my Movement, Pivoting, and Persistence for Pentesters and Ethical Hackers Course. You can get it on TCM-Academy using my link at https://academy.tcm-sec.com/courses/movement-pivoting-and-persistence?affcode=770707_4ss-lc9h.

Instructions

In order to generate a functional domain controller and active directory, the listed PowerShell scripts need to be executed in the following order:

  • Invoke-ForestDeploy.ps1

. .\Invoke-ForestDeploy.ps1

Invoke-ForestDeploy -DomainName mayorsec.local

This will install the Windows Active Directory Domain Services toolset and generate the actual domain. Follow the instructions on screen, making note of the domain name used as this will be needed later. The scripts are hardcoded for mayorsec.local, and any deviation from that domain name will likely break the ADGenerator.ps1 functionality. Making any modifications are on you.

  • ADGenerator.ps1

. .\ADGenerator.ps1

Invoke-ADGenerator -DomainName mayorsec.local

This will generate the appropriate users, groups, permissions, configurations, and misconfigurations needed for the actual course.

Once all scripts are ran and the workstations are joined, the following needs to be ran on DC01 from an elevated Powershell terminal to generate the unconstrained delegation configuration.

Get-ADComputer -Identity Workstation-02 | Set-ADAccountControl -TrustedForDelegation $true

Instruction is provided in course on how to utilize the netGen.ps1 script. A later lesson covers cracking an NTLM hash which uses the included password file.

adgenerator's People

Contributors

dievus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

adgenerator's Issues

Digital certificate error & The string is missing

Found out that I needed to run this command on each start up to run the .ps1 files
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass

The other issue I'm having is a strings is missing terminator:
29096a8ce9349b4b0721e2ff9df2c1a2

Creating Domain Users

When I run this command below I am receiving error "New-ADUser : The server is unwilling to process the request"
ADGenerator-main> Invoke-ADGenerator -DomainName

New-ADUser : The server is unwilling to process the request
At C:\Users\Administrator\Desktop\ADGenerator-main\ADGenerator.ps1:86 char:1

  • New-ADUser -Name "$firstname $lastname" -GivenName $firstname -Surnam ...
  •   + CategoryInfo          : NotSpecified: (CN=Aaron Adams,...yorsec,DC=local:String) [New-ADUser], ADException
      + FullyQualifiedErrorId : ActiveDirectoryServer:0,Microsoft.ActiveDirectory.Management.Commands.NewADUser
    
          [+] a.adams added
          [+] Adding a.adams to Senior Management Group
    

Add-ADGroupMember : Cannot find an object with identity: 'a.adams' under: 'DC=homesec,DC=local'.
At C:\Users\Administrator\Desktop\ADGenerator-main\ADGenerator.ps1:89 char:1

  • Add-ADGroupMember -Identity $Global:Senior -Members $samAccountName
  •   + CategoryInfo          : ObjectNotFound: (a.adams:ADPrincipal) [Add-ADGroupMember], ADIdentityNotFoundException
      + FullyQualifiedErrorId : SetADGroupMember.ValidateMembersParameter,Microsoft.ActiveDirectory.Management.Commands.
     AddADGroupMember
    

forestdeploy does nothing

I run the forestdeploy script using -DomainName mayorsec.local and it doesnt so anything, just new line. following along from the TCM video course.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.