If you are passed an apk file due to a CTF rev problem, you need to decompile to java source code.
Use dex2jar
and jad
.
The flow is .apk
-> .dex
-> .jar
-> .class
-> .jad
.
You can see the source code of java
by opening the .jad
file.
reference:
https://qiita.com/le_skamba/items/04c0a0cfe420be862122
https://hacknote.jp/archives/10259/
http://inarizuuuushi.hatenablog.com/entry/2017/05/09/231600
dex2jar
Use brew.
You need to go through the path.
brew install dex2jar
echo 'export PATH="$PATH:/usr/local/Cellar/dex2jar/2.0/bin"' >> ~/.bash_profile
source ~/.bash_profile
jad
Use brew cask.
brew tap caskroom/cask
brew install caskroom/cask/jad
unzip hoge.apk
d2j-dex2jar hoge.dex
jar xf hoge.jar
jad -r path/hoge.class
Recommended Posts