OnlyForYou
Recon
HTTP (80)

The application has no links going anywhere, so most probably nothing with dirbusting. Subdomain enumeration returns new domain:

We can download the source. From frontend we know that application allows to resize images and convert them.
In app.py the download functionality is vulnerable to LFI. RTFM, and Python's os.path.join
After some fuzzing we discover the path for application on server.
The piece of code is vulnerable to code execution, it's running as shell and it has no sanitization!
Regular expression is bypassable if we put our payload at the end:
There are some internal applications running.
The user www-data doesn't have shell, so no SSH upgrade. I decided to upgrade nc to pwncat-cs.
We can use chisel to port forward the applications
3000 is Gogs, which seems to be Gitea alternative. No creds... moving on.

8001 is server ONLY4YOU application, trying default credentials logs us in.

Creds:
admin:admin
The Tasks mentioned migrating to neo4j, we also saw this port with user. The /search most likely performs contains query for Name field.

https://book.hacktricks.xyz/pentesting-web/sql-injection/cypher-injection-neo4jhttps://www.varonis.com/blog/neo4jection-secrets-data-and-cloud-exploitshttps://hackmd.io/@Chivato/rkAN7Q9NY
Query is injectable, but it's not your typical SQL. Cypher has very different syntax compared to SQL.

Get the server version query works.
The page returns 500, but clearly the request with version information is made to us.

Get tables (or labels)
Get columns (or keys)

Creds:
admin:adminCreds:john:ThisIs4You
SSH (22)
We are now available to SSH as john in to the box.
User.txt
Privilege Escalation
We are able to login into Gogs on port 3000 with john's credentials, if we can create malicious python package we can get RCE.
Malicious Python Packages and Code Execution via pip download
Upload this tar.gz to new Public repository, or edit the existing Test project to be public. After uploading we need to provide raw url so file can be downloaded.
Root.txt
Last updated