Skip to content

Latest commit

 

History

History
89 lines (44 loc) · 1.76 KB

README.md

File metadata and controls

89 lines (44 loc) · 1.76 KB
nmap -sC -sV  10.10.10.85 

Alt text

I see that port 3000 is just running on my target.

Let's make a request to this port.

Alt text

I see just 404 on front of page, let's look at HTTP response headers.

Alt text

From 'X-Powered-By' response header I see that it is 'Express.js' framework is used.

While, I try to decode Cookie, it gives me some stuff as below.

Alt text

I see that it is stuff which related to Serialization and Deserialization,

I searched some blogs for 'Insecure Deserialization' attack for 'Express.js' framework.

I find this

I did all steps which mentioned on blog.

Alt text

That's worked.

Alt text

We got reverse shell from port (1337).

Alt text

Let's make interactive shell.

python3 -c 'import pty; pty.spawn("/bin/bash")'
Ctrl+Z
stty raw -echo; fg
export TERM=xterm
export SHELL=bash

Alt text

user.txt

Alt text

Here, I detect that 'output.txt' file's content is worked via cronjob.

Alt text

That's why I can add my script into 'script.py' which locating on 'Documents' folder.

I also this hidden cronjob via pspy tool.

Alt text

Now, it's time to change this python file via our malicious python file.

Alt text

I upload my malicious file into box and change with legitimate one and opens a listener.

After waiting 5 minutes, I got administrative shell.

root.txt

Alt text