RCity 0~10 해설

2023-12-19

레드라쿤 라쿤시티(RCity)

https://ctf.redraccoon.kr/

라쿤시티는 레드라쿤에서 제공하는 워게임으로, 쉘 스크립팅, 기초 리눅스 커맨드, 기본적인 IT 지식들을 공부하고 연습할 수 있는 플랫폼입니다.

그 외에 라쿤시티나 레드라쿤에 대해서 다양한 정보가 궁금하다면 하단 링크에 접속하시길 바랍니다.

Tutorial

FLAG (스포일러 방지)
flag: 111222abcdef333hjk1

https://ctf.redraccoon.kr/challenges#Tutorial-2

라쿤시티의 참고사항은 다음과 같습니다.

  • 비밀번호: 19자리
  • 각 플레그는 다음 레벨 ssh 유저의 비밀번호 입니다.
  • SSH 접속 방법:  ssh rcity<번호>@ctf.redraccoon.kr -p 31338
  • 대부분의 플래그 파일은 rcity 유저의 홈 디렉토리에 있음
  • 파일을 생성하거나 디렉토리를 만들 경우에는 /tmp 디렉토리를 이용할 것

RCity0

FLAG (스포일러 방지)
flag: d9mK4R2cS1gJ3o7V8A0

https://ctf.redraccoon.kr/challenges#Operation%20RCity0-3

힌트: cat

  • 주소: ctf.redraccoon.kr
  • 포트: 31338
  • 유저 이름: rcity0
  • 비밀번호: rcity0

rcity0에 접속해봅시다.

ssh [email protected] -p 31338

홈 디렉토리에 flag 파일이 있고, 해당 파일을 읽으면 flag를 획득할 수 있습니다.

rcity0@9fa6a9d8227f:~$ ls
flag
rcity0@9fa6a9d8227f:~$ file flag
flag: ASCII text
rcity0@9fa6a9d8227f:~$ cat flag
*******************
rcity0@9fa6a9d8227f:~$

RCity1

FLAG (스포일러 방지)
flag: n1zP6Q3jX4wC7r2bH5T

https://ctf.redraccoon.kr/challenges#Operation%20RCity1-4

힌트: cd

flag.txt를 찾아보면, 'maybe here' 폴더 내에 존재하는 것을 확인할 수 있습니다.

rcity1@9fa6a9d8227f:~$ ls -al
total 36
drwxr-xr-x 1 root root 4096 Dec 16 08:05  .
drwxr-xr-x 1 root root 4096 Dec 16 08:05  ..
-rw-r--r-- 1 root root  220 Jan  6  2022  .bash_logout
-rw-r--r-- 1 root root 3771 Jan  6  2022  .bashrc
-rw-r--r-- 1 root root  807 Jan  6  2022  .profile
drwxr-xr-x 2 root root 4096 Dec 16 08:05  flag
drwxr-xr-x 2 root root 4096 Dec 16 08:05 'maybe here'
drwxr-xr-x 2 root root 4096 Dec 16 08:05  nowaithere
rcity1@9fa6a9d8227f:~$
rcity1@9fa6a9d8227f:~$ ls -al 'maybe here'/
total 12
drwxr-xr-x 2 root root   4096 Dec 16 08:05  .
drwxr-xr-x 1 root root   4096 Dec 16 08:05  ..
-r--r----- 1 root rcity1   20 Dec 16 08:05 'fl ag.txt'
rcity1@9fa6a9d8227f:~$

따라서 해당 flag 파일을 읽으면 flag를 획득할 수 있습니다.

rcity1@34b86e126bc2:~$ cat maybe\ here/fl\ ag.txt
*******************

RCity2

FLAG (스포일러 방지)
flag: e7G5D8yL0qR6v4s3W9Z

https://ctf.redraccoon.kr/challenges#Operation%20RCity2-5

힌트: ls

rcity2@9fa6a9d8227f:~$ ls -al
total 28
drwxr-xr-x 1 root root   4096 Dec 16 08:05 .
drwxr-xr-x 1 root root   4096 Dec 16 08:05 ..
-r--r----- 1 root rcity2   20 Dec 16 08:05 ...catthisfile.txt
-rw-r--r-- 1 root root    220 Jan  6  2022 .bash_logout
-rw-r--r-- 1 root root   3771 Jan  6  2022 .bashrc
-rw-r--r-- 1 root root    807 Jan  6  2022 .profile

