April 13, 2022

Square CTF postfuscator write up

 

< getFlag #4, Own this NFT! (Link) >


▶ How to play
Download the provided file(Link).
제공되는 파일 다운로드.

The humans who designed C9 were afraid that the Charvises would disavow their pact.

인류는 차비스가 약속을 파기할 가능성에 대해 두려워했다.

The humans therefore decided to build an additional defense system, C9, using an ancient programming language. A programming language that Charvises didn’t even know is a programming language!

그래서 그들은 추가 방호 시스템인 C9을 구축하게 된다. 이때 고대의 프로그래밍 언어를 사용하였는데, 차비스는 그 내용이 프로그래밍 언어인지조차 인지하지 못하였다.

Can you figure out the correct input?
관련하여 올바른 입력값을 찾도록 한다.

 

여기서 말하는 고대 언어는 포스트스크립트이다. 쉘 스크립트 파일이 제공되지만 이는 포스트스크립트(PS) 파일을 추출하기 위한 용도이다. 포스트스크립트는 문서를 기술하기 위한 언어(PDL)이며 인터프리터가 존재하며 구글드라이브에서도 열람할 수 있다. PS 파일을 이해하고 요구사항을 준수하여 입력값을 구성하면 플래그를 획득할 수 있다.

The ancient language we are talking about here is PostScript. A shell script file is provided, but this is for extracting a PostScript(PS) file. PostScript is a language for describing documents(PDL), has an interpreter, and also can be viewed on Google Drive. If you understand the PS file and configure the input to comply with the requirements, you can get the flag.

 

 

Hint 1.

A proper debugger can help save time.

적절한 디버거는시간을 단축하는 데 도움이 된다.

https://github.com/luser-dr00g/debug.ps

 

Hint 2.

PostScript works on a stack basis. As soon as a string is entered, it is already put in the stack.

포스트 스크립트는 스택 기반으로 동작한다. 문자열을 입력하는 순간 스택에 들어간다.

 

Hint 3.

XOR operation is everything.

XOR 연산이 전부이다.

 

 

* Check the link below for full write-up details.   

* 전체 라잇업 내용은 아래 링크 확인.    

 

< FULL WRITE UP >

 

 

March 11, 2022

Square CTF 2018 gofuscated write up

 

< Success #3, Own this NFT! (Link) > 

Just click the ♡ of the NFT to receive the free airdrop.


▶ How to play
Download the provided file(Link).
제공되는 파일 다운로드.

The very first settlers didn't have a lot of confidence in their hand-assembled C6 system. They therefore built C7, an advanced defense system written in Golang.
초기에 제작된 C6 시스템은 저수준 언어로 한땀 한땀 제작되었으나 확신을 주지 못했다. 그래서 이후 C7 시스템을 Go 언어로 견고하게 제작하여 도입하였다.

Given the source code, can you find the correct input?
여기 그 소스 코드가 있다. 올바른 입력값을 찾도록 한다.

 

The source code is provided and it is a reversing challenge to analyze it. In the past, challenges with the -fuscated keyword were characterized by difficulties in understanding due to rarely used grammar, etc., but there is a possibility this time as well.

소스 코드가 제공되며 이를 분석하는 리버싱 챌린지이다. 과거에도 -fuscated(혼란스러운) 키워드가 붙은 챌린지는 잘 활용하지 않는 문법 등으로 이해하기 어려운 것이 특징이었는데 이번에도 그럴 가능성이 있다.

 

Hint 1. 

Changing the order of the source code allows for quick testing.

소스 코드의 순서를 변경하면 빠른 테스트를 수행할 수 있다.


Hint 2.

You must pass the test to get the correct flags.

테스트를 통과해야 올바른 플래그를 획득할 수 있다. 


Hint 3.

Characteristics of random functions.

랜덤 함수의 특징.


 

* Check the link below for full write-up details.   

* 전체 라잇업 내용은 아래 링크 확인.    

 

< FULL WRITE UP >


February 22, 2022

Square CTF 2018 gates of hell write up

< Success #2, Own this NFT! (Link) > 

Just click the ♡ of the NFT to receive the free airdrop. 


▶ How to play
# docker run --rm --env PORT=80 -p 8081:80 squarectf/gates-of-hell

C6 is a Linux based system. It was brought to Charvis by the very first settlers. You found a USB drive with a copy of the executable.

