
[Linux] Break Out The Cage
Reconnaissance
sudo nmap 10.10.211.144

Enumeration
HTTP

FTP
FTP allows anonymous login, so we can try to connect to the ftp server. We grab a file called "dad_tasks" which we can read the content.

Cryptanalysis x OSINT
The content of the file seems to be base64 encoded.

The will contain something crypted.

We use dcode.fr to identify the type of encryption which has been. Viginere has a strong probaility to have been used. The plateform Vigenere Solver breaks the cyphered text. The keyis namelesstwo.
Mydadisghostrideraintthatcoolnocausehesonfirejokes could be a password. So we need to know who it belongs to. As the writter says these tasks are for his/her father who is the Ghost Rider so can conclude that the author is one of Nicholas Cage children.
Nicholas Cage has three childs: Weston, Kal-El, August.
Exploitation
SSH
We can performa password spraying attack on the ssh service. We can login with the password we find.


Lateralisation
The message below keeps popping up over the screen.
Some probably, a script in running in background. We can use pspy to find it. First we upload pspy on the target.

We got the program which display the message on the screen.

It is the program /opt/.dads_scripts/spread_the_quotes.py.

This script uses display the content of the file at /opt/.dads_scripts/.files/.quotes which we have the right to modify.

We will use this file to obtain a reverse shell on cage account as he is the owner of the file.

We can get a stable shell:
Persistence
We can export the ssh keys for persistence.
Escalation
In the email_3 we got something which seems crypted: haiinspsyanileph.

It is vigenere encoded withe the key "FACE".

We get the root password that way: root:cageisnotalegend
Remediation
To secure the system, consider these actions:
Use
scpinstead of FTP for secure file transfers.Disable SSH password-based login in favor of key-based authentication.
Implement strong passwords, e.g.,
Mydadisghostrideraintthatcoolnocausehesonfirejokes.Review and restrict file access permissions, particularly on sensitive files like
.quotes.
References
Last updated