...catthisfile.txt 파일이 숨김파일이 되어있는 것을 확인할 수 있습니다.

따라서 해당 파일을 읽으면 flag를 획득할 수 있습니다.

rcity2@9fa6a9d8227f:~$ file ...catthisfile.txt
...catthisfile.txt: ASCII text
rcity2@9fa6a9d8227f:~$ cat ...catthisfile.txt
*******************

RCity3

FLAG (스포일러 방지)
flag: a3P1n7cJ9mV8G0r6S2t

https://ctf.redraccoon.kr/challenges#Operation%20RCity3-6

힌트: find

rcity3@9fa6a9d8227f:~$ ls -al
total 64
drwxr-xr-x  1 root root   4096 Dec 16 08:06 .
drwxr-xr-x  1 root root   4096 Dec 16 08:05 ..
-rw-r--r--  1 root root    220 Jan  6  2022 .bash_logout
-rw-r--r--  1 root root   3771 Jan  6  2022 .bashrc
-rw-r--r--  1 root root    807 Jan  6  2022 .profile
drw-r-x--- 12 root rcity3 4096 Dec 16 08:05 raccoon1
drw-r-x--- 12 root rcity3 4096 Dec 16 08:06 raccoon10
drw-r-x--- 12 root rcity3 4096 Dec 16 08:05 raccoon2
drw-r-x--- 12 root rcity3 4096 Dec 16 08:05 raccoon3
drw-r-x--- 12 root rcity3 4096 Dec 16 08:05 raccoon4
drw-r-x--- 12 root rcity3 4096 Dec 16 08:05 raccoon5
drw-r-x--- 12 root rcity3 4096 Dec 16 08:05 raccoon6
drw-r-x--- 12 root rcity3 4096 Dec 16 08:06 raccoon7
drw-r-x--- 12 root rcity3 4096 Dec 16 08:06 raccoon8
drw-r-x--- 12 root rcity3 4096 Dec 16 08:06 raccoon9

홈 디렉토리에 수많은 폴더들이 존재하므로, find 명령어를 사용하여 txt 파일을 찾아보겠습니다.

rcity3@9fa6a9d8227f:~$ find ./ -name '*.txt'
./raccoon1/city3/directory3/flag7/f14g.txt

해당 파일을 읽으면 flag를 획득할 수 있습니다.

rcity3@9fa6a9d8227f:~$ cat ./raccoon1/city3/directory3/flag7/f14g.txt
*******************

RCity4

FLAG (스포일러 방지)
flag: W6fR3jP7uN1xZ2bL8s4

https://ctf.redraccoon.kr/challenges#Operation%20RCity4-7

힌트: grep

rcity4@9fa6a9d8227f:~$ file flag.txt
flag.txt: ASCII text

flag 파일에는 너무 많은 문자열이 뒤섞여있으므로, grep를 사용하여 찾아보겠습니다.

이때, -i 옵션을 사용하여 대소문자 구분없이 찾도록 합니다.

rcity4@9fa6a9d8227f:~$ grep -i "flag is here" flag.txt
conjunctur Aquilid supernature fLag Is HerE ******************* mumpishly dipterology chromidrosis unresisted

RCity5

FLAG (스포일러 방지)
flag: M2pN9zQ1sW3yH8gR6d0

https://ctf.redraccoon.kr/challenges#Operation%20RCity5-8

힌트: base64

flag 파일을 읽어보면 base64로 인코딩이 되어있는 것을 확인할 수 있습니다.

rcity5@9fa6a9d8227f:~$ file flag.txt
flag.txt: ASCII text, with no line terminators
rcity5@9fa6a9d8227f:~$ cat flag.txt
flag is base64 encoded string - ZmxhZzogTTJwTjl6UTFzVzN5SDhnUjZkMAo=
rcity5@9fa6a9d8227f:~$

따라서 해당 문자열을 base64 decode를 하면 flag를 획득할 수 있습니다.

rcity5@dfb3151cb2fd:~$ echo "ZmxhZzogTTJwTjl6UTFzVzN5SDhnUjZkMAo=" | base64 -d
flag: *******************

RCity6

FLAG (스포일러 방지)
flag: h5Z8D2G4cW7L6x0R3f9

https://ctf.redraccoon.kr/challenges#Operation%20RCity6-9

힌트: file & strings

