๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
  • Welcome.

:: DreamHack ๐Ÿšฉ/wargame - reverse6

[ dreamhack ] - [ reversing | rev-basic-7] https://dreamhack.io/wargame/challenges/21/ rev-basic-7 Reversing Basic Challenge #7 ์ด ๋ฌธ์ œ๋Š” ์‚ฌ์šฉ์ž์—๊ฒŒ ๋ฌธ์ž์—ด ์ž…๋ ฅ์„ ๋ฐ›์•„ ์ •ํ•ด์ง„ ๋ฐฉ๋ฒ•์œผ๋กœ ์ž…๋ ฅ๊ฐ’์„ ๊ฒ€์ฆํ•˜์—ฌ correct ๋˜๋Š” wrong์„ ์ถœ๋ ฅํ•˜๋Š” ํ”„๋กœ๊ทธ๋žจ์ด ์ฃผ์–ด์ง‘๋‹ˆ๋‹ค. ํ•ด๋‹น ๋ฐ”์ด๋„ˆ๋ฆฌ๋ฅผ ๋ถ„์„ํ•˜์—ฌ correct๋ฅผ ์ถœ dreamhack.io ์ด๋ฒˆ ๋ฆฌ๋ฒ„์‹ฑ ๋ฌธ์ œ๋„ ์ด์ „๊ณผ ์œ ํ˜•์€ ๋น„์Šทํ•˜๋‹ค. ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ ๋””์ปดํŒŒ์ผ๋œ ์ฝ”๋“œ์—์„œ if๋ฌธ์˜ ์กฐ๊ฑด๋ฌธ์„ ํ™•์ธํ•˜์—ฌ Correct๋ฅผ ์ถœ๋ ฅํ•˜๊ฒŒ ํ•˜๋Š” ์ž…๋ ฅ๊ฐ’์„ ์ฐพ์•„๋‚ด๋Š” ๊ฒƒ์ด๋‹ค. if ๋ฌธ์˜ ์กฐ๊ฑด๋ฌธ์€ ๋‹ค์Œ๊ณผ ๊ฐ™๋‹ค. (i ^ (unsigned __int8)__ROL1__(*(_BYTE *)(a1 + i), i & 7)) != byte_140003000[i] ์ด ์‹์„ ๋น„๊ต์  .. 2022. 6. 1.
[ dreamhack ] - [ reversing | rev-basic-6] https://dreamhack.io/wargame/challenges/20/ rev-basic-6 Reversing Basic Challenge #6 ์ด ๋ฌธ์ œ๋Š” ์‚ฌ์šฉ์ž์—๊ฒŒ ๋ฌธ์ž์—ด ์ž…๋ ฅ์„ ๋ฐ›์•„ ์ •ํ•ด์ง„ ๋ฐฉ๋ฒ•์œผ๋กœ ์ž…๋ ฅ๊ฐ’์„ ๊ฒ€์ฆํ•˜์—ฌ correct ๋˜๋Š” wrong์„ ์ถœ๋ ฅํ•˜๋Š” ํ”„๋กœ๊ทธ๋žจ์ด ์ฃผ์–ด์ง‘๋‹ˆ๋‹ค. ํ•ด๋‹น ๋ฐ”์ด๋„ˆ๋ฆฌ๋ฅผ ๋ถ„์„ํ•˜์—ฌ correct๋ฅผ ์ถœ dreamhack.io ์ด๋ฒˆ rev-basic-6 ๋ฌธ์ œ๋„ ์ด์ „ ๋ฌธ์ œ๋“ค๊ณผ ๊ฐ™์€ ์œ ํ˜•์ด๋‹ค. ์ด๋ฒˆ์—๋„ ์—ญ์‹œ if ์ ˆ์— ์กด์žฌํ•˜๋Š” ์กฐ๊ฑด๋ฌธ์„ ๋ถ„์„ํ•˜์—ฌ ํŠน์ • ์•Œ๊ณ ๋ฆฌ์ฆ˜์„ ๋งŒ๋“ค์–ด์„œ ์—ญ์œผ๋กœ Correct๋ฅผ ์ถœ๋ ฅํ•˜๋Š” ์ž…๋ ฅ๊ฐ’์„ ์ฐพ์•„๋‚ด์•ผ ํ•œ๋‹ค. ์กฐ๊ฑด๋ฌธ์€ ๋‹ค์Œ๊ณผ ๊ฐ™๋‹ค. byte_140003020[*(unsigned __int8 *)(a1 + i)] != byte_140003000[i] ์ด ์ฝ”๋“œ๋ฅผ ๊ฐ„.. 2022. 5. 31.
[ dreamhack ] - [ reversing | rev-basic-5 ] https://dreamhack.io/wargame/challenges/19/ rev-basic-5 Reversing Basic Challenge #5 ์ด ๋ฌธ์ œ๋Š” ์‚ฌ์šฉ์ž์—๊ฒŒ ๋ฌธ์ž์—ด ์ž…๋ ฅ์„ ๋ฐ›์•„ ์ •ํ•ด์ง„ ๋ฐฉ๋ฒ•์œผ๋กœ ์ž…๋ ฅ๊ฐ’์„ ๊ฒ€์ฆํ•˜์—ฌ correct ๋˜๋Š” wrong์„ ์ถœ๋ ฅํ•˜๋Š” ํ”„๋กœ๊ทธ๋žจ์ด ์ฃผ์–ด์ง‘๋‹ˆ๋‹ค. ํ•ด๋‹น ๋ฐ”์ด๋„ˆ๋ฆฌ๋ฅผ ๋ถ„์„ํ•˜์—ฌ correct๋ฅผ ์ถœ dreamhack.io rev-basic-5 ๋ฌธ์ œ๋„ ์ด์ „๊นŒ์ง€์˜ rev-basic ๋ฌธ์ œ๋“ค๊ณผ ๋น„์Šทํ•œ ์œ ํ˜•์ด๋‹ค. if ์ ˆ์˜ ์กฐ๊ฑด๋ฌธ์„ ํ™•์ธํ•ด๋ณด๋ฉด, *(unsigned __int8 *)(a1 + i + 1) + *(unsigned __int8 *)(a1 + i) != byte_140003000[i] ๋ผ๊ณ  ๋˜์–ด ์žˆ๋Š”๋ฐ, ์ด๋ฅผ ๋ณด๊ธฐ ํŽธํ•˜๊ฒŒ ์ •๋ฆฌํ•˜์ž๋ฉด, a1[i+1] + a1[i] != .. 2022. 5. 31.
[ dreamhack ] - [ reversing | rev-basic-4 ] https://dreamhack.io/wargame/challenges/18/ rev-basic-4 Reversing Basic Challenge #4 ์ด ๋ฌธ์ œ๋Š” ์‚ฌ์šฉ์ž์—๊ฒŒ ๋ฌธ์ž์—ด ์ž…๋ ฅ์„ ๋ฐ›์•„ ์ •ํ•ด์ง„ ๋ฐฉ๋ฒ•์œผ๋กœ ์ž…๋ ฅ๊ฐ’์„ ๊ฒ€์ฆํ•˜์—ฌ correct ๋˜๋Š” wrong์„ ์ถœ๋ ฅํ•˜๋Š” ํ”„๋กœ๊ทธ๋žจ์ด ์ฃผ์–ด์ง‘๋‹ˆ๋‹ค. ํ•ด๋‹น ๋ฐ”์ด๋„ˆ๋ฆฌ๋ฅผ ๋ถ„์„ํ•˜์—ฌ correct๋ฅผ ์ถœ dreamhack.io ์ด์ „ rev-basic ๋ฌธ์ œ๋“ค๊ณผ ๋น„์Šทํ•˜๋‹ค. ๋””์ปดํŒŒ์ผ๋œ main์€ ๋‹ค์Œ๊ณผ ๊ฐ™๋‹ค. sub_140001000 ํ•จ์ˆ˜๊ฐ€ ์ฐธ์ด๋˜๋ฉด Correct๊ฐ€ ์ถœ๋ ฅ๋˜๋Š” ๊ฒƒ์œผ๋กœ ๋ณด์ธ๋‹ค. ํ™•์ธํ•ด๋ณด๊ฒ ๋‹ค. for ๋ฌธ์„ 0x1C ๋ฒˆ, ์ฆ‰, 28๋ฒˆ ๋Œ๋ฆฌ๋Š”๋ฐ, ์กฐ๊ฑด๋ฌธ์€ ((unsigned __int8)(16 * *(_BYTE *)(a1 + i)) | ((int)*(unsigned __i.. 2022. 5. 30.
reversing | [CodeEngn] Malware L07 https://dreamhack.io/wargame/challenges/374/ [CodeEngn] Malware L07 ๋‹ค์Œ์€ ์•…์„ฑ์ฝ”๋“œ Flow์˜ ์ผ๋ถ€๋ถ„์ด๋‹ค. ๋ถ„์„๊ฒฐ๊ณผ ์ด ์•…์„ฑ์ฝ”๋“œ๋Š” ํŠน์ • ์‚ฌ์ดํŠธ์— ์ ‘์†์„ ์‹œ๋„ ํ•˜๊ณ  ์žˆ๋Š”๋ฐ ์ ‘์†์ด ์•ˆ๋ ๊ฒฝ์šฐ ๋ช‡์ดˆ ๋‹จ์œ„๋กœ ์žฌ์ ‘์†์„ ํ•œ๋‹ค. ๋ช‡ms ๋‹จ์œ„๋กœ ์žฌ์ ‘์†์„ ํ•˜๋Š”๊ฐ€ dreamhack.io ๋‹ค์Œ์€ ์•…์„ฑ์ฝ”๋“œ Flow์˜ ์ผ๋ถ€๋ถ„์ด๋‹ค. ๋ถ„์„๊ฒฐ๊ณผ ์ด ์•…์„ฑ์ฝ”๋“œ๋Š” ํŠน์ • ์‚ฌ์ดํŠธ์— ์ ‘์†์„ ์‹œ๋„ ํ•˜๊ณ  ์žˆ๋Š”๋ฐ ์ ‘์†์ด ์•ˆ๋ ๊ฒฝ์šฐ ๋ช‡์ดˆ ๋‹จ์œ„๋กœ ์žฌ์ ‘์†์„ ํ•œ๋‹ค. ๋ช‡ms ๋‹จ์œ„๋กœ ์žฌ์ ‘์†์„ ํ•˜๋Š”๊ฐ€ ๋ฌธ์ œ๋Š” ์œ„์™€ ๊ฐ™๋‹ค. ์ ‘์†์ด ์•ˆ๋  ๊ฒฝ์šฐ -> false๋กœ ์ด์–ด์ง€๋Š” ๋ถ€๋ถ„์„ ์ฐพ์•„๋ณผ ์ƒ๊ฐ์ธ๋ฐ ๋˜ํ•œ, ์žฌ์ ‘์† ์‚ฌ์ด์— ์‹œ๊ฐ„์„ ๋‘๋Š” ๊ฒƒ์„ ๋ณด๋‹ˆ sleep์„ ํ†ตํ•ด ๋ฉˆ์ท„๋‹ค๊ฐ€ ์ด์–ด์ง€๋Š” ๊ฒƒ์œผ๋กœ ๋ณด์ด๊ธฐ๋„ ํ•œ๋‹ค. ์ฝ”๋“œ๋“ค์„ ์‚ดํŽด๋ณด๋‹ค ๋ณด๋‹ˆ.. 2022. 5. 30.
[dreamhack] - [reversing | rev-basic-2] https://dreamhack.io/wargame/challenges/16/ rev-basic-2 Reversing Basic Challenge #2 ์ด ๋ฌธ์ œ๋Š” ์‚ฌ์šฉ์ž์—๊ฒŒ ๋ฌธ์ž์—ด ์ž…๋ ฅ์„ ๋ฐ›์•„ ์ •ํ•ด์ง„ ๋ฐฉ๋ฒ•์œผ๋กœ ์ž…๋ ฅ๊ฐ’์„ ๊ฒ€์ฆํ•˜์—ฌ correct ๋˜๋Š” wrong์„ ์ถœ๋ ฅํ•˜๋Š” ํ”„๋กœ๊ทธ๋žจ์ด ์ฃผ์–ด์ง‘๋‹ˆ๋‹ค. ํ•ด๋‹น ๋ฐ”์ด๋„ˆ๋ฆฌ๋ฅผ ๋ถ„์„ํ•˜์—ฌ correct๋ฅผ ์ถœ dreamhack.io ์‚ฌ์šฉ์ž๊ฐ€ ์–ด๋–ค ๊ฐ’์„ ์ž…๋ ฅํ–ˆ์„ ๋•Œ, ํ•ด๋‹น ์ž…๋ ฅ๊ฐ’์— ๋”ฐ๋ผ correct ํ˜น์€ wrong ์ด ์ถœ๋ ฅ๋˜๋Š” ํ”„๋กœ๊ทธ๋žจ์„ ๋ฆฌ๋ฒ„์‹ฑํ•˜์—ฌ correct๋ฅผ ์ถœ๋ ฅํ•˜๋Š” ๊ฐ’์„ ์ฐพ์•„๋‚ด๋Š” ๋ฌธ์ œ์ด๋‹ค. Corect , Wrong ๋“ฑ์˜ ๋ฌธ์ž๋ฅผ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค. ์ด๋•Œ, IDA์—์„œ ๋ฆฌ๋ฒ„์Šค๋””๋ฒ„๊น…ํ•œ c์ฝ”๋“œ์—์„œ printf ์™€ scanf ๋กœ ๋ณด์ด๋Š” ํ•จ์ˆ˜๋ฅผ ๋‹จ์ถ•ํ‚คN์„ ํ†ตํ•ด ์ด๋ฆ„์„ ๋ฐ”๊ฟ”์ฃผ์—ˆ๋‹ค. ๋˜ํ•œ.. 2022. 5. 30.
728x90