预装软件:
(1)安装 VS 2017 community 版本;
(2)安装 OpenSSL-Win64;
(3)安装 Python 2.7.18 版本;
(4)安装 JDK 1.8版本,我的是 1.8.0_191;
(5)安装 Android SDK,NDK;
(6)安装 git;
环境变量设置:
(1)ANDROID_HOME 指向Android SDK 目录;
(2)ANDROID_SDK 指向 ANDROID_HOME 同样路径;
(3)ANDROID_NDK 指向 NDK 目录;
(4)JAVA_HOME 指向 Java 安装目录;
(5)PYTHONPATH 指向 Python 安装目录;
(6)INCLUDE 指向openssl头文件位置,C:Program FilesOpenSSL-Win64include
(7)LIB 指向 openssl lib库文件位置 C:Program FilesOpenSSL-Win64lib
(8)PATH 添加ndk目录,pyhton 目录,java bin路径,如下图:
取代码和安装必备:
~ git clone https://github.com/linkedin/qark ~ cd qark ~ pip install -r requirements.txt ~ pip install . ~ qark --help
安装成功后,qark 会被安装到 C:Python374scripts 目录下,然后就可以使用了。
E:srcqark_src>where qark
C:Python374scriptsqark.exe
E:srcqark_src>qark --help
Usage: qark [OPTIONS]
Options:
--sdk-path DIRECTORY Path to the downloaded SDK directory if
already downloaded. only necessary if
--exploit-apk is passed. If --exploit-apk is
passed and this flag is not passed,QARK will
attempt to use the ANDROID_SDK_HOME,
ANDROID_HOME, ANDROID_SDK_ROOT environment
variables (in that order) for a path.
--build-path DIRECTORY Path to place decompiled files and exploit
APK. [default: build]
--debug / --no-debug Show debugging statements (helpful for
issues). [default: False]
--apk PATH APK to decompile and run static analysis. If
passed, the --java option is not used.
--java PATH A directory containing Java code, or a Java
file, to run static analysis. If passed,the
--apk option is not used.
--report-type [html|xml|json|csv]
Type of report to generate along with
terminal output. [default: html]
--exploit-apk / --no-exploit-apk
Create an exploit APK targetting a few
vulnerabilities. [default: False]
--report-path DIRECTORY report output path.
--keep-report / --no-keep-report
Append to final report file. [default:
False]
--version Show the version and exit.
--help Show this message and exit.
qark 内置的 dex2jar 程序包是2.0的,比较老,需要更新到更新版本,否则解码新版本apk有问题。



