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

KeyError: 'result' when Computing domain objects #88

Closed
t0-git opened this issue Nov 21, 2023 · 3 comments
Closed

KeyError: 'result' when Computing domain objects #88

t0-git opened this issue Nov 21, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@t0-git
Copy link

t0-git commented Nov 21, 2023

Describe the bug
After installing the latest version of AD_Miner using pipx, and launching it, multiple errors occured, but I think that only the latest one is related to the problem. Indeed, the render folder is empty, but not the cache_neo4j folder:

$ ls -la render_test/
total 44
drwxr-xr-x 8 t0 t0  4096 Nov 21 19:51 .
drwxr-xr-x 4 t0 t0 12288 Nov 21 19:51 ..
drwxr-xr-x 2 t0 t0  4096 Nov 21 18:44 assets
drwxr-xr-x 2 t0 t0  4096 Nov 21 18:44 css
drwxr-xr-x 2 t0 t0  4096 Nov 21 19:51 csv
drwxr-xr-x 2 t0 t0  4096 Nov 21 19:51 html
drwxr-xr-x 4 t0 t0  4096 Nov 21 18:44 icons
-rw-r--r-- 1 t0 t0    59 Nov 21 19:51 index.html
drwxr-xr-x 2 t0 t0  4096 Nov 21 19:51 js
$ ls -la render_test/html/
total 8
drwxr-xr-x 2 t0 t0 4096 Nov 21 19:51 .
drwxr-xr-x 8 t0 t0 4096 Nov 21 19:51 ..
$ ls -la render_test/csv/
total 8
drwxr-xr-x 2 t0 t0 4096 Nov 21 19:51 .
drwxr-xr-x 8 t0 t0 4096 Nov 21 19:51 ..
$ ls -la cache_neo4j
total 1748
drwxr-xr-x 2 t0 t0  12288 Nov 21 20:06 .
drwxr-xr-x 4 t0 t0  12288 Nov 21 19:51 ..
-rw-r--r-- 1 t0 t0 464323 Nov 21 19:51 test_anomaly_acl_1
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_can_read_gmsapassword_of_adm
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_can_read_laps
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_computers_admin_on_computers
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_computers_members_high_privilege
-rw-r--r-- 1 t0 t0   7864 Nov 21 19:51 test_computers_not_connected_since
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_cross_domain_domain_admins
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_da_to_da
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_dc_impersonation
-rw-r--r-- 1 t0 t0     83 Nov 21 19:51 test_dcsync_list
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_delete_orphans
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_del_fake_dc_admins
-rw-r--r-- 1 t0 t0    969 Nov 21 19:51 test_dom_admin_on_non_dc
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_domain_map_trust
-rw-r--r-- 1 t0 t0 186906 Nov 21 19:51 test_domain_OUs
-rw-r--r-- 1 t0 t0     33 Nov 21 19:51 test_domains
-rw-r--r-- 1 t0 t0   6252 Nov 21 19:51 test_dormant_accounts
-rw-r--r-- 1 t0 t0  15830 Nov 21 19:51 test_get_computers_linked_admin_group
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_get_count_of_member_admin_group
-rw-r--r-- 1 t0 t0 279564 Nov 21 19:51 test_get_empty_groups
-rw-r--r-- 1 t0 t0    266 Nov 21 19:51 test_get_empty_ous
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_get_groups_linked_admin_group
-rw-r--r-- 1 t0 t0  66959 Nov 21 19:51 test_get_users_direct_admin
-rw-r--r-- 1 t0 t0  14729 Nov 21 19:51 test_get_users_linked_admin_group
-rw-r--r-- 1 t0 t0    187 Nov 21 19:51 test_get_users_password_not_required
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_graph_rbcd
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_graph_rbcd_to_da
-rw-r--r-- 1 t0 t0     58 Nov 21 19:51 test_guest_accounts
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_has_sid_history
-rw-r--r-- 1 t0 t0    119 Nov 21 19:51 test_krb_pwd_last_change
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_nb_as-rep_roastable_accounts
-rw-r--r-- 1 t0 t0  15756 Nov 21 19:51 test_nb_computers
-rw-r--r-- 1 t0 t0  11256 Nov 21 19:51 test_nb_computers_laps
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_nb_computer_unconstrained_delegations
-rw-r--r-- 1 t0 t0   1681 Nov 21 19:51 test_nb_domain_admins
-rw-r--r-- 1 t0 t0     33 Nov 21 19:51 test_nb_domain_collected
-rw-r--r-- 1 t0 t0    304 Nov 21 19:51 test_nb_domain_controllers
-rw-r--r-- 1 t0 t0  10787 Nov 21 19:51 test_nb_enabled_accounts
-rw-r--r-- 1 t0 t0 126420 Nov 21 19:51 test_nb_groups
-rw-r--r-- 1 t0 t0    356 Nov 21 19:51 test_nb_kerberoastable_accounts
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_nb_user_password_cleartext
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_nb_users_unconstrained_delegations
-rw-r--r-- 1 t0 t0   1077 Nov 21 19:51 test_objects_admincount
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_objects_to_adcs
-rw-r--r-- 1 t0 t0   5704 Nov 21 19:51 test_objects_to_dcsync
-rw-r--r-- 1 t0 t0   4939 Nov 21 19:51 test_objects_to_domain_admin
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_objects_to_operators_member
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_objects_to_ou_handlers
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_objects_to_unconstrained_delegation
-rw-r--r-- 1 t0 t0  15783 Nov 21 19:51 test_os
-rw-r--r-- 1 t0 t0   8504 Nov 21 19:51 test_password_last_change
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_preparation_request_nodes
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_preparation_request_relations
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_pre_windows_2000_compatible_access_group
-rw-r--r-- 1 t0 t0   3475 Nov 21 19:51 test_primaryGroupID_lower_than_1000
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_rbcd
-rw-r--r-- 1 t0 t0    151 Nov 21 19:51 test_rdp_access
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_set_can_extract_dc_secrets
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_set_can_load_code
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_set_can_logon_dc
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_set_containsda
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_set_containsdc
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_set_da
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_set_dag
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_set_dagg
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_set_daggg
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_set_dagg_types
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_set_dag_types
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_set_da_types
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_set_dc
-rw-r--r-- 1 t0 t0    321 Nov 21 19:51 test_set_dcsync1
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_set_dcsync2
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_set_ghost_computer
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_set_gpo_links_count
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_set_gpos_has_links
-rw-r--r-- 1 t0 t0   1522 Nov 21 19:51 test_set_groups_direct_admin
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_set_groups_has_members
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_set_groups_indirect_admin_1
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_set_groups_indirect_admin_2
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_set_groups_indirect_admin_3
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_set_groups_indirect_admin_4
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_set_groups_members_count
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_set_is_adcs
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_set_is_adminsdholder
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_set_is_da_dc
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_set_is_dnsadmin
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_set_is_group_operator
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_set_is_operator_member
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_set_nonda
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_set_nondag
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_set_nondc
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_set_non_server
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_set_path_candidate
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_set_server
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_set_unconstrained_delegations
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_set_upper_domain_name
-rw-r--r-- 1 t0 t0    156 Nov 21 19:51 test_unpriviledged_users_with_admincount
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_unpriv_to_dnsadmins
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_unpriv_users_to_GPO_computer_enforced
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_unpriv_users_to_GPO_computer_not_enforced
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_unpriv_users_to_GPO_init
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_unpriv_users_to_GPO_user_enforced
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_unpriv_users_to_GPO_user_not_enforced
-rw-r--r-- 1 t0 t0   2925 Nov 21 19:51 test_user_password_never_expires
-rw-r--r-- 1 t0 t0   5863 Nov 21 19:51 test_users_admin_on_computers
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_users_admin_on_servers_1
-rw-r--r-- 1 t0 t0    421 Nov 21 19:51 test_users_admin_on_servers_2
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_users_constrained_delegations
-rw-r--r-- 1 t0 t0   1983 Nov 21 19:51 test_users_shadow_credentials
-rw-r--r-- 1 t0 t0  93439 Nov 21 19:51 test_users_shadow_credentials_to_non_admins
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_users_to_unconstrained_delegation
-rw-r--r-- 1 t0 t0    100 Nov 21 19:51 test_vuln_functional_level
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_vuln_permissions_adminsdholder
-rw-r--r-- 1 t0 t0      5 Nov 21 19:51 test_vuln_sidhistory_dangerous

