728x90 ๐ดCTF/Root Me4 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. ์ด์ 1 ๋ค์ 728x90