반응형
반응형
반응형

layers.txt

bin2ascii

oct2ascii

hex2ascii

base64decode

base85decode


Chimera

Open chimera.bin.img using FTK Imager.

 

I found key.docx.

extract it and rename key.docx to key.zip

 

hmm __main__.py ?

zip password key...

but i couldn't find any zip file.

 

so, i opened chimera.bin.img with HxD.exe. Then i searched "flag".

 

flag.png in flag.zip

good

it is in pdf file stream, but i couldn't find any pdf file. so i just carved it.

it says the file is corrupted, but i can get 61% unziped flag.png

 

 

it is half of flag, but we can read flag :)


Glitch in the matrix

 

DQT : en.wikibooks.org/wiki/JPEG_-_Idea_and_Practice/The_header_part#The_Quantization_table_segment_DQT

 

JPEG - Idea and Practice/The header part

The markers[edit] The header part of a JPEG file is divided into segments, and each segment starts with a marker, identifying the segment. Usually a JPEG file contains 7 different markers. A marker is a pair of bytes, the first is 255 and the second is dif

en.wikibooks.org

 

The DQT area is intentionally covered with 0xFF.

To recover DQT area, I copied and pasted the DQT area of other normal jpg files downloaded from the google.

After many attempts, I could read a flag.

 

we_need_bits_lots_of_bits


Net Matroyshka

 

8.pcap

 

7.pcap

 

 

6.pcap

 

copy&paste rsync data and sum data

 

5.pcap

 

follow > udp stream

 

make 4.zip

no footer signature in 5.pcap.

i think i extracted 5.zip wrong because 5.zip said zip file is corrupted.

 

i couldn't extract 5.zip correctly..

 


Tapesplice

BZh91AY&SY is bz2 header signature

 


denouement.png

use zsteg


Résumé

just copy and paste


Charge Tracker

 

dex2jar sourceforge.net/projects/dex2jar/

 

dex2jar

Download dex2jar for free. Tools to work with android .dex and java .class files. Mirrors: * https://bitbucket.org/pxb1988/dex2jar * https://github.com/pxb1988/dex2jar dex2jar contains following compment * dex-reader is designed to read the Dalvik Executab

sourceforge.net

 

open .jar using jd-gui java-decompiler.github.io/

 

Java Decompiler

The “Java Decompiler project” aims to develop tools in order to decompile and analyze Java 5 “byte code” and the later versions. JD-GUI is a standalone graphical utility that displays Java source codes of “.class” files. You can browse the reco

java-decompiler.github.io

 

part1 is here.

done.


Hashcrack 101

www.tunnelsup.com/hash-analyzer/

 

Hash Analyzer - TunnelsUP

Hash type: Bit length: Base: Example Hash Inputs 5f4dcc3b5aa765d61d8327deb882cf99MD5 5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8SHA1 5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8SHA256 $2a$10$N9qo8uLOickgx2ZMRZoMyeIjZAgcfl7p92ldGxad68LJZdL1

www.tunnelsup.com

1~4 : DES (Unix)

5~9 : md5crypt, MD5 (Unix)

10~13 : sha512crypt $6$, SHA512 (Unix)

 

use hashcat

hashcat.net/wiki/doku.php?id=example_hashes

 

example_hashes [hashcat wiki]

Example hashes If you get a “line length exception” error in hashcat, it is often because the hash mode that you have requested does not match the hash. To verify, you can test your commands against example hashes. Unless otherwise noted, the password

hashcat.net

combination bruteforce attack

dictonary attack

 

반응형

'CTF Write Up' 카테고리의 다른 글

dvCTF 2021 Write up  (2) 2021.03.15
BCA CTF 2021 Write up  (0) 2021.03.14
TRUST CTF 2021 write up  (0) 2021.02.28
Tenable CTF 2021 write up  (0) 2021.02.23
Union CTF 2021 Write up  (0) 2021.02.22
반응형

비트에 몸을 맡겨라!

브포 때려서 말이 되는거 찾아서 넣으면 된다.


blank

whitespace -> directory indexing -> whitespace

vii5ard.github.io/whitespace/

 

Whitelips the Whitespace IDE

Stack: Heap:

vii5ard.github.io


TRUST's math class

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
from sympy import *
from pwn import *
 
def cleaneqn(s):
    s = str(s)
    s = s.replace("b'""")
    s = s.replace("=0\\n'","")
    s = s.replace("x","*x")
    s = s.replace("y","*y")
    return s
 
