An app could download and execute dynamic code (not included in the original application package) after installation to evade static analysis techniques (and potentially dynamic analysis techniques) used for application vetting or application store review.[1]
On Android, dynamic code could include native code, Dalvik code, or JavaScript code that uses the Android WebView's JavascriptInterface capability.[2]
On iOS, techniques also exist for executing dynamic code downloaded after application installation.[3][4]
ID | Name | Description |
---|---|---|
S0422 | Anubis | |
S0293 | BrainTest |
Original samples of BrainTest download their exploit packs for rooting from a remote server after installation.[6] |
S0432 | Bread |
Bread has utilized JavaScript within WebViews that loaded a URL hosted on a Bread-controlled server which provided functions to run. Bread downloads billing fraud execution steps at runtime.[7] |
S0655 | BusyGasper |
BusyGasper can download a payload or updates from either its C2 server or email attachments in the adversary’s inbox.[8] |
S0529 | CarbonSteal |
CarbonSteal can dynamically load additional functionality.[9] |
S0480 | Cerberus |
Cerberus can update the malicious payload module on command.[10] |
S0555 | CHEMISTGAMES |
CHEMISTGAMES can download new modules while running.[11] |
S0505 | Desert Scorpion |
Desert Scorpion has been distributed in multiple stages.[12] |
S0550 | DoubleAgent |
DoubleAgent has downloaded additional code to root devices, such as TowelRoot.[9] |
S0420 | Dvmap |
Dvmap can download code and binaries from the C2 server to execute on the device as root.[13] |
S0507 | eSurv |
eSurv’s Android version is distributed in three stages: the dropper, the second stage payload, and the third stage payload which is Exodus.[14] |
S0478 | EventBot | |
S0405 | Exodus |
Exodus One, after checking in, sends a POST request and then downloads Exodus Two, the second stage binaries.[16] |
S0577 | FrozenCell |
FrozenCell has downloaded and installed additional applications.[17] |
S0535 | Golden Cup |
Golden Cup has been distributed in two stages.[18] |
S0551 | GoldenEagle |
GoldenEagle can download new code to update itself.[9] |
S0536 | GPlayed |
GPlayed has the capability to remotely load plugins and download and compile new .NET code.[19] |
S0544 | HenBox | |
S0325 | Judy |
Judy bypasses Google Play's protections by downloading a malicious payload at runtime after installation.[21] |
S0485 | Mandrake |
Mandrake can download its second (Loader) and third (Core) stages after the dropper is installed.[22] |
S0295 | RCSAndroid |
RCSAndroid has the ability to dynamically download and execute new code at runtime.[23] |
S0539 | Red Alert 2.0 |
Red Alert 2.0 can download additional overlay templates.[24] |
S0549 | SilkBean |
SilkBean can install new applications which are obtained from the C2 server.[9] |
S0327 | Skygofree |
Skygofree can download executable code from the C2 server after the implant starts or after a specific command.[25] |
S0324 | SpyDealer |
SpyDealer downloads and executes root exploits from a remote server.[26] |
S0545 | TERRACOTTA |
TERRACOTTA can download additional modules at runtime via JavaScript |
S0424 | Triada |
Triada utilizes a backdoor in a Play Store app to install additional trojanized apps from the Command and Control server.[28] |
S0506 | ViperRAT |
ViperRAT has been installed in two stages and can secretly install new applications.[29] |
G0112 | Windshift |
Windshift has included malware functionality capable of downloading new DEX files at runtime during Operation BULL.[30] |
S0489 | WolfRAT | |
S0494 | Zen |
Zen can dynamically load executable code from remote sources.[32] |
S0287 | ZergHelper |
ZergHelper attempts to extend its capabilities via dynamic updating of its code.[33] |
ID | Mitigation | Description |
---|---|---|
M1005 | Application Vetting |
Application vetting techniques could (either statically or dynamically) look for indications that the application downloads and executes new code at runtime (e.g., on Android use of DexClassLoader, System.load, or the WebView JavaScriptInterface capability, or on iOS use of JSPatch or similar capabilities). Unfortunately, this is only a partial mitigation, as additional scrutiny would still need to be applied to applications that use these techniques, as the techniques are often used without malicious intent, and because applications may employ other techniques such as to hide their use of these techniques. |
M1006 | Use Recent OS Version |
On Android 10 and above devices, applications that target Android API level 29 or higher cannot execute native code stored in the application's internal data storage directory, limiting the ability of applications to download and execute native code at runtime.[34] |
Downloading new code at runtime can be difficult to detect, and therefore enterprises may be better served focusing on detection at other stages of adversary behavior.