anais-apk-forensic 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +249 -0
- package/anais.sh +669 -0
- package/analysis_tools/__pycache__/apk_basic_info.cpython-313.pyc +0 -0
- package/analysis_tools/__pycache__/apk_basic_info.cpython-314.pyc +0 -0
- package/analysis_tools/__pycache__/check_zip_encryption.cpython-313.pyc +0 -0
- package/analysis_tools/__pycache__/check_zip_encryption.cpython-314.pyc +0 -0
- package/analysis_tools/__pycache__/detect_obfuscation.cpython-313.pyc +0 -0
- package/analysis_tools/__pycache__/detect_obfuscation.cpython-314.pyc +0 -0
- package/analysis_tools/__pycache__/dex_payload_hunter.cpython-314.pyc +0 -0
- package/analysis_tools/__pycache__/entropy_analyzer.cpython-314.pyc +0 -0
- package/analysis_tools/__pycache__/error_logger.cpython-313.pyc +0 -0
- package/analysis_tools/__pycache__/error_logger.cpython-314.pyc +0 -0
- package/analysis_tools/__pycache__/find_encrypted_payload.cpython-314.pyc +0 -0
- package/analysis_tools/__pycache__/fix_apk_headers.cpython-313.pyc +0 -0
- package/analysis_tools/__pycache__/fix_apk_headers.cpython-314.pyc +0 -0
- package/analysis_tools/__pycache__/manifest_analyzer.cpython-313.pyc +0 -0
- package/analysis_tools/__pycache__/manifest_analyzer.cpython-314.pyc +0 -0
- package/analysis_tools/__pycache__/network_analyzer.cpython-313.pyc +0 -0
- package/analysis_tools/__pycache__/network_analyzer.cpython-314.pyc +0 -0
- package/analysis_tools/__pycache__/report_generator.cpython-313.pyc +0 -0
- package/analysis_tools/__pycache__/report_generator.cpython-314.pyc +0 -0
- package/analysis_tools/__pycache__/report_generator_modular.cpython-314.pyc +0 -0
- package/analysis_tools/__pycache__/sast_scanner.cpython-313.pyc +0 -0
- package/analysis_tools/__pycache__/sast_scanner.cpython-314.pyc +0 -0
- package/analysis_tools/__pycache__/so_string_analyzer.cpython-314.pyc +0 -0
- package/analysis_tools/__pycache__/yara_enhanced_analyzer.cpython-314.pyc +0 -0
- package/analysis_tools/__pycache__/yara_results_processor.cpython-314.pyc +0 -0
- package/analysis_tools/apk_basic_info.py +85 -0
- package/analysis_tools/check_zip_encryption.py +142 -0
- package/analysis_tools/detect_obfuscation.py +650 -0
- package/analysis_tools/dex_payload_hunter.py +734 -0
- package/analysis_tools/entropy_analyzer.py +335 -0
- package/analysis_tools/error_logger.py +75 -0
- package/analysis_tools/find_encrypted_payload.py +485 -0
- package/analysis_tools/fix_apk_headers.py +154 -0
- package/analysis_tools/manifest_analyzer.py +214 -0
- package/analysis_tools/network_analyzer.py +287 -0
- package/analysis_tools/report_generator.py +506 -0
- package/analysis_tools/report_generator_modular.py +885 -0
- package/analysis_tools/sast_scanner.py +412 -0
- package/analysis_tools/so_string_analyzer.py +406 -0
- package/analysis_tools/yara_enhanced_analyzer.py +330 -0
- package/analysis_tools/yara_results_processor.py +368 -0
- package/analyzer_config.json +113 -0
- package/apkid/__init__.py +32 -0
- package/apkid/__pycache__/__init__.cpython-313.pyc +0 -0
- package/apkid/__pycache__/__init__.cpython-314.pyc +0 -0
- package/apkid/__pycache__/apkid.cpython-313.pyc +0 -0
- package/apkid/__pycache__/apkid.cpython-314.pyc +0 -0
- package/apkid/__pycache__/main.cpython-313.pyc +0 -0
- package/apkid/__pycache__/main.cpython-314.pyc +0 -0
- package/apkid/__pycache__/output.cpython-313.pyc +0 -0
- package/apkid/__pycache__/rules.cpython-313.pyc +0 -0
- package/apkid/apkid.py +266 -0
- package/apkid/main.py +98 -0
- package/apkid/output.py +177 -0
- package/apkid/rules/apk/common.yara +68 -0
- package/apkid/rules/apk/obfuscators.yara +118 -0
- package/apkid/rules/apk/packers.yara +1197 -0
- package/apkid/rules/apk/protectors.yara +301 -0
- package/apkid/rules/dex/abnormal.yara +104 -0
- package/apkid/rules/dex/anti-vm.yara +568 -0
- package/apkid/rules/dex/common.yara +60 -0
- package/apkid/rules/dex/compilers.yara +434 -0
- package/apkid/rules/dex/obfuscators.yara +602 -0
- package/apkid/rules/dex/packers.yara +761 -0
- package/apkid/rules/dex/protectors.yara +520 -0
- package/apkid/rules/dll/common.yara +38 -0
- package/apkid/rules/dll/obfuscators.yara +43 -0
- package/apkid/rules/elf/anti-vm.yara +43 -0
- package/apkid/rules/elf/common.yara +54 -0
- package/apkid/rules/elf/obfuscators.yara +991 -0
- package/apkid/rules/elf/packers.yara +1128 -0
- package/apkid/rules/elf/protectors.yara +794 -0
- package/apkid/rules/res/common.yara +43 -0
- package/apkid/rules/res/obfuscators.yara +46 -0
- package/apkid/rules/res/protectors.yara +46 -0
- package/apkid/rules.py +77 -0
- package/bin/anais +3 -0
- package/dist/cli.js +82 -0
- package/dist/index.js +123 -0
- package/dist/types/index.js +2 -0
- package/dist/utils/index.js +21 -0
- package/dist/utils/output.js +44 -0
- package/dist/utils/paths.js +107 -0
- package/docs/ARCHITECTURE.txt +353 -0
- package/docs/Workflow and Reference.md +445 -0
- package/package.json +70 -0
- package/rules/yara_general_rules.yar +323 -0
- package/scripts/dynamic_analysis_helper.sh +334 -0
- package/scripts/frida/dpt_dex_dumper.js +145 -0
- package/scripts/frida/frida_dex_dump.js +145 -0
- package/scripts/frida/frida_hooks.js +437 -0
- package/scripts/frida/frida_websocket_extractor.js +154 -0
- package/scripts/setup.sh +206 -0
- package/scripts/validate_framework.sh +224 -0
- package/src/cli.ts +91 -0
- package/src/index.ts +123 -0
- package/src/types/index.ts +44 -0
- package/src/utils/index.ts +6 -0
- package/src/utils/output.ts +50 -0
- package/src/utils/paths.ts +72 -0
- package/tsconfig.json +14 -0
|
@@ -0,0 +1,1197 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2023 RedNaga. https://rednaga.io
|
|
3
|
+
* All rights reserved. Contact: rednaga@protonmail.com
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
* This file is part of APKiD
|
|
7
|
+
*
|
|
8
|
+
*
|
|
9
|
+
* Commercial License Usage
|
|
10
|
+
* ------------------------
|
|
11
|
+
* Licensees holding valid commercial APKiD licenses may use this file
|
|
12
|
+
* in accordance with the commercial license agreement provided with the
|
|
13
|
+
* Software or, alternatively, in accordance with the terms contained in
|
|
14
|
+
* a written agreement between you and RedNaga.
|
|
15
|
+
*
|
|
16
|
+
*
|
|
17
|
+
* GNU General Public License Usage
|
|
18
|
+
* --------------------------------
|
|
19
|
+
* Alternatively, this file may be used under the terms of the GNU General
|
|
20
|
+
* Public License version 3.0 as published by the Free Software Foundation
|
|
21
|
+
* and appearing in the file LICENSE.GPL included in the packaging of this
|
|
22
|
+
* file. Please visit http://www.gnu.org/copyleft/gpl.html and review the
|
|
23
|
+
* information to ensure the GNU General Public License version 3.0
|
|
24
|
+
* requirements will be met.
|
|
25
|
+
*
|
|
26
|
+
**/
|
|
27
|
+
|
|
28
|
+
include "common.yara"
|
|
29
|
+
|
|
30
|
+
rule appguard : packer
|
|
31
|
+
{
|
|
32
|
+
meta:
|
|
33
|
+
description = "AppGuard"
|
|
34
|
+
url = "http://appguard.nprotect.com/en/index.html"
|
|
35
|
+
|
|
36
|
+
strings:
|
|
37
|
+
$stub = "assets/appguard/"
|
|
38
|
+
$encrypted_dex = "assets/classes.sox"
|
|
39
|
+
|
|
40
|
+
condition:
|
|
41
|
+
is_apk and all of them
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
rule appguard_a : packer
|
|
45
|
+
{
|
|
46
|
+
meta:
|
|
47
|
+
description = "AppGuard"
|
|
48
|
+
sample = "c5195daa5d17ba6e1755f8cb7270ae3a971eb688ee7d650d10c284d7c93b777d"
|
|
49
|
+
url = "http://appguard.nprotect.com/en/index.html"
|
|
50
|
+
author = "Eduardo Novella"
|
|
51
|
+
|
|
52
|
+
strings:
|
|
53
|
+
$a = "assets/AppGuard0.jar"
|
|
54
|
+
$b = "assets/AppGuard.dgc"
|
|
55
|
+
$c = /lib\/(arm.*|x86.*)\/libAppGuard\.so/
|
|
56
|
+
$d = "libAppGuard-x86.so"
|
|
57
|
+
|
|
58
|
+
condition:
|
|
59
|
+
is_apk and any of them
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
rule appguard_b : packer
|
|
63
|
+
{
|
|
64
|
+
meta:
|
|
65
|
+
description = "AppGuard"
|
|
66
|
+
sample = "23cd2af10d46459065ea65b2d40fb706fd4847a1f8ef195cbebf1c6d8d54a48a"
|
|
67
|
+
url = "http://appguard.nprotect.com/en/index.html"
|
|
68
|
+
author = "Eduardo Novella"
|
|
69
|
+
|
|
70
|
+
strings:
|
|
71
|
+
$stub = "assets/appguard/"
|
|
72
|
+
|
|
73
|
+
condition:
|
|
74
|
+
is_apk and any of them and not appguard
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
rule appguard_c : packer
|
|
78
|
+
{
|
|
79
|
+
meta:
|
|
80
|
+
description = "AppGuard (TOAST-NHNent)"
|
|
81
|
+
url = "https://docs.toast.com/en/Security/AppGuard/en/Overview/"
|
|
82
|
+
url2 = "https://www.toast.com/service/security/appguard"
|
|
83
|
+
sample = "80ac3e9d3b36613fa82085cf0f5d03b58ce20b72ba29e07f7c744df476aa9a92"
|
|
84
|
+
samples = "https://koodous.com/rulesets/5249/apks"
|
|
85
|
+
author = "Eduardo Novella"
|
|
86
|
+
|
|
87
|
+
strings:
|
|
88
|
+
// package com.nhnent.appguard;
|
|
89
|
+
$a1 = /assets\/classes[1-9]{0,1}\.(jet|zip)/
|
|
90
|
+
$b1 = /lib\/(arm.*|x86.*)\/libloader\.so/
|
|
91
|
+
$b2 = /lib\/(arm.*|x86.*)\/libdiresu\.so/
|
|
92
|
+
$c1 = "assets/m7a"
|
|
93
|
+
$c2 = "assets/m8a"
|
|
94
|
+
$c3 = "assets/agconfig" //appguard cfg?
|
|
95
|
+
$c4 = "assets/agmetainfo"
|
|
96
|
+
|
|
97
|
+
condition:
|
|
98
|
+
is_apk and 1 of ($b*) and (1 of ($a*) or 1 of ($c*))
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
rule appguard_d : packer
|
|
103
|
+
{
|
|
104
|
+
meta:
|
|
105
|
+
description = "AppGuard"
|
|
106
|
+
sample = "94454b39eb50b677afec136b1eaea90895f07a735ae2801618baca16e6a2a19f"
|
|
107
|
+
url = "http://appguard.nprotect.com/en/index.html"
|
|
108
|
+
author = "Moolakarapaiyan"
|
|
109
|
+
|
|
110
|
+
strings:
|
|
111
|
+
$dircheck = "assets/appguard/"
|
|
112
|
+
$libcheck = /lib\/(arm.*|x86.*)\/libcompatible(_x86)?\.so/
|
|
113
|
+
|
|
114
|
+
condition:
|
|
115
|
+
is_apk and all of them
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
rule dxshield : packer
|
|
121
|
+
{
|
|
122
|
+
meta:
|
|
123
|
+
description = "DxShield"
|
|
124
|
+
url = "http://www.nshc.net/wp/portfolio-item/dxshield_eng/"
|
|
125
|
+
|
|
126
|
+
strings:
|
|
127
|
+
$decryptlib = "libdxbase.so"
|
|
128
|
+
$res = "assets/DXINFO.XML"
|
|
129
|
+
|
|
130
|
+
condition:
|
|
131
|
+
is_apk and ($decryptlib or $res)
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
private rule secneo_base
|
|
135
|
+
{
|
|
136
|
+
strings:
|
|
137
|
+
$encryptlib1 = "libDexHelper.so"
|
|
138
|
+
$encryptlib2 = "libDexHelper-x86.so"
|
|
139
|
+
$encrypted_dex = "assets/classes0.jar"
|
|
140
|
+
|
|
141
|
+
condition:
|
|
142
|
+
is_apk and any of ($encrypted_dex, $encryptlib2, $encryptlib1)
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
rule secneo_c : packer
|
|
146
|
+
{
|
|
147
|
+
meta:
|
|
148
|
+
description = "SecNeo.C"
|
|
149
|
+
url = "http://www.secneo.com"
|
|
150
|
+
sample = "9267b90fdbf2280f38e1bb4b23262514f71b3dd1c1dad750d8f7f56a831247bc"
|
|
151
|
+
author = "jcase"
|
|
152
|
+
|
|
153
|
+
strings:
|
|
154
|
+
$lib = "libdatajar.so"
|
|
155
|
+
|
|
156
|
+
condition:
|
|
157
|
+
secneo_base and $lib
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
rule secneo_b : packer
|
|
161
|
+
{
|
|
162
|
+
meta:
|
|
163
|
+
description = "SecNeo.B"
|
|
164
|
+
url = "http://www.secneo.com"
|
|
165
|
+
sample = "f5d7985e2add50fce74c99511512084845558ac996ce66f45e633c9495d78400"
|
|
166
|
+
|
|
167
|
+
strings:
|
|
168
|
+
$lib1 = "libdexjni.so"
|
|
169
|
+
$lib2 = "libdexjni%s.so"
|
|
170
|
+
|
|
171
|
+
condition:
|
|
172
|
+
secneo_base and any of ($lib1, $lib2)
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
rule secneo_a : packer
|
|
176
|
+
{
|
|
177
|
+
meta:
|
|
178
|
+
description = "SecNeo.A"
|
|
179
|
+
url = "http://www.secneo.com"
|
|
180
|
+
|
|
181
|
+
condition:
|
|
182
|
+
secneo_base
|
|
183
|
+
and not secneo_b
|
|
184
|
+
and not secneo_c
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
rule dexprotector : packer
|
|
188
|
+
{
|
|
189
|
+
// DexProtector v6.x.x :- Demo, Standard, Business Edition
|
|
190
|
+
|
|
191
|
+
meta:
|
|
192
|
+
author = "Jasi2169 and Eduardo Novella"
|
|
193
|
+
description = "DexProtector"
|
|
194
|
+
url = "https://dexprotector.com/"
|
|
195
|
+
|
|
196
|
+
strings:
|
|
197
|
+
$encrptlib_1 = "assets/dp.arm.so.dat"
|
|
198
|
+
$encrptlib_2 = "assets/dp.arm-v7.so.dat"
|
|
199
|
+
$encrptlib_3 = "assets/dp.arm-v8.so.dat"
|
|
200
|
+
$encrptlib_4 = "assets/dp.x86.so.dat"
|
|
201
|
+
$encrptlib_5 = "assets/dp.x86_64.so.dat"
|
|
202
|
+
|
|
203
|
+
$asset1 = "assets/classes.dex.dat"
|
|
204
|
+
$asset2 = "assets/classes1.dex.dat"
|
|
205
|
+
$asset3 = "assets/classes2.dex.dat"
|
|
206
|
+
$asset4 = "assets/classes3.dex.dat"
|
|
207
|
+
$asset5 = "assets/resources.dat"
|
|
208
|
+
$asset6 = "assets/dp.mp3"
|
|
209
|
+
|
|
210
|
+
condition:
|
|
211
|
+
is_apk and 1 of ($encrptlib_*) and 1 of ($asset*)
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
rule dexprotector_a : packer
|
|
215
|
+
{
|
|
216
|
+
// Possible older version
|
|
217
|
+
|
|
218
|
+
meta:
|
|
219
|
+
author = "Eduardo Novella"
|
|
220
|
+
description = "DexProtector"
|
|
221
|
+
url = "https://dexprotector.com/"
|
|
222
|
+
sample = "242e0ee59de46c7648b7b38efeb8c088ae3dc8c5c8fe9fbd5e707b098ab8f404"
|
|
223
|
+
|
|
224
|
+
strings:
|
|
225
|
+
$encrptlib_1 = "assets/dp.arm-v7.art.kk.so"
|
|
226
|
+
$encrptlib_2 = "assets/dp.arm-v7.art.l.so"
|
|
227
|
+
$encrptlib_3 = "assets/dp.arm-v7.dvm.so"
|
|
228
|
+
$encrptlib_4 = "assets/dp.arm.art.kk.so"
|
|
229
|
+
$encrptlib_5 = "assets/dp.arm.art.l.so"
|
|
230
|
+
$encrptlib_6 = "assets/dp.arm.dvm.so"
|
|
231
|
+
$encrptlib_7 = "assets/dp.x86.art.kk.so"
|
|
232
|
+
$encrptlib_8 = "assets/dp.x86.art.l.so"
|
|
233
|
+
$encrptlib_9 = "assets/dp.x86.dvm.so"
|
|
234
|
+
|
|
235
|
+
$encrptcustom = "assets/dp.mp3"
|
|
236
|
+
|
|
237
|
+
condition:
|
|
238
|
+
is_apk and 2 of them
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
rule dexprotector_b : packer
|
|
242
|
+
{
|
|
243
|
+
// Possible newer version
|
|
244
|
+
meta:
|
|
245
|
+
author = "Eduardo Novella"
|
|
246
|
+
description = "DexProtector"
|
|
247
|
+
url = "https://dexprotector.com/"
|
|
248
|
+
sample = "dca2a0bc0f2605072b9b48579e73711af816b0fa1108b825335d2d1f2418e2a7"
|
|
249
|
+
sample2 = "353f5fa432208f67cdc106c08b19f2c8644a5f768a7051f7c9043d9931a2a116"
|
|
250
|
+
|
|
251
|
+
strings:
|
|
252
|
+
// assets/com.package.name.arm.so.dat
|
|
253
|
+
$encrptlib_1 = /assets\/[A-Za-z0-9.]{2,50}\.arm\-v7\.so\.dat/
|
|
254
|
+
$encrptlib_2 = /assets\/[A-Za-z0-9.]{2,50}\.arm\-v8\.so\.dat/
|
|
255
|
+
$encrptlib_3 = /assets\/[A-Za-z0-9.]{2,50}\.arm\.so\.dat/
|
|
256
|
+
$encrptlib_4 = /assets\/[A-Za-z0-9.]{2,50}\.dex\.dat/
|
|
257
|
+
$encrptlib_5 = /assets\/[A-Za-z0-9.]{2,50}\.x86\.so\.dat/
|
|
258
|
+
$encrptlib_6 = /assets\/[A-Za-z0-9.]{2,50}\.x86\_64\.so\.dat/
|
|
259
|
+
|
|
260
|
+
$encrptcustom_mp3 = /assets\/[A-Za-z0-9.]{2,50}\.mp3/
|
|
261
|
+
$encrptcustom_dat = /assets\/[A-Za-z0-9.]{2,50}\.dat/
|
|
262
|
+
|
|
263
|
+
condition:
|
|
264
|
+
is_apk and 1 of ($encrptlib_*) and 1 of ($encrptcustom_*) and
|
|
265
|
+
not dexprotector_a and
|
|
266
|
+
not dexprotector
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
rule dexprotector_c : packer
|
|
270
|
+
{
|
|
271
|
+
meta:
|
|
272
|
+
author = "Eduardo Novella"
|
|
273
|
+
description = "DexProtector"
|
|
274
|
+
url = "https://dexprotector.com/"
|
|
275
|
+
sample = "2a0d410d540d75f0f1d9a217087e5df6e7032399d3c116a324541488a03f12d3"
|
|
276
|
+
|
|
277
|
+
strings:
|
|
278
|
+
// assets/dp.arch.so.random.mp3
|
|
279
|
+
$encrptlib = /assets\/dp\.(arm-v7|arm-v8|x86|x86_64)\.so\.[A-Za-z0-9]{2,8}\.mp3/
|
|
280
|
+
$encrptcustom = /assets\/[A-Za-z0-9]{2,8}\.mp3/
|
|
281
|
+
|
|
282
|
+
condition:
|
|
283
|
+
is_apk and all of them and
|
|
284
|
+
not dexprotector_a and
|
|
285
|
+
not dexprotector_b and
|
|
286
|
+
not dexprotector
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
rule dexprotector_d : packer
|
|
290
|
+
{
|
|
291
|
+
meta:
|
|
292
|
+
author = "Eduardo Novella"
|
|
293
|
+
description = "DexProtector"
|
|
294
|
+
url = "https://dexprotector.com/"
|
|
295
|
+
sample = "18e638efebb43bcd57e96214fab6f94ff609fc51babf1599f8ef0efd846fbf74"
|
|
296
|
+
|
|
297
|
+
strings:
|
|
298
|
+
// assets/random.(mp3|dat)
|
|
299
|
+
$encrptlib = /assets\/[A-Za-z0-9]{3,64}\.mp3/
|
|
300
|
+
$encrptdat = /assets\/[A-Za-z0-9]{3,64}\.dat/
|
|
301
|
+
$libdexpro = /lib\/(arm.*|x86.*)\/libdexprotector\.[A-Za-z0-9.]{2,16}\.so/
|
|
302
|
+
$libalice = /lib\/(arm.*|x86.*)\/libalice.so/
|
|
303
|
+
|
|
304
|
+
condition:
|
|
305
|
+
is_apk and 1 of ($encrpt*) and 1 of ($lib*) and
|
|
306
|
+
not dexprotector_a and
|
|
307
|
+
not dexprotector_b and
|
|
308
|
+
not dexprotector_c and
|
|
309
|
+
not dexprotector
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
rule dexpro_aide_a : packer
|
|
313
|
+
{
|
|
314
|
+
meta:
|
|
315
|
+
description = "DexProtector for AIDE"
|
|
316
|
+
url = "https://play.google.com/store/apps/details?id=mph.trunksku.apps.dexpro"
|
|
317
|
+
sample = "ccac4f15989a7ee430476d60b3a90ccf6c4ac7f6219f4e06676a69f75c7ce887"
|
|
318
|
+
author = "Eduardo Novella"
|
|
319
|
+
|
|
320
|
+
strings:
|
|
321
|
+
$asset_1 = "assets/classes.dex.dat"
|
|
322
|
+
$asset_2 = "assets/dp-lib/dp.kotlin-v1.lua.mph"
|
|
323
|
+
|
|
324
|
+
condition:
|
|
325
|
+
is_apk and all of them
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
rule dexpro_aide_b : packer
|
|
329
|
+
{
|
|
330
|
+
meta:
|
|
331
|
+
description = "DexProtector for AIDE"
|
|
332
|
+
url = "https://github.com/rednaga/APKiD/issues/197"
|
|
333
|
+
sample = "e113be26d90fe2cb287009345139fba0c550a67b15c3022eb5dc13aa0eb8235a"
|
|
334
|
+
author = "Eduardo Novella"
|
|
335
|
+
|
|
336
|
+
strings:
|
|
337
|
+
// pkgname = mph.dexprotect.a
|
|
338
|
+
$asset_1 = "assets/dexprotect/classes.dex.dat"
|
|
339
|
+
$asset_2 = "assets/eprotect.dat"
|
|
340
|
+
$properties = "dexpro-build.properties"
|
|
341
|
+
|
|
342
|
+
condition:
|
|
343
|
+
is_apk and all of them
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
rule apkprotect : packer
|
|
347
|
+
{
|
|
348
|
+
meta:
|
|
349
|
+
description = "APKProtect"
|
|
350
|
+
|
|
351
|
+
strings:
|
|
352
|
+
$key = "apkprotect.com/key.dat"
|
|
353
|
+
$dir = "apkprotect.com/"
|
|
354
|
+
$lib = "libAPKProtect.so"
|
|
355
|
+
|
|
356
|
+
condition:
|
|
357
|
+
is_apk and ($key or $dir or $lib)
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
rule apkprotect_a : packer
|
|
361
|
+
{
|
|
362
|
+
meta:
|
|
363
|
+
description = "APKProtect 6.x"
|
|
364
|
+
url = "https://play.google.com/store/apps/details?id=com.mcal.dexprotect"
|
|
365
|
+
sample = "1c3e09c6e336fef0261a19e546f3686fcf9a00ee23f7426608fef40465d91289"
|
|
366
|
+
author = "Eduardo Novella"
|
|
367
|
+
|
|
368
|
+
strings:
|
|
369
|
+
$a1 = /lib\/(x86\_64|armeabi\-v7a|arm64\-v8a|x86)\/libapkprotect\.so/
|
|
370
|
+
$a2 = "assets/apkprotect.bin"
|
|
371
|
+
$a3 = "assets/apkprotect/classes.dex.bin"
|
|
372
|
+
$a4 = "apkprotect-build.properties"
|
|
373
|
+
$a5 = "META-INF/APKPROTECT.RSA"
|
|
374
|
+
$a6 = "META-INF/APKPROTECT.SF"
|
|
375
|
+
|
|
376
|
+
condition:
|
|
377
|
+
is_apk and 4 of ($a*)
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
rule apkprotect_b : packer
|
|
381
|
+
{
|
|
382
|
+
meta:
|
|
383
|
+
description = "APKProtect 9.x"
|
|
384
|
+
url = "https://play.google.com/store/apps/details?id=com.mcal.dexprotect"
|
|
385
|
+
sample = "65e02abc0a9e9646cea11a1b0d17e4fd080c98d08c755be7a1dec9d7c21de4de"
|
|
386
|
+
author = "Eduardo Novella"
|
|
387
|
+
|
|
388
|
+
strings:
|
|
389
|
+
/**
|
|
390
|
+
unzip -l 65e02abc0a9e9646cea11a1b0d17e4fd080c98d08c755be7a1dec9d7c21de4de.apk
|
|
391
|
+
Length Date Time Name
|
|
392
|
+
--------- ---------- ----- ----
|
|
393
|
+
1269 2020-05-14 14:56 META-INF/MANIFEST.MF
|
|
394
|
+
1347 2020-05-14 14:56 META-INF/APKPROTECT.SF
|
|
395
|
+
1299 2020-05-14 14:56 META-INF/APKPROTECT.RSA
|
|
396
|
+
6980 2020-05-14 14:56 AndroidManifest.xml
|
|
397
|
+
36 2020-05-14 14:56 assets/ap.others/apkprotect.bin
|
|
398
|
+
425126 2020-05-14 14:56 assets/ap.res/a/a.png
|
|
399
|
+
1464 2020-05-14 14:56 assets/ap.res/b/b.xml
|
|
400
|
+
1504 2020-05-14 14:56 assets/ap.res/c/b.xml
|
|
401
|
+
2981 2020-05-14 14:56 assets/ap.res/d/c.png
|
|
402
|
+
5755 2020-05-14 14:56 assets/ap.res/e/c.png
|
|
403
|
+
9277 2020-05-14 14:56 assets/ap.res/f/c.png
|
|
404
|
+
17743 2020-05-14 14:56 assets/ap.res/g/c.png
|
|
405
|
+
522140 2020-05-14 14:56 assets/ap.src/apkprotect-v1.bin
|
|
406
|
+
161320 2020-05-14 14:56 classes.dex
|
|
407
|
+
202880 2020-05-14 14:56 lib/arm64-v8a/libapkprotect.so
|
|
408
|
+
104088 2020-05-14 14:56 lib/armeabi-v7a/libapkprotect.so
|
|
409
|
+
198336 2020-05-14 14:56 lib/x86/libapkprotect.so
|
|
410
|
+
223632 2020-05-14 14:56 lib/x86_64/libapkprotect.so
|
|
411
|
+
2040 2020-05-14 14:56 resources.arsc
|
|
412
|
+
*/
|
|
413
|
+
$a1 = /lib\/(x86\_64|armeabi\-v7a|arm64\-v8a|x86)\/libapkprotect\.so/
|
|
414
|
+
$a2 = /assets\/(.*)\/apkprotect(.*)\.bin/
|
|
415
|
+
$a3 = "META-INF/APKPROTECT.RSA"
|
|
416
|
+
$a4 = "META-INF/APKPROTECT.SF"
|
|
417
|
+
|
|
418
|
+
condition:
|
|
419
|
+
is_apk and 3 of ($a*) and not apkprotect_a
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
rule bangcle : packer
|
|
423
|
+
{
|
|
424
|
+
meta:
|
|
425
|
+
description = "Bangcle"
|
|
426
|
+
|
|
427
|
+
strings:
|
|
428
|
+
$main_lib = "libsecexe.so"
|
|
429
|
+
$second_lib = "libsecmain.so"
|
|
430
|
+
$container = "assets/bangcleplugin/container.dex"
|
|
431
|
+
$encrypted_jar = "bangcleclasses.jar"
|
|
432
|
+
$encrypted_jar2 = "bangcle_classes.jar"
|
|
433
|
+
|
|
434
|
+
condition:
|
|
435
|
+
is_apk and any of ($main_lib, $second_lib, $container, $encrypted_jar, $encrypted_jar2)
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
rule bangcle_secshell : packer
|
|
439
|
+
{
|
|
440
|
+
meta:
|
|
441
|
+
description = "Bangcle (SecShell)"
|
|
442
|
+
sample = "d710a24971a0cd56c5cbe62b4b926e0122704fba52821e9c888e651a2d26a05c"
|
|
443
|
+
url = "https://blog.fortinet.com/2017/01/26/deep-analysis-of-android-rootnik-malware-using-advanced-anti-debug-and-anti-hook-part-i-debugging-in-the-scope-of-native-layer"
|
|
444
|
+
author = "Eduardo Novella"
|
|
445
|
+
|
|
446
|
+
strings:
|
|
447
|
+
$a = "assets/secData0.jar"
|
|
448
|
+
$b = "libSecShell.so"
|
|
449
|
+
$c = "libSecShell-x86.so"
|
|
450
|
+
|
|
451
|
+
condition:
|
|
452
|
+
is_apk and 2 of them
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
rule kiro : packer
|
|
456
|
+
{
|
|
457
|
+
meta:
|
|
458
|
+
description = "Kiro"
|
|
459
|
+
|
|
460
|
+
strings:
|
|
461
|
+
$kiro_lib = "libkiroro.so"
|
|
462
|
+
$sbox = "assets/sbox"
|
|
463
|
+
|
|
464
|
+
condition:
|
|
465
|
+
is_apk and $kiro_lib and $sbox
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
rule qihoo360 : packer
|
|
469
|
+
{
|
|
470
|
+
meta:
|
|
471
|
+
description = "Qihoo 360"
|
|
472
|
+
|
|
473
|
+
strings:
|
|
474
|
+
$a = "libprotectClass.so"
|
|
475
|
+
|
|
476
|
+
condition:
|
|
477
|
+
is_apk and
|
|
478
|
+
$a and
|
|
479
|
+
not kiro
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
rule jiagu : packer
|
|
483
|
+
{
|
|
484
|
+
meta:
|
|
485
|
+
//developed by Qihoo 360
|
|
486
|
+
description = "Jiagu"
|
|
487
|
+
url = "http://jiagu.360.cn/"
|
|
488
|
+
|
|
489
|
+
strings:
|
|
490
|
+
// These contain a trick function "youAreFooled"
|
|
491
|
+
$main_lib = "libjiagu.so"
|
|
492
|
+
$art_lib = "libjiagu_art.so"
|
|
493
|
+
|
|
494
|
+
condition:
|
|
495
|
+
is_apk and ($main_lib or $art_lib)
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
rule jiagu_a : packer
|
|
499
|
+
{
|
|
500
|
+
meta:
|
|
501
|
+
description = "Jiagu (ApkToolPlus)"
|
|
502
|
+
sample = "684baab16344dc663b7ae84dd1f8d6a39bfb480a977ad581a0a6032f6e437218"
|
|
503
|
+
url = "https://github.com/linchaolong/ApkToolPlus/tree/master/lib.JiaGu/src/com/linchaolong/apktoolplus/jiagu"
|
|
504
|
+
author = "Eduardo Novella"
|
|
505
|
+
|
|
506
|
+
strings:
|
|
507
|
+
$a = "assets/jiagu_data.bin"
|
|
508
|
+
$b = "assets/sign.bin"
|
|
509
|
+
$c = "libapktoolplus_jiagu.so"
|
|
510
|
+
|
|
511
|
+
condition:
|
|
512
|
+
is_apk and all of them
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
rule qdbh_packer : packer
|
|
516
|
+
{
|
|
517
|
+
meta:
|
|
518
|
+
description = "qdbh packer"
|
|
519
|
+
sample = "faf1e85f878ea52a3b3fbb67126132b527f509586706f242f39b8c1fdb4a2065"
|
|
520
|
+
|
|
521
|
+
strings:
|
|
522
|
+
$qdbh = "assets/qdbh"
|
|
523
|
+
|
|
524
|
+
condition:
|
|
525
|
+
is_apk and $qdbh
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
rule unicom_loader : packer
|
|
529
|
+
{
|
|
530
|
+
meta:
|
|
531
|
+
description = "Unicom SDK Loader"
|
|
532
|
+
|
|
533
|
+
strings:
|
|
534
|
+
$decrypt_lib = "libdecrypt.jar"
|
|
535
|
+
$unicom_lib = "libunicomsdk.jar"
|
|
536
|
+
$classes_jar = "classes.jar"
|
|
537
|
+
|
|
538
|
+
condition:
|
|
539
|
+
is_apk and ($unicom_lib and ($decrypt_lib or $classes_jar))
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
rule liapp : packer
|
|
543
|
+
{
|
|
544
|
+
meta:
|
|
545
|
+
description = "LIAPP"
|
|
546
|
+
sample = "b5be20d225edf55634621aa17988a6ed3368d4f7632c8a1eb4d3fc3b6a61c325"
|
|
547
|
+
sample2 = "0697d32c80af84fdde536c5eae2a8bf7ddb0504426a6db7ccde6d8d684a6f588"
|
|
548
|
+
author = "Caleb & Diff & Eduardo Novella"
|
|
549
|
+
|
|
550
|
+
strings:
|
|
551
|
+
$dir = "/LIAPPEgg"
|
|
552
|
+
$lib = "LIAPPClient.sc"
|
|
553
|
+
$ini = "assets/LIAPP.ini"
|
|
554
|
+
|
|
555
|
+
condition:
|
|
556
|
+
is_apk and any of ($dir, $lib, $ini)
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
rule app_fortify : packer
|
|
560
|
+
{
|
|
561
|
+
meta:
|
|
562
|
+
description = "App Fortify"
|
|
563
|
+
|
|
564
|
+
strings:
|
|
565
|
+
$lib = "libNSaferOnly.so"
|
|
566
|
+
|
|
567
|
+
condition:
|
|
568
|
+
is_apk and $lib
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
rule nqshield : packer
|
|
572
|
+
{
|
|
573
|
+
meta:
|
|
574
|
+
description = "NQ Shield"
|
|
575
|
+
|
|
576
|
+
strings:
|
|
577
|
+
$lib = "libnqshield.so"
|
|
578
|
+
$lib_sec1 = "nqshield"
|
|
579
|
+
$lib_sec2 = "nqshell"
|
|
580
|
+
|
|
581
|
+
condition:
|
|
582
|
+
is_apk and any of ($lib, $lib_sec1, $lib_sec2)
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
rule tencent : packer
|
|
586
|
+
{
|
|
587
|
+
meta:
|
|
588
|
+
description = "Mobile Tencent Protect"
|
|
589
|
+
url = "https://intl.cloud.tencent.com/product/mtp"
|
|
590
|
+
sample = "7c6024abc61b184ddcc9fa49f9fac1a7e5568d1eab09ee748f8c4987844a3f81"
|
|
591
|
+
|
|
592
|
+
strings:
|
|
593
|
+
$decryptor_lib = /lib\/(arm.*|x86.*)\/libshell\.so/
|
|
594
|
+
$zip_lib = /lib\/(arm.*|x86.*)\/libmobisecy\.so/
|
|
595
|
+
$mix_dex = "/mix.dex"
|
|
596
|
+
|
|
597
|
+
condition:
|
|
598
|
+
is_apk and any of them
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
rule tencent_a : packer
|
|
602
|
+
{
|
|
603
|
+
meta:
|
|
604
|
+
description = "Mobile Tencent Protect"
|
|
605
|
+
url = "https://intl.cloud.tencent.com/product/mtp"
|
|
606
|
+
sample = "b1a5d9d4c1916a0acc2d5c3b7c811a39ebeb2f6d42b305036473f7053bbf5fe7"
|
|
607
|
+
author = "Eduardo Novella"
|
|
608
|
+
|
|
609
|
+
strings:
|
|
610
|
+
$lib = /lib\/(arm.*|x86.*)\/libshell(a|x)-\d\.\d\.\d\.\d\.so/
|
|
611
|
+
|
|
612
|
+
condition:
|
|
613
|
+
is_apk and all of them
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
rule tencent_b : packer
|
|
617
|
+
{
|
|
618
|
+
meta:
|
|
619
|
+
description = "Tencent Security Enterprise Edition"
|
|
620
|
+
url = "https://cloud.tencent.com/product/ms"
|
|
621
|
+
url2 = "http://www.fron.com.cn/yaq/"
|
|
622
|
+
sample = "49dddbde640fa5e46bf5e427564f6a75599a87e391699e20b0380869b7c4ad83" // com.qidian.QDReader v7.9.352
|
|
623
|
+
author = "Eduardo Novella"
|
|
624
|
+
|
|
625
|
+
strings:
|
|
626
|
+
// lib/arm/libshell-supervbasic.2019.so and lib/arm/libshell-superv.2019.so
|
|
627
|
+
$lib = /lib\/(arm.*|x86.*)\/libshell\-superv(.*)\.\d{4}\.so/
|
|
628
|
+
// assets/dexMethod_00oo1l1l.dat
|
|
629
|
+
$asset = /assets\/dexMethod.*\.dat/
|
|
630
|
+
|
|
631
|
+
condition:
|
|
632
|
+
is_apk and all of them
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
rule tencent_legu : packer
|
|
636
|
+
{
|
|
637
|
+
meta:
|
|
638
|
+
description = "Tencent's Legu"
|
|
639
|
+
url = "https://blog.quarkslab.com/a-glimpse-into-tencents-legu-packer.html"
|
|
640
|
+
sample = "9ff3a53f76c7a6d7e3de3b8567c9606f2cc08ec4aaaae596a27361018d839c58"
|
|
641
|
+
author = "Mert Arıkan"
|
|
642
|
+
|
|
643
|
+
strings:
|
|
644
|
+
$a = "assets/tosversion"
|
|
645
|
+
$b = "assets/0OO00l111l1l"
|
|
646
|
+
$c = "assets/0OO00oo01l1l"
|
|
647
|
+
$d = "assets/o0oooOO0ooOo.dat"
|
|
648
|
+
|
|
649
|
+
condition:
|
|
650
|
+
is_apk
|
|
651
|
+
and $b
|
|
652
|
+
and ($a or $c or $d)
|
|
653
|
+
and not tencent
|
|
654
|
+
and not tencent_a
|
|
655
|
+
and not tencent_b
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
rule tencent_legu_VMP : packer
|
|
659
|
+
{
|
|
660
|
+
meta:
|
|
661
|
+
description = "Tencent's Legu (VMP)"
|
|
662
|
+
url = "https://github.com/rednaga/APKiD/issues/390"
|
|
663
|
+
sample = "95ca638cfb80ebbb21e97c202f9c06f7306c6fc9696b4760a401afa9293000f7" // com.youwan.aoao v2.9.2
|
|
664
|
+
author = "Eduardo Novella"
|
|
665
|
+
|
|
666
|
+
strings:
|
|
667
|
+
$a = /assets\/libwsDataEncryption\_AZAPP.*\.so/
|
|
668
|
+
$b = /assets\/wslib\/(arm.*|x86.*)\/libWSSec(V?)\.so/
|
|
669
|
+
$c = "assets/wsDal.jar"
|
|
670
|
+
$d = /assets\/WSSEC(A|B|C|D)\.jar/
|
|
671
|
+
|
|
672
|
+
condition:
|
|
673
|
+
is_apk and all of them
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
rule ijiami : packer
|
|
677
|
+
{
|
|
678
|
+
meta:
|
|
679
|
+
description = "Ijiami"
|
|
680
|
+
|
|
681
|
+
strings:
|
|
682
|
+
$old_dat = "assets/ijiami.dat"
|
|
683
|
+
$new_ajm = "ijiami.ajm"
|
|
684
|
+
$ijm_lib = "assets/ijm_lib/"
|
|
685
|
+
|
|
686
|
+
condition:
|
|
687
|
+
is_apk and ($old_dat or $new_ajm or $ijm_lib)
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
rule naga : packer
|
|
691
|
+
{
|
|
692
|
+
meta:
|
|
693
|
+
description = "Naga"
|
|
694
|
+
|
|
695
|
+
strings:
|
|
696
|
+
$lib = "libddog.so"
|
|
697
|
+
|
|
698
|
+
condition:
|
|
699
|
+
is_apk and $lib
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
rule alibaba : packer
|
|
703
|
+
{
|
|
704
|
+
meta:
|
|
705
|
+
description = "Alibaba"
|
|
706
|
+
|
|
707
|
+
strings:
|
|
708
|
+
$lib = "libmobisec.so"
|
|
709
|
+
|
|
710
|
+
condition:
|
|
711
|
+
is_apk and $lib
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
rule medusah : packer
|
|
715
|
+
{
|
|
716
|
+
meta:
|
|
717
|
+
description = "Medusah"
|
|
718
|
+
url = "https://medusah.com/"
|
|
719
|
+
|
|
720
|
+
strings:
|
|
721
|
+
$lib = "libmd.so"
|
|
722
|
+
|
|
723
|
+
condition:
|
|
724
|
+
is_apk and $lib
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
rule medusah_appsolid : packer
|
|
728
|
+
{
|
|
729
|
+
meta:
|
|
730
|
+
// Samples and discussion: https://github.com/rednaga/APKiD/issues/19
|
|
731
|
+
description = "Medusah (AppSolid)"
|
|
732
|
+
url = "https://appsolid.co/"
|
|
733
|
+
sample = "5c1f14c1674c6f3ff72d9a017b083023d6c59635bec83718afec2d23372f84f4"
|
|
734
|
+
|
|
735
|
+
strings:
|
|
736
|
+
$encrypted_dex = "assets/high_resolution.png"
|
|
737
|
+
|
|
738
|
+
condition:
|
|
739
|
+
is_apk and $encrypted_dex and not medusah
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
rule baidu : packer
|
|
743
|
+
{
|
|
744
|
+
meta:
|
|
745
|
+
description = "Baidu"
|
|
746
|
+
|
|
747
|
+
strings:
|
|
748
|
+
$lib = "libbaiduprotect.so"
|
|
749
|
+
$encrypted = "baiduprotect1.jar"
|
|
750
|
+
|
|
751
|
+
condition:
|
|
752
|
+
is_apk and ($lib or $encrypted)
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
rule pangxie : packer
|
|
756
|
+
{
|
|
757
|
+
meta:
|
|
758
|
+
description = "PangXie"
|
|
759
|
+
sample = "ea70a5b3f7996e9bfea2d5d99693195fdb9ce86385b7116fd08be84032d43d2c"
|
|
760
|
+
|
|
761
|
+
strings:
|
|
762
|
+
$lib = "libnsecure.so"
|
|
763
|
+
|
|
764
|
+
condition:
|
|
765
|
+
is_apk and $lib
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
rule kony : packer
|
|
769
|
+
{
|
|
770
|
+
meta:
|
|
771
|
+
description = "Kony"
|
|
772
|
+
url = "http://www.kony.com/"
|
|
773
|
+
|
|
774
|
+
strings:
|
|
775
|
+
$lib = "libkonyjsvm.so"
|
|
776
|
+
$decrypt_keys = "assets/application.properties"
|
|
777
|
+
$encrypted_js = "assets/js/startup.js"
|
|
778
|
+
|
|
779
|
+
condition:
|
|
780
|
+
is_apk and $lib and $decrypt_keys and $encrypted_js
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
rule approov : packer
|
|
784
|
+
{
|
|
785
|
+
meta:
|
|
786
|
+
description = "Approov"
|
|
787
|
+
url = "https://www.approov.io/"
|
|
788
|
+
|
|
789
|
+
strings:
|
|
790
|
+
$lib = "libapproov.so"
|
|
791
|
+
$sdk_config = "assets/cbconfig.JSON"
|
|
792
|
+
|
|
793
|
+
condition:
|
|
794
|
+
is_apk and $lib and $sdk_config
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
rule yidun : packer
|
|
798
|
+
{
|
|
799
|
+
meta:
|
|
800
|
+
description = "yidun"
|
|
801
|
+
url = "https://dun.163.com/product/app-protect"
|
|
802
|
+
|
|
803
|
+
strings:
|
|
804
|
+
$anti_trick = "Lcom/_" // Class path of anti-trick
|
|
805
|
+
$entry_point = "Lcom/netease/nis/wrapper/Entry"
|
|
806
|
+
$jni_func = "Lcom/netease/nis/wrapper/MyJni"
|
|
807
|
+
$lib = "libnesec.so"
|
|
808
|
+
$nedata = "assets/nedata.db"
|
|
809
|
+
$nedig = "assets/nedig.properties"
|
|
810
|
+
|
|
811
|
+
condition:
|
|
812
|
+
is_apk and (#lib > 1 or ($anti_trick and $entry_point and $jni_func) or ($nedata and $nedig))
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
rule apkpacker : packer
|
|
816
|
+
{
|
|
817
|
+
meta:
|
|
818
|
+
description = "ApkPacker"
|
|
819
|
+
sample = "087af5aacab8fc8bc7b1dcb7a138c3552d175c74b496056893299bc437422f95"
|
|
820
|
+
author = "Eduardo Novella"
|
|
821
|
+
|
|
822
|
+
strings:
|
|
823
|
+
$a = "assets/ApkPacker/apkPackerConfiguration"
|
|
824
|
+
$b = "assets/ApkPacker/classes.dex"
|
|
825
|
+
// These may be related, but not enough samples to be sure
|
|
826
|
+
//$c = "assets/config.txt"
|
|
827
|
+
//$d = "assets/sht.txt"
|
|
828
|
+
|
|
829
|
+
condition:
|
|
830
|
+
is_apk and all of them
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
rule chornclickers : packer
|
|
834
|
+
{
|
|
835
|
+
|
|
836
|
+
meta:
|
|
837
|
+
// This has no name so we made one up from Ch-china,-orn-porn and -clickers
|
|
838
|
+
description = "ChornClickers"
|
|
839
|
+
url = "https://github.com/rednaga/APKiD/issues/93"
|
|
840
|
+
sample = "0c4a26d6b27986775c9c58813407a737657294579b6fd37618b0396d90d3efc3"
|
|
841
|
+
author = "Eduardo Novella"
|
|
842
|
+
|
|
843
|
+
strings:
|
|
844
|
+
$a = "lib/armeabi/libhdus.so"
|
|
845
|
+
$b = "lib/armeabi/libwjus.so"
|
|
846
|
+
|
|
847
|
+
condition:
|
|
848
|
+
is_apk and all of them
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
rule appsuit_packer : packer
|
|
852
|
+
{
|
|
853
|
+
meta:
|
|
854
|
+
description = "AppSuit"
|
|
855
|
+
url = "http://www.stealien.com/appsuit.html"
|
|
856
|
+
sample = "8dc42cc950617ff51d0409a05809d20ca4c375f05c3fa2324b249e1306758a94"
|
|
857
|
+
author = "Eduardo Novella"
|
|
858
|
+
|
|
859
|
+
strings:
|
|
860
|
+
$asset1 = "assets/appsuit/momo"
|
|
861
|
+
$asset2 = "assets/appsuit/meme"
|
|
862
|
+
$native_lib2 = "libAppSuit.so"
|
|
863
|
+
|
|
864
|
+
condition:
|
|
865
|
+
is_apk and 2 of them
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
rule appsealing : packer
|
|
869
|
+
{
|
|
870
|
+
meta:
|
|
871
|
+
// Commercial packer
|
|
872
|
+
description = "AppSealing"
|
|
873
|
+
url = "https://www.appsealing.com/"
|
|
874
|
+
sample = "61a983b032aee2e56159e682ad1588ad30fa8c3957bf849d1afe6f10e1d9645d"
|
|
875
|
+
author = "zeroload"
|
|
876
|
+
|
|
877
|
+
strings:
|
|
878
|
+
$native_lib_1 = "libcovault.so"
|
|
879
|
+
$native_lib_2 = "libcovault-appsec.so"
|
|
880
|
+
$stub = "assets/appsealing.dex"
|
|
881
|
+
$dex = "assets/sealed1.dex"
|
|
882
|
+
|
|
883
|
+
condition:
|
|
884
|
+
is_apk and all of them
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
rule appsealing_a : packer
|
|
888
|
+
{
|
|
889
|
+
meta:
|
|
890
|
+
description = "AppSealing"
|
|
891
|
+
url = "https://www.appsealing.com/"
|
|
892
|
+
sample = "09de88c86182f066b5a1b1b7f0d5553cf6010ef2aed4a12ed5d9bea2e1866bbb"
|
|
893
|
+
author = "Eduardo Novella"
|
|
894
|
+
|
|
895
|
+
strings:
|
|
896
|
+
// asset names at "assets/AppSealing" : 11,a1,a3,aslc,hr,s1,s3,si,x1,x3
|
|
897
|
+
$a1 = /assets\/AppSealing\/(.*)/
|
|
898
|
+
|
|
899
|
+
condition:
|
|
900
|
+
is_apk and #a1 > 3
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
rule secenh : packer
|
|
904
|
+
{
|
|
905
|
+
meta:
|
|
906
|
+
description = "Secenh"
|
|
907
|
+
sample = "0709d38575e15643f03793445479d869116dca319bce2296cb8af798453a8752"
|
|
908
|
+
author = "Nacho Sanmillan"
|
|
909
|
+
|
|
910
|
+
strings:
|
|
911
|
+
$a1 = "assets/libsecenh.so"
|
|
912
|
+
$a2 = "assets/libsecenh_x86.so"
|
|
913
|
+
$b1 = "assets/respatcher.jar"
|
|
914
|
+
$b2 = "assets/res.zip"
|
|
915
|
+
|
|
916
|
+
condition:
|
|
917
|
+
is_apk
|
|
918
|
+
and 1 of ($a*)
|
|
919
|
+
and 1 of ($b*)
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
rule apkencryptor : packer
|
|
923
|
+
{
|
|
924
|
+
meta:
|
|
925
|
+
description = "ApkEncryptor"
|
|
926
|
+
url = "https://github.com/FlyingYu-Z/ApkEncryptor"
|
|
927
|
+
sample = "bc4a8774f4a2b0a72b3ffd4d9e1933913a1d95a8e50082255a167dec9d115a99"
|
|
928
|
+
author = "Eduardo Novella"
|
|
929
|
+
|
|
930
|
+
strings:
|
|
931
|
+
$src1 = "src/2ba5b2615b9b71b48c7694d6489e0171"
|
|
932
|
+
$src2 = "src/2e15f58d32a5ff652706ef41ec85a763"
|
|
933
|
+
$src3 = "src/3676d55f84497cbeadfc614c1b1b62fc"
|
|
934
|
+
|
|
935
|
+
condition:
|
|
936
|
+
is_apk and ($src1 or $src2 or $src3)
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
rule epicvm : packer
|
|
940
|
+
{
|
|
941
|
+
meta:
|
|
942
|
+
description = "Epic VM"
|
|
943
|
+
url = "https://t.me/epic_pro"
|
|
944
|
+
url2 = "https://t.me/epic_pro/12"
|
|
945
|
+
sample = "da62478ddde547878294508d428580013e7ffce274ae3756ac260ae7d50640b8"
|
|
946
|
+
author = "Eduardo Novella"
|
|
947
|
+
|
|
948
|
+
strings:
|
|
949
|
+
$lib = /lib\/(x86\_64|armeabi\-v7a|arm64\-v8a|x86)\/libEpic\_Vm\.so/
|
|
950
|
+
|
|
951
|
+
condition:
|
|
952
|
+
is_apk and all of them
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
rule appiron : packer
|
|
956
|
+
{
|
|
957
|
+
meta:
|
|
958
|
+
description = "Secucen AppIron"
|
|
959
|
+
url = "http://www.secucen.com/app/view/fintech/appIron"
|
|
960
|
+
sample = "d4f4a24ce6350bc4e23e2170da5b217dd65161aba5eca775d75514e9cdac4d59"
|
|
961
|
+
author = "dustty0 & Eduardo Novella"
|
|
962
|
+
|
|
963
|
+
strings:
|
|
964
|
+
$lib = /lib\/(.*)\/libAppIron-jni_v(.*)\.so/
|
|
965
|
+
$lib2 = /libAppIronExpress_v(.*)\.so/
|
|
966
|
+
$asset = /assets\/appiron\/(.*)/
|
|
967
|
+
|
|
968
|
+
condition:
|
|
969
|
+
is_apk and 2 of them
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
rule eversafe : packer
|
|
973
|
+
{
|
|
974
|
+
meta:
|
|
975
|
+
description = "Eversafe"
|
|
976
|
+
url = "https://everspin.global/products/solutions/eversafe-mobile"
|
|
977
|
+
sample = "00dbb346f3ae0540620eb120ccf00a65af81a07baed5adfdcd2fc620a33ed298"
|
|
978
|
+
author = "dustty0 & Eduardo Novella"
|
|
979
|
+
|
|
980
|
+
strings:
|
|
981
|
+
$lib1 = /lib\/(.*)\/libeversafe\.so/
|
|
982
|
+
$lib2 = /lib\/(.*)\/libeversafe-loader\.so/
|
|
983
|
+
$asset = /assets\/eversafe\/eversafe_(.*)\.data/
|
|
984
|
+
|
|
985
|
+
condition:
|
|
986
|
+
is_apk and 2 of them
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
rule appcamo : packer
|
|
990
|
+
{
|
|
991
|
+
meta:
|
|
992
|
+
description = "AppCamo"
|
|
993
|
+
url = "http://appcamo.com/s2/s2_1.php"
|
|
994
|
+
sample = "b8bf8e44eff2f4557f050d19534624dc3df5053f7793eb409b98c18c475d969b"
|
|
995
|
+
author = "dustty0 & Eduardo Novella"
|
|
996
|
+
|
|
997
|
+
strings:
|
|
998
|
+
$lib = /lib\/(.*)\/libalib\.so/
|
|
999
|
+
$asset = /assets\/[0-9a-f]{32}\/[0-9a-f]{32}\.png/
|
|
1000
|
+
// assets/288426d06828409c8fb4f21080a51aee/d7b00c0c23514d7b9c9a022fcb9ce073.png
|
|
1001
|
+
|
|
1002
|
+
condition:
|
|
1003
|
+
is_apk and all of them
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
rule aegis : packer
|
|
1007
|
+
{
|
|
1008
|
+
meta:
|
|
1009
|
+
description = "Aegis - Android Republic Mods"
|
|
1010
|
+
url = "https://androidrepublic.org"
|
|
1011
|
+
sample = "4ca8c5f8ecfa1c36678b1745a2b58872e3f3f5fd14df6dd5fd65d6b8f2677f53"
|
|
1012
|
+
author = "Yehh22 & Eduardo Novella"
|
|
1013
|
+
|
|
1014
|
+
strings:
|
|
1015
|
+
$asset1 = "assets/aegis/aegis.mf"
|
|
1016
|
+
$asset2 = "assets/aegis/aegis.sig"
|
|
1017
|
+
$asset3 = /assets\/aegis\/aegis[0-9]{1}\.dat/
|
|
1018
|
+
$asset4 = "assets/aegis/nmsscr.nmss"
|
|
1019
|
+
$asset5 = "assets/aegis/nmssey.nmss"
|
|
1020
|
+
$asset6 = "assets/aegis/nmsskc.nmss"
|
|
1021
|
+
$asset7 = "assets/aegis/shield.dat"
|
|
1022
|
+
|
|
1023
|
+
condition:
|
|
1024
|
+
is_apk and any of them
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
rule kangapack : packer
|
|
1028
|
+
{
|
|
1029
|
+
meta:
|
|
1030
|
+
description = "KangaPack"
|
|
1031
|
+
sample = "2c05efa757744cb01346fe6b39e9ef8ea2582d27481a441eb885c5c4dcd2b65b"
|
|
1032
|
+
sample2 = "1ac9044146fa1ff7fcf73cd31f7a940838983792e2a849cb66eed5a1d9c997dd"
|
|
1033
|
+
author = "Axelle Apvrille"
|
|
1034
|
+
url = "https://cryptax.medium.com/inside-kangapack-the-kangaroo-packer-with-native-decryption-3e7e054679c4"
|
|
1035
|
+
|
|
1036
|
+
strings:
|
|
1037
|
+
$lib = /lib\/(arm.*|x86.*)\/libapksadfsalkwes.so/
|
|
1038
|
+
|
|
1039
|
+
condition:
|
|
1040
|
+
is_apk and all of them
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
rule tongfu_shield : packer
|
|
1044
|
+
{
|
|
1045
|
+
meta:
|
|
1046
|
+
description = "Tongfu shield"
|
|
1047
|
+
url = "https://www.tongfudun.com"
|
|
1048
|
+
url2 = "https://www.payegis.com/"
|
|
1049
|
+
sample = "af27533557a47ff6795b0df77ea863bbefafa4974ce2dbf9604a79ce7196d080" // com.kingdee.zhihuiji v6.25.22
|
|
1050
|
+
author = "Eduardo Novella"
|
|
1051
|
+
|
|
1052
|
+
strings:
|
|
1053
|
+
$asset1 = "assets/mode"
|
|
1054
|
+
$asset2 = "assets/PK"
|
|
1055
|
+
$asset3 = "assets/virtual"
|
|
1056
|
+
$asset4 = "assets/libegis.a"
|
|
1057
|
+
$lib = /lib\/(arm.*|x86.*)\/libegis.so/
|
|
1058
|
+
|
|
1059
|
+
condition:
|
|
1060
|
+
is_apk and $lib and any of ($asset*)
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
rule zimperium_zshield_apk : packer
|
|
1064
|
+
{
|
|
1065
|
+
meta:
|
|
1066
|
+
description = "Zimperium (zShield)"
|
|
1067
|
+
url = "https://www.zimperium.com/zshield"
|
|
1068
|
+
sample = "9512c46d99cdca1914a9f86870aa1c49845701abe1c63365ba2681d658c19941" // com.dbs.dbspaylah v6.2.0
|
|
1069
|
+
author = "Eduardo Novella"
|
|
1070
|
+
|
|
1071
|
+
strings:
|
|
1072
|
+
/**
|
|
1073
|
+
assets/jkhybtvppg.szip
|
|
1074
|
+
assets/jkhybtvppg/0.odex
|
|
1075
|
+
assets/jkhybtvppg/1.odex
|
|
1076
|
+
lib/$arch/libjkhybtvppg.so
|
|
1077
|
+
|
|
1078
|
+
assets/ztest.szip
|
|
1079
|
+
assets/ztest/0.odex
|
|
1080
|
+
lib/$arch/libztest.so
|
|
1081
|
+
*/
|
|
1082
|
+
$lib = /lib\/(arm.*|x86.*)\/lib.*\.so/
|
|
1083
|
+
$asset1 = /assets\/.*\/0\.odex/
|
|
1084
|
+
$asset2 = /assets\/.*\.szip/
|
|
1085
|
+
|
|
1086
|
+
condition:
|
|
1087
|
+
is_apk and all of them
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1090
|
+
rule nesun_apk : packer
|
|
1091
|
+
{
|
|
1092
|
+
meta:
|
|
1093
|
+
description = "Nesun"
|
|
1094
|
+
url = "http://nesun.cn"
|
|
1095
|
+
sample = "13735b73994231e25393a1847e1111c9741cc112315b3f0d4f775a62ab58ae5d"
|
|
1096
|
+
author = "Abhi"
|
|
1097
|
+
|
|
1098
|
+
strings:
|
|
1099
|
+
$lib = /lib\/(arm.*|x86.*)\/libzprotect\.so/
|
|
1100
|
+
|
|
1101
|
+
condition:
|
|
1102
|
+
is_apk and $lib
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
rule gpresto_apk : packer
|
|
1106
|
+
{
|
|
1107
|
+
meta:
|
|
1108
|
+
description = "G-Presto (anti-cheat)"
|
|
1109
|
+
url = "https://www.largosoft.co.kr/"
|
|
1110
|
+
sample = "44558c6c758b1ecf42ecda9981240d50c32f42e0d2be4693e37e39f8eb3a3488"
|
|
1111
|
+
author = "Abhi"
|
|
1112
|
+
|
|
1113
|
+
strings:
|
|
1114
|
+
$lib = /lib\/(arm.*|x86.*)\/libATG_L\.so/
|
|
1115
|
+
$assets = /assets\/ATG_E.*\.sec/
|
|
1116
|
+
$assetslib = "assets/libData.so"
|
|
1117
|
+
|
|
1118
|
+
condition:
|
|
1119
|
+
is_apk and 2 of them
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
rule kiwisec_apk : packer
|
|
1123
|
+
{
|
|
1124
|
+
meta:
|
|
1125
|
+
description = "KiwiSec"
|
|
1126
|
+
url = "https://en.kiwisec.com/"
|
|
1127
|
+
sample = "d108652bd1b685765e3ada2b7376e3c3ff67f8162afcf8bad91e0aef79b7b08a"
|
|
1128
|
+
author = "Abhi"
|
|
1129
|
+
|
|
1130
|
+
strings:
|
|
1131
|
+
$lib = /lib\/(arm.*|x86.*)\/libkiwicrash\.so/
|
|
1132
|
+
$lib2 = /lib\/(arm.*|x86.*)\/libkiwi_dumper\.so/
|
|
1133
|
+
$lib3 = /lib\/(arm.*|x86.*)\/libKwProtectSDK\.so/
|
|
1134
|
+
$lib4 = /lib\/(arm.*|x86.*)\/libkwsdataenc\.so/
|
|
1135
|
+
$lib5 = /lib\/(arm.*|x86.*)\/libkadp\.so/
|
|
1136
|
+
$lib6 = /lib\/(arm.*|x86.*)\/libwhite-box\.so/
|
|
1137
|
+
|
|
1138
|
+
condition:
|
|
1139
|
+
is_apk and 2 of them
|
|
1140
|
+
}
|
|
1141
|
+
|
|
1142
|
+
rule dingxiang_apk : packer
|
|
1143
|
+
{
|
|
1144
|
+
meta:
|
|
1145
|
+
description = "DingXiang"
|
|
1146
|
+
url = "https://www.dingxiang-inc.com/business/android"
|
|
1147
|
+
sample = "788ebabd9b5464c5e86b3832e4a7b6e7c91cce5603ff17f214429400ba3bb2b9" // net.crigh.cgsport
|
|
1148
|
+
author = "Abhi"
|
|
1149
|
+
|
|
1150
|
+
strings:
|
|
1151
|
+
$lib = /lib\/(arm.*|x86.*)\/libsys_misc\.so/
|
|
1152
|
+
$assets = /assets\/csn.*\.data\d?/
|
|
1153
|
+
$assets2 = "assets/__param.data"
|
|
1154
|
+
$assets3 = "assets/__version.txt"
|
|
1155
|
+
$dsnstub = "dsnstub000.vd"
|
|
1156
|
+
|
|
1157
|
+
condition:
|
|
1158
|
+
is_apk and 2 of them
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1161
|
+
rule manxi_sec : packer
|
|
1162
|
+
{
|
|
1163
|
+
meta:
|
|
1164
|
+
description = "Manxi Security"
|
|
1165
|
+
url = "https://www.manxi-inc.com/en/"
|
|
1166
|
+
sample = "9803121e89d5609215dc736b11cf5cf0a7d56ddfe5ac9ab71eb2b2883f427ac2" // cn.dict.android.pro (6.1.37)
|
|
1167
|
+
author = "Abhi"
|
|
1168
|
+
|
|
1169
|
+
strings:
|
|
1170
|
+
$a1 = /assets\/mxsafe\/(arm.*|x86.*)\/libdSafeShell\.so/
|
|
1171
|
+
$a2 = /assets\/mx\/(arm.*|x86.*)\/libmxacc\.so/
|
|
1172
|
+
$a3 = /lib\/(arm.*|x86.*)\/libmanxi\.so/
|
|
1173
|
+
$a4 = "assets/mxsafe.data"
|
|
1174
|
+
$a5 = "assets/mxsafe.config"
|
|
1175
|
+
$a6 = "assets/mxsafe.jar"
|
|
1176
|
+
|
|
1177
|
+
condition:
|
|
1178
|
+
is_apk and any of them
|
|
1179
|
+
}
|
|
1180
|
+
|
|
1181
|
+
rule dexprotectx : packer
|
|
1182
|
+
{
|
|
1183
|
+
meta:
|
|
1184
|
+
description = "DexProtect X (DexShellx)"
|
|
1185
|
+
url = "https://dexprotectx.pro"
|
|
1186
|
+
url2 = "https://t.me/DexShell_x"
|
|
1187
|
+
sample = "72e8685df3168c947190a4ccb76ca26de3762bfe5560549545e935b09c8893df" // com.x.dexprotectx
|
|
1188
|
+
author = "Abhi"
|
|
1189
|
+
|
|
1190
|
+
strings:
|
|
1191
|
+
$a1 = "assets/libVMDexShellx.so"
|
|
1192
|
+
$a2 = /assets\/dexshell\/(arm.*|x86.*)\/libdexshell\.so/
|
|
1193
|
+
$a3 = "assets/DexShell.mp3"
|
|
1194
|
+
|
|
1195
|
+
condition:
|
|
1196
|
+
is_apk and any of them
|
|
1197
|
+
}
|