# apktool包描述
apktool用于對第三方的、已編譯的Android應用程序(apk文件)進行逆向工程。通過使用該工具,你可以對apk文件進行反編譯和解包,所反編譯出的文件和編譯前幾乎一直,另外,也可以修改部分代碼并進行重新打包;當然,通過apktool的反編譯功能,可以生成支持單步調試的samli工程。同時,由于apktool簡化和集成了很多自動化操作,并且采用了統一的工程文件結構,這使得對Android apk文件逆向過程變得很輕松。
apktool絕不是為了滿足盜版和其他的非法之需,而是,可以像某個應用的開發者一樣,通過使用它對應用完成一些如添加功能、平臺適配等本地化的工作,來滿足自己的需要。
主要功能:
* 對資源文件進行高還原度解碼(包括resources.arsc、XMLs和.9.png文件)
* smali 調試:SmaliDebugging
* 高自動化功能
**資料來源**:https://code.google.com/p/android-apktool
[apktool Homepage](http://code.google.com/p/android-apktool/)|[Kali apktool Repo](http://git.kali.org/gitweb/?p=packages/apktool.git;a=summary)
- 作者:Brut.alll
- 許可證:Apache-2.0
## apktool包中包含的工具
### apktool Android apk逆向工具
```
root@kali:~# apktool
Apktool v1.5.2 - a tool for reengineering Android apk files
Copyright 2010 Ryszard Wi?niewski <brut.alll@gmail.com>
with smali v1.4.1, and baksmali v1.4.1
Updated by @iBotPeaches <connor.tumbleson@gmail.com>
Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
Usage: apktool [-q|--quiet OR -v|--verbose] COMMAND [...]
COMMANDs are:
d[ecode] [OPTS] <file.apk> [<dir>]
Decode <file.apk> to <dir>.
OPTS:
-s, --no-src
Do not decode sources.
不對dex文件進行反編譯
-r, --no-res
Do not decode resources.
不對資源文件進行反編譯
-d, --debug
Decode in debug mode. Check project page for more info.
調試模式
-b, --no-debug-info
Baksmali -- don't write out debug info (.local, .param, .line, etc.)
反編譯不輸出調試信息
-f, --force
Force delete destination directory.
強制覆蓋已存在文件目錄
-t <tag>, --frame-tag <tag>
Try to use framework files tagged by <tag>.
使用framework文件
--frame-path <dir>
Use the specified directory for framework files
framework文件目錄
--keep-broken-res
Use if there was an error and some resources were dropped, e.g.:
"Invalid config flags detected. Dropping resources", but you
want to decode them anyway, even with errors. You will have to
fix them manually before building.
當出現錯誤或者資源文件缺失的時候使用該參數。如提示"Invalid config flags detected. Dropping resources",但是你仍然想繼續解包。這樣的話,在進行打包之前,需要手動修復那些錯誤的文件才能正常進行打包。
b[uild] [OPTS] [<app_path>] [<out_file>]
Build an apk from already decoded application located in <app_path>.
對一個在<app_path>下的已經解包的應用工程進行重打包。
It will automatically detect, whether files was changed and perform
needed steps only.
apktool會自動檢測文件是否修改。
If you omit <app_path> then current directory will be used.
<app_path>的默認值為當前目錄。
If you omit <out_file> then <app_path>/dist/<name_of_original.apk>
will be used.
<out_file>的默認值為<app_path>/dist/<name_of_original.apk>
OPTS:
-f, --force-all
Skip changes detection and build all files.
跳過文件變動檢查,對所有文件進行重打包。
-d, --debug
Build in debug mode. Check project page for more info.
調試模式下進行重打包。
-a, --aapt
Loads aapt from specified location.
使用指定的aapt。
if|install-framework <framework.apk> [<tag>] --frame-path [<location>]
Install framework file to your system.
安裝framework文件。
For additional info, see: http://code.google.com/p/android-apktool/
For smali/baksmali info, see: http://code.google.com/p/smali/
```
## apktool用法示例
使用調試模式對apk文件(/root/SdkControllerApp.apk)進行解包:
```
root@kali:~# apktool d /root/SdkControllerApp.apk
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /root/apktool/framework/1.apk
I: Loaded.
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Done.
I: Copying assets and libs...
```
- Information Gathering
- acccheck
- ace-voip
- Amap
- Automater
- bing-ip2hosts
- braa
- CaseFile
- CDPSnarf
- cisco-torch
- Cookie Cadger
- copy-router-config
- DMitry
- dnmap
- dnsenum
- dnsmap
- DNSRecon
- dnstracer
- dnswalk
- DotDotPwn
- enum4linux
- enumIAX
- Fierce
- Firewalk
- fragroute
- fragrouter
- Ghost Phisher
- GoLismero
- goofile
- hping3
- InTrace
- iSMTP
- lbd
- Maltego Teeth
- masscan
- Metagoofil
- Miranda
- nbtscan-unixwiz
- Nmap
- ntop
- p0f
- Parsero
- Recon-ng
- SET
- smtp-user-enum
- snmp-check
- sslcaudit
- SSLsplit
- sslstrip
- SSLyze
- THC-IPV6
- theHarvester
- TLSSLed
- twofi
- URLCrazy
- Wireshark
- WOL-E
- Xplico
- Vulnerability Analysis
- BBQSQL
- BED
- cisco-auditing-tool
- cisco-global-exploiter
- cisco-ocs
- cisco-torch
- copy-router-config
- Doona
- Exploitation Tools
- Wireless Attacks
- Ghost-Phisher
- mfoc
- Forensics Tools
- Binwalk
- bulk-extractor
- Web Applications
- apache-users
- BurpSuite
- sqlmap
- w3af
- Sniffing-Spoofing
- Bettercap
- Burp Suite
- DNSChef
- Fiked
- hamster-sidejack
- HexInject
- Password Attacks
- crunch
- hashcat
- John the Ripper
- Johnny
- Hardware Hacking
- android-sdk
- apktool
- Arduino
- dex2jar
- Sakis3G
- Reverse Engineering
- apktool