๋ฐ˜์‘ํ˜•

๐Ÿ”’ Cyber Security 27

[DreamHack] ๋“œ๋ฆผํ•ต ์›นํ•ดํ‚น : blind-command

https://dreamhack.io/wargame/challenges/73/ blind-command Read the flag file XD Reference Server-side Basic Server-side Advanced - Command Injection dreamhack.io ๋ฌธ์ œ Read FLAG file XD ํƒ์ƒ‰ ๋“ค์–ด๊ฐ€๋ฉด ๊ฝค๋‚˜ ๋ถˆ์นœ์ ˆํ•œ ํ™”๋ฉด์ด ๋‚˜์˜จ๋‹ค url ์ฟผ๋ฆฌ์— ?cmd=๊ฐ’ ์„ ์ถ”๊ฐ€ํ•˜๋‹ˆ ํ•ด๋‹นํ•˜๋Š” ๊ฐ’์ด ๋‚˜์˜ค๋Š” ๊ฐ„๋‹จํ•œ ์‚ฌ์ดํŠธ๋‹ค ๋ฌธ์ œ ํŒŒ์ผ์„ ๋ณด์ž #!/usr/bin/env python3 from flask import Flask, request import os app = Flask(__name__) @app.route('/' , methods=['GET']) def index(): cmd..

[DreamHack] ๋“œ๋ฆผํ•ต ์›นํ•ดํ‚น : Carve Party

https://dreamhack.io/wargame/challenges/96/ Carve Party Description ํ• ๋กœ์œˆ ํŒŒํ‹ฐ๋ฅผ ๊ธฐ๋…ํ•˜๊ธฐ ์œ„ํ•ด ํ˜ธ๋ฐ•์„ ์ค€๋น„ํ–ˆ์Šต๋‹ˆ๋‹ค! ํ˜ธ๋ฐ•์„ 10000๋ฒˆ ํด๋ฆญํ•˜๊ณ  ํ”Œ๋ž˜๊ทธ๋ฅผ ํš๋“ํ•˜์„ธ์š”! dreamhack.io ๋ฌธ์ œํŒŒ์ผ ์—ฌ๋Š”๋ฒ• ๋ฌธ์ œํŒŒ์ผ์„ ๋‹ค์šด๋กœ๋“œํ•˜๊ณ  ์••์ถ•์„ ํ’€๋ฉด .html ํŒŒ์ผ ํ•˜๋‚˜๊ฐ€ ๋‚˜์˜จ๋‹ค. ์ด๋ฅผ ๋ธŒ๋ผ์šฐ์ €(์›จ์ผ, ํฌ๋กฌ, ์‚ฌํŒŒ๋ฆฌ ๋“ฑ)์— ๋Œ์–ด์˜ค๋ฉด ํŒŒ์ผ์ด ์—ด๋ฆฐ๋‹ค ํ’€์ด ํ˜ธ๋ฐ•์„ 10000๋ฒˆ ํด๋ฆญํ•˜๋ฉด ํ”Œ๋ž˜๊ทธ๋ฅผ ๋ฐ›์„ ์ˆ˜ ์žˆ๋‹ค๊ณ  ํ•œ๋‹ค. ์ฒ˜์Œ์€ ์‰ฝ๊ฒŒ ๊ฐœ๋ฐœ์ž ๋„๊ตฌ๋ฅผ ์—ด์–ด์„œ ์ฝ”๋“œ๋ฅผ ์‚ดํŽด๋ณด์ž F12 -> source var pumpkin = [ 124, 112, 59, 73, 167, 100, 105, 75, 59, 23, 16, 181, 165, 104, 43, 49, 118, 71, 1..

[DreamHack] ๋“œ๋ฆผํ•ต ์›นํ•ดํ‚น: web-ssrf

