All Projects → PlumHound → Plumhound

PlumHound / Plumhound

Licence: gpl-3.0
Bloodhound for Blue and Purple Teams

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Plumhound

adalanche
Active Directory ACL Visualizer and Explorer - who's really Domain Admin?
Stars: ✭ 862 (+90.71%)
Mutual labels:  active-directory, infosec, blueteam
MurMurHash
This little tool is to calculate a MurmurHash value of a favicon to hunt phishing websites on the Shodan platform.
Stars: ✭ 79 (-82.52%)
Mutual labels:  infosec, blueteam
dummyDLL
Utility for hunting UAC bypasses or COM/DLL hijacks that alerts on the exported function that was consumed.
Stars: ✭ 35 (-92.26%)
Mutual labels:  infosec, blueteam
ad-privileged-audit
Provides various Windows Server Active Directory (AD) security-focused reports.
Stars: ✭ 42 (-90.71%)
Mutual labels:  active-directory, blueteam
Ldapcherry
Web UI for managing users and groups in multiple directory services.
Stars: ✭ 194 (-57.08%)
Mutual labels:  directory, active-directory
github-watchman
Monitoring GitHub for sensitive data shared publicly
Stars: ✭ 60 (-86.73%)
Mutual labels:  infosec, blueteam
Blue-Team-Notes
You didn't think I'd go and leave the blue team out, right?
Stars: ✭ 899 (+98.89%)
Mutual labels:  infosec, blueteam
Bootsy
Designed to be installed on a fresh install of raspbian on a raspberry pi, by combining Respounder (Responder detection) and Artillery (port and service spoofing) for network deception, this tool allows you to detect an attacker on the network quickly by weeding out general noisy alerts with only those that matter.
Stars: ✭ 33 (-92.7%)
Mutual labels:  infosec, blueteam
Crack-O-Matic
Find and notify users in your Active Directory with weak passwords
Stars: ✭ 89 (-80.31%)
Mutual labels:  active-directory, blueteam
BTPS-SecPack
This repository contains a collection of PowerShell tools that can be utilized to protect and defend an environment based on the recommendations of multiple cyber security researchers at Microsoft. These tools were created with a small to medium size enterprise environment in mind as smaller organizations do not always have the type of funding a…
Stars: ✭ 33 (-92.7%)
Mutual labels:  active-directory, blueteam
Automatedlab
AutomatedLab is a provisioning solution and framework that lets you deploy complex labs on HyperV and Azure with simple PowerShell scripts. It supports all Windows operating systems from 2008 R2 to 2019, some Linux distributions and various products like AD, Exchange, PKI, IIS, etc.
Stars: ✭ 1,194 (+164.16%)
Mutual labels:  directory, active-directory
Bxss
bXSS is a utility which can be used by bug hunters and organizations to identify Blind Cross-Site Scripting.
Stars: ✭ 331 (-26.77%)
Mutual labels:  infosec, blueteam
Smogcloud
Find cloud assets that no one wants exposed 🔎 ☁️
Stars: ✭ 168 (-62.83%)
Mutual labels:  infosec, blueteam
NIST-to-Tech
An open-source listing of cybersecurity technology mapped to the NIST Cybersecurity Framework (CSF)
Stars: ✭ 61 (-86.5%)
Mutual labels:  infosec, blueteam
Slack Watchman
Monitoring your Slack workspaces for sensitive information
Stars: ✭ 159 (-64.82%)
Mutual labels:  infosec, blueteam
Gitlab Watchman
Monitoring GitLab for sensitive data shared publicly
Stars: ✭ 127 (-71.9%)
Mutual labels:  infosec, blueteam
Snoop
Snoop — инструмент разведки на основе открытых данных (OSINT world)
Stars: ✭ 886 (+96.02%)
Mutual labels:  infosec, blueteam
Defaultcreds Cheat Sheet
One place for all the default credentials to assist the Blue/Red teamers activities on finding devices with default password 🛡️
Stars: ✭ 1,949 (+331.19%)
Mutual labels:  infosec, blueteam
1earn
ffffffff0x 团队维护的安全知识框架,内容包括不仅限于 web安全、工控安全、取证、应急、蓝队设施部署、后渗透、Linux安全、各类靶机writup
Stars: ✭ 3,715 (+721.9%)
Mutual labels:  infosec, blueteam
pyc2bytecode
A Python Bytecode Disassembler helping reverse engineers in dissecting Python binaries by disassembling and analyzing the compiled python byte-code(.pyc) files across all python versions (including Python 3.10.*)
Stars: ✭ 70 (-84.51%)
Mutual labels:  infosec, blueteam

PlumHound

PlumHound - BloodHoundAD Report Engine for Security Teams