Terminal Output

$ AD-miner -u neo4j -p bloodhound -cf test
[+]Base : 185 | Base : 2137 | Base : 217 | Base : 21 | Base : 1 | Base : 18 | Base : 42 | Relations : 30814
[1/118] [+]Requesting : Delete orphan objects that have no labels
[-]Done in 0.00 s - 0 objects
[2/118] [+]Requesting : Clean AD Miner custom attributes
[-]Done in 0.10 s - 0 objects
[3/118] [+]Requesting : Delete objects for which SID could not resolved
[!]{code: Neo.ClientError.Statement.SyntaxError} {message: The property existence syntax `... exists(variable.property)` is no longer supported. Please use `variable.property IS NOT NULL` instead. (line 1, column 22 (offset: 21))
"MATCH (n) WHERE (NOT EXISTS(n.domain) AND NOT (n:Domain)) OR NOT EXISTS(n.name) DETACH DELETE n"
                      ^}
[!]Traceback (most recent call last):
  File "/home/t0/.local/pipx/venvs/ad-miner/lib/python3.11/site-packages/ad_miner/__main__.py", line 76, in populate_data_and_cache
    neo4j.process_request(neo4j, request_key)
  File "/home/t0/.local/pipx/venvs/ad-miner/lib/python3.11/site-packages/ad_miner/sources/modules/neo4j_class.py", line 286, in process_request
    result = self.writeRequest(self, request_key)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/t0/.local/pipx/venvs/ad-miner/lib/python3.11/site-packages/ad_miner/sources/modules/neo4j_class.py", line 320, in simpleRequest
    result = tx.run(request["request"])
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/t0/.local/pipx/venvs/ad-miner/lib/python3.11/site-packages/neo4j/_sync/work/transaction.py", line 156, in run
    result._tx_ready_run(query, parameters)
  File "/home/t0/.local/pipx/venvs/ad-miner/lib/python3.11/site-packages/neo4j/_sync/work/result.py", line 120, in _tx_ready_run
    self._run(query, parameters, None, None, None, None)
  File "/home/t0/.local/pipx/venvs/ad-miner/lib/python3.11/site-packages/neo4j/_sync/work/result.py", line 166, in _run
    self._attach()
  File "/home/t0/.local/pipx/venvs/ad-miner/lib/python3.11/site-packages/neo4j/_sync/work/result.py", line 274, in _attach
    self._connection.fetch_message()
  File "/home/t0/.local/pipx/venvs/ad-miner/lib/python3.11/site-packages/neo4j/_sync/io/_common.py", line 180, in inner
    func(*args, **kwargs)
  File "/home/t0/.local/pipx/venvs/ad-miner/lib/python3.11/site-packages/neo4j/_sync/io/_bolt.py", line 658, in fetch_message
    res = self._process_message(tag, fields)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/t0/.local/pipx/venvs/ad-miner/lib/python3.11/site-packages/neo4j/_sync/io/_bolt5.py", line 317, in _process_message
    response.on_failure(summary_metadata or {})
  File "/home/t0/.local/pipx/venvs/ad-miner/lib/python3.11/site-packages/neo4j/_sync/io/_common.py", line 247, in on_failure
    raise Neo4jError.hydrate(**metadata)