flag 파일을 조사하면, 실행파일임을 확인할 수 있습니다.

rcity6@34b86e126bc2:~$ file flag
flag: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=b1f86367bf51938246c5385f86ff7dfee49dbb08, for GNU/Linux 3.2.0, not stripped

실행 권한이 있으므로 실행해보면, flag와 관련된 실행결과 값은 없어보입니다.

rcity6@9fa6a9d8227f:~$ ls -l flag
-r--r-x--- 1 root rcity6 16696 Dec 16 08:06 flag
rcity6@9fa6a9d8227f:~$ ./flag
Hello World
The string contains:
9 digit(s)
6 uppercase letter(s)
4 lowercase letter(s)
Current time: Thu Dec 21 18:13:29 2023

Lorem ipsum dolor sit amet, consectetur
Length of string: 39
Random number: 52
Square root of the random number: 401327526
adipiscing elit, sed do eiusmod tempor
Length of string: 38
Random number: 11
Square root of the random number: 889772806
incididunt ut labore et dolore magna aliqua.
Length of string: 44
Random number: 13
Square root of the random number: 580527218
Ut enim ad minim veniam, quis nostrud exercitation
Length of string: 50
Random number: 16
Square root of the random number: 398489157
ullamco laboris nisi ut aliquip ex ea commodo consequat.
Length of string: 56
Random number: 38
Square root of the random number: 946774164
Duis aute irure dolor in reprehenderit in
Length of string: 41
Random number: 8
Square root of the random number: 255529424
voluptate velit esse cillum dolore eu fugiat
Length of string: 44
Random number: 45
Square root of the random number: 1582771754
nulla pariatur. Excepteur sint occaecat cupidatat
Length of string: 49
Random number: 72
Square root of the random number: 982603457
non proident, sunt in culpa qui officia deserunt
Length of string: 48
Random number: 1
Square root of the random number: 1565220625
mollit anim id est laborum.
Length of string: 27
Random number: 10
Square root of the random number: 193915272

따라서 strings 명령어를 사용하여 해당 파일 내의 인쇄가능한 문자열을 추출해보겠습니다.

이때, 비밀번호는 19자리이므로, 19자리 이상인 문자열만 출력하면 플래그를 획득할 수 있습니다.

rcity6@9fa6a9d8227f:~$ strings -n 19  flag
/lib64/ld-linux-x86-64.so.2
_ITM_deregisterTMCloneTable
_ITM_registerTMCloneTable
*******************
Lorem ipsum dolor sit amet, consectetur
adipiscing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation
ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in
voluptate velit esse cillum dolore eu fugiat
nulla pariatur. Excepteur sint occaecat cupidatat
non proident, sunt in culpa qui officia deserunt
mollit anim id est laborum.
The string contains:
%d uppercase letter(s)
%d lowercase letter(s)
Length of string: %lu
Square root of the random number: %d
GCC: (Debian 12.2.0-14) 12.2.0
deregister_tm_clones
__do_global_dtors_aux
__do_global_dtors_aux_fini_array_entry
__frame_dummy_init_array_entry
_GLOBAL_OFFSET_TABLE_
__libc_start_main@GLIBC_2.34
_ITM_deregisterTMCloneTable
_ITM_registerTMCloneTable
__cxa_finalize@GLIBC_2.2.5
__ctype_b_loc@GLIBC_2.3

RCity7

FLAG (스포일러 방지)
flag: F6jR2K3qH1gW7X5b0S9

https://ctf.redraccoon.kr/challenges#Operation%20RCity7-10

힌트: netcat

이번 문제는 해당 시스템 내에서 실행되고 있는 네트워크 포트를 찾아야합니다.

따라서 nmap을 사용하여 찾아보겠습니다.

rcity7@34b86e126bc2:~$ nmap -sT 127.0.0.1
Starting Nmap 7.80 ( https://nmap.org ) at 2023-10-20 11:08 UTC
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00011s latency).
Not shown: 998 closed ports
PORT     STATE SERVICE
22/tcp   open  ssh
9999/tcp open  abyss

Nmap done: 1 IP address (1 host up) scanned in 0.09 seconds

22번, 9999번 포트에서 실행되고 있는 것을 확인할 수 있습니다.

따라서 netcat으로 9999번 포트에 접속해보겠습니다.

rcity7@34b86e126bc2:~$ nc 127.0.0.1 9999
[+] 20초 안에 현재 유저의 비밀번호를 입력하세요: *******************
[+] Correct password received. Flag: *******************

