Cypher

Recon

nmap_scan.log

HTTP (80)

Writeup.png

All path goes to /login, but no registration is available.

Neo4j Procedure

/testing has *.jar file we can inspect

Neo4j procedure has command injection, if we are able to use it.

Writeup-1.png

Neo4j

After trying to use SQL injection the application crashes with error messages.

Writeup-2.png

Authentication happens with Neo4j query

https://www.varonis.com/blog/neo4jection-secrets-data-and-cloud-exploitsarrow-up-righthttps://pentester.land/blog/cypher-injection-cheatsheet/arrow-up-right

SSRF:

Writeup-3.png

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

SSH (22)

User.txt

Privilege Escalation

https://github.com/blacklanternsecurity/bbotarrow-up-right

LFI bbot

You can leak files with Custom Yara Rules combined with Debug mode

Root doesn't seem to own id_rsa key

Root.txt

Login as root (try) (and fail lol)

Either root doesn't have SSH keys at all or it's simply not id_rsa. We can use -v (verbose) mode on SSH to see what keys it tries to use

Doesn't work

Password is not in rock you :/

RCE bbot

https://www.blacklanternsecurity.com/bbot/Stable/dev/module_howto/#create-the-python-filearrow-up-righthttps://www.blacklanternsecurity.com/bbot/Stable/dev/module_howto/#load-modules-from-custom-locationsarrow-up-right

Last updated