DOMDOM
0posts
today
total
personal posts · since 2021

Fragments
of a day.

A small notebook for slow moments slipping by.

2023 IT Creator
2024 Food Creator
2025 News Creator
2026 News Creator

Latest Posts최근

Security/CTF

[HackTheBoo] [Web] Juggling Facts Writeup(문제풀이)

Introduction Category : Web Difficulty : easy Description : An organization seems to possess knowledge of the true nature of pumpkins. Can you find out what they honestly know and uncover this centuries-long secret once and for all? Code Analysis Flag 가 어디있나 살펴봤고, entrypoint.sh 파일에서 DB 생성 시에 입력되는 것을 볼 수 있었습니다. CREATE DATABASE web_juggling_facts; USE web_juggling_facts; CREATE TABLE facts ( id IN..

Security/CTF

[SekaiCTF] [Web] Sekai Game Start

문제 지문 Hey it's our Sekai Game – try to make it start!! Author: bwjy 문제 풀이 문제 코드는 아래와 같습니다. sekai_game.run 이라는 GET 파라미터를 받아서, 그 내용 값을 unserialize 함수에 넘겨주는 것으로 Flag값이 출력되도록 해야하는 문제입니다. 우선 첫번째로 sekai_game.run 이라는 이름의 GET 파라미터를 어떻게 받아와야하는지 고민해보게 됩니다. PHP에서는 보통 파라미터로 . 이라는 문자가 들어오면 _(언더바)로 변경해버립니다. https://www.php.net/manual/en/language.variables.external.php#81080 PHP: Variables From External Source..

Security/Wargame

[Hackthebox] Letter Dispair Writeup(문제풀이)

문제 개요 문제 설명 난이도 및 유형 A high-profile political individual was a victim of a spear-phishing attack. The email came from a legitimate government entity in a nation we don't have jurisdiction. However, we have traced the originating mail to a government webserver. Further enumeration revealed an open directory index containing a PHP mailer script we think was used to send the email. We need access t..

Security/CTF

[Hackthebox] Intergalactic Post Writeup(문제풀이)

문제 개요 RCE with Sqlite3 query injection 코드 분석 index.php 를 보면 라우터로 등록된 경로는 GET / 과 POST /subscribe 로 한개씩 존재합니다.

Security/CTF

[Web] Do you know Hashes - 2021 INCOGNITO CTF Writeup

Web 문제 중에서 제일 점수가 낮은 문제로 hash collision 과 php 비교 연산자(php magic hash) 관련 문제였습니다. 문제를 보면 처음엔 md5 hash 와 crc32 hash 값이 서로 일치해야 하고 두 번째엔 crc32 와 md4 가, 세 번째엔 md5와 md4가 일치해야 한다고 합니다. 위 문제를 풀기전에 일단 php magic hash 관련 내용을 찾아보았습니다. 위 코드에서 a와 b는 서로 다른 값이지만 php 비교 연산자에서는 두 값이 참이 나옵니다. 정수의 형태로 비교하는 php 비교 연산자는 a의 값을 0 * 10^123456 으로 인식하여 결국 0 값으로 인삭하게 됩니다. 그러므로 두 변수 모두 0 값이므로 true 값이 됩니다. 이런 현상을 이용하여 0e 로 시..

Security/Wargame

[Hackthebox] - Toxic Writeup(문제풀이)

처음에 접속하면 위와 같은 웹페이지가 나옵니다. 그리고 제공받은 다운로드 파일에는 dockerfile과 index.html와 index.php 등의 일부 소스코드 파일도 존재합니다. 페이지 자체는 그냥 html 파일로 만들어진 것 같았으며, 서버 언어는 세션 키의 이름이 PHPSESSID 인 것을 보아 php인 것 같고, nginx 서버로 구동되고 있는 것 같았습니다. 그리고 세션 아이디가 base64 디코딩인 되는 것을 확인했습니다. // Tzo5OiJQYWdlTW9kZWwiOjE6e3M6NDoiZmlsZSI7czoxNToiL3d3dy9pbmRleC5odG1sIjt9 디코딩 결과 O:9:"PageModel":1:{s:4:"file";s:15:"/www/index.html";} insecure deser..

728x90
반응형
728x90
반응형

Thanks for staying up late.

keep wandering · keep listening