> For the complete documentation index, see [llms.txt](https://docs.cooku222.kr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cooku222.kr/security/digital-forensics/dreamhack/dreamhack-steg-pack.md).

# \[Dreamhack] Steg-Pack

#### 문제 링크

<https://dreamhack.io/wargame/challenges/1676>

[Steg-Pack가짜 flag를 피해서 진짜 flag를 찾아라!@dreamhack.io](https://dreamhack.io/wargame/challenges/1676)

&#x20;

#### 문제

<figure><img src="https://blog.kakaocdn.net/dna/bSndqu/btsNf6xBP0M/AAAAAAAAAAAAAAAAAAAAAExqsA2EUuuD7MgmsKmlBLF2ORMP2-jLo0vfYeEUJN78/img.png?credential=yqXZFxpELC7KVnFOS48ylbz2pIh7yKj8&#x26;expires=1782831599&#x26;allow_ip=&#x26;allow_referer=&#x26;signature=PvlvffgwkM2X5LqG72Ws3txLTo8%3D" alt="" height="666" width="592"><figcaption></figcaption></figure>

&#x20;\
&#x20;

#### Writeup

<figure><img src="https://blog.kakaocdn.net/dna/bM93nE/btsNdxYscsw/AAAAAAAAAAAAAAAAAAAAAFnyO2YrAOZ-zKM1ahxkCW70vxFXte5BbNU3mOU8SJHn/img.png?credential=yqXZFxpELC7KVnFOS48ylbz2pIh7yKj8&#x26;expires=1782831599&#x26;allow_ip=&#x26;allow_referer=&#x26;signature=AlvqdWZO9cNRX4yS0CK1bQQDoZw%3D" alt="" height="490" width="1187"><figcaption><p>문제 이미지 파일 원본</p></figcaption></figure>

이미지 파일만 떡하니 주어졌는데, 이미지는 페이크 플래그 -> 이미지가 바이너리 값으로 변환하면 어떤 정보를 얻을 수 있겠다 싶어서 헥사 에디터를 연다.(FTK Imager는 깨진 이미지 복구용이니까 여기선 HxD로 먼저 접근하는게 맞다)

<figure><img src="https://blog.kakaocdn.net/dna/bozvCZ/btsNdT1jXDD/AAAAAAAAAAAAAAAAAAAAACnrSx0HcdS6e2sKfhJsnXs__qkkd1uhBhTxIH7fvOoa/img.png?credential=yqXZFxpELC7KVnFOS48ylbz2pIh7yKj8&#x26;expires=1782831599&#x26;allow_ip=&#x26;allow_referer=&#x26;signature=jEMjV2zHJiSCDWt32uqjE6Hfdnk%3D" alt="" height="352" width="843"><figcaption></figcaption></figure>

에디터로 해당 이미지를 열면 헤더 시그니처를 통해 파일 확장자가 png인 것을 알 수 있는데, 여기서 딱히 깨진 흔적이 안 보이니 올바른 확장자를 사용하고 있음을 파악함.\
타 롸업 참고하면서 작성중인데, 확장자가 올바르면 여러 이미지의 병합 가능성을 떠올려야 한다고 한다. (이유를 지피티한테 검색하니까 CTF에서 자주 나오는 트릭 중 하나로, 스테가노 그래피 + 병합 이라고 한다)

<figure><img src="https://blog.kakaocdn.net/dna/I12Rx/btsNe5T6CLB/AAAAAAAAAAAAAAAAAAAAADvMsh5S8Wiaechpq4RtwPrAHThQvpR4EoFlhX3uawMM/img.png?credential=yqXZFxpELC7KVnFOS48ylbz2pIh7yKj8&#x26;expires=1782831599&#x26;allow_ip=&#x26;allow_referer=&#x26;signature=TAOoxFsAFoU2itjHi4sOQgsZdGo%3D" alt="" height="207" width="782"><figcaption><p>png의 Footer Signature 확인 -> png외에 zip 파일 숨어짐(1)</p></figcaption></figure>

<figure><img src="https://blog.kakaocdn.net/dna/9iodV/btsNdzaWda9/AAAAAAAAAAAAAAAAAAAAAM6w2QJrzXwOWNuI2ImHTRMypomqmkJSPP7orBRn32ts/img.png?credential=yqXZFxpELC7KVnFOS48ylbz2pIh7yKj8&#x26;expires=1782831599&#x26;allow_ip=&#x26;allow_referer=&#x26;signature=RyYLmlR7WzSwIukxJhzAe5z8RA8%3D" alt="" height="148" width="812"><figcaption><p>png의 Footer Signature 확인 -> png외에 zip 파일 숨어짐(1)</p></figcaption></figure>

zip 파일의 시작 오프셋은 4680이고, 종료 오프셋은 7212\
4680 - 7212만큼 쭉 복사한 후 새로운 파일을 만들고 붙여넣기 후  .zip 확장자를 입력해 병합된 파일을 별도로 분리

<figure><img src="https://blog.kakaocdn.net/dna/cdw59R/btsNf92aiDv/AAAAAAAAAAAAAAAAAAAAABadZz6RARchoe0V8bwKJ2B2YzyIIslQu1ZgunfP-QKJ/img.png?credential=yqXZFxpELC7KVnFOS48ylbz2pIh7yKj8&#x26;expires=1782831599&#x26;allow_ip=&#x26;allow_referer=&#x26;signature=Ya%2FEg4TzeYEE7H5wYLFafhsoRFA%3D" alt="" height="886" width="952"><figcaption><p>4680 - 7212 쭉 복사후 붙여넣기</p></figcaption></figure>

<figure><img src="https://blog.kakaocdn.net/dna/dHtluU/btsNe4HDPKs/AAAAAAAAAAAAAAAAAAAAADep5P5A59V0geT1HsMG8USjDhoWgEHeHaKqDQTBEBdH/img.png?credential=yqXZFxpELC7KVnFOS48ylbz2pIh7yKj8&#x26;expires=1782831599&#x26;allow_ip=&#x26;allow_referer=&#x26;signature=3oxh%2FtOd6eRkeiEAcGe4xYJzc84%3D" alt="" height="187" width="831"><figcaption><p>zip 파일로 변환(아 참고로 나는 연결 프로그램을 제트브레인으로 해놔서 아이콘이 특이하게 뜬다. 원래면 압축파일 아이콘 뜨는게 맞다)</p></figcaption></figure>

<figure><img src="https://blog.kakaocdn.net/dna/8lggO/btsNfdqOrhq/AAAAAAAAAAAAAAAAAAAAAAUAGQHoYQAJGdTHoh827lG2t6r0FWqcRDHu14_d4fQg/img.png?credential=yqXZFxpELC7KVnFOS48ylbz2pIh7yKj8&#x26;expires=1782831599&#x26;allow_ip=&#x26;allow_referer=&#x26;signature=18tEtg41hYGFBnOELhYI6LRwr%2Fg%3D" alt="" height="395" width="803"><figcaption></figcaption></figure>

Zip 파일을 압축 해제하면 이렇게 파일이 생성된다.\
우선 picture 안으로 들어간다.

<figure><img src="https://blog.kakaocdn.net/dna/CB5az/btsNftfRZB8/AAAAAAAAAAAAAAAAAAAAAIeCNlzOtOiGngrKGzuFX9usBrgo_ixoPtjgUF0bNM7p/img.png?credential=yqXZFxpELC7KVnFOS48ylbz2pIh7yKj8&#x26;expires=1782831599&#x26;allow_ip=&#x26;allow_referer=&#x26;signature=ngxcc%2FuA1fEkQFQbi17Rc1ZXshE%3D" alt="" height="165" width="843"><figcaption></figcaption></figure>

flag처럼 생긴 png 파일이 등장한다.&#x20;

<figure><img src="https://blog.kakaocdn.net/dna/AcGDv/btsNfGsvMwz/AAAAAAAAAAAAAAAAAAAAABxlnDH8xODDdoUFlQzH43zohtGPunqaMXMiWkNDDtfD/img.png?credential=yqXZFxpELC7KVnFOS48ylbz2pIh7yKj8&#x26;expires=1782831599&#x26;allow_ip=&#x26;allow_referer=&#x26;signature=5CY5Co4%2BBrsZLyWA29iCDCjBd8s%3D" alt="" height="387" width="1195"><figcaption></figcaption></figure>

플래그값이 나온다.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cooku222.kr/security/digital-forensics/dreamhack/dreamhack-steg-pack.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
