New Tool Launch - Belch 1.0.13
Check it out!! (click here)
New Tool Launch - Belch 1.0.13Check it out!! (click here)
Online TrainingView Demo (click here)
|
Managed Code Rootkits SummaryThis page introduces application level rootkit attacks on managed code environments, enabling an attacker to change the language runtime implementation, and to hide malicious code inside its core. Same concept can be applied to
For information on Java and .NET Rootkits please refer to: Java Rootkits: Java-Rootkits
.NET Rootkits: .NET-Framework-Rootkits
Java & .NET were chosen as case studies, since their execution model similar to each other and to other platforms, and since they're used today by most new development projects.
What are Managed Code Rootkits (MCR)?
MCR are Application level rootkits, hidden inside the managed code environment libraries. Their target is the managed code runtime (the VM) providing services to the upper level applications. MCR main influence is on the upper level application, by controlling their execution code in single control point.
While traditional rootkits usually hide some information from the OS (Hiding their presence, hiding files, processes, registry keys, ports, etc…), MCR can do the same, but by hiding from the upper level applications. Another characteristics of MCR is that they can cause sophisticated logical behavior modification, as will described later on.
Code reviews will not detect backdoors installed inside the VM since the payload is not in the code itself, but rather it is inside the VM implementation. Writing MCR will enable the attacker to install a reverse shell inside the framework, to steal valuable information, to fixate encryption keys, disable security checks and to perform other nasty things.
Since MCR's act as a part of the sandbox, they have access to low level, private methods. They can also change the virtual machine’s implementation. By performing direct modification of the library intermediate bytecode, the application cannot detect the presence of a rootkit. The modified sanbox “lies” to the application.
It is important to mention that there are Non evasive (“by design”) legitimate ways of tampering with the sandbox behavior:
MCR advantages to the attacker
Attack scenarios
MCR is not an exploit. It requires having admin level access to the machine, since messing with the sandbox usually requires admin privileges (due to ACL restriction).
So the attacker somehow got access to the target machine.What’s next?
Attacker installs a MCR, capable of
Method Injection
Injecting a new method enables to extend the runtime environment with general purpose “malware API” implemented as new methods
Those functions can live “Side by side” with other methods - they can be injected separately or at once without interfering with each other. Now all the payload needs to do is call the requested injected method and supply the correct parameters.
Some examples:
Attacking the "Object" class All classes automatically extend the class “Object” - they inherit its member variables & methods and by that they contain generic code recieved from Object. Injecting a new method to “Object” class will influence ALL existing classes, so a rootkit can be injected to Object in order to take control of all the instantiated objects.
Example method: report current object variables to attacker
private void SendVariables(string attackerAddress)
Call for action
People should be aware of MCR. They should pay close attention to the status their application VM runtime code in order to prevent/detect modifications.
Knowing about MCR is relevat to everyone:
|
Contact Us
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||