Released as Proof of Concept for Blue and Purple teams to more effectively use BloodHoundAD in continual security life-cycles by utilizing the BloodHoundAD pathfinding engine to identify Active Directory security vulnerabilities resulting from business operations, procedures, policies and legacy service operations.

PlumHound operates by wrapping BloodHoundAD's powerhouse graphical Neo4J backend cypher queries into operations-consumable reports. Analyzing the output of PlumHound can steer security teams in identifying and hardening common Active Directory configuration vulnerabilities and oversights.

Release and call to Action

The initial PlumHound code was released on May 14th, 2020 during a Black Hills Information Security webcast, A Blue Teams Perspective on Red Team Tools. The webcast was recorded and is available on YouTube. A Blue Team's Perspetive on Red Team Tools.

The PlumHound Framework yields itself to community involvement in the creation and proliferation of "TaskLists" (work) that can be shared and used across different organizations. TaskLists contain jobs for PlumHound to do (queries to run, reports to write). A second PlumHound community repo has been created to allow for the open sharing of TaskLists (see Plumhound-Tasks)

Looking for more tasks and templates? Checkout PlumHound-Tasks for the community driven marketplace of PlumHound reporting taskslists and report designs

Background

A client of ours working on hardening their Active Directory infrastructure asked us about vulnerabilities that can be found by using BloodHound. They had heard of the effectiveness of BloodHoundAD in Red-Team's hands and was told that BloodHound would identify all types of security mis-alignments and mis-configurations in their Active Directory environment. We helped them through analysis of their BloodHound dataset and it became quickly evident that BloodHoundAD's pathfinding graphical database was not designed for the fast-passed analytical security team accustom to reading reports and action items.

In fact, one of our cypher queries determined that 96% of their 3000 users had a path to Domain Admin with an average of just 4 steps. However, that graphical query rendered over 10,000 paths to Domain Admin. Finding the actual cause of the short-paths to DA wasn't as easy as just loading data into BloodHound or putting Cobalt Strike on Auto-Pilot with BloodHound Navigation.
Hence, PlumHound was created out of a need to retrieve consumable data from BloodHoundAD's pathfinding engine. Data that could yield itself to inferring actionable work for security teams to harden their environments.

Sample Reports

The sample reports are from a BadBlood created AD environment that does not include user sessions and massive ACLs that would be typical of a larger environment. That is, the reports a bit bare, but you get the idea. Sample reports are found in the /reports folder. Note that by default, this is the output location for PlumHound and will over-write reports in this location if specified by the tasklist file.

PlumHound

  • This is a screenshot of an earlier report version. New versions include Title, Header etc.

PlumHound Examples

Use the default username, password, server, and execute the "Easy" task, to test connectivity. This will output all Active Directory user objects from the Neo4J database.

python3 PlumHound.py --easy

Execute PlumHound with the Default TaskList using Default Credentials and Database.

python3 PlumHound.py -x tasks/default.tasks

The same, but quiet the output (-v 0), specify the Neo4J server, useranme, and password instead of using defaults.

python3 PlumHound.py -x tasks/default.tasks -s "bolt://127.0.0.1:7687" -u "neo4j" -p "neo4jj" -v 0

Execute the Path Analyzer external function.

Option #1 using label. The supported labels are User, Group, Computer, OU and GPO. This function will assume the target group is "DOMAIN ADMINS".

python3 PlumHound.py -ap user

NOTE: The above syntax implies you are using the default values for sever, user and password or that you have hardcoded them in the script.

Option #2 specify start node and end node 

python3 PlumHound.py -ap "domain [email protected]" "domain [email protected]"

NOTE: To use BlueHound Path Analyzer logic you need to get a copy of the Python script from https://github.com/scoubi/BlueHound

Detailed PlumHound Syntax

usage: PlumHound.py [-h] [-s SERVER] [-u USERNAME] [-p PASSWORD] [--UseEnc]
                    (--easy | -x TASKFILE | -q,--QuerySingle QUERYSINGLE | -bp,--BusiestPath BUSIESTPATH [BUSIESTPATH ...] | -ap,--AnalyzePath ANALYZEPATH [ANALYZEPATH ...])
                    [-t TITLE] [--of OUTFILE] [--op PATH] [--ox {stdout,HTML,CSV}] [--HTMLHeader HTMLHEADER] [--HTMLFooter HTMLFOOTER] [--HTMLCSS HTMLCSS]
                    [-v VERBOSE]

BloodHound Wrapper for Blue/Purple Teams; v01.070a

