모바일 해킹 - 안드로이드 APK 추출 및 분석
우선 APP을 APK로 추출하려면 전용 앱을 설치해야 함
https://play.google.com/store/apps/details?id=com.ext.ui
APK Extractor - Google Play 앱
여러분의 기기에 설치된 앱을 SD카드로 추출합니다.
play.google.com
그리고 APK를 언패키징 해주는 도구인 apktool를 설치한다.
https://ibotpeaches.github.io/Apktool/
Apktool - A tool for reverse engineering 3rd party, closed, binary Android apps.
A tool for reverse engineering 3rd party, closed, binary Android apps. It can decode resources to nearly original form and rebuild them after making some modifications. It also makes working with an app easier because of the project like file structure and
ibotpeaches.github.io
7-zip으로 이용해 APK의 압축을 풀 수가 있지만, 내용물들이 깨져 보인다는 단점이 있다.
이 깨진 파일을 apktool를 이용하면 원본의 내용을 텍스트 형태로 볼 수 있다.
설치 방법(윈도우):
1. wrapper script를 다른 이름으로 저장 이름은 "apktool.bat"으로
2. apktool-2를 설치
3. "apktool.jar"로 이름 변경
4. "apktool.bat"와 "apktool.jar"을 C://Windows로 옮긴다.
그리고 앱에서 추출한 apk를 onedrive 등 클라우드 도구로 알아서 PC로 옮겨주고,
apk가 있는 폴더에서 아래의 명령어를 실행시켜준다.
apktool d "앱이름.apk"
그러면 drawable, layout, raw, value 등 앱에 필요한 리소스들과 AndroidManifest.xml 등을 확인할 수 있다.