๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

๋“œ๋ฆผํ•ต4

[Dreamhack] Exercise: Welcome-Beginners ๋“œ๋ฆผํ•ต ์›Œ๊ฒŒ์ž„ ๋ฌธ์ œ ํ’€์ด ๐Ÿšบ Exercise: Welcome-Beginners ๋“œ๋ฆผํ•ต ์›Œ๊ฒŒ์ž„ ๋ฌธ์ œ ํ’€์ด 1. ๋ฌธ์ œ ์„ค๋ช… ํ™•์ธ ํ›„ ์„œ๋ฒ„ ์ƒ์„ฑ 2. ์ƒ์„ฑํ•œ ์„œ๋ฒ„๋กœ ์ ‘์†ํ•˜๊ธฐ ์ „, ๋ฌธ์ œ ํŒŒ์ผ ๋‹ค์šด๋กœ๋“œ ํ›„ ์˜คํ”ˆ 3. ์‚ฌ์šฉ์ž๋กœ๋ถ€ํ„ฐ ์ž…๋ ฅ๋ฐ›์€ ๊ฐ’์ด "Dreamhack" ์ธ ๊ฒฝ์šฐ FLAG๋ฅผ ์ถœ๋ ฅํ•˜๋Š” ๋ถ€๋ถ„ ๋ฐœ๊ฒฌ char cmp_str[10] = "Dreamhack"; char inp_str[10]; printf("Enter \"Dreamhack\" : "); scanf("%9s", inp_str); if(strcmp(cmp_str, inp_str) == 0){ ใ…คใ…คputs("Welcome Beginners!"); ใ…คใ…ค// print flag ใ…คใ…คputs(flag); } 4. Ubuntu ๊ฐ€์ƒํ™˜๊ฒฝ์—์„œ nc ๋ช…๋ น์–ด๋ฅผ ํ†ตํ•ด ์„œ๋ฒ„ ์ ‘์† --> "Drea.. 2023. 11. 25.
[Dreamhack] ex-reg-ex ๋“œ๋ฆผํ•ต ์›Œ๊ฒŒ์ž„ ๋ฌธ์ œ ํ’€์ด ๐Ÿคธ‍โ™€๏ธ ex-reg-ex ๋“œ๋ฆผํ•ต ์›Œ๊ฒŒ์ž„ ๋ฌธ์ œ ํ’€์ด 1. ๋ฌธ์ œ ์„ค๋ช… ํ™•์ธ ํ›„ ์„œ๋ฒ„ ์ƒ์„ฑ 2. ์ƒ์„ฑํ•œ ์„œ๋ฒ„๋กœ ์ ‘์†ํ•œ ๋’ค ์ž„์˜์˜ ๊ฐ’ ์ž…๋ ฅ --> Input ๊ฐ’์ด ๊ทธ๋Œ€๋กœ ์ถœ๋ ฅ๋จ์„ ํ™•์ธ 3. ๋ฌธ์ œ ํŒŒ์ผ ๋‹ค์šด๋กœ๋“œ ํ›„ app.py ์˜คํ”ˆ #!/usr/bin/python3 from flask import Flask, request, render_template import re app = Flask(__name__) try: ใ…คใ…คFLAG = open("./flag.txt", "r").read() # flag is here! except: ใ…คใ…คFLAG = "[**FLAG**]" @app.route("/", methods = ["GET", "POST"]) def index(): ใ…คใ…คinput_val = "" ใ…คใ…คif re.. 2023. 11. 24.
[Dreamhack] rev-basic-1 WriteUp โ˜‚๏ธ rev-basic-1 WriteUp 1. ๋ฌธ์ œ ์„ค๋ช… ํ™•์ธ ํ›„ ํŒŒ์ผ ๋‹ค์šด๋กœ๋“œ 2. ๋‹ค์šด๋ฐ›์€ ์‘์šฉ ํ”„๋กœ๊ทธ๋žจ ์‹คํ–‰ ํ›„ ์ž„์˜์˜ ๋ฌธ์ž์—ด ์ž…๋ ฅ --> Enter ์„ ํด๋ฆญํ•˜๋‹ˆ ํ”„๋กœ๊ทธ๋žจ์ด ์ข…๋ฃŒ๋จ์„ ํ™•์ธ 3. x64dbg๋ฅผ ํ†ตํ•ด ์‘์šฉ ํ”„๋กœ๊ทธ๋žจ ์˜คํ”ˆ 4. ์ƒ๋‹จ์˜ '๊ธฐํ˜ธ' ํƒญ์—์„œ 'chall1.exe' ํด๋ฆญ 5. ์ž…๋ ฅ๋ฐ›์€ ๋ฌธ์ž์—ด์„ ์ •๋‹ต๊ณผ ๋น„๊ตํ•˜๋Š” ๋ถ€๋ถ„ ๋ฐœ๊ฒฌ --> ์ •๋‹ต์€ "DH{Compar3_the_ch4ract3r}" 6. ๋ฐœ๊ฒฌํ•œ FLAG ์ž…๋ ฅ --> ๋ฌธ์ œ ํ•ด๊ฒฐ ์„ฑ๊ณต 2023. 11. 20.
[Dreamhack] rev-basic-0 WriteUp ๐Ÿ™ rev-basic-0 WriteUp 1. ๋ฌธ์ œ ์„ค๋ช… ํ™•์ธ ํ›„ ํŒŒ์ผ ๋‹ค์šด๋กœ๋“œ 2. ๋‹ค์šด๋ฐ›์€ ์‘์šฉ ํ”„๋กœ๊ทธ๋žจ ์‹คํ–‰ ํ›„ ์ž„์˜์˜ ๋ฌธ์ž์—ด ์ž…๋ ฅ --> Enter ์„ ํด๋ฆญํ•˜๋‹ˆ ํ”„๋กœ๊ทธ๋žจ์ด ์ข…๋ฃŒ๋จ์„ ํ™•์ธ 3. IDA ๋ฅผ ํ†ตํ•ด ์‘์šฉ ํ”„๋กœ๊ทธ๋žจ ์˜คํ”ˆ 4. ๋ฌธ์ž์—ด ๊ฒ€์ƒ‰ ๊ธฐ๋Šฅ์„ ํ†ตํ•ด 'Correct' ๋ฉ”์‹œ์ง€ ๊ฒ€์ƒ‰ --> Wrong & Correct ๋ฉ”์‹œ์ง€ ๋ฐœ๊ฒฌ 5. ์œ„๋กœ ์Šคํฌ๋กคํ•˜๋‹ˆ ์ž…๋ ฅ๋ฐ›์€ ๋ฌธ์ž์—ด์„ ์ •๋‹ต๊ณผ ๋น„๊ตํ•˜๋Š” ๋ถ€๋ถ„ ๋ฐœ๊ฒฌ --> ์ •๋‹ต์€ "Compar3_the_str1ng" 6. ๋ฐœ๊ฒฌํ•œ FLAG ์ž…๋ ฅ --> ๋ฌธ์ œ ํ•ด๊ฒฐ ์„ฑ๊ณต 2023. 11. 19.