https://dreamhack.io/wargame/challenges/75/ web-ssrf flask๋กœ ์ž‘์„ฑ๋œ image viewer ์„œ๋น„์Šค ์ž…๋‹ˆ๋‹ค. SSRF ์ทจ์•ฝ์ ์„ ์ด์šฉํ•ด ํ”Œ๋ž˜๊ทธ๋ฅผ ํš๋“ํ•˜์„ธ์š”. ํ”Œ๋ž˜๊ทธ๋Š” /app/flag.txt์— ์žˆ์Šต๋‹ˆ๋‹ค. Reference Server-side Basic dreamhack.io ํ•จ๊ป˜ ์‹ค์Šต์ธ ๋งŒํผ ํ’€์ด๋Š” ์ž๋ฃŒ์— ๋‹ค ๋‚˜์™€์žˆ๋‹ค. ๋‹ค๋งŒ ์ž๋ฃŒ์—์„œ ๋ถ€๋ฅดํŠธํฌ์Šค๋กœ ํฌํŠธ๋ฒˆํ˜ธ๋ฅผ ์ฐพ์•„๋‚ผ๋•Œ ํŒŒ์ด์ฌ์„ ์ด์šฉํ•˜๋Š”๋ฐ, ์ด ์ฝ”๋“œ๋ฅผ ํ›จ์”ฌ ๋” ๋‹จ์ˆœํ™”ํ•  ์ˆ˜ ์žˆ์ง€ ์•Š์„๊นŒ ์‹ถ์–ด์„œ ๊ฐ„๊ฒฐํ•˜๊ฒŒ ๋ฐ”๊ฟ”๋ดค๋‹ค. import requests ERROR_RESPONSE = "iVBORw0KGgoAAAANSUhEUgAAA04AAAF4CAYAAABjHKkYAAAMRmlDQ1BJQ0MgUHJvZmlsZQAASImVVwdYU..

[DreamHack] ๋“œ๋ฆผํ•ต ์›นํ•ดํ‚น : file-download-1

https://dreamhack.io/wargame/challenges/37/ file-download-1 File Download ์ทจ์•ฝ์ ์ด ์กด์žฌํ•˜๋Š” ์›น ์„œ๋น„์Šค์ž…๋‹ˆ๋‹ค. flag.py๋ฅผ ๋‹ค์šด๋กœ๋“œ ๋ฐ›์œผ๋ฉด ํ”Œ๋ž˜๊ทธ๋ฅผ ํš๋“ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. Reference Introduction of Webhacking dreamhack.io ๋ฌธ์ œ File Download ์ทจ์•ฝ์ ์ด ์กด์žฌํ•˜๋Š” ์›น ์„œ๋น„์Šค์ž…๋‹ˆ๋‹ค. flag.py๋ฅผ ๋‹ค์šด๋กœ๋“œ ๋ฐ›์œผ๋ฉด ํ”Œ๋ž˜๊ทธ๋ฅผ ํš๋“ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋ฌธ์ œํŒŒ์ผ ๋”๋ณด๊ธฐ #!/usr/bin/env python3 import os import shutil from flask import Flask, request, render_template, redirect from flag import FLAG APP = Fla..

[DreamHack] ๋“œ๋ฆผํ•ต ์›นํ•ดํ‚น: command-injection-1

https://dreamhack.io/wargame/challenges/44/ command-injection-1 ํŠน์ • Host์— ping ํŒจํ‚ท์„ ๋ณด๋‚ด๋Š” ์„œ๋น„์Šค์ž…๋‹ˆ๋‹ค. Command Injection์„ ํ†ตํ•ด ํ”Œ๋ž˜๊ทธ๋ฅผ ํš๋“ํ•˜์„ธ์š”. ํ”Œ๋ž˜๊ทธ๋Š” flag.py์— ์žˆ์Šต๋‹ˆ๋‹ค. Reference Introduction of Webhacking dreamhack.io ๋ฌธ์ œ ํŠน์ • Host์— ping ํŒจํ‚ท์„ ๋ณด๋‚ด๋Š” ์„œ๋น„์Šค์ž…๋‹ˆ๋‹ค. Command Injection์„ ํ†ตํ•ด ํ”Œ๋ž˜๊ทธ๋ฅผ ํš๋“ํ•˜์„ธ์š”. ํ”Œ๋ž˜๊ทธ๋Š” flag.py์— ์žˆ์Šต๋‹ˆ๋‹ค. ๋ฌธ์ œํŒŒ์ผ ๋”๋ณด๊ธฐ #!/usr/bin/env python3 import subprocess from flask import Flask, request, render_template, redirect fro..

[DreamHack] ๋“œ๋ฆผํ•ต ๋ฆฌ๋ฒ„์‹ฑ : rev-basic-0