neo4j.exceptions.CypherSyntaxError: {code: Neo.ClientError.Statement.SyntaxError} {message: The property existence syntax `... exists(variable.property)` is no longer supported. Please use `variable.property IS NOT NULL` instead. (line 1, column 22 (offset: 21))
"MATCH (n) WHERE (NOT EXISTS(n.domain) AND NOT (n:Domain)) OR NOT EXISTS(n.name) DETACH DELETE n"
                      ^}
[...]
[32/118] [+]Requesting : Set ou_candidate=TRUE to candidates eligible to shortestou to DA
[!]{code: Neo.ClientError.Statement.SyntaxError} {message: The property existence syntax `... exists(variable.property)` is no longer supported. Please use `variable.property IS NOT NULL` instead. (line 1, column 79 (offset: 78))
"MATCH (m) WHERE NOT m.name IS NULL AND ((m:Computer AND (m.is_dc=false OR NOT EXISTS(m.is_dc))) OR (m:User AND (m.is_da=false OR NOT EXISTS(m.is_da)))) SET m.ou_candidate=TRUE"
                                                                               ^}
[!]Traceback (most recent call last):
  File "/home/t0/.local/pipx/venvs/ad-miner/lib/python3.11/site-packages/ad_miner/__main__.py", line 76, in populate_data_and_cache
    neo4j.process_request(neo4j, request_key)
  File "/home/t0/.local/pipx/venvs/ad-miner/lib/python3.11/site-packages/ad_miner/sources/modules/neo4j_class.py", line 286, in process_request
    result = self.writeRequest(self, request_key)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/t0/.local/pipx/venvs/ad-miner/lib/python3.11/site-packages/ad_miner/sources/modules/neo4j_class.py", line 320, in simpleRequest
    result = tx.run(request["request"])
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/t0/.local/pipx/venvs/ad-miner/lib/python3.11/site-packages/neo4j/_sync/work/transaction.py", line 156, in run
    result._tx_ready_run(query, parameters)
  File "/home/t0/.local/pipx/venvs/ad-miner/lib/python3.11/site-packages/neo4j/_sync/work/result.py", line 120, in _tx_ready_run
    self._run(query, parameters, None, None, None, None)
  File "/home/t0/.local/pipx/venvs/ad-miner/lib/python3.11/site-packages/neo4j/_sync/work/result.py", line 166, in _run
    self._attach()
  File "/home/t0/.local/pipx/venvs/ad-miner/lib/python3.11/site-packages/neo4j/_sync/work/result.py", line 274, in _attach
    self._connection.fetch_message()
  File "/home/t0/.local/pipx/venvs/ad-miner/lib/python3.11/site-packages/neo4j/_sync/io/_common.py", line 180, in inner
    func(*args, **kwargs)
  File "/home/t0/.local/pipx/venvs/ad-miner/lib/python3.11/site-packages/neo4j/_sync/io/_bolt.py", line 658, in fetch_message
    res = self._process_message(tag, fields)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/t0/.local/pipx/venvs/ad-miner/lib/python3.11/site-packages/neo4j/_sync/io/_bolt5.py", line 317, in _process_message
    response.on_failure(summary_metadata or {})
  File "/home/t0/.local/pipx/venvs/ad-miner/lib/python3.11/site-packages/neo4j/_sync/io/_common.py", line 247, in on_failure
    raise Neo4jError.hydrate(**metadata)
