ADExplorerSnapshot.py
ADExplorerSnapshot.py copied to clipboard
Add Dockerfile
Added a Dockerfile to easy deployment.
This was helpful for me to avoid Python 3.11 incompatibilities on my host, due to https://github.com/ly4k/Certipy/issues/108.
Docker images can be built with a command like this: docker build -t c3c/adexplorersnapshot .
The resulting image can be used in a command like this: docker run --rm -it -v "$(pwd):/src" c3c/adexplorersnapshot -o /src/out /src/adexplorer.dat
. That is the normal arguments go after the image name, as I made the script the entrypoint. Running the image with no arguments will default to showing the help.
docker run --rm -it c3c/adexplorersnapshot
usage: ADExplorerSnapshot.py [-h] [-o OUTPUT] [-m {BloodHound,Objects}] snapshot
AD Explorer snapshot ingestor for BloodHound
positional arguments:
snapshot Path to the snapshot .dat file.
options:
-h, --help show this help message and exit
-o OUTPUT, --output OUTPUT
Path to the *.json output folder. Folder will be created if it doesn't exist. Defaults to the current directory.
-m {BloodHound,Objects}, --mode {BloodHound,Objects}
The output mode to use. Besides BloodHound JSON output files, it is possible to dump all objects with all attributes to NDJSON. Defaults to BloodHound output mode.
I'm wondering if this is still needed? I think the issue might've been resolved with https://github.com/c3c/ADExplorerSnapshot.py/issues/38 Nonetheless, might still be useful to have it in Docker.
I think have a docker file will be beneficial.