https://dreamhack.io/wargame/challenges/14/writeups rev-basic-0 Reversing Basic Challenge #0 ์ด ๋ฌธ์ œ๋Š” ์‚ฌ์šฉ์ž์—๊ฒŒ ๋ฌธ์ž์—ด ์ž…๋ ฅ์„ ๋ฐ›์•„ ์ •ํ•ด์ง„ ๋ฐฉ๋ฒ•์œผ๋กœ ์ž…๋ ฅ๊ฐ’์„ ๊ฒ€์ฆํ•˜์—ฌ correct ๋˜๋Š” wrong์„ ์ถœ๋ ฅํ•˜๋Š” ํ”„๋กœ๊ทธ๋žจ์ด ์ฃผ์–ด์ง‘๋‹ˆ๋‹ค. ํ•ด๋‹น ๋ฐ”์ด๋„ˆ๋ฆฌ๋ฅผ ๋ถ„์„ํ•˜์—ฌ correct๋ฅผ ์ถœ dreamhack.io ๋ฌธ์ œ์ •๋ณด - Reversing Basic Challenge #0 ์ด ๋ฌธ์ œ๋Š” ์‚ฌ์šฉ์ž์—๊ฒŒ ๋ฌธ์ž์—ด ์ž…๋ ฅ์„ ๋ฐ›์•„ ์ •ํ•ด์ง„ ๋ฐฉ๋ฒ•์œผ๋กœ ์ž…๋ ฅ๊ฐ’์„ ๊ฒ€์ฆํ•˜์—ฌ correct ๋˜๋Š” wrong์„ ์ถœ๋ ฅํ•˜๋Š” ํ”„๋กœ๊ทธ๋žจ์ด ์ฃผ์–ด์ง‘๋‹ˆ๋‹ค. ํ•ด๋‹น ๋ฐ”์ด๋„ˆ๋ฆฌ๋ฅผ ๋ถ„์„ํ•˜์—ฌ correct๋ฅผ ์ถœ๋ ฅํ•˜๋Š” ์ž…๋ ฅ๊ฐ’์„ ์ฐพ์œผ์„ธ์š”! ํš๋“ํ•œ ์ž…๋ ฅ๊ฐ’์€ DH{} ํฌ๋งท์— ๋„ฃ์–ด์„œ ์ธ์ฆํ•ด์ฃผ์„ธ์š”. ์˜ˆ์‹œ) ์ž…๋ ฅ..

[CryptoHack] General Challenge - XOR

https://cryptohack.org/challenges/general/ CryptoHack – Home A fun, free platform to learn about cryptography through solving challenges and cracking insecure code. Can you reach the top of the leaderboard? cryptohack.org XOR Starter Given the string "label", XOR each character with the integer 13. Convert these integers back to a string and submit the flag as crypto{new_string}. The Python pwnt..

[CryptoHack] General Challenge - Ecoding

https://cryptohack.org/challenges/general/ CryptoHack – Home A fun, free platform to learn about cryptography through solving challenges and cracking insecure code. Can you reach the top of the leaderboard? cryptohack.org ASCII ASCII is a 7-bit encoding standard which allows the representation of text using the integers 0-127. Using the below integer array, convert the numbers to their correspon..

[CryptoHack] Introduction to CryptoHack

https://cryptohack.org/challenges/introduction/ CryptoHack – Home A fun, free platform to learn about cryptography through solving challenges and cracking insecure code. Can you reach the top of the leaderboard? cryptohack.org Finding Flags Each challenge is designed to help introduce you to a new piece of cryptography. Solving a challenge will require you to find a "flag". These flags will usua..

[DreamHack] ๋“œ๋ฆผํ•ต ์›นํ•ดํ‚น: csrf-2

https://dreamhack.io/wargame/challenges/269/ csrf-2 ์—ฌ๋Ÿฌ ๊ธฐ๋Šฅ๊ณผ ์ž…๋ ฅ๋ฐ›์€ URL์„ ํ™•์ธํ•˜๋Š” ๋ด‡์ด ๊ตฌํ˜„๋œ ์„œ๋น„์Šค์ž…๋‹ˆ๋‹ค. CSRF ์ทจ์•ฝ์ ์„ ์ด์šฉํ•ด ํ”Œ๋ž˜๊ทธ๋ฅผ ํš๋“ํ•˜์„ธ์š”. Reference Client-side Basic dreamhack.io ๋ฌธ์ œ ์ •๋ณด ์—ฌ๋Ÿฌ ๊ธฐ๋Šฅ๊ณผ ์ž…๋ ฅ๋ฐ›์€ URL์„ ํ™•์ธํ•˜๋Š” ๋ด‡์ด ๊ตฌํ˜„๋œ ์„œ๋น„์Šค์ž…๋‹ˆ๋‹ค. CSRF ์ทจ์•ฝ์ ์„ ์ด์šฉํ•ด ํ”Œ๋ž˜๊ทธ๋ฅผ ํš๋“ํ•˜์„ธ์š”. ๋”๋ณด๊ธฐ #!/usr/bin/python3 from flask import Flask, request, render_template, make_response, redirect, url_for from selenium import webdriver import urllib import os app = Flask..

๋ฐ˜์‘ํ˜•