neo4j.exceptions.CypherSyntaxError: {code: Neo.ClientError.Statement.SyntaxError} {message: The property existence syntax `... exists(variable.property)` is no longer supported. Please use `variable.property IS NOT NULL` instead. (line 1, column 79 (offset: 78))
"MATCH (m) WHERE NOT m.name IS NULL AND ((m:Computer AND (m.is_dc=false OR NOT EXISTS(m.is_dc))) OR (m:User AND (m.is_da=false OR NOT EXISTS(m.is_da)))) SET m.ou_candidate=TRUE"
                                                                               ^}
[...]
[104/118] [+]Requesting : anomaly_acl_2
[!]{code: Neo.ClientError.Statement.SyntaxError} {message: The property existence syntax `... exists(variable.property)` is no longer supported. Please use `variable.property IS NOT NULL` instead. (line 1, column 24 (offset: 23))
"MATCH (gg:Group) WHERE EXISTS(gg.members_count) with gg as g order by gg.members_count DESC MATCH (g)-[r2{isacl:true}]->(n) WHERE ((g.is_da IS NULL OR g.is_da=FALSE) AND (g.is_dc IS NULL OR g.is_dc=FALSE)) OR (NOT n.domain CONTAINS '.' + g.domain AND n.domain <> g.domain) RETURN g.members_count,n.name,g.name,type(r2),LABELS(g)[0] order by g.members_count DESC"
                        ^}
