acceis / bqm Goto Github PK
View Code? Open in Web Editor NEWDeduplicate custom BloudHound queries from different datasets and merge them in one customqueries.json file.
Home Page: https://acceis.github.io/bqm/
License: MIT License
Deduplicate custom BloudHound queries from different datasets and merge them in one customqueries.json file.
Home Page: https://acceis.github.io/bqm/
License: MIT License
Hello @noraj,
thank you for the version 1.4.0 of bqm as we can now merge local files \o/. Well done.
I have some suggestions/whishes in order to address ThePorgs/Exegol-images#163
1/ When starting the Exegol container, we only need to manipulate local files (Exegol's and the user's) and the version 1.4.0 pulls remote files by default. This means that implementing the PR in the current state of bqm still implies to empty temporarily the file query-sets.json as a workaround to disable remote sources. Something we agreed is not a good idea.
Hence my whish: could you add a CLI option to disable the pulling of remote sources ?
2/ Still for the same Exegol PR, rather than setting local files with -i /tmp/a.json,/tmp/b.json
, could you support either:
-i /tmp/directory -i /tmp/a.json -i /tmp/b.json
-d /tmp/directory -i /tmp/a.json -i /tmp/b.json
This would add support for directories. Bqm could autodetect the .json files in the folders.
In the first case, the folder is included with the argument -i
(as of version 1.4.0), second case with a new argument -d
. I don't know what you may prefer, these are suggestions, my favorite is the one with -d
.
Having an option to include directories means that in Exegol, we would not need to have a wrapper around bqm to detect the files from a folder and dynamically construct the argument to pass to bqm.
Plus, in both cases, I found the comma separator to break bqm if the user's file contains the character ,
. This is why I suggest to have support for multiple -d and -i arguments.
3/ To expand a bit my thoughts above the above 1/, I think that bqm could be started a bit differently.
Rather than pulling remote sources by default and optionnally merge them with local files, bqm could start as an empty shell.
Then, the sources are enabled one by one on command-line:
-r [data-sets.json]
: to pull the remote sources for the optional
file data-sets.json. If the switch is set and without a file, then the default dataset file is chosen. I think it may intereset users to set their own data-sets file if they want custom remote sources (for example: a remote file on an intranet).-d <directory>
: to include one local set directory.-i <file>
: to include one local set file.All three switches could be set several times, as there could be several remote sources, several directories, and several individual files.
Best
The compass security repository is broken into data/query-sets.json.
https://raw.githubusercontent.com/CompassSecurity/BloodHoundQueries/master/customqueries.json
need to be replaced by :
https://raw.githubusercontent.com/CompassSecurity/BloodHoundQueries/master/BloodHound_Custom_Queries/customqueries.json
1/ When starting the Exegol container, we only need to manipulate local files (Exegol's and the user's) and the version 1.4.0 pulls remote files by default. This means that implementing the PR in the current state of bqm still implies to empty temporarily the file query-sets.json as a workaround to disable remote sources. Something we agreed is not a good idea.
Hence my whish: could you add a CLI option to disable the pulling of remote sources ?
Add exegol dataset: https://github.com/ThePorgs/Exegol-images/blob/main/sources/bloodhound/customqueries.json
2/ Still for the same Exegol PR, rather than setting local files with
-i /tmp/a.json,/tmp/b.json
, could you support either:* `-i /tmp/directory -i /tmp/a.json -i /tmp/b.json` * or `-d /tmp/directory -i /tmp/a.json -i /tmp/b.json`
This would add support for directories. Bqm could autodetect the .json files in the folders. In the first case, the folder is included with the argument
-i
(as of version 1.4.0), second case with a new argument-d
. I don't know what you may prefer, these are suggestions, my favorite is the one with-d
.Having an option to include directories means that in Exegol, we would not need to have a wrapper around bqm to detect the files from a folder and dynamically construct the argument to pass to bqm. Plus, in both cases, I found the comma separator to break bqm if the user's file contains the character
,
. This is why I suggest to have support for multiple -d and -i arguments.
@ShutdownRepo suggestion
I think it would be nice to have bqm check if the file indicated in the path already exist, and use it’s content as part of the dataset. This would allow, whether it’s Exegol or somethings else, to always sync with what’s already there locally
3/ To expand a bit my thoughts above the above 1/, I think that bqm could be started a bit differently.
Rather than pulling remote sources by default and optionnally merge them with local files, bqm could start as an empty shell.
Then, the sources are enabled one by one on command-line:-r [data-sets.json]: to pull the remote sources for the optional file data-sets.json. If the switch is set and without a file, then the default dataset file is chosen. I think it may intereset users to set their own data-sets file if they want custom remote sources (for example: a remote file on an intranet). -d <directory>: to include one local set directory. -i <file>: to include one local set file.
All three switches could be set several times, as there could be several remote sources, several directories, and several individual files.
Hello,
as discussed in ThePorgs/Exegol-images#163, could you add support so that the tool can import local files and not just remote ones?
Thanks in advance
Hello,
as discussed in ThePorgs/Exegol-images#163, could you add support so that the location of the dataset could be specified on the command line?
Thanks in advance
$ ruby bin/bqm -l
[+] Available datasets:
Traceback (most recent call last):
1: from bin/bqm:84:in <main>
bin/bqm:62:in get_datasets: undefined method load_file for JSON:Module (NoMethodError)
$
$ ruby --version
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux-gnu]
$
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.