Mazars-Tech / AD_Miner

AD Miner is an Active Directory audit tool that leverages cypher queries to crunch data from the #Bloodhound graph database to uncover security weaknesses
GNU General Public License v3.0
1.08k stars 110 forks source link

Main page access #16

Closed elmaestro61 closed 11 months ago

elmaestro61 commented 11 months ago

Hi

How to have the main page (as in your github page) with :

Me, i launch a web server with python and i navigate in the differents pages : python3 -m http.server 8080

Is it normal in my index.html there is just a redirection ? My command : AD-miner -c -cf company_name -u neo4j -p mypassword

Thank you

jmbesnard commented 11 months ago

Hello

the index.html will redirect to html/index.html. And so you should end up seeing the dashboard as illustrated in the README.

Could you maybe ellaborate a little further so that we may be of better assistance ? thanks

elmaestro61 commented 11 months ago

I have not index.html in html/ folder

When i launch index.html, i have this error message on my web navigator :

Error response
Error code: 404
Message: File not found.
Error code explanation: HTTPStatus.NOT_FOUND - Nothing matches the given URI.
jmbesnard commented 11 months ago

Can you confirm that the script executed successfully ? If so, feel free to join the recently created discord server at [EDIT : link deactivated for now] to discuss this further

elmaestro61 commented 11 months ago

There are several errors but it's on the requestings. Normaly, the script generate a index.html in html folder ? I joined discord server thank you

Lagije commented 11 months ago

Hello,

I have the same error, do you have a procedure to correct it?

Thank you for your help,

Gilliann

jmbesnard commented 11 months ago

Could you provide us with more information such as python version, operating system and error messages ?

Lagije commented 11 months ago

Hello,

My OS is Windows Server 2016 version 1607 Python: 3.11

I have the following message at the beginning of the execution: [!]{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): u1 (line 1, column 112 (offset: 111)) "OPTIONAL MATCH (u:User) WITH COLLECT (DISTINCT u) AS u1 OPTIONAL MATCH (c:Computer) WITH COLLECT(DISTINCT c) + u1 AS o1 OPTIONAL MATCH (g:Group) WITH COLLECT(DISTINCT g) + o1 AS o2 UNWIND o2 AS o MATCH (o) WITH o ORDER BY o.name MATCH p=(o)-[:AdminTo1..3]->(c:Computer) WITH count(p) as nbr_admin, o.name as username MATCH (o) WHERE o.name=username SET o.nbr_adm_machines=nbr_admin" ^} [!]Traceback (most recent call last): File "C:\Users\az_adm\AppData\Local\Programs\Python\Python311\Lib\site-packages\ad_miner__main__.py", line 65, in populate_data_and_cache req"method" File "C:\Users\az_adm\AppData\Local\Programs\Python\Python311\Lib\site-packages\ad_miner\sources\modules\neo4j_class.py", line 1286, in requestList result = self.request(self, request, list) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\az_adm\AppData\Local\Programs\Python\Python311\Lib\site-packages\ad_miner\sources\modules\neo4j_class.py", line 1409, in request result = tx.run(request["request"]) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\az_adm\AppData\Local\Programs\Python\Python311\Lib\site-packages\neo4j_sync\work\transaction.py", line 156, in run result._tx_ready_run(query, parameters) File "C:\Users\az_adm\AppData\Local\Programs\Python\Python311\Lib\site-packages\neo4j_sync\work\result.py", line 120, in _tx_ready_run self._run(query, parameters, None, None, None, None) File "C:\Users\az_adm\AppData\Local\Programs\Python\Python311\Lib\site-packages\neo4j_sync\work\result.py", line 166, in _run self._attach() File "C:\Users\az_adm\AppData\Local\Programs\Python\Python311\Lib\site-packages\neo4j_sync\work\result.py", line 274, in _attach self._connection.fetch_message() File "C:\Users\az_adm\AppData\Local\Programs\Python\Python311\Lib\site-packages\neo4j_sync\io_common.py", line 180, in inner func(args, kwargs) File "C:\Users\az_adm\AppData\Local\Programs\Python\Python311\Lib\site-packages\neo4j_sync\io_bolt.py", line 658, in fetch_message res = self._process_message(tag, fields) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\az_adm\AppData\Local\Programs\Python\Python311\Lib\site-packages\neo4j_sync\io_bolt5.py", line 317, in _process_message response.on_failure(summary_metadata or {}) File "C:\Users\az_adm\AppData\Local\Programs\Python\Python311\Lib\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): u1 (line 1, column 112 (offset: 111)) "OPTIONAL MATCH (u:User) WITH COLLECT (DISTINCT u) AS u1 OPTIONAL MATCH (c:Computer) WITH COLLECT(DISTINCT c) + u1 AS o1 OPTIONAL MATCH (g:Group) WITH COLLECT(DISTINCT g) + o1 AS o2 UNWIND o2 AS o MATCH (o) WITH o ORDER BY o.name MATCH p=(o)-[:AdminTo*1..3]->(c:Computer) WITH count(p) as nbr_admin, o.name as username MATCH (o) WHERE o.name=username SET o.nbr_adm_machines=nbr_admin" ^}

jmbesnard commented 11 months ago

This piece of code is actually useless and will probably be removed soon. You can disable this query by setting set_x_nbr_adm_machines to false in the config.json file

jmbesnard commented 11 months ago

We'll close this issue after a PR will have been merged to fix this