def solveeqn(a1, a2): #연립방정식 풀어서 x와 y값 구하기
    x, y = symbols('x y')
    return eval("solve( [ Eq("+a1+" ,0), Eq("+a2+", 0) ], [x,y] )"#입력 형태 맞춰 넣기가 애매해서 eval함수 사용했습니다.
 
def solve_func(e):
    x, y = symbols('x y')
 
    for i in range(2):
        e[i] = cleaneqn(e[i]) #입력받은 방정식을 sympy가 입력받을 수 있는 형태로 변환
 
    ans = solveeqn(e[0], e[1]) #교점 좌표 구하기
    print(ans[x])
    return ans[x], ans[y]
 
#main
equation = ["0"]*2 #방정식을 저장하기 위함
= remote("n1net4il.xyz"31339)
p.recvuntil("===== TRUST's Math Class =====\n")
for i in range(0100):
    equation[0= p.recvline()
    equation[1= p.recvline()
    for j in range(2):
        print(equation[j])
    x, y = solve_func(equation)
    p.recvuntil(":")
    p.sendline(str(eval(str(x))))
    p.recvuntil(":")
    p.sendline(str(eval(str(y))))
 
p.interactive()
 
cs

Listen PIZ!!

pptx 파일을 zip으로 바꾸고

slide23.xml을 보면

base64 문자열이 있다.


ultimate hacking defense

vmdk 파일이 주어진다.

ftk imager로 열자

필요한 파일들은 뭘까 문제 지문을 잘 읽어보자.

 

해커가 가장 마지막으로 접속했던 웹사이트에서 해킹툴을 다운받았고, 터미널에서 TRUST 서버를 공격하기 위해 여러 명령어들을 썼다는 정보를 입수했다

마지막으로 접속한 웹사이트, 터미널

인터넷 접속 기록과 터미널 입력 기록을 살펴보면 되겠다.

 

크롬, 파폭, 웨일등의 브라우저가 설치되지 않았다.

바로 ie를 보면 되겠다.

ie 히스토리 (C:\Users\user\AppData\Local\Microsoft\Internet Explorer\Recovery\Last Active\{7A1FA2C8-7768-11EB-94AC-001A7DDA7113}.dat)를 직접 봐도 되겠지만

ie에 마지막으로 입력한 url 기록은 NTUSER.DAT에서도 찾아볼 수 있다.

해당 파일을 추출하여 regripper을 돌려준다.

forensic.korea.ac.kr/DFWIKI/index.php/RegRipper

 

RegRipper - Digital Forensic Wikipedia

Regripper는 Harlan Carvey에서 개발한 레지스트리 분석 도구로 오픈소스로 제공된다. 최신 업데이트는 2013년 4월이며, 최신 버전은 v2.8이다. 본 항에서는 최신버전인 v2.8버전을 사용하였다. Regripper는 C

forensic.korea.ac.kr

해당 페이지에 들어가면 플래그 뒷부분을 얻을 수 있다.

 

 

이어서, 최근 문서에서 consolehost_history.txt를 볼 수 있다.

파워쉘을 사용했다는 것을 알 수 있다.

해당 파일을 찾아 추출하자

C:\Users\Devleo\AppData\Roaming\Microsoft\Windows\Powershell\PSReadLine\ConsoleHost_history.txt

플래그 앞부분 TRUST{ 를 검색하면 된다.

반응형

'CTF Write Up' 카테고리의 다른 글

BCA CTF 2021 Write up  (0) 2021.03.14
BSidesSF CTF 2021 write up  (0) 2021.03.09
Tenable CTF 2021 write up  (0) 2021.02.23
Union CTF 2021 Write up  (0) 2021.02.22
darkCON CTF 2021 write up  (0) 2021.02.21
반응형

show me the pcap

forensic

 

코로나사태로 인해 루돌프들 끼리 산타우체국에서 비밀리로 비대면 회의를 진행했다!
해당 회의 내용을 중간자 공격으로 PCAP형태로 가져왔으니 분석해보자!

 

 

pcap 파일 한 개가 주어진다.

 

Wireshark로 해당 파일을 열어보면 SSH, TLS 패킷들이 보이는데, 아래로 내려보면 756번부터 많은 RTP패킷들이 캡쳐된 것을 확인할 수 있다.

RTP는 실시간 전송 프로토콜로, 오디오와 비디오 정보의 실시간 전송을 하기위해 사용된다. 문제 지문에서 비대면 회의를 진행하였다고 했으므로, 해당 회의 내용이 RTP를 통해 진행된 것으로 볼 수 있다.

 

 

 

 

 

 

 

 

RTP 패킷의 담긴 내용을 확인해야 하는데, 해당 내용이 오디오형식이고 Wireshark에서 지원하는 코덱인 경우, Wireshark로 바로 확인할 수 있는 방법이 있다.

 

아무 RTP 패킷을 클릭하고 상단 메뉴에서 Telephony > RTP > Stream Analysis 를 클릭하고

Play Streams 버튼을 클릭하고 소스 선택 후 재생버튼을 누르면 된다.

 

그러나 여기에서는 비어있거나 지원하지 않는 코덱이라고 나온다.

 

따라서 해당 내용은 비디오인 것으로 추측해볼 수 있고, 다른 방법을 찾아보아야 했다.

 

 

 

 

 

 

 

 

 

여러가지를 검색하던 중에 블로그 글 하나를 찾을 수 있었다.

blog.itekako.com/technical/2017/03/07/rtp-stream-replay/

 

RTP stream replay

Company news, knowledge sharing, technology, best practices and more.

blog.itekako.com

캡쳐한 rtp 패킷을 목적지만 수정하여 다시 실시간으로 전송하여 내용을 확인하는 방식이다.

 

 

 

 

 

필요한 환경은 패킷을 보낼 리눅스 환경과 내용을 확인할 리눅스/윈도우 환경 2개이다.

 

 

먼저, 주어진 pcap파일에서 (이하 origin.pcap) rtp패킷만 추출한 pcap파일을 만들어야 한다.

1. Wireshark로 origin.pcap를 연다.

2. 상단 메뉴에서 Telephony > RTP > RTP Streams

3. 스트림 선택

4. Prepare Filter 클릭 후 창 닫기

5. 상단 메뉴에서 File > Export Specified Packets… > Export as > pcap

6. rtpstream.pcap로 저장

7. rtpstream.pcap를 패킷을 보낼 리눅스 환경으로 이동

 

 

 

 

 

rtpstream.pcap를 replay하기 위해서는 패킷의 목적지 ip와 mac 주소를 수정해 주어야 한다.

해당 과정은 아래 modify-pcap.sh로 수행한다.

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/usr/bin/env bash
# http://blog.itekako.com/technical/2017/03/07/rtp-stream-replay/
set -o errexit
set -o nounset
set -o errtrace
set -o pipefail
 
REPLAY_DST_IP="${1}"
IN_PCAP_FILE="${2}"
OUT_PCAP_FILE="${3:-rtp-for-replay.pcap}"
OUT_SDP_FILE="${4:-sdp}"
 
REPLAY_SRC_IP=$(ip route get "${REPLAY_DST_IP}" | sed --"s/.* src (\S*).*/\1/p")
REPLAY_SRC_DEV=$(ip route get "${REPLAY_DST_IP}" | sed --"s/.* dev (\S*).*/\1/p")
REPLAY_SRC_MAC=$(ip link show "${REPLAY_SRC_DEV}" | sed --"s/.*\/ether (\S*).*/\1/p")
if [ -"${REPLAY_SRC_MAC}" ]
then
  echo "Error reading source MAC address. Make sure that the destination IP does not belong to this machine".
fi
ping --1 -- "${REPLAY_DST_IP}" > /dev/null
ARP_PATH=$(which arp)
 
if [ -"${ARP_PATH}" ]
then
  ARP_CMD="${ARP_PATH}"
else
  ARP_CMD="sudo ${ARP_PATH}"
fi
REPLAY_DST_MAC=$(${ARP_CMD} -an -- "${REPLAY_DST_IP}" | sed --"s/.* at (\S*).*/\1/p")
 
read ORIG_SRC_IP ORIG_SRC_MAC ORIG_DST_IP ORIG_DST_MAC RTP_DST_PORT <<<$(\
    tshark -T fields -e ip.src -e eth.src -e ip.dst -e eth.dst -e udp.dstport -1 -"${IN_PCAP_FILE}")
 
tcprewrite \
    --fixcsum \
    --srcipmap=${ORIG_SRC_IP}/32:${REPLAY_SRC_IP}/32 \
    --enet-smac=${REPLAY_SRC_MAC} \
    --dstipmap=${ORIG_DST_IP}/32:${REPLAY_DST_IP}/32 \
    --enet-dmac=${REPLAY_DST_MAC} \
    --infile="${IN_PCAP_FILE}" \
    --outfile="${OUT_PCAP_FILE}"
 
echo "c=IN IP4 ${REPLAY_SRC_IP}
m=video ${RTP_DST_PORT} RTP/AVP 96
a=rtpmap:96 H264/90000" > "${OUT_SDP_FILE}"
 
echo "Copy file \"$(readlink -e ${OUT_SDP_FILE})\" to player machine, open it in player, then execute:"
echo "  sudo tcpreplay --intf1=${REPLAY_SRC_DEV} '${OUT_PCAP_FILE}'"
cs

 

위 스크립트 실행에 필요한 패키지를 설치해야 한다.

$ sudo apt-get install tcpreplay tshark net-tools

 

그리고 스크립트를 실행해 준다.

$ bash modify-pcap.sh <player machine ip> <input pcap file> [<output pcap file>] [<output sdp file>]
$ bash modify-pcap.sh 192.168.0.2 rtpstream.pcap

 

 

그러면 패킷을 받기 위한 정보가 담긴 sdp파일이 생성되고, 패킷을 replay하기 위한 명령어가 출력된다.

 

sdp파일은 패킷을 받을 환경으로 이동한다.

 

 

 

 

 

 

 

 

패킷을 받아 영상으로 보기 위해서는 아래 명령어를 사용하면 된다.

$ ffplay sdp

나는 윈도우 환경에서 진행하였기 때문에 ffplay.exe를 사용하였다. ffplay.exe는 ffmpeg.org/download.html에서 다운받을 수 있다.

 

ffplay sdp로 대기 중인 상태에서, 리눅스 환경에서

 

sudo tcpreplay --intf1=enp0s3 'rtp-for-replay.pcap'

(modify-pcap.sh을 실행하고 출력된 명령어)을 실행하면, 패킷이 전송되어 받을 수 있다.

 

 

 

 

 

 

 

 

 

ffplay.exe sdp를 실행하였을 때 나는 

 

 

이러한 오류가 발생하였다. 해당 오류는 -protocol_whitelist file,udp,rtp,crypto,data 옵션을 추가해주어 해결할 수 있었다.

 

 

 

 

 

 

첫 번째 시도에서 오류가 발생하였다.

blog.itekako.com/technical/2017/03/07/rtp-stream-replay/에서는 문제가 있을 때, sdp 파일에 추가적인 정보를 추가해주라고 되어 있다. 

 

 

 

sdp-fmtp-data.sh

1
2
3
4
5
6
set -o errexit
set -o nounset
IN_FILE="${1}"
echo "a=fmtp:96 $(tshark -E aggregator=';' -Y sdp.fmtp.parameter -T fields -e sdp.fmtp.parameter -r "${IN_FILE}")"
cs
$ bash sdp-fmtp-data.sh origin.pcap

 

 

출력 결과

a=fmtp:96 profile-level-id=1;config=000001B001000001B58913000001000000012000C48D8DC43D3C04871443000001B24C61766335372E3130372E313030

 

해당 내용을 sdp 다음 행에 추가해주었다.

 

그러나 여전히 오류가 발생하였다.

 

sdp

c=IN IP4 10.0.2.15
m=video 58898 RTP/AVP 96
a=rtpmap:96 H264/90000
a=fmtp:96 profile-level-id=1;config=000001B001000001B58913000001000000012000C48D8DC43D3C04871443000001B24C61766335372E3130372E313030

 

sdp에 내용이 부족하거나 잘 못 설정된 것 같아, origin.pcap 파일을 다시 살펴보았다.

 

rtp 패킷들이 전송되기 전 부분인 749번 패킷에서 메타데이터를 확인할 수 있었다.

해당 내용에 따라 코덱 정보를 H264에서 MP4V-ES로 수정하고 시도하였더니 플래그를 얻을 수 있었다.

 

 

반응형

'CTF Write Up' 카테고리의 다른 글

The Cyber Grabs CTF 0x02 write up  (0) 2021.01.17
0xL4ugh CTF write up  (0) 2021.01.16
CyberTalents Digital Forensics CTF write up  (0) 2020.11.29
제 2회 TeamH4C CTF 2020 Write-up  (0) 2020.10.13
CCE2020 Quals Write-up  (0) 2020.09.26
반응형

 

Toolkit basic 25 General Information

Is a computer forensics distribution that installs all necessary tools on Ubuntu to perform a detailed digital forensic and incident response examination.

 

 

google search.

 

 

Little Story Boy basic 25 Digital Forensics

stylesuxx.github.io/steganography/

extract LSB data

 

you can use zsteg.

 

 

Light easy 50 Digital Forensics

Just get the flag

file : light

 

tool name : HxD

This file has png header signature. Therefore It is PNG file, and it has also png footer signature.

 

 

tool name : HxD

After PNG footer signature, there are some binary strings.

I could guess that binary is ascii code, because it starts 01~~.

 

https://www.branah.com/ascii-converter

easy.

 

 

 

Meta Header easy 50 Digital Forensics

Can You help us to extract the metal from Exchangeable header

 

file : metal.jpg

 

image description is strange.

 

hmm

 

next!

 

 

 

volatility easy 50 Digital Forensics

welcome to volatility 101, you have to know when you start analyzing a memory dump you have to look to processes and files on desktop.

profile = WinXPSP2x86

 

 

 

프로세스 특이사항은 이정도.

 

 

/Desktop/flag/

 

 

나오는게 없다. R-studio로 분석해봐야 할 거 같다.

 

 

another memdumpfile in Desktop dir.

 

There are 3 files which has 0 byte size in flag dir.

The file name seems like 'key'.

 

compare with look_to_clipboard.txt and filename.

k.08462 -> 20

e.22743 -> 8

y.08981 -> 40

 

 

이 다음은 mem을 추출해봐야 할거 같다.

filescan
dumpfiles

 

?

아 easy 맞냐고

 

Dega hard 200 Digital Forensics

Dega Company has been attacked and some data have been exfiltrated, Help them to know what exactly has been leaked.

 

pcap

base64로 인코딩된 문자열이 많던데

 

last human hard 200 Digital Forensics

This Stream is so weird, looking something hidden here!!

 

sonic visualizer - failed

audio lsb - failed

 

-롸업-

0xmohammed.github.io/2020/11/29/Last-Human-Writeup.html

 

'Last human' writeup CyberTalents DF CTF - 0xMohammed

Description This Stream is so weird, looking something hidden here!! Diffculity: Hard Walkthrough Challange is a wave file with high pitched noise, After examining file with usual tools (binwalk, exiftool, strings,..etc) we found nothing so we should dig d

0xmohammed.github.io

 

 

Xmen medium 100 Digital Forensics

cyber Criminal is hiding information in the below file .can you capture the flag ?. Note: Flag format flag{XXXXXXX}

 

더보기

00000000: 504b 0304 0a00 0900 0000 e52b 944d d66f PK.........+.M.o

00000010: ef86 2300 0000 1700 0000 0a00 1c00 7365 ..#...........se

00000020: 6372 6574 2e74 7874 5554 0900 036d 6f1b cret.txtUT...mo.

00000030: 5c6d 6f1b 5c75 780b 0001 0400 0000 0004 \mo.\ux.........

00000040: 0000 0000 89ed 4cbb 8ba3 91b4 8e10 d9e5 ......L.........

00000050: ab2e 196e 20f4 37df fbe5 096c ed4e 8d0a ...n .7....l.N..

00000060: e056 e98c 26b1 a450 4b07 08d6 6fef 8623 .V..&..PK...o..#

00000070: 0000 0017 0000 0050 4b01 021e 030a 0009 .......PK.......

00000080: 0000 00e5 2b94 4dd6 6fef 8623 0000 0017 ....+.M.o..#....

00000090: 0000 000a 0018 0000 0000 0001 0000 00a4 ................

000000a0: 8100 0000 0073 6563 7265 742e 7478 7455 .....secret.txtU

000000b0: 5405 0003 6d6f 1b5c 7578 0b00 0104 0000 T...mo.\ux......

000000c0: 0000 0400 0000 0050 4b05 0600 0000 0001 .......PK.......

000000d0: 0001 0050 0000 0077 0000 0000 00 ...P...w.....

xxd -r garbage garbage.zip

 

password brute-force 1to5 char - failed

lock bit change - failed

 

 

----풀이보고 내용추가----

dictionary attack으로 패스워드는 hacker_crackdown가 됨.;;

 

Habibamod  medium 100 Digital Forensics

Habibamod is sending a secret signal, tune your receiver.

 

wireshark

It's simple.

 

data

Value of encoder is encoded in base64.

 

0 to . , 1 to !

To decode it: . to 0, ! to 1.

 

Bin to ascii

 

 

good.

Location medium 100 Digital Forensics

vcan0  06C   [8]  88 E6 0A 3D EC DC 50 2A

 

Bomp medium 100 Digital Forensics

Why dosen't my BOMP Explode!!
Format: Flag{}

 

b0mp 파일이 주어진다.

 

first 2 bytes are empty, but next 4 bytes seems like file size.

0xcdbe = 52670 =

so this is bmp file. b0mp에서 0을 빼면 bmp이기도 하다.

 

put 0x42 0x4D (bmp magic number) into first 2 bytes.

 

hmm

another bits are also empty.

 

ㅎㅎ 모르겠다.

 

 

----풀이보고 내용추가----

b0mp의 파일명을 b0mp.data로 바꾸고 GIMP에 불러온 뒤에, 오프셋, 너비, 높이를 아래와 같이 조절하면 플래그를 확인할 수 있다.

 

P@dly medium 100 Digital Forensics

Someone outside the department has downloaded some files from our server but fortunately we encrypt all the files. Can you get this files?

note.epd and readme.txt were transferred.

pub is directory.

 

readme.txt

note.epd is encrypted file.

 

How to decrypt note.epd.

 

xor 0~0xff - failed

반응형

'CTF Write Up' 카테고리의 다른 글

0xL4ugh CTF write up  (0) 2021.01.16
2020 Christmas CTF [show me the pcap] Write-up  (2) 2020.12.27
제 2회 TeamH4C CTF 2020 Write-up  (0) 2020.10.13
CCE2020 Quals Write-up  (0) 2020.09.26
FIESTA 2020 Write up  (2) 2020.09.07
반응형

저는 플래그를 이 파일에..

100

저는 플래그를 이 파일에 넣는 것에 긍정적입니다. 저를 위해 찾아 줄 수 있나요?

KEY Format : ABCTF{(key)}

 

 

just_open_it_jpg 라는 파일이 주어진다.

 

이미지를 보면 중간에 비트가 손상되서 이미지가 깨진 것을 확인할 수 있다.

 

jpg는 앞에 비트 하나만 잘 못 되어도 뒤에 전부 문제가 생기는 그러한 특징이 있다.

 

해당 비트 부분을 찾아서 고쳐야 하나 생각했지만..

 

문제에서 플래그 포멧을 준 것을 보고,  플래그 포멧을 이용하여 검색으로 찾으면 나오지 않을까라는  생각이 들었는데,

맞았다.

 

반응형
반응형

Multimedia

제 친구의 개가 바다에서…

100

 

제 친구의 개가 바다에서 수영을 하다가 플래그를 발견했는데 제게 주지 않습니다. 여기서 구해 줄 수 있습니까?

 

 

hidden.jpg가 주어진다.

 

이미지를 잘 보면, 흐릿한 문자열을 확인할 수 있다.

 

 

 

 

포토샵을 사용하여 반전 > 명도&채도 조절 을 통해 비교적 선명한 문자열을 만들 수 있었다.

반응형
반응형

Find the flag

 

주어진 파일 뒷 부분에 PK 시그니쳐가 붙어있다.

When you open a given png file with HxD, you can see PK signature at the end.

 

zip으로 만들어서 열면 플래그가 나온다.

Rename the file .png to .zip. Then, you can get a flag!

 

 

 

simple_forensic

 

암호가 걸린 zip 파일이 주어진다.

Given zip file has locked.

 

 

브포 돌려서 비번을 찾을 수 있다.

You need to brute-force attack to find password to unlock zip.

The password is 1337.

 

그러면 압축파일(file.zip) 하나랑 txt파일을 하나 열 수 있다.

Then, you can get a file.zip and a txt file.

뭔가 했는데, 모스부호 였다.

In txt file, you can see only K and H. I guessed this is morse code.

 

H -> - , K -> . 으로 하고 돌리면 되는데,

 

페이크 플래그가 나온다. ㅋㅋ;;

However, it was fake flag. :p

 

 

버리고 file.zip을 보자. 암호가 걸려있는 것 처럼 보이지만, 사실은 안 걸려있다.

Send txt file to TRASH CAN. And look at the file.zip

It seems like locked file, but it isn't. You don't need to find a password.

 

비트 조작해주면 된다.

Just change some bits of zip file.

mandu-mandu.tistory.com/143 참고하자

 

SuNiNaTaS [FORENSIC 28번] 풀이

SuNiNaTaS의 28번문제 풀이입니다. [FORENSIC] 암호가 걸린 압축파일이 있다. 근데 문제내용을 보았을 때 "brute force가 필요없다","암호가 있기나 한건가!"를 보면 암호는 없는 것 같다. 근데 비밀번호를

mandu-mandu.tistory.com

 

(처음에 브포를 돌렸기 때문에 이런 풀이가 나올 것 같았음.)

 

 

hxd로 까보면,

이렇게 나오는데, zero-width space steganography가 적용된 것이다.

e2808b, e2808c, e2808d, e2808f

 

zero-width space steganography

 

 

github.com/offdev/zwsp-steg-js

 

offdev/zwsp-steg-js

Zero-Width Space Steganography, encodes/decodes hidden messages as non printable/readable characters. - offdev/zwsp-steg-js

github.com

를 이용하여 플래그를 구할 수 있었다.

I can get a flag using zwsp-steg-js.

 

 

 

 

 

 

 

 

Find Hangul

 

아무런 설명 없이 VM.E01을 던져준다.

No description for this task.... :(

 

you can open the VM.E01 using FTK Imager.

 

유저폴더 살펴보고 휴지통을 살펴보았다.

I looked at the user folder and the Recycle.Bin.

 

뭔가 많다.
페이크파일들로 가득하다;;

 

 

많고많은 폴더와 파일 중에서 훈민정음.docx파일을 찾을 수 있다.

You can find Hunminjeongeum.docx file in many fake files.

 

추출해서 열어보자.

Export and open it.

 

 

하얀글씨로 안 보이도록 하거나, 스크롤을 많이 내리도록 되어 있어서, 색상 맞춰주고 정렬해주면 한 번에 내용을 볼 수 있다.

근데 저기있는 플래그도 페이크플래그다. ㅎㅎ;

But there's no flag. h4c(hangul_choigo) is not a flag. 

 

docx 파일을 zip으로 만들고 열어보면 flag.png를 찾을 수 있다.

Rename .docx to .zip and then open it, you can find flag.png

 

청크 이름의 대소문자를 바꿔놓았다. 다 수정해주면 정상적으로 이미지를 확인할 수 있다.

Recover chunk names.

png -> PNG

Srgb -> sRGB 등.. ect...

 

GNP

 

 

ff d9 jpg 푸터 시그니쳐 뒤에 png 파일이 뒤집어 있다.

It's reversed!!

 

잘라내서 뒤집고

< flag.png xxd -p -c1 | tac | xxd -p -r > file.png

 

stegsolve.jar로 보면 문자열이 나온다.

 

 

Affine Cipher 돌리면 플래그가 나온다. (GUESSING!!!!)

 

www.dcode.fr/affine-cipher (AUTOMATIC BRUTE FORCE DECRYPTION)

 

 

 

 

Dark light (not full wirte-up)

 

 

파일 여러개가 붙어있다.

foremost를 사용해서 분리해주었다.

 

 

 

 

qr code 9개가 나오는데 값을 보면,

 

sorry_this_is_not_a_flag

do_you_want_a_flag?

do_you_know_Korean_proverb?

어둡다.

h4c(f4c3_f_a_k_e)

 

뭘까?

hmm hmmmmmmmmmmmmmmm

 

 

 

 

 

 

message from space (not full wirte-up)

 

wav가 주어지는데, sstv 문제다.

 

github.com/MossFrog/SSTV-Decoder/blob/master/SSTV-Complete.py

 

MossFrog/SSTV-Decoder

An SSTV decoder created using python. The input files consists of 8 second frequency modulated transmissions. - MossFrog/SSTV-Decoder

github.com

 

 

디코딩 해주면 이런 이미지가 나온다.

Password : HangulDay

 

어디다 써먹는 걸까

Where can i use it... :(

 

 

14461009

 

한글 단순 치환 암호이다.

Hangul simple substitution cipher.

 

1446년 10월 09일, 'ㆍ','ㅛ','ㅕ' 이 부분을 보면 한글 창제와 관련이 있는 내용으로 보인다.

 

치환 코드는 이 것을 이용했다.

j0n9hyun.xyz/writeups/crypto/Korean-substituation-cipher/

 

한글 단일 치환 암호

한글 단일 치환 암호 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374# coding: utf-8def divide_char(char): num = ord

j0n9hyun.xyz

 

 

필,켜,녈뇩 -> 천,지,인을   부터 시작하면 된다.

 

 

어느 정도 게싱으로 때려맞춰보면, 마지막에 문제를 확인할 수 있다.

 

 

해당 문제에 대한 답을 주어진 서버로 넘겨주면 플래그를 받을 수 있다.

 

반응형

'CTF Write Up' 카테고리의 다른 글

2020 Christmas CTF [show me the pcap] Write-up  (2) 2020.12.27
CyberTalents Digital Forensics CTF write up  (0) 2020.11.29
CCE2020 Quals Write-up  (0) 2020.09.26
FIESTA 2020 Write up  (2) 2020.09.07
2020 Defenit CTF Write Up  (2) 2020.06.06
반응형

forensic

keyboord

100

 

usb keyboard 패킷 캡쳐 파일이다.

github.com/TeamRocketIst/ctf-usb-keyboard-parser

 

TeamRocketIst/ctf-usb-keyboard-parser

This is the updated script from https://teamrocketist.github.io/2017/08/29/Forensics-Hackit-2017-USB-ducker/ - TeamRocketIst/ctf-usb-keyboard-parser

github.com

이거 이용해서 hex 데이터를 키보드 문자로 변환해준다.

 

해당 키보드로 c코드를 작성한 것 같다.

 

코드 작성해도 돌려주면 플래그가 나온다.

 

 

webpacket

100

웹소켓으로 id와 pw를 인증하는 과정이 있다.

 

id pw를 입력받는 페이지에서 인증서버로 인증을 거치는 것이라고 추측해볼 수 있다.

 

따라서 http 패킷 중에서 websocket발생 이전 패킷들을 살펴보았다.

찾았다.

13.209.132.135:4423으로 이동하였다.

 

login.js를 보면, 패스워드를 인코딩한다. xor이기 때문에 인코딩 함수를 그대로 사용하여 복호화하였다.

pw가 flag였다.

 

 

반응형

'CTF Write Up' 카테고리의 다른 글

CyberTalents Digital Forensics CTF write up  (0) 2020.11.29
제 2회 TeamH4C CTF 2020 Write-up  (0) 2020.10.13
FIESTA 2020 Write up  (2) 2020.09.07
2020 Defenit CTF Write Up  (2) 2020.06.06
angstrom CTF 2020 write up  (0) 2020.03.14
반응형

SuNiNaTaS의 32번문제 풀이입니다. 


[FORENSIC]


경찰청으로 부터 연쇄 테러 용의자로 부터 압수한 USB 이미지 분석을 의뢰 받았다.

최초 분석을 신입 직원에게 맡겼으나 Hex Editor로 여기 저기 둘러 보다 실수로 특정 부분이 손상되고 이미지가 인식되지 않는다.


당신은 포렌식 전문가의 자존심을 걸고 이미지를 살려 내고 다음 테러를 예방하는데 기여를 해야 한다.

1. 다음 테러 계획이 들어있는 문서의 수정 일시는? (UTC+9)

2. 다음 테러 장소는?


인증키 형식 : lowercase(MD5(YYYY-MM-DD_HH:MM:SS_장소)


예) lowercase(MD5(2016-03-28_13:00:00_Pink Lake)




hex editor로 열어보면 FAT32로 포멧되어 있는 것을 알 수 있다.




표에 따르면, 0x1FE~0x1FF 범위에 부트레코드 손상여부를 확인하는 용도의 시그니처 0x55AA가 있어야 한다고 한다.

그러나 이 이미지파일에는 없다.




시그니처 위쪽으로 밀려 있다. 사이에 NULL바이트를 추가해서 올바른 위치로 밀어주었다.


1FE - 126 = D8


D8크기 만큼 추가해주면 된다.




그러면 FTK Imager에서 정상적으로 인식한다.



2차 테러 계획.hwp를 추출해서 열어보면 다음 테러 장소를 알 수 있다.

 Rose Park



파일 수정 시각은 파일 속성을 보면 된다.



2016-05-30_11:44:02




MD5(2016-05-30_11:44:02_Rose Park) == 8ce84f2f0568e3c70665167d44e53c2a


반응형

'WAR GAME > SuNiNaTaS' 카테고리의 다른 글

SuNiNaTaS [FORENSIC 31번] 풀이  (0) 2018.09.03
SuNiNaTaS [FORENSIC 30번] 풀이  (0) 2018.08.08
SuNiNaTaS [FORENSIC 29번] 풀이  (3) 2018.08.08
SuNiNaTaS [FORENSIC 28번] 풀이  (0) 2018.08.07
SuNiNaTaS [SYSTEM 27번] 풀이  (0) 2018.08.07
반응형

SuNiNaTaS의 31번문제 풀이입니다. 


[FORENSIC]


* 안내 : 본 PDF 파일은 PC에 유해한 작업을 하지 않습니다. 단순 문제 풀이용입니다.

악성코드가 첨부된 PDF를 분석하여 Flag를 찾으세요.

인증키 형식 : lowercase(MD5(Flag))



http://ex3llo.tistory.com/33 게시글을 참고해서 풀어보았습니다.




https://blog.didierstevens.com/programs/pdf-tools/ 에서 pdfid.py를 다운받았습니다.




pdfid.py를 사용해 pdf 문서 구조를 확인했다. JavaScript 코드가 있는 것을 확인할 수 있다.




이제 이 자바스크립트 코드를 확인하기 위해 peepdf.py를 사용했다. 

이 peepdf.py는 https://github.com/jesparza/peepdf 에서 다운받을 수 있습니다.


-i 옵션을 꼭 넣자.



먼저 30을 확인해 보았다.





코드가 나올 때 까지 쭉 쫓아가자..






37에서 코드가 나왔다!


코드 하단에 base64 인코딩 문자열이 있다. [따라하지 마세요!]



이 문자열을 가져다가 크롬 콘솔에 갖다 붙이고,




연결된 문자열을 가져다가 디코딩 사이트에서 디코딩을 돌렸다.



계속 하다보면 문자열이 줄어들고 있음을 알 수 있다.




...






...



으아아ㅏ아아ㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏ


다시 풀어야 겠다...







이어서 해보자.




36에는 아무것도 없다... 39에 %PDF가 보인다.


object 39에 pdf파일이 있는 것 같다. 이를 추출하기 위해 PDFStreamDumper.exe를 사용했다.

(이 프로그램을 보니 처음부터 이걸 사용했으면 되는게 아닌가 하는...읆...)



object 39을 pdf형식으로 추출했다.


pdf가 보호되어 있어서 https://smallpdf.com/unlock-pdf 이 사이트를 통해 잠금을 풀었다.



다시 PDFStreamDumper.exe 를 사용하니 object 7에서 플래그가 나왔다.





MD5(SunINatAsGOodWeLL!@#$) == 13d45a1e25471e72d2acc46f8ec46e95

반응형

'WAR GAME > SuNiNaTaS' 카테고리의 다른 글

SuNiNaTaS [FORENSIC 32번] 풀이  (0) 2018.09.04
SuNiNaTaS [FORENSIC 30번] 풀이  (0) 2018.08.08
SuNiNaTaS [FORENSIC 29번] 풀이  (3) 2018.08.08
SuNiNaTaS [FORENSIC 28번] 풀이  (0) 2018.08.07
SuNiNaTaS [SYSTEM 27번] 풀이  (0) 2018.08.07

+ Recent posts