Coder Social home page Coder Social logo

trimarcjake / bluetuxedo Goto Github PK

View Code? Open in Web Editor NEW
68.0 6.0 6.0 17.62 MB

A tiny tool to find and fix common misconfigurations in Active Directory-integrated DNS

License: Other

PowerShell 100.00%
active-directory dns adi-dns adidns powershell powershell-module

bluetuxedo's Introduction

BlueTuxedo

A tiny tool built to find and fix common misconfigurations in Active Directory-Integrated DNS (and a little DHCP as a treat).

How can BlueTuxedo help you?

Read the slides from WWHF.

Watch the presentation from BSidesCharm.

Quick Start:

# Install from PSGallery
Install-Module -Name BlueTuxedo -Scope CurrentUser
Invoke-BlueTuxedo

# Clone from GitHub and Import
git clone https://github.com/TrimarcJake/BlueTuxedo.git
cd BlueTuxedo
Import-Module .\BlueTuxedo.psd1 -Force
Invoke-BlueTuxedo

# Use the testing branch - probably broken, but 🤷‍♀️
git clone https://github.com/TrimarcJake/BlueTuxedo.git
cd BlueTuxedo
git checkout testing
Import-Module .\BlueTuxedo.psd1 -Force
Invoke-BlueTuxedo

Running Invoke-BlueTuxedo with no paramters will Get stuff, Test it, then offer code for how to Repair identified issues (where possible).

Get Stuff

  • ADI Zones
  • Conditional Forwarder
  • Dangling SPNs 1
  • DHCP Dynamic Update service account configuration
  • DnsAdmins Membership
  • DnsUpdateProxy Membership
  • Forwarder Configuration
  • Global Query Block List (GQBL)
  • Non-ADI Zone Auditing
  • Query Resolution Policies
  • Security Descriptors
  • Socket Pool Configuration
  • Tombstoned DNS Records
  • Wildcard Record
  • WPAD Record
  • Zone Scopes
  • Zone Scope Containers

Test Stuff

Item Test Condition
ADI Zones Is Legacy Zone?
ADI Zones Are Secure Updates enabled?
DHCP Dynamic Update service account Exists on each DHCP server?
Dangling SPNs Exist?
DnsAdmins Membership Is non-zero?
DnsUpdateProxy Membership Is non-zero?
Forwarder Configuration Exist?
Global Query Block List (GQBL) Contains wpad/isatap
Non-ADI Zones Exist?
Query Resolution Policies Exist?
Security Descriptor (ACEs) Standard/Expected?
Security Descriptor (Ownership) Standard/Expected?
Socket Pool Configuration Is maximum?
Tombstoned DNS Records Exist?
Wildcard Record Exists & correct type?
WPAD Record Exists & correct type?
Zone Scopes Exist?
Zone Scope Containers Exists & empty?

Repair Stuff

Item Fix
ADI Zones Convert Legacy (Windows 2000 Compatible) Zones to Modern
Dangling SPNs Delete SPN from Account
Socket Pool Configuration Set Socket Pool Configuration to Maximum
Tombstoned DNS Records Delete Tombstoned DNS Record
Wildcard Record Create Proper Wildcard Record
WPAD Record Create Proper WPAD Record

Footnotes

  1. A "Dangling SPN" is a Service Principal Name (SPN) in which the host portion of the SPN does not resolve to an IP address.

bluetuxedo's People

Contributors

trimarcjake avatar jimsycurity avatar

Stargazers

n0isegat3 avatar  avatar  avatar 2h0ng avatar Julian Cohen avatar  avatar  avatar  avatar  avatar Ryota Sakai avatar  avatar Jeff McJunkin avatar Andrew T. Schmitt avatar Chris Murray avatar Ryan Denham avatar Abhiroop Pal avatar Tom Maguire avatar lapolis_aka_blu avatar Nicolas Vincent avatar git-st0m avatar Mihai Limbășan avatar  avatar  avatar  avatar  avatar Kay Daskalakis avatar Cliff avatar  avatar Andrew Healey avatar φ-Z avatar Nenad Vijatov avatar  avatar Dave Hardy avatar  avatar Bastien Perez avatar Ivan Necheporenko avatar  avatar Kevin James O'Dea avatar  avatar Aaron Osgood avatar gsmith257 avatar Jake Smith avatar Shiv4x6c avatar  avatar shifty0g avatar  avatar lapinou avatar  avatar  avatar  avatar Jonathan Colon avatar  avatar  avatar Sal M avatar Royce Williams avatar  avatar spyr0 avatar  avatar Pete Cook avatar Kyle Price avatar Joe Gasper avatar bl4ckr4ptor avatar  avatar Amarjit Labhuram avatar A avatar  avatar Sam Erde avatar  avatar

Watchers

Jonathan Colon avatar Andrew T. Schmitt avatar  avatar Michael Hubbard avatar  avatar  avatar

bluetuxedo's Issues

Update Show- functions.

Show- functions were using variables from the script scope, so they don't work standalone.

Need to pass variables to them.

Run script automated and output to file?

Howdy!
Is there a way to run the script without hitting enter to the various questions (accepting the defaults), as well as have it output it all to a file to review afterwards?

Problem with 'DhcpServer' module

This could very well be something I am doing wrong, but when I try to import the module, I get this error:

PS C:\powershell\bluetux\BlueTuxedo-main> import-module .\BlueTuxedo.psd1
import-module : The required module 'DhcpServer' is not loaded. Load the module or remove the module from
'RequiredModules' in the file 'C:\powershell\bluetux\BlueTuxedo-main\BlueTuxedo.psd1'.
At line:1 char:1
+ import-module .\BlueTuxedo.psd1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (C:\powershell\b...BlueTuxedo.psd1:String) [Import-Module], Missing
   MemberException
    + FullyQualifiedErrorId : Modules_InvalidManifest,Microsoft.PowerShell.Commands.ImportModuleCommand

Let me know if there is something I can try to resolve this, or if you have questions. Thanks! Great talk at WWHF by the way.

Specify domain

Howdy,
How would I specify a particular domain to use? I am testing out in a scenario that has a few domain trusts (including one that is down), and it is taking very long to error out on these remote domains.
Thanks!

Failed to Enumerate Zones

Hello, while executing BlueTuxedo on a custom Windows 10 image that was not domain joined, my team received the following errors at on a client engagement:
MicrosoftTeams-image

We executed it within a runas /netonly shell using a compromised standard user and confirmed the shell to be valid. The client is in fact using ADIDNS through conversation with them. We have disabled Windows Defender locally and have not been having client IPSs blocking on our loud activities (i.e., BloodHound). Client hostnames are resolving and we can authenticate to DCs without issue.

If you have any ideas, feel free to reach out sooner rather later as I will only be on this client network as the engagement will end soon. Certainly understand any delays of 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.