Android/InsecureBankv2

apktool, JD-GUI를 이용한 모바일 애플리케이션 디컴파일

박연준 2023. 7. 3. 16:58

apktool, JD-GUI를 이용한 모바일 애플리케이션 디컴파일

디컴파일 도구

일반적으로 사용하는 디컴파일 도구는 다음과 같다.

 

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

 

GitHub - pxb1988/dex2jar: Tools to work with android .dex and java .class files

Tools to work with android .dex and java .class files - GitHub - pxb1988/dex2jar: Tools to work with android .dex and java .class files

github.com

 

Java Decompiler

The “Java Decompiler project” aims to develop tools in order to decompile and analyze Java 5 “byte code” and the later versions. JD-GUI is a standalone graphical utility that displays Java source codes of “.class” files. You can browse the reco

java-decompiler.github.io

 

apktool은 apk 파일로 압축된 resources, classes.dex, XML 파일들을 디버깅 파일 형태로 변환하고, 수정되면 다시 수정된 apk 파일로 생성하는 도구이다.

apktool 사용

https://raw.githubusercontent.com/iBotPeaches/Apktool/master/scripts/windows/apktool.bat 의 내용을 복사하고, 메모장에 붙여넣기 하여 파일 이름을 apktool.bat 으로 저장한다.

 

https://bitbucket.org/iBotPeaches/apktool/downloads/ 링크에서 파일을 다운로드 받고, apktool.jar 로 파일 이름을 변경한다.

위 두 파일을 C:\Windows 파일로 이동시킨다

 

cmd창에 apktool를 입력해봤을 때 다음과 같은 화면이 나오면 성공이다.

 

인시큐어뱅크 폴더안의 app 폴더로 이동한 다음 apktool d app-release.apk 명령어로 소스 코드를 디컴파일 한다.

 

app-release 폴더에 파일이 생성된다. 평문화된 XML 파일을 app-release\smail\com\android\insecurebankv2 에서 smail 파일을 확인할 수 있다.

dex2jar와 JD-GUI를 이용

dex2jar는 명칭과 같이 APK 파일 또는 APK 파일에 포함된 classes.dex 파일을 자바 클래스 파일로 변환해주는 도구이다.

 

dex2jar 파일 다운로드

dex2jar-2.0.zip
2.25MB

 

인시큐어뱅크 폴더 안에 위 폴더를 붙여 넣는다.

 

IncsecureBankv2-master에 있는 InsecureBankv2.apk 파일을 dex2jar 폴더로 이동시킨다.

 

다음은 cmd창에서 위 dex2jar-2.0으로 이동한 후 dj2-dex2jar.bat InsecureBankv2.apk 를 입력한다.

정상적으로 완료가 되면 다음과 같이 -dex2jar 파일이 생성된 것을 확인할 수 있다.

JD-GUI로 자바 파일 디컴파일

윈도우에서 사용할 수 있는 JD-GUI 파일 다운로드

jd-gui-windows-1.6.6.zip
1.30MB

 

 

jd-gui.exe 파일을 실행하고 InsecureBankv2-dex2jar.jar 파일을 불러오면 자동 디컴파일이 된다.

 

 

'Android > InsecureBankv2' 카테고리의 다른 글

Android Drozer 설치  (0) 2023.07.03
BytecodeViewer를 활용한 APK 분석  (0) 2023.07.03
인시큐어뱅크(InsecureBankv2) 앱 설치  (0) 2023.07.03
Nox 개발자 옵션 활성화  (0) 2023.07.03
Nox 설치와 환경 설정  (0) 2023.07.03