์ƒˆ์†Œ์‹

Game/Frida

[Frida-Lab] level 2 _Write-Up

  • -
๋ฐ˜์‘ํ˜•

ํŒŒ์ผ์ด ์ˆจ๊ฒจ์ ธ ์žˆ์–ด์„œ ๊ฒ€์ƒ‰ํ•ด์„œ ์ฐพ์•„๋ด์•ผํ•จ.

 

์†Œ์Šค์ฝ”๋“œ๋ฅผ ์‚ดํŽด๋ณด๋ฉด, ํ•ด๋‹น ๋ฉ”์†Œ๋“œ๋Š” ๋ฐฐ์—ด์„ ๋‹ด๊ณ  ์ž‡์Œ ->์ด์˜ 1๋ฒˆ์งธ ๋ฐฐ์—ด ๊ฐ’์„ 1๋กœ ๋งž์ถฐ์ฃผ๋ฉด  ๋ฌธ์ œ๊ฐ€ ํ•ด๊ฒฐ๋˜๋Š” ๊ฒƒ ๊ฐ™์Œ

 

์ผ๋‹จ ์Šคํƒœํ‹ฑ ๋ฉ”์†Œ๋“œ๊ฐ€ ์•„๋‹˜(static method(x))

instance method ์ž„ 

 

์„ ์–ธํ•ด์ค„ ๋•Œ static ์ด ๋“ค์–ด์žˆ์œผ๋ฉด ์Šคํƒœํ‹ฑ ๋ฉ”์†Œ๋“œ๋ผ ํ•  ์ˆ˜ ์žˆ๊ณ  ์—†๋‹ค๋ฉด ์ธ์Šคํ„ด์Šค ๋ฉ”์†Œ๋“œ๋ผ ํ•จ -> ์ธ์Šคํ„ดํŠธํ™” ๋œ ๊ฐ์ฒด๋ฅผ ์ฐพ์•„์•ผํ•จ.

java.use ?? ? - >x

java.choose -> ok

 

setImmediate(function(){
	Java.perform(function(){
      //Challenge 02
      Java.choose("uk.rossmarks.fridalab.MainActivity",{
          onMatch : function(chall_02){
              chall_02.chall02();
          },
          onComplete : function(){
              console.log("Solved Challenge 02");
          }
      })
    })
})

ํ•ด๋‹น ์ฝ”๋“œ ์‹คํ–‰ ์‹œ ๋ฌธ์ œ๊ฐ€ ํ•ด๊ฒฐ๋จ

 

frida -U -l chall2.js uk.rossmarks.fridalab

์œ„ ๋ช…๋ น์–ด ์‹คํ–‰ ์‹œ ์ฝ”๋“œ ์‹คํ–‰๋จ

 

๋ฉ”์†Œ๋“œ ํ˜ธ์ถœ ๋ฐฉ๋ฒ•์€ 2๊ฐ€์ง€๊ฐ€ ์žˆ์Œ

static method -> java.use

instance method -> java.choose

 

๋งŒ์•ฝ static ์ด ์•„๋‹Œ๋ฐ, use๋ฅผ ์‚ฌ์šฉํ•ด์„œ ํ˜ธ์ถœํ•˜๋ฉด ํ˜ธ์ถœ์ด ์•ˆ๋จ

 

 

๋ฌธ์ œ๋ฅผ ๋‹ค์‹œ ํ’€์–ด๋ณด๊ณ  ์‹ถ์€๋ฐ ์ด๋ฏธ ์ฒดํฌ๊ฐ€ ๋˜์–ด ๋ฒ„๋ ค์„œ ๋Œ๋ฆด ์ˆ˜ ์—†๋‹ค๋ฉด Kill ๋ช…๋ น์–ด๋ฅผ ์จ์ฃผ๋ฉด ๋จ.

frida-kill -U 3951[ps ๋ฒˆํ˜ธ] -> ์ž…๋ ฅ ์‹œ ํ”„๋ฆฌ๋‹ค ์ข…๋ฃŒ --> ๋‹ค์‹œ ์ฒ˜์Œ์œผ๋กœ ๋Œ์•„๊ฐ

๋ฐ˜์‘ํ˜•

'Game > Frida' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

[Frida-Lab] level 3 _Write-Up  (0) 2021.04.09
[Frida-Lab] level 1 _Write-Up  (0) 2021.04.09
Contents

ํฌ์ŠคํŒ… ์ฃผ์†Œ๋ฅผ ๋ณต์‚ฌํ–ˆ์Šต๋‹ˆ๋‹ค

์ด ๊ธ€์ด ๋„์›€์ด ๋˜์—ˆ๋‹ค๋ฉด ๊ณต๊ฐ ๋ถ€ํƒ๋“œ๋ฆฝ๋‹ˆ๋‹ค.