현재 유저의 비밀번호를 입력하면 flag를 획득할 수 있습니다.

RCity8

FLAG (스포일러 방지)
flag: u4H8k2M0lW1xN7c3P9d

https://ctf.redraccoon.kr/challenges#Operation%20RCity7-10

힌트: scripting

해당 flag.txt는 base64로 여러번 인코딩되어 있으므로, base64 디코딩을 여러번해야 합니다.

base64 여러번 반복하는 shell script를 작성해보겠습니다.

state=$(<flag.txt)
for i in {1..44}; do
   state=$(<<<"$state" base64 --decode)
done
echo "$state"

해당 스크립트를 실행하면 flag를 획득할 수 있습니다.

rcity8@9fa6a9d8227f:/tmp/asdf$ chmod 744 asdf.sh
rcity8@9fa6a9d8227f:/tmp/asdf$ ./asdf.sh
flag: *******************

RCity9

FLAG (스포일러 방지)
flag: z9J3r8D1sX4h2L0q6F7

https://ctf.redraccoon.kr/challenges#Operation%20RCity9-12

힌트: awk & sed & cut

rcity9@9fa6a9d8227f:~$ ls
flag.txt  nmap-result.txt
rcity9@9fa6a9d8227f:~$ cat flag.txt
U2FsdGVkX18eHQZAaj9yNYmTL24HDni1oKmRLk4+0uz6TBHhRfUl5txHjdKEHOIK
rcity9@9fa6a9d8227f:~$ cat nmap-result.txt
21/tcp open FTP Microsoft ftpd v.1.3
22/tcp open ssh OpenSSH 7.9 (protocol 2.0)
23/tcp open telnet Linux telnetd
25/tcp open smtp Postfix smtpd
53/tcp open domain ISC BIND 9.8.2rc1-RedHat-9.8.2-0.62.rc1.el6_9.2
80/tcp open http Apache httpd 2.4.29 ((Ubuntu))
110/tcp open pop3 Dovecot pop3d
111/tcp open rpcbind 2 (RPC #100000)
135/tcp open msrpc Microsoft Windows RPC
139/tcp open netbios-ssn Samba smbd 3.X - 4.X (workgroup: WORKGROUP)
143/tcp open imap Dovecot imapd
179/tcp open bgp Cisco IOS 12.4 (Cisco 3825)
199/tcp open smux SNMP Unix Multiplexer
389/tcp open ldap OpenLDAP 2.2.X - 2.3.X
443/tcp open ssl/http Apache httpd
445/tcp open microsoft-ds Microsoft Windows 7 - 10 microsoft-ds (workgroup: WORKGROUP)
465/tcp open ssl/smtp Postfix smtpd
512/tcp open exec Linux rexecd
513/tcp open login
514/tcp open shell Linux rshd
515/tcp open printer LPD Printer Service
587/tcp open submission Postfix smtpd
631/tcp open ipp CUPS 1.2
646/tcp open ldp Cisco IOS LDP
873/tcp open rsync (protocol version 31)
902/tcp open ssl/vmware-auth VMware Authentication Daemon 1.10
989/tcp open ftps-data
990/tcp open ftps
993/tcp open ssl/imap Dovecot imapd
995/tcp open ssl/pop3 Dovecot pop3d
1080/tcp open socks 5 (FreeCap v3.18)
1194/tcp open openvpn OpenVPN 2.4.7 x86_64-pc-linux-gnu
1241/tcp open nessus Nessus Security Scanner
1433/tcp open ms-sql-s Microsoft SQL Server 2017 14.00.1000.00; RTM
1521/tcp open oracle Oracle 11g 11.1.0.7.0 (Windows IA32)
2049/tcp open nfs_acl 2-3 (RPC #100227)
2082/tcp open infowave
2083/tcp open radsec
2086/tcp open gnunet
2087/tcp open eli
3306/tcp open mysql MySQL 5.7.25-0ubuntu0.16.04.2
3389/tcp open ms-wbt-server Microsoft Terminal Service
3690/tcp open svnserve Subversion
3784/tcp open bfd-control
3899/tcp open rim-II-Config
4000/tcp open remoteanything RA-tcp 1.0.0
4369/tcp open epmd Erlang Port Mapper Daemon
4433/tcp open ipp CUPS 1.2
4444/tcp open krb524
4445/tcp open upnotifyp
4446/tcp open n1-fwp
5432/tcp open postgresql PostgreSQL DB 9.2.4 - 9.3.9
5500/tcp open hotline
5631/tcp open pcanywhere
5666/tcp open nrpe Nagios NRPE
5900/tcp open vnc VNC (protocol 3.8)
5901/tcp open vnc-1 VNC (protocol 3.3)
5985/tcp open wsman Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)
6000/tcp open X11 (access denied)
6001/tcp open X11:1 (access denied)
6002/tcp open X11:2 (access denied)
6003/tcp open X11:3 (access denied)
6112/tcp open dtspc
6379/tcp open redis Redis key-value store 3.0.504
6666/tcp open irc IRC (Internet Relay Chat)
6667/tcp open irc UnrealIRCd
6679/tcp open irc UnrealIRCd
6697/tcp open irc InspIRCd
7000/tcp open afs3-fileserver (Access denied)
7001/tcp open afs3-callback (Access denied)
7070/tcp open realserver
8000/tcp open http-alt HTTPD 1.1 (PHP 7.2.34)
8008/tcp open http Apache Tomcat/Coyote JSP engine 1.1
8009/tcp open ajp13 Apache JSP Tomcat 5.5.17 (Servlet 2.4; JSP 2.0; Java 1.5)
8080/tcp open http-proxy Squid http proxy 3.5.12
8081/tcp open blackice-icecap IBM Internet Security Systems' BlackICE Defender 3.6 cdp
8082/tcp open blackice-alerts
8085/tcp open unknown
8086/tcp open unknown
8087/tcp open unknown
8090/tcp open unknown
8443/tcp open https-alt Apache JServ Protocol v1.3
8888/tcp open sun-answerbook
9001/tcp open tor-orport Tor
9090/tcp open zeus-admin Secure Computing Sidewinder G2 firewall
9091/tcp open xmltec-xmlmail
9100/tcp open jetdirect HP JetDirect card
9200/tcp open http Elasticsearch 6.8.2
10000/tcp open http Webmin httpd
10001/tcp open scp-config
10002/tcp open documentum
10003/tcp open unknown
10004/tcp open emcrk
10009/tcp open unknown
10010/tcp open oozie Oozie Job Tracker 4.1
10100/tcp open itap-ddtp
11211/tcp open memcache Memcached 1.4.13
27017/tcp open mongodb MongoDB 3.6.3 (requires authentication)
27018/tcp open mongodb MongoDB 3.6.3 (requires authentication)
27019/tcp open mongodb MongoDB 3.6.3 (requires authentication)

nmap-result.txt 파일 내의 포트 + 쉼표 문자열로 구성된 암호화키를 만들어보겠습니다.

rcity9@9fa6a9d8227f:~$ awk '{print $1}' nmap-result.txt | cut -d "/" -f 1 | tr '\n' ',' | sed 's/,$//'
21,22,23,25,53,80,110,111,135,139,143,179,199,389,443,445,465,512,513,514,515,587,631,646,873,902,989,990,993,995,1080,1194,1241,1433,1521,2049,2082,2083,2086,2087,3306,3389,3690,3784,3899,4000,4369,4433,4444,4445,4446,5432,5500,5631,5666,5900,5901,5985,6000,6001,6002,6003,6112,6379,6666,6667,6679,6697,7000,7001,7070,8000,8008,8009,8080,8081,8082,8085,8086,8087,8090,8443,8888,9001,9090,9091,9100,9200,10000,10001,10002,10003,10004,10009,10010,10100,11211,27017,27018,27019

각 명령어 별로 다음을 수행합니다.

  • awk '{print $1}' nmap-result.txt: nmap-result.txt 파일의 각 줄에서 첫번째 필드를 추출합니다. 여기서의 첫번째 필드는 '21/tcp'가 추출됩니다,
  • cut -d "/" -f 1: 추출된 첫번째 필드을 '/'로 구분하여 첫번째 부분만 추출합니다.
  • tr '\n' ',': 줄바꿈문자를 쉼표로 바꿉니다.
  • sed 's/,$//': 마지막에 붙는 쉼표를 제거합니다.

따라서 암호화된 플래그를 복호화하면 flag를 구할 수 있습니다.

rcity9@9fa6a9d8227f:~$ cat flag.txt | openssl enc -d -aes-256-cbc -base64 -k $(awk '{print $1}' nmap-result.txt | cut -d "/" -f 1 | tr '\n' ',' | sed 's/,$//')
*** WARNING : deprecated key derivation used.
Using -iter or -pbkdf2 would be better.
flag: *******************rcity9@9fa6a9d8227f:~$

RCity10

FLAG (스포일러 방지)
flag: k3G8q2L5uX6r9C7b1H4

https://ctf.redraccoon.kr/challenges#Operation%20RCity10-13

힌트: tar & zip

rcity10@9fa6a9d8227f:~$ ls -al
total 28
drwxr-xr-x 1 root root    4096 Dec 16 08:06 .
drwxr-xr-x 1 root root    4096 Dec 16 08:05 ..
-rw-r--r-- 1 root root     220 Jan  6  2022 .bash_logout
-rw-r--r-- 1 root root    3771 Jan  6  2022 .bashrc
-rw-r--r-- 1 root root     807 Jan  6  2022 .profile
-r--r----- 1 root rcity10  408 Dec 16 08:06 flag.txt
rcity10@9fa6a9d8227f:~$ file flag.txt
flag.txt: 7-zip archive data, version 0.4

7zip이므로, 압축을 풀어주면

rcity10@9fa6a9d8227f:/tmp/asdf$ 7z x flag.txt

7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=C.UTF-8,Utf16=on,HugeFiles=on,64 bits,1 CPU DO-Regular (306F2),ASM,AES-NI)

