บทนำ (Overviews)
โปรแกรมบนระบบปฎิบัติการ “Android” ไม่ว่าจะเป็น “google play” หรือติดตั้งเองนั้น โดยปกติจะมีนามสกุลคือ “.apk” ซึ่งไฟล์นี้เราสามารถย้อนกลับไปดูถึง “code” ที่โปรแกรมเมอร์เขียนเอาไว้ได้
ขั้นตอน (Step)
- จากระบบปฏิบัติการ “Kali” ให้เขา “Menu” (Applications > Kali Linux > Reverse Engineering > Misc RE Tools > dex2jar)
- ใช้คำสั่งดังรูปเพื่อสร้างไฟล์ .jar
d2j-dex2jar -- convert dex to jar usage: d2j-dex2jar [options] <file0> [file1 ... fileN] options: -d,--debug-info translate debug info -e,--exception-file <file> detail exception file, default is $current_dir/[fi le-name]-error.zip -f,--force force overwrite -h,--help Print this help message -n,--not-handle-exception not handle any exception throwed by dex2jar -o,--output <out-jar-file> output .jar file, default is $current_dir/[file-na me]-dex2jar.jar -os,--optmize-synchronized optmize-synchronized -p,--print-ir print ir to Syste.out -r,--reuse-reg reuse regiter while generate java .class file -s same with --topological-sort/-ts -ts,--topological-sort sort block by topological, that will generate more readable code -v,--verbose show progress version: reader-1.15, translator-0.0.9.15, ir-1.12 root@kali:~# d2j-dex2jar /root/Desktop/app.apk dex2jar /root/Desktop/app.apk -> app-dex2jar.jar
- เมื่อเสร็จสิ้นไฟล์ .jar จะอยู่ที่ (/root/app-dex2jar.jar)
- เมื่อได้ไฟล์ดังกล่าวเราสามารถเปิดดู “source-code” ได้โดยใช้โปรแกรม (jd.benow.ca/jd-gui/downloads/jd-gui-0.3.6.windows.zip)