[!]Traceback (most recent call last):
  File "/home/t0/.local/pipx/venvs/ad-miner/lib/python3.11/site-packages/ad_miner/__main__.py", line 76, in populate_data_and_cache
    neo4j.process_request(neo4j, request_key)
  File "/home/t0/.local/pipx/venvs/ad-miner/lib/python3.11/site-packages/ad_miner/sources/modules/neo4j_class.py", line 288, in process_request
    result = self.simpleRequest(self, request_key)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/t0/.local/pipx/venvs/ad-miner/lib/python3.11/site-packages/ad_miner/sources/modules/neo4j_class.py", line 320, in simpleRequest
    result = tx.run(request["request"])
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/t0/.local/pipx/venvs/ad-miner/lib/python3.11/site-packages/neo4j/_sync/work/transaction.py", line 156, in run
    result._tx_ready_run(query, parameters)
  File "/home/t0/.local/pipx/venvs/ad-miner/lib/python3.11/site-packages/neo4j/_sync/work/result.py", line 120, in _tx_ready_run
    self._run(query, parameters, None, None, None, None)
  File "/home/t0/.local/pipx/venvs/ad-miner/lib/python3.11/site-packages/neo4j/_sync/work/result.py", line 166, in _run
    self._attach()
  File "/home/t0/.local/pipx/venvs/ad-miner/lib/python3.11/site-packages/neo4j/_sync/work/result.py", line 274, in _attach
    self._connection.fetch_message()
  File "/home/t0/.local/pipx/venvs/ad-miner/lib/python3.11/site-packages/neo4j/_sync/io/_common.py", line 180, in inner
    func(*args, **kwargs)
  File "/home/t0/.local/pipx/venvs/ad-miner/lib/python3.11/site-packages/neo4j/_sync/io/_bolt.py", line 658, in fetch_message
    res = self._process_message(tag, fields)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/t0/.local/pipx/venvs/ad-miner/lib/python3.11/site-packages/neo4j/_sync/io/_bolt5.py", line 317, in _process_message
    response.on_failure(summary_metadata or {})
  File "/home/t0/.local/pipx/venvs/ad-miner/lib/python3.11/site-packages/neo4j/_sync/io/_common.py", line 247, in on_failure
    raise Neo4jError.hydrate(**metadata)
neo4j.exceptions.CypherSyntaxError: {code: Neo.ClientError.Statement.SyntaxError} {message: The property existence syntax `... exists(variable.property)` is no longer supported. Please use `variable.property IS NOT NULL` instead. (line 1, column 24 (offset: 23))
"MATCH (gg:Group) WHERE EXISTS(gg.members_count) with gg as g order by gg.members_count DESC MATCH (g)-[r2{isacl:true}]->(n) WHERE ((g.is_da IS NULL OR g.is_da=FALSE) AND (g.is_dc IS NULL OR g.is_dc=FALSE)) OR (NOT n.domain CONTAINS '.' + g.domain AND n.domain <> g.domain) RETURN g.members_count,n.name,g.name,type(r2),LABELS(g)[0] order by g.members_count DESC"
                        ^}

[...]
[113/118] [+]Requesting : Users that are local admins cross-domain
[!]{code: Neo.ClientError.Statement.SyntaxError} {message: Aggregation column contains implicit grouping expressions. For example, in 'RETURN n.a, n.a + n.b + count(*)' the aggregation expression 'n.a + n.b + count(*)' includes the implicit grouping key 'n.b'. It may be possible to rewrite the query by extracting these grouping/aggregation expressions into a preceding WITH clause. Illegal expression(s): paths (line 1, column 382 (offset: 381))
"MATCH p1=(u{enabled:true})-[r:MemberOf*1..4]->(g:Group{is_admin:true})-[rr:AdminTo]->(c:Computer) WHERE c.ghost_computer IS NULL AND u.domain <> c.domain AND NOT c.domain CONTAINS u.domain WITH collect(distinct p1) as paths OPTIONAL MATCH q=(u{enabled:true})-[r:AdminTo]->(c:Computer) WHERE c.ghost_computer IS NULL AND u.domain <> c.domain AND NOT c.domain CONTAINS u.domain WITH paths + collect(distinct q) as allPaths UNWIND allPaths as p RETURN DISTINCT p"
                                                                                                                                                                                                                                                                                                                                                                                              ^}
