ANSSI-FR / AD-control-paths

Active Directory Control Paths auditing and graphing tools
https://www.sstic.org/2014/presentation/chemins_de_controle_active_directory/
Other
655 stars 99 forks source link

Error on Query.ps1 #27

Open achile81 opened 4 years ago

achile81 commented 4 years ago

ERROR ON QUERY THE GRAPH DATABASE:

[!]Neo4j returned an error: Unable to deserialize request: Illegal unquoted character ((CTRL-CHAR, code 10)): has to be escaped using backslash to be included in string value at [Source: HttpInputOverHTTP@3e538d5d[c=204,q=0,[0]=null,s=STREAM]; line: 1, column: 33] Exiting

gdedrouas commented 4 years ago

What is the command line ?

ghost commented 4 years ago

I'm hitting the same issue.

The command line I used was .\Query.ps1 -search "cn=administrateurs" and the error I got was

[!]Neo4j returned an error:
Unable to deserialize request: Illegal unquoted character ((CTRL-CHAR, code 10)): has to be escaped using backslash to be included in string value
 at [Source: HttpInputOverHTTP@3d88bcf1[c=201,q=0,[0]=null,s=STREAM]; line: 1, column: 33]
Exiting

My Active Directory is setup in french, this may be related.

novasurf74 commented 3 years ago

Hi,

I'm hitting the same issue that Cyrtiac. But my command is .\Query.ps1 -quick -neo4jPort 7475

Can you help us?

Thank's

spicyjuice commented 3 years ago

Hi, I have the same issue :( Any idea?

Thx

mdoidy commented 3 years ago

I had the same issue and I managed to fix it by removing all the return chars within each $Body=... line

IamPhilG commented 3 years ago

I had the same issue The removal of return chars were not enough even if it has been added to the query.ps1 script. I then rewrote the lines 98 to 105 in query.ps1 as followed:

$Body = @" 
{"statements":[{"statement" : "MATCH(n) WHERE n.name STARTS WITH `$searchedName WITH {id:ID(n),name:n.name} AS principal RETURN principal","parameters" : {"searchedName" : "$search"} }]}
"@ -replace "`r`n",""

And I have no more errors