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

๋ถ„๋ฅ˜ ์ „์ฒด๋ณด๊ธฐ443

[Webhacking.kr] old-16 ์›Œ๊ฒŒ์ž„ ๋ฌธ์ œ ํ’€์ด ๐Ÿ– old-16 ์›Œ๊ฒŒ์ž„ ๋ฌธ์ œ ํ’€์ด 1. ๋ฌธ์ œ ํ™”๋ฉด์œผ๋กœ ๋“ค์–ด๊ฐ„ ํ›„ ๋‹จ์ถ•ํ‚ค F12๋ฅผ ํ†ตํ•ด ๊ฐœ๋ฐœ์ž ๋„๊ตฌ ์˜คํ”ˆ 2. Sources ํƒญ์˜ Index ํŽ˜์ด์ง€๋กœ ๋“ค์–ด๊ฐ€ ์ฝ”๋“œ ์—ด๋žŒ Challenge 16 * ++ ์ž…๋ ฅ ์ด๋ฒคํŠธ์— ๋”ฐ๋ผ ์ž‘์—…์„ ์ˆ˜ํ–‰ํ•˜๋Š” mv() ํ•จ์ˆ˜์— ์ฃผ๋ชฉ ++ Do it! ์ด๋ผ๋Š” ์ฃผ์„์ด ๋‹ฌ๋ฆฐ Line 15์— ์ฃผ๋ชฉ 3. ์•„๋ž˜ ์‚ฌ์ดํŠธ๋ฅผ ์ด์šฉํ•˜์—ฌ ASCII Code ์™€ ๋งค์นญ๋˜๋Š” ํ‚ค๋ณด๋“œ ๋ฌธ์ž ํƒ์ƒ‰ cd ๊ฐ’ (ASKII Code) ๋งค์นญ๋˜๋Š” ๋ฌธ์ž ์ˆ˜ํ–‰ ์ž‘์—… 100 d ๋ณ„์˜ x ์ขŒํ‘œ๋ฅผ ์˜ค๋ฅธ์ชฝ์œผ๋กœ 50px๋งŒํผ ์ด๋™ 97 a ๋ณ„์˜ x ์ขŒํ‘œ๋ฅผ ์™ผ์ชฝ์œผ๋กœ 50px๋งŒํผ ์ด๋™ 119 w ๋ณ„์˜ y ์ขŒํ‘œ๋ฅผ ์œ„์ชฝ์œผ๋กœ 50px๋งŒํผ ์ด๋™ 115 s ๋ณ„์˜ y ์ขŒํ‘œ๋ฅผ ์•„๋ž˜์ชฝ์œผ๋กœ 50px๋งŒํผ ์ด๋™ 124 | ๋ธŒ๋ผ์šฐ์ €๋ฅผ ๋‹ค๋ฅธ ํŽ˜์ด์ง€๋กœ ์ด๋™ ++.. 2023. 8. 22.
[Webhacking.kr] old-26 ์›Œ๊ฒŒ์ž„ ๋ฌธ์ œ ํ’€์ด โ˜„๏ธ old-26 ์›Œ๊ฒŒ์ž„ ๋ฌธ์ œ ํ’€์ด 1. ๋ฌธ์ œ ํ™”๋ฉด์œผ๋กœ ๋“ค์–ด๊ฐ„ ํ›„ view-source ์„ ํƒํ•˜์—ฌ ์ฝ”๋“œ ์—ด๋žŒ view-source ++ GET ๋ฐฉ์‹์œผ๋กœ ์ž…๋ ฅ๋ฐ›์€ id๊ฐ’์ด admin ์ด๋ผ๋ฉด, ๋ฌธ์ œ ํ•ด๊ฒฐ 2. preg_match() ํ•จ์ˆ˜ ์šฐํšŒ๋ฅผ ์œ„ํ•ด, URL ์ธ์ฝ”๋”ฉ ํ‘œ์ค€์— ๋”ฐ๋ผ ์•„๋ž˜ ์ž‘์—… ์ˆ˜ํ–‰ Not - Encoded Encoded - Once Encoded - Twice admin %61%64%6D%69%6E %2561%2564%256D%2569%256E ++ ์‚ฌ์šฉํ•œ URL ์ธ์ฝ”๋” & ๋””์ฝ”๋” --> https://heavenly-appear.tistory.com/176 [URL ์ธ์ฝ”๋”, ๋””์ฝ”๋”] url์ธ์ฝ”๋”ฉ, url๋””์ฝ”๋”ฉ - ๋ฐ”๋กœ ๋ณ€ํ™˜ํ•ด๋“œ๋ ค์š”! Encoding Decoding ๋ณต์‚ฌ๋ฒ„ํŠผ์€ ํ˜„์žฌ ํฌ๋กฌ์—์„œ๋งŒ ์ง€์›.. 2023. 8. 21.
[Dreamhack] broken-png ๋“œ๋ฆผํ•ต ์›Œ๊ฒŒ์ž„ ๋ฌธ์ œ ํ’€์ด ๐Ÿคณ broken-png ๋“œ๋ฆผํ•ต ์›Œ๊ฒŒ์ž„ ๋ฌธ์ œ ํ’€์ด 1. ๋ฌธ์ œ์— ๋Œ€ํ•œ ์„ค๋ช…์„ ์ฝ์€ ํ›„ ๋ฌธ์ œ ํŒŒ์ผ ๋‹ค์šด๋กœ๋“œ 2. ๋‹ค์šด๋ฐ›์€ ์ด๋ฏธ์ง€ ํŒŒ์ผ ์—ด๊ธฐ --> FLAG ์ผ๋ถ€๊ฐ€ ์ž˜๋ ค์žˆ์Œ์„ ํ™•์ธ 3. HxD ์–ดํ”Œ์„ ํ†ตํ•ด ๋‹ค์šด๋ฐ›์€ ์ด๋ฏธ์ง€ ํŒŒ์ผ ์—ด๊ธฐ ++ HxD ํ”„๋กœ๊ทธ๋žจ์ด๋ž€? HxD๋Š” ์œˆ๋„์šฐ ์šด์˜ ์ฒด์ œ์—์„œ ๋™์ž‘ํ•˜๋Š” ํ”„๋ฆฌ์›จ์–ด ํ—ฅ์Šค ์—๋””ํ„ฐ๋กœ, ์ฃผ๋กœ ์ปดํ“จํ„ฐ ํŒŒ์ผ์˜ ์ด์ง„ ๋ฐ์ดํ„ฐ๋ฅผ ํŽธ์ง‘ ๋ฐ ๋ถ„์„ํ•˜๋Š” ๋„๊ตฌ๋กœ ์‚ฌ์šฉ๋œ๋‹ค. ์ด ์™ธ์—๋„ HxD๋Š” CRC(์ˆœํ™˜ ์ค‘๋ณต ๊ฒ€์‚ฌ) ์ง„ํ–‰ ๋ฐ ๋ฉ”๋ชจ๋ฆฌ ๊ฒ€์‚ฌ ๊ธฐ๋Šฅ๋„ ์ง€์›ํ•˜๋Š” ๊ฐ•๋ ฅํ•œ ๋„๊ตฌ๋กœ์„œ, ์ฃผ๋กœ ์‹œ์Šคํ…œ ๊ด€๋ฆฌ์ž๋‚˜ ํ”„๋กœ๊ทธ๋ž˜๋จธ, ๋ณด์•ˆ ์ „๋ฌธ๊ฐ€ ๋ฐ ์—”์ง€๋‹ˆ์–ด๊ฐ€ ์‚ฌ์šฉํ•œ๋‹ค. 4. ์ง„์ˆ˜ ์„ค์ •์„ '10'์œผ๋กœ ๋ณ€๊ฒฝํ•œ ๋’ค, ์ด๋ฏธ์ง€์˜ ์„ธ๋กœ ํฌ๊ธฐ๋ฅผ ๊ฐ€๋กœ์™€ ๋™์ผํ•˜๊ฒŒ ์กฐ์ • ํŒŒ๋ž‘ ๋ถ€๋ถ„ ๋นจ๊ฐ• ๋ถ€๋ถ„ 00 00 02 00 (10์ง„์ˆ˜) 00 00 0.. 2023. 8. 20.
[Dreamhack] 64se64 ๋“œ๋ฆผํ•ต ์›Œ๊ฒŒ์ž„ ๋ฌธ์ œ ํ’€์ด ๐Ÿ‘’ 64se64 ๋“œ๋ฆผํ•ต ์›Œ๊ฒŒ์ž„ ๋ฌธ์ œ ํ’€์ด 1. ๋ฌธ์ œ์— ๋Œ€ํ•œ ์„ค๋ช… ์ˆ™์ง€ (๋ฌธ์ œ ํŒŒ์ผ์€ ๋ณ„๋„ ๋‹ค์šด๋กœ๋“œ ํ•„์š” X) 2. ์„œ๋ฒ„ ์ƒ์„ฑ ํ›„ ์•ˆ๋‚ด๋œ ๋งํฌ๋กœ ์ ‘์† 3. F12 ๋‹จ์ถ•ํ‚ค๋ฅผ ํ†ตํ•ด ๊ฐœ๋ฐœ์ž ๋„๊ตฌ ์‹คํ–‰ --> Sources ํƒญ์—์„œ ์†Œ์Šค ์ฝ”๋“œ ํ™•์ธ Welcome! ๐Ÿ‘‹ 4. value ๋ณ€์ˆ˜ ์† base64๋กœ ์ธ์ฝ”๋”ฉ๋œ ๋ฌธ์ž์—ด ํ•ด๋…์„ ์œ„ํ•œ ์Šคํฌ๋ฆฝํŠธ ์ž‘์„ฑ import base64 encoded_data = "IyEvdXNyL2Jpbi9lbnYgcHl0aG9uMwphc2M9WzY4LCA3MiwgMTIzLCA5OCwgMTAxLCA0OCwgNTIsIDU0LCA5OCwgNTUsIDUzLCA1MCwgNTAsIDk3LCA5NywgNTAsIDEwMSwgNTAsIDU2LCAxMDIsIDUwLCA1NSwgNTQsIDEwMSwgNDgsID.. 2023. 8. 19.
[Dreamhack] SingleByteXor ๋“œ๋ฆผํ•ต ์›Œ๊ฒŒ์ž„ ๋ฌธ์ œ ํ’€์ด ๐Ÿž SingleByteXor ๋“œ๋ฆผํ•ต ์›Œ๊ฒŒ์ž„ ๋ฌธ์ œ ํ’€์ด 1. ๋ฌธ์ œ์— ๋Œ€ํ•œ ์„ค๋ช… ์ˆ™์ง€ (๋ฌธ์ œ ํŒŒ์ผ์€ ๋ณ„๋„ ๋‹ค์šด๋กœ๋“œ ํ•„์š” X) ++ XOR(Exclusive OR) ์•”ํ˜ธ๋ž€? XOR(Exclusive OR) ์•”ํ˜ธ๋ฒ•์€ ๋‘ ๋น„ํŠธ๋‚˜ ๋ถˆ(Boolean) ๊ฐ’์ด ๋‹ค๋ฅผ ๋•Œ 1, ๊ฐ™์„ ๋•Œ 0์„ ๋ฐ˜ํ™˜ํ•˜๋Š” "๋ฐฐํƒ€์  ๋…ผ๋ฆฌํ•ฉ" ์—ฐ์‚ฐ์„ ์‚ฌ์šฉํ•˜์—ฌ ๋ฐ์ดํ„ฐ๋ฅผ ์•”ํ˜ธํ™”ํ•˜๋Š” ๊ฐ„๋‹จํ•œ ์•”ํ˜ธํ™” ๊ธฐ๋ฒ•์ด๋‹ค. XOR(Exclusive OR) ์—ฐ์‚ฐ์€ ๊ฐ ๋ฐ์ดํ„ฐ ๋น„ํŠธ์™€ ์•”ํ˜ธํ™” ํ‚ค ๋น„ํŠธ ๊ฐ„ ์—ฐ์‚ฐ์„ ์ˆ˜ํ–‰ํ•˜๋Š” ๋ฐฉ์‹์œผ๋กœ ๋™์ž‘ํ•˜๋ฉฐ, ๊ฐ ๋น„ํŠธ์— ๋Œ€ํ•ด ์•”ํ˜ธํ™” ํ‚ค์˜ ํ•ด๋‹น ๋น„ํŠธ์™€ XOR ์—ฐ์‚ฐ์„ ์ˆ˜ํ–‰ํ•˜๋ฉด ์•”ํ˜ธ๋ฌธ์ด ์ƒ์„ฑ๋œ๋‹ค. ๋ณตํ˜ธํ™”์˜ ๊ฒฝ์šฐ ๋™์ผํ•œ ํ‚ค๋ฅผ ํ†ตํ•ด ์—ฐ์‚ฐ์„ ์ถ”๊ฐ€ ์ˆ˜ํ–‰ํ•จ์œผ๋กœ์จ ์–ป์„ ์ˆ˜ ์žˆ๋‹ค. 2. ๋ณตํ˜ธํ™”๋ฅผ ์œ„ํ•œ Python ์Šคํฌ๋ฆฝํŠธ ์ž‘์„ฑ hex_value = "54586b.. 2023. 8. 18.
[Dreamhack] Simple-web-request ๋“œ๋ฆผํ•ต ์›Œ๊ฒŒ์ž„ ๋ฌธ์ œ ํ’€์ด ๐Ÿฟ Simple-web-request ๋“œ๋ฆผํ•ต ์›Œ๊ฒŒ์ž„ ๋ฌธ์ œ ํ’€์ด 1. ๋ฌธ์ œ์— ๋Œ€ํ•œ ์„ค๋ช…์„ ์ฝ์€ ํ›„ ๋ฌธ์ œ ํŒŒ์ผ ๋‹ค์šด๋กœ๋“œ 2. ๋‹ค์šด๋ฐ›์€ app.py ํŒŒ์ผ ์˜คํ”ˆ ํ›„ ์ฝ”๋“œ ๋ถ„์„ #!/usr/bin/python3 import os from flask import Flask, request, render_template, redirect, url_for import sys app = Flask(__name__) try: # flag is here! FLAG = open("./flag.txt", "r").read() except: FLAG = "[**FLAG**]" @app.route("/") def index(): return render_template("index.html") @app.route("/step1",.. 2023. 8. 17.