728x90 ๐ดCTF84 Hack The Box - Busqueda Writeup SynopsisBusqueda is an Easy Difficulty Linux machineinvolves exploiting a command injection vulnerability present in a python module.By leveraging this vulnerability(์ด ์ทจ์ฝ์ ์ ์ด์ฉํ์ฌ), we gain user-level access to the machine.To escalate privileges to root, we discover credentials within a Git config file, allowing us to log into a local Gitea service.Additionally(์ถ๊ฐ์ ์ผ๋ก), we uncover that a system che.. 2025. 4. 16. CTF - ์๊ฒ์ ์ฌ์ดํธ ๋ชจ์ Web Hacking https://www.root-me.org/?lang=en https://los.rubiya.kr/ https://webhacking.kr/ Pwnable(System Hacking) https://pwnable.kr/ Reversing http://reversing.kr/ Etc https://dreamhack.io/wargame Pentesting Platform https://app.hackthebox.com/ https://tryhackme.com/ 2024. 4. 18. Hack The Box - Archetype Writeup(2) ์ง์ ๊ฐ์๋จธ์ ์์ openvpn์ ํตํด ํ์ผ ๋จธ์ ๊ณผ ํต์ ์ด ๊ฐ๋ฅํ๊ฒ ๋ง๋ค์ด ์ฃผ์์ต๋๋ค. ์ด์ ์ ๋งํ๋ ์ธํฐ๋ท ํต์ ์ด ์ด์ ๊ฐ๋ฅํด์ก์ต๋๋ค. Task 4. What script from Impacket collection can be used in order to establish an authenticated connection to a Microsoft SQL Server?(Microsoft SQL Server์ ์ธ์ฆ๋ ์ฐ๊ฒฐ์ ์ค์ ํ๊ธฐ ์ํด Impacket ์ปฌ๋ ์ ์ ์ด๋ค ์คํฌ๋ฆฝํธ๋ฅผ ์ฌ์ฉํ ์ ์๋์?) ๋ฌธ์ ๊ฐ ์ดํดํ๊ธฐ ์ด๋ ค์ธ ๊ฒฝ์ฐ ๋งจ ์๋จ์ ํํธ๊ฐ ์ ํ pdf ํ์ผ์ ํ์ธํ ์ ์๋ ๋ฒํผ์ด ์์ต๋๋ค. ๊ทธ๊ฑธ ๋๋ฌ ์ฐธ๊ณ ํ์ธ์. ๋ณด์ํ๋ mssqlclient.py๋ฅผ ํตํด MSSQL ์๋ฒ์ ์ ์์ด ๊ฐ๋ฅํ๊ฐ.. 2024. 3. 4. Hack The Box - Archetype Writeup(1) Task 1. Which TCP port is hosting a database server?(๋ฐ์ดํฐ๋ฒ ์ด์ค ์๋ฒ์ ํฌํธ ๋ฒํธ๋ ๋ฌด์์ธ๊ฐ?) ์ ๋ณด ์์ง์ ์ํด ํฌํธ ์ค์บ๋(nmap)๋ฅผ ์ฌ์ฉํด ๋์(10.129.44.107)์ด ๊ฐ๋ฐฉํ ํฌํธ๋ฅผ ์ค์บํฉ๋๋ค. nmap -sC -sV 10.129.44.107 ์ค์บ ๊ฒฐ๊ณผ ๋์์ด SMB(135, 139, 445)์ MS-SQL ์๋ฒ๊ฐ ํ์ฑํ๊ฐ ๋ ๊ฒ์ ๋ณผ ์ ์์ต๋๋ค. ๋ช ๋ น์ด ์ต์ (-sC, -sV) ์ค๋ช ์ ์๋์ ๊ฐ์ต๋๋ค. ๋ฌธ์ 1 ์ ๋ต์ 1433 Task 2. What is the name of the non-Administrative share available over SMB?(SMB์์ ์ฌ์ฉํ ์ ์๋ ๋น๊ด๋ฆฌ์ ๊ณต์ ์ ์ด๋ฆ์ ๋ฌด์์ธ๊ฐ์? ) ๋ฆฌ๋ ์ค์๋ s.. 2024. 2. 28. Root Me - TCP - Encoded string ๋ฌธ์ ๋ด์ฉ TCP ํ๋กํ ์ฝ์ ์ฌ์ฉํ์ฌ ์ด ํ ์คํธ๋ฅผ ์์ํ๋ ค๋ฉด ๋คํธ์ํฌ ์์ผ์ ์๋ ํ๋ก๊ทธ๋จ์ ์ฐ๊ฒฐํด์ผ ํฉ๋๋ค. ํ๋ก๊ทธ๋จ์์ ๋ณด๋ธ ์ธ์ฝ๋ฉ๋ ๋ฌธ์์ด์ ํด๋ ํด์ผ ํฉ๋๋ค. ํ๋ก๊ทธ๋จ์ด ๋ฌธ์์ด์ ๋ณด๋ธ ์๊ฐ๋ถํฐ 2์ด ์ด๋ด์ ์ ๋ต์ ๋ณด๋ด์ผ ํฉ๋๋ค. ๋ต์ ๋ฌธ์์ด๋ก ๋ณด๋ด์ผ ํฉ๋๋ค. ์ ๋ต ์ฝ๋ """ To start this test using the TCP protocol, you need to connect to a program on a network socket. You must decode the encoded character string sent by the program. You have 2 seconds to send the correct answer from the moment the program sen.. 2024. 2. 16. Root Me - TCP - Back to school ๋ฌธ์ ๋ด์ฉ ์ซ์ 1์ ์ ๊ณฑ๊ทผ์ ๊ณ์ฐํ๊ณ ์ซ์ 2๋ฅผ ๊ณฑํฉ๋๋ค. ๊ทธ๋ฐ ๋ค์ ๊ฒฐ๊ณผ๋ฅผ ์์์ ์ดํ ๋ ์๋ฆฌ๋ก ๋ฐ์ฌ๋ฆผํฉ๋๋ค. ํ๋ก๊ทธ๋จ์ด ๊ณ์ฐ์ ๋ณด๋ธ ์๊ฐ๋ถํฐ 2์ด ์ด๋ด์ ์ ๋ต์ ๋ณด๋ด์ผ ํฉ๋๋ค. ๋ต์ ๋ค์๊ณผ ๊ฐ์ ํ์์ผ๋ก ๋ณด๋ด์ผ ํฉ๋๋ค. ์ ๋ต ์ฝ๋ """ To start this test using the TCP protocol, you need to connect to a program on a network socket. Calculate the square root of number 1 and multiply by number 2. Then round the result to two decimal places. You have 2 seconds to send the correct answer from the .. 2024. 2. 16. Root Me - Encoding - ASCII ๋ฌธ์ ๋ด์ฉ 4C6520666C6167206465206365206368616C6C656E6765206573743A203261633337363438316165353436636436383964356239313237356433323465 ํํธ ์ ๋ต ๋ฌธ์์ด์ ๋ ๊ฐ์ฉ ๋ถ๋ฆฌํด์ 16์ง์ ๋ฌธ์๋ฅผ ASCII๋ก ๋ณํ s = "4C6520666C6167206465206365206368616C6C656E6765206573743A203261633337363438316165353436636436383964356239313237356433323465" a, b = 0, 2 for i in range( len(s)//2 ): c = ( s[ a + (i*2) : b + (i*2) ] ) print( chr( int(c, 16) ).. 2024. 2. 16. Root Me - CSP Bypass - Inline code Home ํ์ด์ง ํ ํ์ด์ง์๋ ์ ๋ ฅ์ฐฝ์ด ๋ณด์ด๊ณ ์๋์ ๊ฐ์ด ๋ฌธ์๋ฅผ ์ ๋ ฅํ๋ฉด ํ์ด์ง์ ๋ฐ์๋๋ค. ํ์ด์ง ๋ด์ฉ์ ๋ณด๋ฉด ํ๋๊ทธ ๊ฐ์ด ๋ด๋ง ํ์ธ์ด ๊ฐ๋ฅํ๋๋ก ์ค์ ์ด ๋์ด์๋ค๊ณ ํ๋ค. ๋ํ CSP๊ฐ ์ค์ ์ด ๋์ด XSS๋ ๋ถ๊ฐํ๋ค๊ณ ์ ํ์๋ค. ๋ง์ฝ ๋ฐฉ๊ธ ์ ์ ๋ ฅ์ฐฝ์๋ค ํ๊ทธ๋ฅผ ์ฌ์ฉํ๋ฉด ์๋์ ๊ฐ์ ์๋ฌ ํ์ด์ง๊ฐ ์ถ๋ ฅ์ด ๋๋ค. ์๋ฌ ์์ธ์ "Content-Security-Policy"๊ฐ ์ค์ ์ด ๋์ด ์๊ธฐ ๋๋ฌธ์ด๋ค. connect-src 'none'; font-src 'none'; frame-src 'none'; img-src 'self'; manifest-src 'none'; media-src 'none'; object-src 'none'; script-src 'unsafe-inline'; style-src 'self.. 2024. 2. 15. OWASP Juice Shop - Database Schema Exfiltrate the entire DB schema definition via SQL Injection. ์ง์ญํ๋ฉด SQL Injection์ ํตํ์ฌ DB ์คํค๋ง์ ์ ์์ด๋ฅผ ๊ฐ์ ธ์ค๋ผ๋ ์๋ฏธ์ด๋ค. SQLi๋ฅผ ์๋ํด ๋ณผ ์ ์๋ ๊ณต๊ฒฉ ๋ฒกํฐ๋ ํฌ๊ฒ ๋ก๊ทธ์ธ๊ณผ ์ํ ๊ฒ์ ๋ ๊ฐ์ง ์์ง๋ง ๋ก๊ทธ์ธ ๋ถ๋ถ์ ์ผ๋จ SQLi๋ฅผ ํตํด ์ํ๋ ๊ฒฐ๊ณผ๋ฅผ ๊ฐ์ ธ์ค์ง ๋ชปํ๋ฏ๋ก ์ผ๋จ ํจ์คํ์๋ค. (๊ทธ๋ฆฌ๊ณ ์ด๋ฐ ๋ฌธ์ ์ ํ์ ๊ณต๊ฒฉ ๋ฒกํฐ๋ ์ฃผ๋ก ๊ฒ์ ํ์ด์ง์ธ ๊ฒฝ์ฐ๊ฐ ๋ง์์๋ค.) ์ฃผ์ ์๋ ์๊ด ์์ง๋ง ๊ณ์ ํ์ด์ง์๋ ERROR BASED๋ฅผ ์ด์ฉํ๋ ๋ธ๋ผ์ธ๋ SQLi ๊ฐ๋ฅ์ฑ์ ์์๋ค. jim@juice-sh.op' AND CASE WHEN (select 1 from Users where email='jim@juice-sh.op') THEN 1.. 2023. 9. 29. OWASP Juice Shop - Login Admin (Injection) ๋ง์ผ ๋ก๊ทธ์ธ ์ฟผ๋ฆฌ๋ฌธ์ด ์๋์ ๊ฐ๋ค. SELECT * FROM Users WHERE email = '${req.body.email || ''}' AND password = '${security.hash(req.body.password || '')}' AND deletedAt IS NULL "admin@juice-sh.op' or '1'='1'--"๋ฅผ ์ ๋ ฅํ๋ค๋ฉด SELECT * FROM Users WHERE email = 'admin@juice-sh.op' or '1'='1'--' AND password = '${security.hash(req.body.password || '')}' AND deletedAt IS NULL ์ฟผ๋ฆฌ๋ฌธ์ ๊ฒฐ๊ณผ๊ฐ ์ฐธ์ด ๋๋ฉด์ ๋ก๊ทธ์ธ์ด ์ฑ๊ณตํ๋ค. 2023. 9. 27. OWASP Juice Shop - 100kB๋ณด๋ค ํฐ ํ์ผ์ ์ฌ๋ฆฌ์ธ์. (Improper Input Validation) ๋ค์๊ณผ ๊ฐ์ด ํฌ๊ธฐ ๋ณ๋ก ๋ค๋ฅธ ํ์ผ์ด ์๋ค. ๊ฐ์ฅ ํฐ ํ์ผ์ 120KB (122,880 ๋ฐ์ดํธ) ๊ฐ์ฅ ์์ ํ์ผ์ 1๋ฐ์ดํธ (1 ๋ฐ์ดํธ) ์ค๊ฐ์ 97.6KB (100,000 ๋ฐ์ดํธ) ํ์ผ ์ ๋ก๋๋ ์ต๋ 100 KB๊น์ง ๊ฐ๋ฅํ๋ฏ๋ก ๊ฐ์ฅ ํฐ ํ์ผ์ ์ฌ๋ฆฌ๋ฉด ์์ ๊ฐ์ ์ค๋ฅ๊ฐ ๋ฌ๋ค. ๊ฐ๋ฐ์ ๋๊ตฌ์ Console ํญ์ ํ์ธํ๋ฉด fileSize์ ๊ด๋ จ๋ ์ค๋ฅ๊ฐ ๋จ๊ฒ ๋๋ค. ํฌ๊ธฐ๊ฐ ํฐ ํ์ผ์ ์ฌ๋ฆฌ๋ฉด ์ ์ค๋ฅ ๋ฌธ๊ตฌ๊ฐ ๋จ์ง๋ง ๊ทธ๋ ์ง ์์ผ๋ฉด ๋จ์ง ์๋๋ค. ์ค๋ฅ ์์ธ ํ์ผ์ธ vendor.js๋ฅผ ํ์ธํ๋ฉด ํ์ผ์ ์ต๋ ์ฌ์ด์ฆ๋ฅผ ๋น๊ตํ๋ ๊ฒ ๊ฐ์ ํํฐ ํจ์ ๋ถ๋ถ์ด ๋ณด์ธ๋ค. ์ด๊ฑธ ๋ณด์์ ๋๋ ์ต๋ ํฌ๊ธฐ ์ฌ์ด์ฆ์ธ์ง ๊ฒ์ฆ์ ํด๋ผ์ด์ธํธ ์ธก์์ ํ๋ ๊ฒ์ผ๋ก ๋ณด์ธ๋ค. ๊ทธ๋ผ ์ ๋ถ๋ถ์ ์์ ํ๋ฉด 100 KB๊ฐ ๋๋ ํ์ผ๋ ์ฌ๋ ค ๋ณผ ์ ์์ง ์์.. 2023. 9. 27. OWASP Juice Shop - ์ํ ๋ฆฌ๋ทฐ ์กฐ์ (Broken Access Control) ๋ค์์ ํน์ ์ ํ์ ์ํํ์ ์์ฑํ๋ ํ๋ฉด์ด๋ค. ์์๋ก ์ํํ ๋ด์ฉ์ ์ ๊ณ ํ์ธ์ ๋๋ฅด๋ฉด ๋ฑ๋ก์ด ๋๋ ๊ตฌ์กฐ์ด๋ค. ํ์ด๋ก๋๋ฅผ ํ์ธํ๋ฉด author, message๋ฅผ ์ ๋ ฅ๋ฐ๋ ๊ฒ์ ๋ณผ ์ ์๋ค. ๋ฒํ์ค์ํธ๋ฅผ ์คํํด Interrupt๋ฅผ ๊ฑธ์ด ์๋์ ํ์ด๋ก๋ ์ค author๋ฅผ "admin@juice-sh.op"๋ก ์กฐ์ํ๋ค. ๋ฆฌ๋ทฐ๋ฅผ ํ์ธํ๋ฉด ์ค์ ๊ด๋ฆฌ์(admin@juice-sh.op)๊ฐ ๋ฆฌ๋ทฐ๋ฅผ ๋จ ๊ฒ์ฒ๋ผ ๋ชจ๋ฐฉํ ์ ์๋ค. OWASP TOP 10์ ๋ฑ์ฌ๋ ์ทจ์ฝํ ์ ๊ทผ ์ ์ด(Broken Access Control)์ ํ ์์ ๋ฌธ์ ๋ค. 2023. 9. 27. ์ด์ 1 2 3 4 ยทยทยท 7 ๋ค์ 728x90