728x90 ์ ์ฒด ๊ธ720 XSS game - [6/6] Level 6: Follow the ๐ 2023. 9. 10. XSS game - [5/6] Level 5: Breaking protocol 2023. 9. 10. XSS game - [4/6] Level 4: Context matters 3'); alert('1 2023. 9. 10. XSS game - [3/6] Level 3: That sinking feeling... 2023. 9. 10. XSS game - [2/6] Level 2: Persistence is key https://xss-game.appspot.com/level2 https://xss-game.appspot.com/level2 Oops! Based on your browser cookies it seems like you haven't passed the previous level of the game. Please go back to the previous level and complete the challenge. xss-game.appspot.com 2023. 9. 10. XSS game - [1/6] Level 1: Hello, world of XSS https://xss-game.appspot.com/level1 XSS game: Level 1 xss-game.appspot.com 2023. 9. 10. DreamHack - error based sql injection ํ์ด TMI) extractvalue ํจ์ extractvalue(XML ๋ฐ์ดํฐ, XPath ํํ์)์ ์ธ์๋ก ๋ฐ์ต๋๋ค. XML ๋ฐ์ดํฐ๋ '๋๋ฆผํต ์ด์ผ๊ธฐ' ๊ฐ์ ๋ฐ์ดํฐ๊ฐ ์ฌ ์ ์์ผ๋ฉฐ XPath ํํ์์๋ '/STORE/BOOK/TITLE' ๊ฐ์ ๊ฐ์ด ์ฌ ์ ์์ต๋๋ค. ๋ง์ฝ SELECT extractvalue('๋๋ฆผํต ์ด์ผ๊ธฐ', '/STORE/BOOK/TITLE')๋ฅผ ์คํํ๋ฉด ๋๋ฆผํต ์ด์ผ๊ธฐ๊ฐ ์ถ๋ ฅ์ด ๋ฉ๋๋ค. extractvalue ํจ์๋ฅผ ์ด์ฉํ error based sql injection ํน์ดํ๊ฒ๋ MySQL์๋ XPATH syntax ์ค๋ฅ๊ฐ ์๊ธฐ๋ฉด ๊ทธ ์ค๋ฅ์ ์์ธ์ด ๋๋ XPath ํํ์์ ๊ทธ๋๋ก ๋ณด์ฌ์ค๋๋ค. ์์: (1105, "XPATH syntax error: '์๋ฌ์ ์์ธ'") ์ด์ ์ ์ด์ฉํ๋ฉด er.. 2023. 9. 10. DreamHack - CSP Bypass Advanced ํ์ด ์๋ฐ์คํฌ๋ฆฝํธ ์คํ์ด ์๋ ์ด์ @app.after_request def add_header(response): global nonce response.headers['Content-Security-Policy'] = f"default-src 'self'; img-src https://dreamhack.io; style-src 'self' 'unsafe-inline'; script-src 'self' 'nonce-{nonce}'; object-src 'none'" nonce = os.urandom(16).hex() return response request ํ ๋๋ง๋ค ํค๋์ CSP(Content-Security-Policy)๊ฐ ๋ถ๊ธฐ ๋๋ฌธ์ด๋ค. ๋ ์ดํด๋ณด์๋ฉด script-src๊ฐ self์ด๊ธฐ ๋๋ฌธ์ orig.. 2023. 9. 10. DreamHack - chocoshop ํ์ด ์ทจ์ฝ์ r.expire(used_coupon, timedelta(seconds=coupon['expiration'] - int(time()))) ์ฐ์ ์ด๋ ๊ฒ ์ฌ์ฉํ ์ฟ ํฐ์ (์ฟ ํฐ๋ง๋ฃ์๊ฐ + ํ์ฌ์๊ฐ) ๋ค์ ์ ๊ฑฐํ๋ ๊ฒ์ด ์ข ์์ํ๊ณ if coupon['expiration'] { var coupon = res.coupon; fetch(url+"/coupon/submit", { "headers": { "accept": "*/*", "accept-language": "ko-KR,ko;q=0.9,en-US;q=0.8,en;q=0.7", "authorization": aut.. 2023. 9. 9. DreamHack - funjs ํ์ด ๊ฐ๋ฐ์ ๋๊ตฌ์ Sources ํญ์์ ๋ธ๋ ์ดํฌ ํฌ์ธํธ๋ฅผ ๊ฑฐ๋ ๊ฒ์ด ํต์ฌ if (flag[_0x374fd6(0x17c)] != 0x24) { ์ฒ์์ ์ด ์กฐ๊ฑด๋ฌธ ๋๋ฌธ์ ์๊พธ NOP! ๊ฐ ์ถ๋ ฅ์ด ๋๋๋ฐ ๋ฌด์จ ๋ด์ฉ์ธ์ง ํ์ธํ๋ ค๋ฉด Console ์ฐฝ์๋ค๊ฐ flag[_0x374fd6(0x17c)]์ 0x24๋ฅผ ๊ฐ๊ฐ ์ ๋ ฅ ๊ทธ ๊ฒฐ๊ณผ if (flag.length != 36)๋ฅผ ๋ปํ๋ ๊ฒ์ ํ์ธ ํ๋๊ทธ ์ ๋ ฅ ๊ฐ์ ์ผ๋ถ๋ก 36๊ธ์๋ก ์ ๋ ฅํด์ ๋ค์ ๋ผ์ธ์ ์งํํ์๋ค. ์์ ๋น์ทํ๊ฒ ํ์คํ์ค ์งํ ๊ณผ์ ์ ํ์ธํ๋ฉด์ ๋๋์ด ์ฌ์ฉ์ ์ ๋ ฅ ๊ฐ๊ณผ ์ค์ flag ๊ฐ์ ๋น๊ตํ๋ ๋ฐ๋ณต๋ฌธ์ ์ฐพ์์ฃผ์๋๋ฐ ๋ ์๋์ฒ๋ผ ์์ ์ ํ์ฌ ์ง์ง flag ๊ฐ์ ์ฐพ์ ์ ์์๋ค. result = "" for (var i = 0x0; i < flag[_0x374.. 2023. 9. 9. DreamHack - [wargame.kr] tmitter ํ์ด SQL Injection ์ทจ์ฝ์ ์ด ์๋ ํ์ด์ง ์ฐพ๊ธฐ ์ฐ์ ๋ก๊ทธ์ธ ํ์ด์ง, ํ์ ๊ฐ์ ํ์ด์ง์ ๋จ๋ฐ์ดํ(‘)๋ ์๋ฐ์ดํ(")๋ฅผ ๋ค ๋ฃ์์ง๋ง ๋ฑํ ๋ฌธ์ ์์ด ํ์ ๊ฐ์ ๊ณผ ๋ก๊ทธ์ธ์ด ์๋ํ๋ค. ํ์ง๋ง ๋๋ค์์ ๋จ๋ฐ์ดํ(’)๊ฐ ์์ ๋ tmitter ์์ฑ ๊ธฐ๋ฅ์ด ์ ์๋๋ ๊ฒ์ ํ์ธํ์ฌ ์์ฑ ๊ธฐ๋ฅ์ SQLi ์ทจ์ฝํ ์ ์ ์ฐพ์๋ค. ํ๋ ๊ฐ์ ํ์ธํ๊ธฐ tmitter ์์ฑ ๊ธฐ๋ฅ์ ์ฌ์ฉํ๋ SQL ์ฟผ๋ฆฌ๋ฌธ์ ์์ธก์ ํด๋ณด์๋ค. ์ฒ์์๋ ์๋์ ๊ฐ์ ์ฟผ๋ฆฌ๋ฅผ ์ฐ์ง ์์๊น ์๊ฐ์ ํ์์ง๋ง ๊ทธ๋ผ ๊ณต๊ฒฉ์ด ๋จนํ๊ธฐ ์ฝ์ง ์์๋ค. insert into tmitter_board(id, msg) values ('guest', 'hello'); ์๋ฌดํผ ๋ฉ์์ง', null)#์ ์ฐ๊ณ ์์ฑ์ ํ๋ ์ ๋๋ก ์ฌ๋ผ๊ฐ๋ ๊ฒ์ ํ์ธํ๊ณ ํ๋๊ฐ ๋ช ๊ฐ์ง ๋ .. 2023. 9. 9. DreamHack - [wargame.kr] crack crack crack it ํ์ด htpassswd blueh4g:$1$SVXyqAwy$iMW9SbLyUd1v6Fen7mNUe0 ๋ณด์๋ง์ shadow ํ์ผ์ด ๋ ์ฌ๋์ผ๋ฉฐ [username]:[$password_id]:[$salt]:[$encrypted_password] ์ผ ๊ฒ์ด๋ผ๊ณ ์๊ฐํ๋ค. ์ฒซ ๋ฒ์งธ ํ๋ $1์ MD5๋ฅผ ๋ํ๋ธ๋ค. ๋ฌธ์ ์์ ํจ์ค์๋๊ฐ ์ฒ์์๋ G4HeulB๋ก ์์ํ๋ฉฐ ์ํ๋ฒณ ์๋ฌธ์์ ์ซ์๋ค๋ก ๊ตฌ์ฑ ๋๋ค๊ณ ์ธ๊ธํ๋ค. ์ฐ์ ํจ์ค์๋ ํฌ๋ ๋๊ตฌ์ธ john์ ์ฌ์ฉ์ ํ์ผ๋ฉฐ mask ์ต์ ์ ์ฌ์ฉํ์ฌ ์ํ๋ ๋ฌธ์๋ก ์ด๋ฃจ์ด์ง ์์์ ํจ์ค์๋๋ฅผ ์์ฑํด brute forcing ํ์๋ค. john htpasswd -1=[0-9a-z] --mask='G4HeulB?1' --max-length=11 ๋ช ์ด ์ง๋์ง ์์ ๋ฐ๋ก ํฌ๋ํน์ด ์ฑ๊ณต๋์์ผ.. 2023. 9. 9. ์ด์ 1 ยทยทยท 7 8 9 10 11 12 13 ยทยทยท 60 ๋ค์ 728x90