optional arguments:
  -h, --help            show this help message and exit
  --easy                Test Database Connection, Returns Domain Users to stdout
  -x TASKFILE, --TaskFile TASKFILE
                        Specify a PlumHound TaskList File
  -q,--QuerySingle QUERYSINGLE
                        Specify a Single Cypher Query
  -bp,--BusiestPath BUSIESTPATH [BUSIESTPATH ...]
                        Find the X Shortest Paths that give the most users a path to Domain Admins. Need to specified [short|all] for shortestpath and the
                        number of results. Ex: PlumHound -bp all 3
  -ap,--AnalyzePath ANALYZEPATH [ANALYZEPATH ...]
                        Analyze 'Attack Paths' between two nodes and find which path needs to be remediated to brake the path.

DATABASE:
  -s SERVER, --server SERVER
                        Neo4J Server
  -u USERNAME, --username USERNAME
                        Neo4J Database Useranme
  -p PASSWORD, --password PASSWORD
                        Neo4J Database Password
  --UseEnc              Use encryption when connecting.

OUTPUT:
  Output Options (For single cypher queries only. --These options are ignored when -x or --easy is specified.

  -t TITLE, --title TITLE
                        Report Title for Single Query [HTML,CSV,Latex]
  --of OUTFILE, --OutFile OUTFILE
                        Specify a Single Cypher Query
  --op PATH, --OutPath PATH
                        Specify an Output Path for Reports
  --ox {stdout,HTML,CSV}, --OutFormat {stdout,HTML,CSV}
                        Specify the type of output

HTML:
  Options for HTML Output (For single queries or TaskLists

  --HTMLHeader HTMLHEADER
                        HTML Header (file) of Report
  --HTMLFooter HTMLFOOTER
                        HTML Footer (file) of Report
  --HTMLCSS HTMLCSS     Specify a CSS template for HTML Output

VERBOSESet verbosity:
  -v VERBOSE, --verbose VERBOSE
                        Verbosity 0-1000, 0 = quiet

For more information see https://plumhound.DefensiveOrigins.com

Database Connection

PlumHound needs to connect to the Neo4J graphing database where BloodHoundAD data was loaded.

DATABASE:
  -s SERVER, --server SERVER
                        Neo4J Server
  -u USERNAME, --username USERNAME
                        Neo4J Database Useranme
  -p PASSWORD, --password PASSWORD
                        Neo4J Database Password
  --UseEnc              Use encryption when connect

PlumHound paramters are set by default. You can override the default by including the argument.

Argument/Parameter Default
SERVER bolt://localhost:7687
USERNAME neo4j
PASSWORD neo4jj

HTML Report Design Output and Variables

HTML output includes the ability to use HTML Headers, Footers, and CSS to modify the design of the report. Additionaly, variables can be added to the HTML Header and Footer files that are replaced at runtime.

HTML:
  Options for HTML Output (For single queries or TaskLists

  --HTMLHeader HTMLHEADER
                        HTML Header (file) of Report
  --HTMLFooter HTMLFOOTER
                        HTML Footer (file) of Report
  --HTMLCSS HTMLCSS     Specify a CSS template for HTML Output
Argument/Parameter Default
HTMLHeader templates/head.html
HTMLFooter templates/tail.html
HTMLCSS templates/html.css
Variable Output
--------PH_TITLE------- Report Tile from --Title or TaskList/Job
--------PH_DATE------- Python date.today()

This allows the HTML output to be dynamic and tailored to your specification.

TaskList Files

The PlumHound Repo includes a sample TaskList that exports some basic BloodHoundAD Cypher queries to an HTML Report. The included tasks\Default.tasks sample shows the basic syntax of the TaskList files. The TaskList Files allow PlumHound to be fully scripted with batch jobs after the SharpHound dataset has been imported not BloodHoundAD on Neo4j. Looking for more tasks and templates? Checkout PlumHound-Tasks for the community driven marketplace of PlumHound reporting taskslists and report designs.

TaskList File Syntax

The TaskList file syntax is as follows. Note that any cypher query containing a double quote must be modified to use a single quote instead of double.

["Report Title","[Output-Format]","[Output-File]","[CypherQuery]"]

TaskList Sample: default.tasks

The default.tasks file includes multiple tasks that instruct PlumHound to create reports using the specified "HTML" output format, output filename, and specific BloodHoundAD Neo4JS cypher Query.

Report Indexer Module

The report indexer builds an HTML report of all the completed jobs. Add the following job to a task list. The parameter = "REPORT-INDEX" instructs PlumHound to generate an HTML index of all the successfully exported tasks in that run of tasks.

Report Indexer Task Syntax

["Report Index","HTML","Reports.html","REPORT-INDEX"]

BlueHound Module

Busiest Path

The Busiest Path(s) function takes two parameters 1- all or short either you want to use shortestpath or allshorteshpaths algorithym. 2- The number of results you want to return. ex: Top 5

python3 PlumHound.py -bp short 5
[*]Building Task List
[51, '[email protected]']
[51, '[email protected]']
[50, '[email protected]']
[49, '[email protected]']
[49, '[email protected]']
[*]Tasks Generation Completed
Tasks: []

Analyze Path

The Analyze Path takes either a label or a start node and end node and loop through all the paths finding which relationship(s) need to be broken in order to break the whole path. This is useful when you want to provide your AD Admins with concrete actions they can take in order to improuve your overall AD Security Posture.

python3 PlumHound.py -ap group
[...]
---------------------------------------------------------------------
Analyzing paths between [email protected] and DOMAIN [email protected]
---------------------------------------------------------------------
Removing the relationship CanRDP between [email protected] and COMP00886.BTV.ORG breaks the path!
Removing the relationship HasSession between COMP00886.BTV.ORG and [email protected] breaks the path!
---------------------------------------------------------------------
Analyzing paths between [email protected] and DOMAIN [email protected]
---------------------------------------------------------------------
---------------------------------------------------------------------
Analyzing paths between [email protected] and DOMAIN [email protected]
---------------------------------------------------------------------
---------------------------------------------------------------------
Analyzing paths between [email protected] and DOMAIN [email protected]
---------------------------------------------------------------------
Removing the relationship ExecuteDCOM between [email protected] and COMP00629.BTV.ORG breaks the path!
Removing the relationship HasSession between COMP00629.BTV.ORG and [email protected] breaks the path!
Removing the relationship MemberOf between [email protected] and [email protected] breaks the path!
Removing the relationship MemberOf between [email protected] and [email protected] breaks the path!
---------------------------------------------------------------------
Analyzing paths between [email protected] and DOMAIN [email protected]
---------------------------------------------------------------------
Removing the relationship AdminTo between [email protected] and COMP01055.BTV.ORG breaks the path!
Removing the relationship HasSession between COMP01055.BTV.ORG and [email protected] breaks the path!
Removing the relationship MemberOf between [email protected] and [email protected] breaks the path!
Removing the relationship MemberOf between [email protected] and [email protected] breaks the path!
Removing the relationship AdminTo between [email protected] and COMP00658.BTV.ORG breaks the path!
Removing the relationship AllowedToDelegate between COMP00658.BTV.ORG and COMP01387.BTV.ORG breaks the path!
Removing the relationship AllowedToDelegate between COMP01387.BTV.ORG and COMP00275.BTV.ORG breaks the path!
Removing the relationship HasSession between COMP00275.BTV.ORG and [email protected] breaks the path!
Removing the relationship MemberOf between [email protected] and DOMAIN [email protected] breaks the path!
---------------------------------------------------------------------
Analyzing paths between [email protected] and DOMAIN [email protected]
---------------------------------------------------------------------
---------------------------------------------------------------------
Analyzing paths between [email protected] and DOMAIN [email protected]
---------------------------------------------------------------------
[...]

Logging

By default, PlumHound generates a log in file log\PlumHound.log

Hat-Tips & Acknowledgements

  • Hausec's Cypher Query CheatSheet gave us a headstart on some decent pathfinding cypher queries. | Git
  • SadProcessor's Blue Hands on BloodHound gave us a detailed primer on BloodHoundAD's ability to lead a BlueTeam to water. | Git.
  • Additional work by SadProcessor with Cypher Dog 3.0 shows similar POC via utilizing BloodHoundAD's Cypher Queries with a RestAPI endpoint via PowerShell. PlumHound operates similarly however written in python and designed for stringing multiple queries into consumable reports designed to infer actionable items.
  • BloodHoundAD: We wouldn't be talking about this at all if it weren't for the original BloodHoundAD work. BloodHound is developed by @_wald0, @CptJesus, and @harmj0y.
  • "Band-aids don't fix dank domains." BadBlood saved us a ton of time building realistic-enough AD domains for testing. @davidprowe
  • BloodHound from Red to Blue - Scoubi- Mathieu Saulnier Mathieu merged his BlueHound project with PlumHound in 2020 as a extension of features. Mathieu is an active collaborator of Plumhound and the BlueHound path-finding extension.

Presentations

Installation Requirements (python 3.7/3.8)

  • apt-get install python3
  • pip3 install -r requirements.txt

Environment Setup Instructions

  • Install Neo4JS
  • Install BloodhoundAD
  • Import AD dataset into BloodhoundAD to be parsed
  • Use PlumHound to Report

Collaboration

Help PlumHound grow and be a great tool for Blue and Purple Teams. We've created the initial proof of concept and are committed to continuing the maturity of PlumHound to leverage the power of BloodHoundAD into continual security improvement processes. Community involvement is what makes this industry great!

License

GNU GPL3

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].