Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull last changes #726

Closed
wants to merge 266 commits into from
Closed

Conversation

patrickvanreck
Copy link

No description provided.

andyrobbins and others added 28 commits April 28, 2017 14:15
Add ACL object control queries and organize node tabs
"Invoke-BloodHound -CollectionMethod ACLs"
I regret nothing
This PR addresses two issues with parsing Bolt responses:

1. The nature of OPTIONAL MATCH queries means there is a potential for returning "null" fields in a Bolt result. However, this raised errors when a null field was parsed for something like "identity.low" (which doesn't exist for a null field), so the graph wouldn't end up rendering. I've added some checks so that null fields are skipped and the other potential fields (Node, Relationship, Path) are still passed along for proper rendering.

2. The original logic would check the first field in the Bolt result for a certain property: `if (result._fields[0].hasOwnProperty('segments'))`. If it existed, then it would assume there was only one field in the result and it was a Path. If it didn't exist, then it would loop through each field and assume it was either a Node, Relationship, or Array with nested Node/Relationship fields. The problem arises when a query returns both a Path and some other field (Name/Relationship). For example, if the Path was listed as the first RETURN param, then it would be rendered and all other fields would be ignored. The opposite is also true -- if a Node/Relationship was listed as the first RETURN param, then any Path fields would be ignored. I've reordered some of the logic so that each field is parsed in turn instead of having a mutual exclusion between Path and Node/Relationship fields.

I came across these while toying with some custom queries. As far as I can tell, none of the existing BloodHound queries use OPTIONAL MATCH or have a RETURN clause with both a Path and a Node/Relationship, so they shouldn't be affected by the current configuration. Merging this PR would be a boost for those using custom queries :)
Update to Bolt result parsing in Graph.jsx
Copy link

CLA Assistant Lite bot:
Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


2 out of 11 committers have signed the CLA.
@rvazarkar
@andyrobbins
@HarmJ0y
@bismark-foofus
@digininja
@byt3bl33d3r
@dominik Schaudel
@ktwombley
@egru
@Beercow
@mbrancato
byt3bl33d3r, Dominik Schaudel seem not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You can retrigger this bot by commenting recheck in this Pull Request

@Hack-the-box Hack-the-box closed this by deleting the head repository Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.