I Smell a RAT: Java Botnet Found in the Wild

Most of today’s malware works on Windows and its apps, because it can affect a lot of people around the world. However, other platforms are becoming more popular every day and attracting bad guys who are starting to create malicious code for other systems. (For a few examples, see BlackHoleRAT, HellRaiser RAT, and a fake-alert scam for Mac OS X.)

A further threat is cross-platform malware that can execute on Windows and Mac using Java; this type of malware can run in a multiplatform Java Virtual Machine. IncognitoRAT is one example of a Java-based Trojan discovered in the wild that is being downloaded and installed by another component. This malware behaves like other Windows botnets but uses source code and libraries that can operate on other platforms.

The original propagation vector of IncognitoRAT is a Windows executable, but apparently it was created using the tool JarToExe, which includes, among other features, the ability to convert .jar files into .exe files, to add program icons and version information, and protect and encrypt Java programs. The victim’s machine has to have the Java Runtime Environment installed and must be online. As soon as the file is executed, it starts downloading a ZIP file with a pack of Java-based libraries to perform several remote activities:

  • Java Registry Wrapper: Used to access the Windows Registry and create an entry in Software\Microsoft\Windows\CurrentVersion\Run to execute the malware every time the computer starts
  • Java Remote Control: To view and take remote control (keyboard and mouse) of an infected machine
  • JLayer – MP3 Library: To remotely play an MP3 file on the infected machine
  • RNP-VideoPlayer: To play videos remotely
  • JavaMail: Optional Java package to send stolen information to an email account
  • Freedom for Media Java: Open-source alternative to the official Java Media Framework; used by the malware to watch and record images from a remote webcam

In additional to those libraries, the downloader drops the following .jar components:

  • JavaUpdater.jar: Decrypts the directory (full path) that will be created by the malware to place all the components on the infected machine. It implements TripleDES encryption and decryption methods. Finally, the component executes the principal malware, server.jar, using the common instructions to run Java applications in Windows (java -jar %malwarepath%/Server.jar).
  • Server.jar: Runs in the background collecting keystrokes using a DLL designed to hook the keyboard on the infected machine. Also waits for commands sent from the control server to use the libraries described above and perform other actions, such as sending the captured keystrokes in a text file to an FTP server or an email account, viewing and recording the remote webcam, performing distributed denial –of-service attacks, taking remote control of the machine, etc.

One interesting feature of this botnet that we could not replicate during our analysis is its ability to “crash” the system. Apparently, it is a fake crash because in the dropped files we found a curious image that may appear on the infected machine:

According to public information, this malicious code is available for Windows, Mac OS X, and iPhone/iPad (the last only to control infected computers). However, we’ve seen only the PC version in a downloader/dropper in the wild. McAfee products detect this malware in our latest DATs as JV/IncognitoRAT.

Introducing McAfee+

Identity theft protection and privacy for your digital life

FacebookLinkedInTwitterEmailCopy Link

Stay Updated

Follow us to stay updated on all things McAfee and on top of the latest consumer and mobile security threats.

FacebookTwitterInstagramLinkedINYouTubeRSS

More from McAfee Labs

Back to top