rcity

rcity9 Write-Up

jeff_kim 2024. 3. 31. 12:39

 

 

풀이

rcity9@04d1eb9322c1:~$ ls
flag.txt  nmap-result.txt
rcity9@04d1eb9322c1:~$ cat flag.txt 
U2FsdGVkX1+leDPhZC2pHbHzQIm53MhRqDVCJb2LcjMP1GDsGRCyOwImPRC8WlYt
rcity9@04d1eb9322c1:~$ head 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)

 

이렇게 되어 있는 것을 파싱해서 21,22,23,25 이렇게 나오게 해야한다 

rcity9@04d1eb9322c1:~$ cat nmap-result.txt  | awk -F'/' '{printf "%s,", $1}' | 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

 

이렇게 나온 출력 결과물을 복사 한다음에 아래와 같이 붙여 넣는다

rcity9@04d1eb9322c1:~$ cat flag.txt | openssl enc -d -aes-256-cbc -base64 -k 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
*** WARNING : deprecated key derivation used.
Using -iter or -pbkdf2 would be better.
flag: z9J3r8D1sX4h2L0q6F7

 

위에서 nmap-result.txt 를 파싱한 결과물 가지고 복호화를 하면 flag가 떨어진다

'rcity' 카테고리의 다른 글

rcity11 Write-Up  (0) 2024.04.01
rcity10 Write-Up  (0) 2024.03.31
rcity8 Write-Up  (1) 2024.03.31
rcity7 Write-Up  (1) 2024.03.31
rcity6 Write-Up  (1) 2024.03.31