김보안의 블로깅
  • 🏠 Home
  • 📚 Project
    • Blockchain
      • 🎦 PickMe
      • 🎦 IoTC
      • 🎦 Blackchain
      • 📃 Gemology
      • 🎦 PickMe
      • 🎦 PickMe
    • AI
      • 👋 A.I. Dream Reader
      • 🎦 A.I. Dream Reader
    • Security
      • 🎦 SNAC
    • Education
      • 🎦 Smart Lecture
  • 🤸‍♂ Hobby
    • Music
      • Violin
      • Guitar
      • Piano
      • Drum
    • Flower
      • Flower Certificate
    • Sport
      • Ski
      • Skateboard
      • Golf
      • Boxing

2016년 10월 4일 화요일

[Android] Frida 사용해보기

 SecureKim     오후 11:14     android, Frida, Security     No comments   


입소문으로만 들었던 Frida. 직접 사용해 보기로 했다.
(프리더 아니고 프라다 아니다.)

이상하게도 한국에는 소개된 블로그가 없었다..


기본적으로 DBus 를 타고 PC쪽이 client, 앱쪽이 server인 구조를 갖고 있다.

PC에서 스크립트를 작성해서 실행하면 된다.



다른 것보다 빌드가 제일 힘들었다... 프록시에.. VS2015에... Python Path에 공백 없어야 되고..
잘되던 nodejs 용 npm 도 안되서 Python 등등 그냥 집에서 다 빌드 해서 가져 왔다.

바로 frida-ps 를 치면 에러가 나올텐데 chcp 65001 등으로 콘솔 코드 페이지 바꿔 줘야 한다.

-안드로이드-
인터넷에 영어로 찾아보면 다 있는 내용인데 정리해 본다.

원하는 앱을 실행시키고, {경로}/frida-server (예) /data/local/tmp/frida-server를 실행하면 된다.
윈도에서는 frida-trace -U -i open "원하는 패키지명" 하면 바인딩 된다. 

일단 프로세스에 Attach 하는 방법은, frida-ps 으로 pid를 찾고,
frida -U -p {pid} 로 Attach 하면 된다.
또는 app 이름 알면 앱으로 바로 Attatch 가능하다.
frida -U com.example.seccon2015.rock-paper-scissors

(실제 내가 해본 예제는 블로그에 올릴 수 없는 내용이라서...
글로만 서술했다. 죄송..)

아래는 인터넷에 돌아다니는 예제들인데,

작성 -> Attach 후 -> %load Examples.js 하면 앱 실행하면서 같이 돌아간다.




Examples.js

