Skip to content

Commit 0edf16c

Browse files
authored
Merge pull request #64 from idnahacks/v1work
Release on Pypi
2 parents 79e917d + 763b44e commit 0edf16c

File tree

12 files changed

+909
-672
lines changed

12 files changed

+909
-672
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,3 +136,4 @@ pwnscore.txt
136136
db/goodhound.db
137137
goodhound.db
138138
goodhound.db.old
139+
pyproject.toml

README.md

Lines changed: 24 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# GoodHound
2-
2+
![PyPI - Downloads](https://img.shields.io/pypi/dm/goodhound)
33
```
44
______ ____ __ __
55
/ ____/___ ____ ____/ / / / /___ __ ______ ____/ /
@@ -20,15 +20,28 @@ GoodHound operationalises Bloodhound by determining the busiest paths to high va
2020
### Quick Start
2121
For a very quick start with most of the default options, make sure you have your neo4j server running and loaded with SharpHound data and run:
2222
```
23-
git clone https://github.com/idnahacks/GoodHound.git
24-
cd GoodHound
25-
pip install -r requirements.txt
26-
python goodhound.py -p "neo4jpassword" -o csv -f .
23+
pip install goodhound
24+
goodhound -p "neo4jpassword"
2725
```
2826
This will process the data in neo4j and output 3 csv reports in the GoodHound directory.
2927

3028
![Demo](images/demo.gif)
3129

30+
## Installation
31+
32+
### Pre-requisites
33+
- Python and pip already installed.
34+
- Both neo4j and bloodhound will need to be already installed. The docs at https://bloodhound.readthedocs.io/en/latest/#install explain this well.
35+
36+
### Using Pip
37+
Use pip to install directly from the PyPi library, if you do not wish to change any local modules you already have installed it is recommended to use pipenv:
38+
```
39+
pip install goodhound
40+
```
41+
This will create a 'goodhound' entrypoint that you can call from the CLI:
42+
```
43+
goodhound -h
44+
```
3245

3346
### Default behaviour
3447

@@ -68,11 +81,14 @@ The weakest links report is a way to potentially find links of attack paths that
6881
- csv saves a comma separated values file for use with reporting or MI (completing the graphs, actions, charts trifecta in the tagline)
6982
- md or markdown to display a markdown formatted output
7083

71-
-f an optional filepath for the csv output option
72-
-v enables verbose output to display query times
84+
-d an optional filepathdirectory path for the csv output option
7385

7486
By default the output is csv in the current working directory.
7587

88+
-q supresses all output
89+
-v enables verbose output
90+
--debug enables debug output
91+
7692
### Number of results
7793
-r can be used to select the amount of results to show. By default the top 5 busiest paths are displayed.
7894
-sort can be used to sort by:
@@ -86,11 +102,7 @@ For example, you want to add the highvalue label to 'dbserver01' because it cont
86102
```
87103
match (c:Computer {name:'[email protected]'}) set c.highvalue=TRUE
88104
```
89-
The schema can contain multiple queries, each on a separate line.
90-
91-
### Query
92-
-q can be used to override the default query that is run to calculate the busiest path. This is largely for debugging the script if your dataset is large and you want to temporarily load in a query that looks at a smaller set of your data in order to quickly try GoodHound out.
93-
Care should be taken to ensure that the query provides output in the same way as the built-in query, so it doesn't stop any other part of GoodHound running.
105+
The schema can contain multiple queries, each on a separate line.
94106

95107
### SQLite Database
96108
By default Goodhound stores all attack paths in a SQLite database called goodhound.db stored in the local directory. This gives the opportunity to query attack paths over time.
@@ -103,29 +115,6 @@ Larger datasets can take time to process.
103115
GoodHound does "warm-up" the database using the same query that the Warm-Up Database option in the Bloodhound GUI does, however the Neo4j documentation suggests that this is no longer necessary, and in practice I haven't seen it make any different on Neo4j 4.0 and greater.
104116
There are also many guides for tuning the neo4j database for increased performance which are out of scope here (although if I make any significant improvements I'll document the findings).
105117

106-
## Installation
107-
108-
### Pre-requisites
109-
- Python and pip already installed.
110-
- Both neo4j and bloodhound will need to be already installed. The docs at https://bloodhound.readthedocs.io/en/latest/#install explain this well.
111-
112-
### Downloading GoodHound
113-
Either download using git or by downloading the zip file and extract to your chosen location.
114-
```
115-
git clone https://github.com/idnahacks/GoodHound.git
116-
cd goodhound
117-
```
118-
__OR__
119-
```
120-
https://github.com/idnahacks/GoodHound/archive/refs/heads/main.zip
121-
```
122-
123-
### Installing
124-
- Install required Python modules.
125-
- Goodhound will install py2neo and pandas libraries, if you do not wish to change any local modules you already have installed it is recommended to use pipenv.
126-
```
127-
pip install -r requirements.txt
128-
```
129118

130119
## SQLite Database
131120
By default Goodhound will insert all of attack paths that it finds into a local SQLite database located in a db directory inside the current working directory.

changelog.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Changelog
2+
3+
## 1.0
4+
- Upload to Pypi and update installation docs
5+
6+
## 0.8
7+
- Restructure files to follow pypi structure
8+
- Make BloodHound 4.1 patch optional
9+
- Add changelog
10+
- Add more options relating to logging and output
11+
- Add error handling to neo4j connection
12+
- Add error handling to file output
13+
- change parameter for output dir to -d as this made more sense
14+
- remove custom query option as it could just end up messy
15+
- switch to pathlib for determining filepaths

0 commit comments

Comments
 (0)