Upon launching the application, the user is shown an attacker-defined message screen asking the user to enable the Accessibility Service permission for the application, as shown in the figure below. The Accessibility Service is a legitimate feature on Android phones to assist users with disabilities, however due to the inherent nature of the service, the feature may provide a threat actor with highly granular control over a victim's phone if enabled. If Copybara is installed and not granted the accessibility permission, the malware repeatedly shows notifications and toast messages (as shown in the figure below) to coerce the victim into enabling the service.
Figure 3 : Example Copybara launch screen without the accessibility permission enabled.
If the service is enabled, the user is shown another attacker-defined screen, as shown in the figure below.
Figure 4: Example screenshot of Copybara after the Accessibility Service feature is enabled.
Once the Accessibility Service feature is enabled, the application prevents the user from accessing some options in the Settings menu, ensuring they are unable to uninstall Copybara. In the background, the malware’s behavior is determined by its configuration. Copybara is designed to download a list of phishing pages from the C2 server. The Copybara C2 responds with a ZIP file containing counterfeit login pages that mimic popular cryptocurrency exchanges and financial institutions. During our analysis, we discovered the existence of two operational C2 servers that were actively serving the phishing pages.
The figure below shows an open directory of a live C2 server hosting Copybara phishing pages.
Figure 5: Open directory of a live Copybara C2 server hosting phishing pages.
These phishing pages are designed to deceive unsuspecting users into entering their sensitive information. As depicted in the figure below, an example of one such phishing page imitates a login page for a prominent cryptocurrency exchange.
Figure 6: An example Copybara phishing page designed to look like a popular cryptocurrency exchange.
Finally, the application initiates a connection to an MQTT server on port 52997. Copybara subscribes to a specific queue named commands_FromPC
on this server. This connection enables the application to listen for and receive various commands sent by the C2 server.
The specific commands and their descriptions are provided in the table below.
Command | Functionality |
| Opens Settings for the application (otherwise blocked for the user via the Settings menu). |
| Checks if the device admin feature is enabled. If it is not enabled, the user is prompted to enter a new lock screen password. Subsequently, the malware proceeds to lock the device screen. |
| The malware receives a list of package and filenames associated with injects from the C2 server. If a file with a matching name already exists, the malware first deletes the existing file. Subsequently, it proceeds to download a new file from the C2 server. The downloaded file is then written to disk. |
| Initializes an MQTT connection to the C2 server and then starts the device’s rear camera. |
| Initializes an MQTT connection to the C2 server and then starts the device’s front camera. |
| Ends camera activity. |
| Maximizes screen brightness. |
| Minimizes screen brightness. |
| Transmits audio from the microphone to the C2 server. |
| Stops transmitting microphone audio to the C2 server. |
| Deletes all notifications from the victim’s device. |
| Stops deleting notifications. |
| Creates a custom view using settings from the |
| Clicks on the screen at the location specified by |
| Closes the connection to the MQTT server and stops the background service. |
| Shows an overview of recent applications. |
| Downloads an application from an |
| Opens a URL provided by the C2 server. |
| Dismisses open notifications. |
| Performs an action specified by the C2 server. The IDs specified by the C2 server correspond to the global actions provided by the Accessibility Service. |
| Based on the value of the |
| Based on the value of the |
| Turns off the screen capture feature on the victim’s device. |
| Streams the screen activity of the infected device to the MQTT server. The stream is published to the MQTT server in a queue named |
| Downloads an image from the C2 server. The specific image name, referred to as |
| Minimizes screen brightness and sets a black background. |
| Displays a webview that opens a specific URL provided by the server through the |
| Displays a webview containing HTML content that is determined by objects received from the server, such as |
| Removes an overlay from the screen. |
| Sets a flag value based on the |
| Retrieves a list of installed packages on the infected device and sends this information to the MQTT server by publishing it to a queue called |
| Enables or disables the keylogger functionality based on the value of the |
| Carries out a gesture on the screen based on the values |
| Sets the text value, as specified by the |
| Sets a flag based on the value of the |
| Clears browser history and wipes data on the device. |
| Initiates a phone call to a specific number provided by the C2 server through the |
| Adjusts the image quality of screenshots sent to the C2 server based on the value provided by the |
| Publishes contact information from the device to the MQTT server at a queue named |
| Executes an Accessibility Service action on the phone, depending on the value of the |
| Adjusts the frames per second (fps) value based on the |
| Hides or displays the application icon in the phone menu based on the value of the |
| Disables the lock screen. |
| Requests a specific permission based on the value of the |
| Initiates the launch of a specific application as indicated by the |
| Deletes a specific application, as indicated by the |
| Enables the blocking of notifications for a specific application as indicated by the |
| Blocks the user from opening a specific application as indicated by the |
| Performs a swipe action using the values |
| Performs a swipe action using the values for firstX, firstY, secondX, secondY, and intSpeed provided by the C2 server. |
| Performs a swipe action using the values for |
| Enters a pattern using the values |
| Performs a gesture using the values for |
| Creates a notification using the data received from the C2 server through the parameters |
| Sets a flag based on the value of the |
| Publishes SMS messages collected from the infected device to the MQTT server at a queue named |
| Deletes a specific SMS from the phone as indicated by the |
| Sends an SMS using the phone number and SMS body specified by the |
| Sends a heartbeat message to the C2 server. |
Table 1: Copybara commands and functionalities.