//http://blog.mdsec.co.uk/2015/04/instrumenting-android-applications-with.htmlD
alvik.perform(function () {
   
    var LockManager = Dalvik.use("com.github.orangegangsters.lollipin.lib.managers.LockManager");
    var LockManagerInstance = LockManager.getInstance();
    var AppLock = LockManagerInstance.getAppLock();
 
    for(var i=1230; i<1235 64="" a="" accessing="" activity.hookme.overload="" activity="Dalvik.use(" after="" alvik="" and="" android.content.context="" application="Dalvik.use(" are="" arg="" args="" ava.available="" ava="" available="" button="" c.a.implementation="function" c.tostring="" c621f5aee06dad53e37c="" c="" call="" called="" cedricvb.be="" check="" class="" classes="" classname="" clicked="" client="" com.example.myapp.myactivity="" com.example.seccon2015.rock_paper_scissors.mainactivity="" com.onlycoin.android.secure.sslpinning="" com.test.test="" comment="" console.log="" console="" context="" crash="" currentapplication="" dalvik.perform="" defeating-ssl-pinning-in-coin-for-android="" defined="" do="" done="" else="" enumerate="" enumerating="" flag="" flankerhqd="" foo="" found="" frida="" function="" gist.github.com="" github.com="" got="" handler="" have="" here="" hook="" hookme="" how="" http:="" https:="" i="" if="" immediate="" implementation="function" in="" inning="" instrumentando-apps-android-frida="" is="" issues="" it="" java.enumerateloadedclasses="" java.lang.string="" java.perform="" java="" json.stringify="" know="" kr.repo.h2spice.yekehtmai.c="" la-es="" like="" line="" loaded="" log="" mainactivity.onclick.implementation="function" mainactivity="Java.use(" message="" not="" onclick="" oncomplete:="" one:="" onmatch:="" original="" our="" out="" package_info="" package_name="" post="" pre="" prettyphoto="" process="" question:="" refer="" result="" return="" rotlogix.com="" running="" s.tostring="" s="" seccon-2015-reverse-engineering-android-apk-2-400-writeup="" send="" set="" should="" show="" sign="package_info.signatures[0];" signs="" ss.tostring="" ss="" sslpinning.a.overload="" sslpinning="Dalvik.use(" str1="" str2="" t="" that="" the="" this.a.overload="" this.cnt.value="999;" this.cnt="" this.m.value="0;" this.n.value="1;" this.onclick="" this="" to="" tring1:="" tring2:="" v="" values="" var="" vm="" we="" when="" whenever="" won="" www.welivesecurity.com="">
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
이메일로 전송BlogThis!X에 공유Facebook에서 공유
최근 게시물 이전 게시물 홈

0 개의 댓글:

댓글 쓰기

페이지

  • 홈
  • Hobby

Categories

  • AI
  • AWS
  • Blockchain
  • Hardware
  • Javascript
  • Node.js
  • Plasma
  • Security
  • Study
  • Video
  • android
  • mysql
  • review
  • windows

Popular Posts

  • Network Ping Batch - 윈도우 네트워크 핑 스크립트
    네트워크 상태를 ping을 통해 시각적으로 보여주는 배치파일입니다. (왼쪽 IP에는 Ping이 안나가고 있고, 오른쪽 IP 에는 Ping이 나가고 있습니다.) 제가 만들었고 라이센스 없습니다. ----------------------------...
  • 회사 프록시와 인증서에 고통받는 그대를 위한 글 (Bash, Gradle, Python, wget, nodejs(npm), apt-get, cURL, git, yarn, androidStudio)
    대기업에 입사하면 장단점이 있는데, 단점 중에 하나가 회사에서 프록시를 사용하여 트래픽 감시를 하므로 프록시 설정을 해주어야 한다는 점 입니다. 특히, 회사에서는 https 트래픽도 감시를 하므로 인증서도 설정해 주어야 합니다. 그런데 문...
  • 블랙보드 강의 녹화 영상 다운로드 가능한 방법 (노설치)
    별도의 설치도 필요 없고 아주 쉽습니다. 구글 크롬브라우저 에서 블랙보드 녹화 영상에  다운로드 가능한 메뉴가 나오게 하는 코드입니다.  먼저 블랙보드 강의자료에 입장하고, 재생 버튼을 클릭 하지 않은 상태로 F12 를 입력합니다. 재생을 클릭하지 마...

Blog Archive

  • ►  2026 (2)
    • ►  2월 (2)
  • ►  2025 (3)
    • ►  9월 (1)
    • ►  8월 (1)
    • ►  7월 (1)
  • ►  2024 (2)
    • ►  11월 (2)
  • ►  2023 (2)
    • ►  10월 (1)
    • ►  1월 (1)
  • ►  2022 (10)
    • ►  12월 (1)
    • ►  11월 (3)
    • ►  9월 (1)
    • ►  8월 (1)
    • ►  6월 (2)
    • ►  3월 (2)
  • ►  2021 (9)
    • ►  12월 (3)
    • ►  11월 (1)
    • ►  6월 (1)
    • ►  5월 (2)
    • ►  4월 (2)
  • ►  2020 (12)
    • ►  10월 (1)
    • ►  9월 (2)
    • ►  7월 (1)
    • ►  6월 (1)
    • ►  5월 (5)
    • ►  4월 (1)
    • ►  2월 (1)
  • ►  2019 (14)
    • ►  10월 (2)
    • ►  7월 (1)
    • ►  3월 (4)
    • ►  2월 (2)
    • ►  1월 (5)
  • ►  2018 (14)
    • ►  12월 (2)
    • ►  11월 (4)
    • ►  10월 (1)
    • ►  8월 (2)
    • ►  5월 (4)
    • ►  1월 (1)
  • ►  2017 (12)
    • ►  10월 (2)
    • ►  9월 (9)
    • ►  5월 (1)
  • ▼  2016 (8)
    • ▼  10월 (2)
      • 미라이 봇넷(MIRAI BOTNET) Attack 분석
      • [Android] Frida 사용해보기
    • ►  8월 (1)
    • ►  6월 (1)
    • ►  1월 (4)
  • ►  2015 (6)
    • ►  12월 (3)
    • ►  10월 (1)
    • ►  6월 (1)
    • ►  5월 (1)
  • ►  2014 (10)
    • ►  11월 (1)
    • ►  9월 (1)
    • ►  7월 (1)
    • ►  6월 (1)
    • ►  5월 (3)
    • ►  4월 (1)
    • ►  3월 (2)
  • ►  2013 (28)
    • ►  12월 (3)
    • ►  11월 (6)
    • ►  10월 (6)
    • ►  9월 (6)
    • ►  8월 (1)
    • ►  7월 (3)
    • ►  6월 (3)

구독

글
Atom
글
댓글
Atom
댓글

로드 중입니다...

각오

직접 해보지 않은 것은 포스팅 하지 않겠습니다.

Copyright © 김보안의 블로깅 | Powered by Blogger
Design by Hardeep Asrani | Blogger Theme by NewBloggerThemes.com | Distributed By Gooyaabi Templates