[!]Traceback (most recent call last):
  File "/home/t0/.local/pipx/venvs/ad-miner/lib/python3.11/site-packages/ad_miner/__main__.py", line 76, in populate_data_and_cache
    neo4j.process_request(neo4j, request_key)
  File "/home/t0/.local/pipx/venvs/ad-miner/lib/python3.11/site-packages/ad_miner/sources/modules/neo4j_class.py", line 288, in process_request
    result = self.simpleRequest(self, request_key)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/t0/.local/pipx/venvs/ad-miner/lib/python3.11/site-packages/ad_miner/sources/modules/neo4j_class.py", line 312, in simpleRequest
    for record in tx.run(request["request"]):
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/t0/.local/pipx/venvs/ad-miner/lib/python3.11/site-packages/neo4j/_sync/work/transaction.py", line 156, in run
    result._tx_ready_run(query, parameters)
  File "/home/t0/.local/pipx/venvs/ad-miner/lib/python3.11/site-packages/neo4j/_sync/work/result.py", line 120, in _tx_ready_run
    self._run(query, parameters, None, None, None, None)
  File "/home/t0/.local/pipx/venvs/ad-miner/lib/python3.11/site-packages/neo4j/_sync/work/result.py", line 166, in _run
    self._attach()
  File "/home/t0/.local/pipx/venvs/ad-miner/lib/python3.11/site-packages/neo4j/_sync/work/result.py", line 274, in _attach
    self._connection.fetch_message()
  File "/home/t0/.local/pipx/venvs/ad-miner/lib/python3.11/site-packages/neo4j/_sync/io/_common.py", line 180, in inner
    func(*args, **kwargs)
  File "/home/t0/.local/pipx/venvs/ad-miner/lib/python3.11/site-packages/neo4j/_sync/io/_bolt.py", line 658, in fetch_message
    res = self._process_message(tag, fields)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/t0/.local/pipx/venvs/ad-miner/lib/python3.11/site-packages/neo4j/_sync/io/_bolt5.py", line 317, in _process_message
    response.on_failure(summary_metadata or {})
  File "/home/t0/.local/pipx/venvs/ad-miner/lib/python3.11/site-packages/neo4j/_sync/io/_common.py", line 247, in on_failure
    raise Neo4jError.hydrate(**metadata)
neo4j.exceptions.CypherSyntaxError: {code: Neo.ClientError.Statement.SyntaxError} {message: Aggregation column contains implicit grouping expressions. For example, in 'RETURN n.a, n.a + n.b + count(*)' the aggregation expression 'n.a + n.b + count(*)' includes the implicit grouping key 'n.b'. It may be possible to rewrite the query by extracting these grouping/aggregation expressions into a preceding WITH clause. Illegal expression(s): paths (line 1, column 382 (offset: 381))
"MATCH p1=(u{enabled:true})-[r:MemberOf*1..4]->(g:Group{is_admin:true})-[rr:AdminTo]->(c:Computer) WHERE c.ghost_computer IS NULL AND u.domain <> c.domain AND NOT c.domain CONTAINS u.domain WITH collect(distinct p1) as paths OPTIONAL MATCH q=(u{enabled:true})-[r:AdminTo]->(c:Computer) WHERE c.ghost_computer IS NULL AND u.domain <> c.domain AND NOT c.domain CONTAINS u.domain WITH paths + collect(distinct q) as allPaths UNWIND allPaths as p RETURN DISTINCT p"
                                                                                                                                                                                                                                                                                                                                                                                              ^}
[...]
[+]Requests finished !
[+]Computing domains objects
**Traceback (most recent call last):
  File "/home/t0/.local/bin/AD-miner", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/t0/.local/pipx/venvs/ad-miner/lib/python3.11/site-packages/ad_miner/__main__.py", line 178, in main
    domains = Domains(arguments, neo4j)
              ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/t0/.local/pipx/venvs/ad-miner/lib/python3.11/site-packages/ad_miner/sources/modules/domains.py", line 147, in __init__
    self.cross_domain_local_admins_paths = neo4j.all_requests["cross_domain_local_admins"]["result"]
                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
KeyError: 'result'**

Lines were no errors occurred are skipped.

System information

  • Fresh install of a Debian 12 VM
$ neo4j version
neo4j 5.13.0
# python3 --version
Python 3.11.2
@t0-git t0-git added the bug Something isn't working label Nov 21, 2023
@t0-git
Copy link
Author

t0-git commented Nov 21, 2023

Solved downgrading neo4j to version 4.

@t0-git t0-git closed this as completed Nov 21, 2023
@wwwGeneral
Copy link

I have the exact same issue in neo4j 4.4.30, which version of neo4j works ?

@leJoPra
Copy link
Collaborator

leJoPra commented Apr 25, 2024

I have the exact same issue in neo4j 4.4.30, which version of neo4j works ?

Neo4j 4.4.32 is working fine.

@leJoPra leJoPra closed this as not planned Won't fix, can't repro, duplicate, stale Apr 25, 2024
@leJoPra leJoPra closed this as completed Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants