davidprowe / BadBlood

BadBlood by @davidprowe, Secframe.com, fills a Microsoft Active Directory Domain with a structure and thousands of objects. The output of the tool is a domain similar to a domain in the real world. After BadBlood is ran on a domain, security analysts and engineers can practice using tools to gain an understanding and prescribe to securing Active Directory. Each time this tool runs, it produces different results. The domain, users, groups, computers and permissions are different. Every. Single. Time.
https://www.secframe.com/badblood
GNU General Public License v3.0
2.01k stars 273 forks source link

Issues with AD_Computers_Create\CreateComputers.ps1 #18

Open r0b0tG4nG opened 2 years ago

r0b0tG4nG commented 2 years ago

i am able to install badblood without any error but when i look into the AD, i can see that no machine was added to my DC. is it just me facing this issue or everyone else is facing this too?? attached is a screenshot image

tijldeneut commented 2 years ago

They can be found in the Tier OU's, for example under AWS>Devices etc ... Get-ADComputers wil list all of them

benpatin commented 1 year ago

Hi, Same issue here, the CreateComputers.ps1 doesn't create any computer object. When using invoke-badblood.ps1 i have a lot of errors on the computer part :

Creating Tiered OU Structure Creating Users on Domain True True Creating Groups on Domain Creating Computers on Domain Cannot index into a null array. At C:\ProgramData\badblood\AD_Computers_Create\CreateComputers.ps1:64 char:16

  • if($args[0]){
  • 
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : NullArray

Cannot index into a null array. At C:\ProgramData\badblood\AD_Computers_Create\CreateComputers.ps1:75 char:16

  • if($args[1]){
  • 
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : NullArray

Cannot index into a null array. At C:\ProgramData\badblood\AD_Computers_Create\CreateComputers.ps1:85 char:16

  • if($args[1]){
  • 
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : NullArray

Cannot index into a null array. At C:\ProgramData\badblood\AD_Computers_Create\CreateComputers.ps1:96 char:16

  • if($args[2]){
  • 
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : NullArray

Get-Item : Cannot bind argument to parameter 'Path' because it is null. At C:\ProgramData\badblood\AD_Computers_Create\CreateComputers.ps1:129 char:31

  • $scriptparent = (get-item $scriptpath).parent.fullname
  • 
    + CategoryInfo          : InvalidData: (:) [Get-Item], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.GetItemCommand

import-csv : Could not find a part of the path 'C:\AD_OU_CreateStructure\3lettercodes.csv'. At C:\ProgramData\badblood\AD_Computers_Create\CreateComputers.ps1:130 char:21

  • ... ttercodes = import-csv ($scriptparent + "\AD_OU_CreateStructure\3lett ...
  • 
    + CategoryInfo          : OpenError: (:) [Import-Csv], DirectoryNotFoundException
    + FullyQualifiedErrorId : FileOpenFailure,Microsoft.PowerShell.Commands.ImportCsvCommand

Get-ADComputer : Cannot validate argument on parameter 'Server'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again. At C:\ProgramData\badblood\AD_Computers_Create\CreateComputers.ps1:290 char:53

  • $comps = Get-ADComputer -server $setdc -f {(name ...
  • 
    + CategoryInfo          : InvalidData: (:) [Get-ADComputer], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.ActiveDirectory.Management.Commands.GetADComputer
benpatin commented 1 year ago

Found the issue. I made a pull request https://github.com/davidprowe/BadBlood/pull/23