What is cloaking in Android malware?

Cloaking is a technique used by some Android malware to evade detection and analysis by security solutions or users. On other words, its process of using multiple techniques to making certain in-app behaviors dependent on specific conditions in order to avoid the detection or witness of those behavior.

Why understanding clocking is important for malware analyzers

Universal Cloaking Techniques

Even across multiple platforms campaigns successfully utilizing cloaking usually include most of the following elements:

  1. Setting up a C2 infrastructure to invoke specific behaviors based on network responses. Your C2 controller say to agent what and when to do some works
  2. Gathering client-side data about the system resulting in a fingerprint that can be reproduceable across install attempts, generally results in a persistent device identifier either provided system or unique to the campaign itself
  3. The unique device identifier is often accompanied by a one time installation ID allowing the camping to track number of attempts per persistent device identifier. For example if C2 controller sees a device installed the app more than four times in 24-hours is potential analyst not going target them.
  4. Ensuring network requests aren’t coming from blocked ASN such as a cloud provider, VPN-provider, or a known AV vendor. Most of AV vendors register net-blocks and malware C2 controller can find them.
  5. Server-side systems in place to block behaviors for certain device IDs.

Common Android Device Checks