{"id":2462,"date":"2020-05-18T09:59:07","date_gmt":"2020-05-18T08:59:07","guid":{"rendered":"https:\/\/www.teal-consulting.de\/?p=2462"},"modified":"2020-05-18T11:01:41","modified_gmt":"2020-05-18T10:01:41","slug":"acceleration-of-bloodhound-automation-of-neo4j-queries","status":"publish","type":"post","link":"https:\/\/www.teal-consulting.de\/en\/2020\/05\/18\/acceleration-of-bloodhound-automation-of-neo4j-queries\/","title":{"rendered":"Acceleration of Bloodhound &#8211; automation of Neo4j queries"},"content":{"rendered":"<div class=\"wpb-content-wrapper\" id=\"wpb-content-root\">[vc_row css_animation=&#8221;&#8221; row_type=&#8221;row&#8221; use_row_as_full_screen_section=&#8221;no&#8221; type=&#8221;full_width&#8221; angled_section=&#8221;no&#8221; text_align=&#8221;left&#8221; background_image_as_pattern=&#8221;without_pattern&#8221;][vc_column][vc_empty_space height=&#8221;30&#8243;][vc_row_inner row_type=&#8221;row&#8221; type=&#8221;full_width&#8221; text_align=&#8221;left&#8221; css_animation=&#8221;&#8221;][vc_column_inner][vc_column_text]This month we would like to give something back to the community. As you have read in our <a href=\"https:\/\/www.teal-consulting.de\/en\/2019\/11\/13\/assume-breach\/\" target=\"_blank\" rel=\"noopener noreferrer\">November blog<\/a>, we use numerous open source tools for our Active Directory Assessment. A prominent example is <a href=\"https:\/\/github.com\/BloodHoundAD\/BloodHound\" target=\"_blank\" rel=\"noopener noreferrer\">Bloodhound<\/a> with the <a href=\"https:\/\/neo4j.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">Neo4j<\/a> graph database in the background. Bloodhound is a tool that allows an attacker to &#8220;scan&#8221; the Active Directory with user rights and then evaluate the data offline. All groups, users and computer objects are stored, but above all also login data (who has a session where) and authorizations. These can be evaluated with special queries and potential targets and paths of attack are shown.<\/p>\n<p>In addition to the visualization of the attack paths in Bloodhound, there are numerous queries that can only be used directly against Neo4J, because the result is not a path but a list. In the net there are already numerous pages with interesting queries, e.g. from <a href=\"https:\/\/hausec.com\/2019\/09\/09\/bloodhound-cypher-cheatsheet\/\" target=\"_blank\" rel=\"noopener noreferrer\">@Haus3c<\/a> or from the <a href=\"https:\/\/github.com\/BloodHoundAD\/BloodHound\/wiki\/Cypher-Query-Gallery\" target=\"_blank\" rel=\"noopener noreferrer\">Bloodhound authors<\/a> (@wald0 and @CptJesus) themselves. From the latter there is also a good article on how to write your own Cypher queries (that&#8217;s the name of the Neo4j language).<\/p>\n<p>In the context of our AD assessment we always execute the same basic set of queries together with customer specific queries and hand the result over to the customer in CSV format as part of the assessment documentation. We have automated exactly this step and publish the script together with this blog article \ud83d\ude0a.<\/p>\n<h3 style=\"text-align: left;\">Das script works as follows:<\/h3>\n<p>The script reads one or more Cypher queries and their titles from an input file in JSON format, submits the queries to the Neo4j API one by one with the stored credentials and writes the result to a CSV file in the same directory.<\/p>\n<p>The API URL, input file, username, password and output directory can be passed as parameters.<\/p>\n<p>Please keep one thing in mind: If a query runs too long and you abort the PowerShell script, the processing of the query will continue within Neo4j. So you have to restart the Neo4j service to abort the query.<\/p>\n<h3>And this is how it looks like:<\/h3>\n[\/vc_column_text][\/vc_column_inner][\/vc_row_inner][vc_empty_space height=&#8221;30&#8243;][vc_single_image image=&#8221;2449&#8243; img_size=&#8221;full&#8221; qode_css_animation=&#8221;&#8221;][vc_column_text]\n<p style=\"font-size: 13px;\">Script and inputfile<\/p>\n[\/vc_column_text][vc_empty_space height=&#8221;30&#8243;][vc_single_image image=&#8221;2452&#8243; img_size=&#8221;full&#8221; qode_css_animation=&#8221;&#8221;][vc_column_text]\n<p style=\"font-size: 13px;\">Queryfile<\/p>\n[\/vc_column_text][vc_empty_space height=&#8221;30&#8243;][vc_single_image image=&#8221;2454&#8243; img_size=&#8221;full&#8221; qode_css_animation=&#8221;&#8221;][vc_column_text]\n<p style=\"font-size: 13px;\">Command without parameter<\/p>\n[\/vc_column_text][vc_empty_space height=&#8221;30&#8243;][vc_single_image image=&#8221;2458&#8243; img_size=&#8221;full&#8221; qode_css_animation=&#8221;&#8221;][vc_column_text]\n<p style=\"font-size: 13px;\">Script and inputfile<\/p>\n[\/vc_column_text][vc_empty_space height=&#8221;30&#8243;][vc_column_text]\n<h3>The resultfile<\/h3>\n[\/vc_column_text][vc_single_image image=&#8221;2456&#8243; img_size=&#8221;full&#8221; qode_css_animation=&#8221;&#8221;][vc_column_text]\n<p style=\"font-size: 13px;\">The result<\/p>\n[\/vc_column_text][vc_empty_space height=&#8221;30&#8243;][vc_column_text]You can find the script in our <a href=\"https:\/\/github.com\/teal-technology-consulting\/Invoke-Neo4jQuery\" target=\"_blank\" rel=\"noopener noreferrer\">GitHub repo<\/a>.<\/p>\n<p>Have fun with it. Feel free to contact us with any questions. If we have awakened your interest in an AD assessment, you are also welcome to contact us at \ud83d\ude0a.[\/vc_column_text][vc_empty_space height=&#8221;50&#8243;][vc_raw_html]JTNDYSUyMGhyZWYlM0QlMjJqYXZhc2NyaXB0JTNBaGlzdG9yeS5iYWNrJTI4JTI5JTIyJTNFJTNDc3BhbiUyMHN0eWxlJTNEJTIyY29sb3IlM0ElMjAlMjNmZjIwNzAlM0IlMjIlM0UlM0MlM0MlMjBCYWNrJTNDJTJGc3BhbiUzRSUzQyUyRmElM0U=[\/vc_raw_html][vc_empty_space height=&#8221;50&#8243;][vc_separator type=&#8221;small&#8221; position=&#8221;center&#8221; color=&#8221;#eeeeee&#8221; thickness=&#8221;2&#8243; width=&#8221;1100&#8243;][vc_empty_space height=&#8221;100&#8243;][\/vc_column][\/vc_row][vc_row css_animation=&#8221;&#8221; row_type=&#8221;row&#8221; use_row_as_full_screen_section=&#8221;no&#8221; type=&#8221;full_width&#8221; angled_section=&#8221;no&#8221; text_align=&#8221;left&#8221; background_image_as_pattern=&#8221;without_pattern&#8221;][vc_column][vc_column_text]\n<h2>LATEST POSTS<\/h2>\n[\/vc_column_text][vc_empty_space height=&#8221;30&#8243;]\n<div class='latest_post_holder boxes three_columns one_row' >\n    <ul>\n    \n        <li class=\"clearfix\">\n            <div class=\"boxes_image\">\n                                <a itemprop=\"url\" href=\"https:\/\/www.teal-consulting.de\/en\/2026\/04\/01\/logging-in-instead-of-breaking-in\/\"><img decoding=\"async\" width=\"539\" height=\"303\" data-src=\"https:\/\/www.teal-consulting.de\/wp-content\/uploads\/2023\/03\/blog_headerbild_teal_krux-mit-der-KI_AI-539x303.jpg\" class=\"attachment-latest_post_boxes size-latest_post_boxes wp-post-image lazyload\" alt=\"\" data-srcset=\"https:\/\/www.teal-consulting.de\/wp-content\/uploads\/2023\/03\/blog_headerbild_teal_krux-mit-der-KI_AI-539x303.jpg 539w, https:\/\/www.teal-consulting.de\/wp-content\/uploads\/2023\/03\/blog_headerbild_teal_krux-mit-der-KI_AI-300x169.jpg 300w, https:\/\/www.teal-consulting.de\/wp-content\/uploads\/2023\/03\/blog_headerbild_teal_krux-mit-der-KI_AI-1024x575.jpg 1024w, https:\/\/www.teal-consulting.de\/wp-content\/uploads\/2023\/03\/blog_headerbild_teal_krux-mit-der-KI_AI-768x432.jpg 768w, https:\/\/www.teal-consulting.de\/wp-content\/uploads\/2023\/03\/blog_headerbild_teal_krux-mit-der-KI_AI-1536x863.jpg 1536w, https:\/\/www.teal-consulting.de\/wp-content\/uploads\/2023\/03\/blog_headerbild_teal_krux-mit-der-KI_AI-700x393.jpg 700w, https:\/\/www.teal-consulting.de\/wp-content\/uploads\/2023\/03\/blog_headerbild_teal_krux-mit-der-KI_AI.jpg 1920w\" data-sizes=\"(max-width: 539px) 100vw, 539px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 539px; --smush-placeholder-aspect-ratio: 539\/303;\"><\/a>\n            <\/div>\n            <div class=\"latest_post\"  >\n                <div class=\"latest_post_text\">\n                    <div class=\"latest_post_inner\">\n                        <div class=\"latest_post_text_inner\">\n                            <h3 itemprop=\"name\" class=\"latest_post_title entry_title\"><a itemprop=\"url\" href=\"https:\/\/www.teal-consulting.de\/en\/2026\/04\/01\/logging-in-instead-of-breaking-in\/\">\u201cLogging In instead of Breaking In\u201d: Why your identities are the biggest security risk<\/a><\/h3>\n                            <p class=\"excerpt\">Attackers no longer \u201csimply\u201d break in, they LOG in. If you\u2019re still relying on traditional defenses in 2026, we believe you\u2019ve probably already lost the battle for your data....<\/p>\n                            <span class=\"post_infos\">\n                                                                    <span class=\"date_hour_holder\">\n                                        <span itemprop=\"dateCreated\" class=\"date entry_date updated\">01 April, 2026 <meta itemprop=\"interactionCount\" content=\"UserComments: 0\"\/><\/span>\n                                    <\/span>\n                                                                                                \n                                \n                                                            <\/span>\n                        <\/div>\n                    <\/div>\n                <\/div>\n            <\/div>\n        <\/li>\n    \n        <li class=\"clearfix\">\n            <div class=\"boxes_image\">\n                                <a itemprop=\"url\" href=\"https:\/\/www.teal-consulting.de\/en\/2026\/04\/29\/bsi-update-grundschutz\/\"><img decoding=\"async\" width=\"539\" height=\"303\" data-src=\"https:\/\/www.teal-consulting.de\/wp-content\/uploads\/2022\/09\/teal_blog_on-prem-safe_header-539x303.jpg\" class=\"attachment-latest_post_boxes size-latest_post_boxes wp-post-image lazyload\" alt=\"\" data-srcset=\"https:\/\/www.teal-consulting.de\/wp-content\/uploads\/2022\/09\/teal_blog_on-prem-safe_header-539x303.jpg 539w, https:\/\/www.teal-consulting.de\/wp-content\/uploads\/2022\/09\/teal_blog_on-prem-safe_header-300x169.jpg 300w, https:\/\/www.teal-consulting.de\/wp-content\/uploads\/2022\/09\/teal_blog_on-prem-safe_header-1024x575.jpg 1024w, https:\/\/www.teal-consulting.de\/wp-content\/uploads\/2022\/09\/teal_blog_on-prem-safe_header-768x432.jpg 768w, https:\/\/www.teal-consulting.de\/wp-content\/uploads\/2022\/09\/teal_blog_on-prem-safe_header-1536x863.jpg 1536w, https:\/\/www.teal-consulting.de\/wp-content\/uploads\/2022\/09\/teal_blog_on-prem-safe_header-700x393.jpg 700w, https:\/\/www.teal-consulting.de\/wp-content\/uploads\/2022\/09\/teal_blog_on-prem-safe_header.jpg 1920w\" data-sizes=\"(max-width: 539px) 100vw, 539px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 539px; --smush-placeholder-aspect-ratio: 539\/303;\"><\/a>\n            <\/div>\n            <div class=\"latest_post\"  >\n                <div class=\"latest_post_text\">\n                    <div class=\"latest_post_inner\">\n                        <div class=\"latest_post_text_inner\">\n                            <h3 itemprop=\"name\" class=\"latest_post_title entry_title\"><a itemprop=\"url\" href=\"https:\/\/www.teal-consulting.de\/en\/2026\/04\/29\/bsi-update-grundschutz\/\">BSI Update: Grundschutz++ Will become mandatory in 2028 &#8211; why you should take action now<\/a><\/h3>\n                            <p class=\"excerpt\">The wait is over: The BSI has published the first guidelines for Grundschutz++. What at first glance looks like additional bureaucratic red tape is, in fact, the new \u201cstate of the art\u201d for NIS2. ...<\/p>\n                            <span class=\"post_infos\">\n                                                                    <span class=\"date_hour_holder\">\n                                        <span itemprop=\"dateCreated\" class=\"date entry_date updated\">29 April, 2026 <meta itemprop=\"interactionCount\" content=\"UserComments: 0\"\/><\/span>\n                                    <\/span>\n                                                                                                \n                                \n                                                            <\/span>\n                        <\/div>\n                    <\/div>\n                <\/div>\n            <\/div>\n        <\/li>\n    \n        <li class=\"clearfix\">\n            <div class=\"boxes_image\">\n                                <a itemprop=\"url\" href=\"https:\/\/www.teal-consulting.de\/en\/2026\/01\/29\/bye-bye-rc4\/\"><img decoding=\"async\" width=\"539\" height=\"303\" data-src=\"https:\/\/www.teal-consulting.de\/wp-content\/uploads\/2026\/01\/Blog-Headerbild_RC4-539x303.png\" class=\"attachment-latest_post_boxes size-latest_post_boxes wp-post-image lazyload\" alt=\"\" data-srcset=\"https:\/\/www.teal-consulting.de\/wp-content\/uploads\/2026\/01\/Blog-Headerbild_RC4-539x303.png 539w, https:\/\/www.teal-consulting.de\/wp-content\/uploads\/2026\/01\/Blog-Headerbild_RC4-300x169.png 300w, https:\/\/www.teal-consulting.de\/wp-content\/uploads\/2026\/01\/Blog-Headerbild_RC4-1024x575.png 1024w, https:\/\/www.teal-consulting.de\/wp-content\/uploads\/2026\/01\/Blog-Headerbild_RC4-768x432.png 768w, https:\/\/www.teal-consulting.de\/wp-content\/uploads\/2026\/01\/Blog-Headerbild_RC4-1536x863.png 1536w, https:\/\/www.teal-consulting.de\/wp-content\/uploads\/2026\/01\/Blog-Headerbild_RC4-700x393.png 700w, https:\/\/www.teal-consulting.de\/wp-content\/uploads\/2026\/01\/Blog-Headerbild_RC4.png 1920w\" data-sizes=\"(max-width: 539px) 100vw, 539px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 539px; --smush-placeholder-aspect-ratio: 539\/303;\"><\/a>\n            <\/div>\n            <div class=\"latest_post\"  >\n                <div class=\"latest_post_text\">\n                    <div class=\"latest_post_inner\">\n                        <div class=\"latest_post_text_inner\">\n                            <h3 itemprop=\"name\" class=\"latest_post_title entry_title\"><a itemprop=\"url\" href=\"https:\/\/www.teal-consulting.de\/en\/2026\/01\/29\/bye-bye-rc4\/\">Bye-bye RC4: Your guide to the Kerberos transition in April 2026<\/a><\/h3>\n                            <p class=\"excerpt\">The clock is ticking for one of the longest-lasting (and most insecure) ciphers in our networks. Microsoft is getting serious and pushing for the shutdown of RC4 encryption in the Kerberos protocol....<\/p>\n                            <span class=\"post_infos\">\n                                                                    <span class=\"date_hour_holder\">\n                                        <span itemprop=\"dateCreated\" class=\"date entry_date updated\">29 January, 2026 <meta itemprop=\"interactionCount\" content=\"UserComments: 0\"\/><\/span>\n                                    <\/span>\n                                                                                                \n                                \n                                                            <\/span>\n                        <\/div>\n                    <\/div>\n                <\/div>\n            <\/div>\n        <\/li>\n        <\/ul>\n<\/div>[\/vc_column][\/vc_row]\n<\/div>","protected":false},"excerpt":{"rendered":"<p>This month we would like to give something back to the community. As you have read in our November blog, we use numerous open source tools for our Active Directory Assessment<\/p>\n","protected":false},"author":5,"featured_media":2423,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[10],"tags":[],"class_list":["post-2462","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.teal-consulting.de\/en\/wp-json\/wp\/v2\/posts\/2462","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.teal-consulting.de\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.teal-consulting.de\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.teal-consulting.de\/en\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.teal-consulting.de\/en\/wp-json\/wp\/v2\/comments?post=2462"}],"version-history":[{"count":3,"href":"https:\/\/www.teal-consulting.de\/en\/wp-json\/wp\/v2\/posts\/2462\/revisions"}],"predecessor-version":[{"id":2465,"href":"https:\/\/www.teal-consulting.de\/en\/wp-json\/wp\/v2\/posts\/2462\/revisions\/2465"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.teal-consulting.de\/en\/wp-json\/wp\/v2\/media\/2423"}],"wp:attachment":[{"href":"https:\/\/www.teal-consulting.de\/en\/wp-json\/wp\/v2\/media?parent=2462"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.teal-consulting.de\/en\/wp-json\/wp\/v2\/categories?post=2462"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.teal-consulting.de\/en\/wp-json\/wp\/v2\/tags?post=2462"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}