์ƒˆ์†Œ์‹

์ธ๊ธฐ ๊ฒ€์ƒ‰์–ด

๐Ÿ“ฑ Mobile

[๋ชจ๋ฐ”์ผ] frida ์„ค์น˜๋ฒ•

  • -

์ผ๋‹จ ํŒŒ์ด์ฌ ์„ค์น˜ ํ•ด์•ผํ•œ๋‹ค. ์„ค์น˜ ๋ฐฉ๋ฒ•์€ ์•„๋ž˜ ์ฃผ์†Œ์—์„œ ํ™•์ธ

https://p-ssw0rd.tistory.com/132

 

[Python] ์œˆ๋„์šฐ ํŒŒ์ด์ฌ ์„ค์น˜ํ•˜๊ธฐ ๋ฐ PIP ์„ค์ •

1. ํŒŒ์ด์ฌ ๊ณต์‹ ํ™ˆํŽ˜์ด์ง€์—์„œ ์œˆ๋„์šฐ ์„ค์น˜ ํŒŒ์ผ์„ ๋ฐ›๋Š”๋‹ค. www.python.org/downloads Download Python The official home of the Python Programming Language www.python.org 2. [Add python.exe to PATH] ์˜ต์…˜ ์„ ํƒ ํ›„ [Install Now]๋ฅผ ํด๋ฆญ

p-ssw0rd.tistory.com

ํŒŒ์ด์ฌ์˜ pip ์„ค์ • ๊ธฐ๋Šฅ์„ ์ด์šฉํ•˜์—ฌ ์‰ฝ๊ฒŒ ์„ค์น˜๊ฐ€ ๊ฐ€๋Šฅํ•˜๋‹ค.

pip install frida
pip install frida-tools

์„ค์น˜ ํ›„ frida --version ๋ช…๋ น์–ด ์‚ฌ์šฉ ์‹œ ๋ฒ„์ „์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค.

๋‹จ๋ง๊ธฐ์— ๋„ฃ์„ ์„œ๋ฒ„ ๋‹ค์šด๋กœ๋“œ

https://github.com/frida/frida/releases

 

Releases · frida/frida

Clone this repo to build Frida. Contribute to frida/frida development by creating an account on GitHub.

github.com

ํ”„๋ฆฌ๋‹ค ์„œ๋ฒ„๋Š” ๋กœ์ปฌ์ปดํ“จํ„ฐ์— ์„ค์น˜๋œ ๋ฒ„์ „๊ณผ ๋™์ผํ•˜๊ฒŒ frida-server-(๋ฒ„์ „)-android-arm(๋น„ํŠธ).xz๋กœ ๋‹ค์šด ๋ฐ›๋Š”๋‹ค

ex) ํ˜„์žฌ ๋‚ด ์ƒํ™ฉ์ผ ๊ฒฝ์šฐ frida-server-16.1.4-android-arm64.xz

๋‹ค์šด๋กœ๋“œ ํ›„ ์••์ถ•์„ ํ‘ผ๋‹ค.

cmd๋ฅผ ์—ด์–ด frida-server๊ฐ€ ์žˆ๋Š” ๊ฒฝ๋กœ๋กœ ์ด๋™ ํ›„ adb๋ฅผ ์ด์šฉํ•ด frida ์„œ๋ฒ„ ํŒŒ์ผ์„ ๋‹จ๋ง๊ธฐ์˜ /data/local/tmp ๊ฒฝ๋กœ์— ๋„ฃ์–ด์ค€๋‹ค

adb push frida-server-16.1.4 /data/local/tmp

 

adb shell // ํ•ด๋‹น ๋””๋ฐ”์ด์Šค์˜ adb ์‰˜์„ ์˜คํ”ˆํ•œ๋‹ค.
$ su // ๋ฃจํŠธ๊ถŒํ•œ ํš๋“
# cd /data/local/tmp //tmp ํด๋”๋กœ ์ด๋™ํ•œ๋‹ค.
# chmod 777 frida-server-16.1.4-android-arm64 //frida์˜ ํŒŒ์ผ ๊ถŒํ•œ์„ 777๋กœ ์„ค์ •ํ•ด์ค€๋‹ค.
# ./frida-server-16.1.4-android-arm64 -l 0.0.0.0:27042 & //frida๋ฅผ ๋ฐฑ๊ทธ๋ผ์šด๋“œ์—์„œ 27042 ํฌํŠธ๋กœ ์—ด์–ด์ค€๋‹ค.
# ps -ef | grep frida // frida ์„œ๋ฒ„๊ฐ€ ์ž˜ ์˜คํ”ˆ ๋ผ ์žˆ๋Š”์ง€ ํ™•์ธํ•œ๋‹ค.
> frida-ps -D [๋””๋ฐ”์ด์Šค๋ช…] -ai // ํ˜„์žฌ ๋””๋ฐ”์ด์Šค์˜ ํ”„๋กœ๊ทธ๋žจ๋“ค์„ ์ถœ๋ ฅํ•œ๋‹ค(pid ํฌํ•จ)

 

Contents

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

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