Scanning the drive for archives:
1 file, 408 bytes (1 KiB)

Extracting archive: flag.txt
--
Path = flag.txt
Type = 7z
Physical Size = 408
Headers Size = 138
Method = LZMA2:12
Solid = -
Blocks = 1

Everything is Ok

Size:       330
Compressed: 408
rcity10@9fa6a9d8227f:/tmp/asdf$ ls
flag.txt  flag.xyz.zzz.abc
rcity10@9fa6a9d8227f:/tmp/asdf$ file flag.xyz.zzz.abc
flag.xyz.zzz.abc: Zip archive data, at least v2.0 to extract, compression method=deflate

flag.xyz.zzz.abc도 zip으로 압축된 파일이므로, 압축을 해제하겠습니다.

rcity10@9fa6a9d8227f:/tmp/asdf$ unzip flag.xyz.zzz.abc
Archive:  flag.xyz.zzz.abc
  inflating: flag.xyz.zzz
rcity10@9fa6a9d8227f:/tmp/asdf$ ls -al
total 20
drwxrwxr-x 2 rcity10 rcity10 4096 Dec 21 18:49 .
drwxrwx-wt 1 root    root    4096 Dec 21 18:49 ..
-r--r----- 1 rcity10 rcity10  408 Dec 21 18:46 flag.txt
-rw-r--r-- 1 rcity10 rcity10  158 Dec 16 08:06 flag.xyz.zzz
-rw-r--r-- 1 rcity10 rcity10  330 Dec 16 08:06 flag.xyz.zzz.abc
rcity10@9fa6a9d8227f:/tmp/asdf$ file flag.xyz.zzz
flag.xyz.zzz: gzip compressed data, was "flag.xyz", last modified: Sat Dec 16 08:06:05 2023, from Unix, original size modulo 2^32 10240

flag.xyz.zzz도 gzip으로 압축된 파일이므로, 압축 해제하겠습니다.

이때 gzip은 확장자가 .gz 이여야 압축이 해제되므로 확장자 변경후 압축 해제하겠습니다.

rcity10@9fa6a9d8227f:/tmp/asdf$ mv flag.xyz.zzz flag.xyz.gz & gzip -d flag.xyz.gz
[1] 1773
[1]+  Done                    mv flag.xyz.zzz flag.xyz.gz
rcity10@9fa6a9d8227f:/tmp/asdf$ file flag.xyz
flag.xyz: POSIX tar archive (GNU)

tar으로 압축된 파일이므로, 압축해제하겠습니다.

rcity10@9fa6a9d8227f:/tmp/asdf$ tar -xvf flag.xyz
flag.txt
rcity10@9fa6a9d8227f:/tmp/asdf$ file flag.txt
flag.txt: ASCII text
rcity10@9fa6a9d8227f:/tmp/asdf$ cat flag.txt
flag: *******************

최종적으로 flag.txt가 나오고, flag를 획득할 수 있습니다.