C6은 리눅스 기반 시스템으로, 초기 정착민들이 차비스로부터 가져왔다. 여기 USB에 해당 시스템의 복사본 실행 파일이 있다.

Now, all you need to do is figure out the correct input to disable C6 through its online interface.

이제, 해당 시스템의 온라인 인터페이스에 올바른 값을 입력하여 비활성화한다.

 

This is a reversing challenge where an online interface and an executable file are provided for analyzing. The provided file is gates_of_hell.tar.gz, and when decompressing twice, the gates_of_hell file is created. This is a 32-bit Linux executable file with symbol information removed. No other protection techniques such as PIE were applied.

온라인 인터페이스와 실행 파일이 제공되며 이를 분석하는 리버싱 챌린지이다. 제공되는 파일은 gates_of_hell.tar.gz이며 2회 압축 해제 시 gates_of_hell 파일이 생성된다. 이는 심볼 정보가 제거된 32비트 리눅스 실행 파일이다. 기타 PIE 등 보호 기법은 적용되지 않았다.

 

Hint 1. 

When entering parameters, do not exceed the 1-byte range.

파라미터를 입력할 때 1바이트 범위를 초과하지 않는다.


Hint2.

There is assembly code that cannot be viewed by the decompiler.

디컴파일러로 확인할 수 없는 어셈블리 코드가 존재한다.


 

* Check the link below for full write-up details.   

* 전체 라잇업 내용은 아래 링크 확인.    

 

< FULL WRITE UP > 


January 27, 2022

Square CTF 2018 captcha write up


< Success #1, Own this NFT! (Link) >

Just click the ♡ of the NFT to receive the free airdrop. 


▶ How to play
# docker run --rm --env PORT=80 -p 8082:80 squarectf/captcha

 

Charvises(the native species which lived on Charvis 8HD before the first settlers arrived) were very good at math. In a surprising symbiosis relationship between humans and Charvises, it was agreed that the Charvises would be responsible for C8.

차비스족(최초 정착민이 도달하기 전 차비스 8HD 지역에 거주했던 원주민)은 수학에 능통했다. 인간과 차비스족은 서로 우호적이었으며 함께 지냈는데, C8 시스템에 대한 책임은 차비스족이 담당하기로 하였다.

Can you pass their CAPTCHA (Completely Automated Public Turing Test to tell Charvises and Humans Apart)?

자 이제 해당 CAPTCHA(차비스족과 인간을 구분하는 완전 자동화된 공개 튜링 테스트)를 통과해보라.

  

In general, CAPTCHA is a technology used to distinguish between a human and a computer. It means a quiz that requires fluid thinking that humans can do but computers find difficult and If it passes, it is evaluated as a human. There are various methods, such as reading superimposed strings or understanding real images such as bridges and buses.

 

일반적으로 캡차(CAPTCHA)는 사람과 컴퓨터를 구별하기 위해 사용되는 기술이다. 사람은 가능하지만 컴퓨터는 어려워하는 유동적 사고를 요구하는 퀴즈가 출제되며, 만약 통과하면 사람인 것으로 평가한다. 겹쳐져 있는 문자열을 읽거나 교량이나 버스와 같은 실사 이미지를 이해하는 등 다양한 방식이 있다.

 

In this challenge, the middle C in the spelling of captcha is replaced with chavis instead of computer. However, referring to the mention that Chavis is good at math, we can think of the possibility that it is a quiz related to mathematics that is difficult for humans to solve.

 

여기서는 캡차 스펠링 중 중간의 C를 컴퓨터가 아닌 차비스로 바꾸어 사용한다. 그런데 차비스는 수학을 잘한다고 언급된 것을 참고할 때 인간이 풀기 어려운 수학과 관련된 퀴즈일 가능성을 생각해볼 수 있다.

 

 

Hint 1. 

The formula is changed by the font, not the JavaScript code.   

 

수식은 자바스크립트 코드가 것이 아니라 폰트에 의해서 변경된다.   

 

 

Hint 2. 

The correct answer must be submitted with the token.  

 

정답은 토큰과 함께 제출해야 한다.   

 

 

* Check the link below for full write-up details. 

* 전체 라잇업 내용은 아래 링크 확인. 

 

< FULL WRITE UP >