site Search:


 
    All Forums Hot Topics Gallery






how-to block ads


 
Search Topic:
Uniqs:
4088
Share Topic
Posting?
Post a:
Post a:
Links: ·Hijack This logs? ·Panda Free Tools ·Vundo Removal
page: 1 · 2
AuthorAll Replies

SUMware
Premium
join:2002-05-21
kudos:2

3 edits

.NET Framework Rootkits

From SecurityFocus
Nov 13 2008 -
quote:
.NET Framework Rootkits - Backdoors inside your Framework
Author: Erez Metula;

Paper Description
=================

The paper introduces a new method that enables an attacker to change the .NET language, and to hide malicious code inside its core.
It covers various ways to develop rootkits for the .NET framework, so that every EXE/DLL that runs on a modified Framework will behave differently than what it's supposed to do. Code reviews will not detect backdoors installed inside the Framework since the payload is not in the code itself, but rather it is inside the Framework implementation. Writing Framework rootkits 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 as described in this paper.

Paper Summary
============

Framework modification can be achieved by tampering with a Framework DLL and "pushing" it back into the Framework.
The process is composed of several steps, described thoroughly at the corresponding whitepaper.
It also exposes a flaw in the manner in which a .NET Framework DLL is loaded, and how it is possible to bypass its signature mechanism.
Instead of re-signing tampered DLL's with a spoofed Microsoft signature key - surprisingly, it was found during this research that the modified DLL can be directly copied to the correct location at the file system, because the SN mechanism does not check the actual signature of a loaded DLL but blindly loads the DLL based on the directory name with the corresponding signature name!
It is important to mention that this technique does not requires "full trust" permissions, which further proves the fact that the GAC / CAS protection mechanisms are broken.

This paper also introduces ".Net-Sploit" - a new tool for building MSIL rootkits that will enable the user to inject preloaded/custom payload to the Framework core DLL.

You can find the detailed whitepaper, .NET-Sploit tool, source code, and the OWASP presentation at:
»www.applicationsecurity.co.il/.N···its.aspx
[Note: At time of posting the above applicationsecurity.co link did not work for me.
Try this one: »www.applicationsecurity.co.il/en···ult.aspx
Direct link to whitepaper [PDF] here.]


microserf v1

@cgocable.net



The 'exploit' starts with the modification of a framework dll (assembly) from outside the runtime using administrative privileges. I'd hardly call that a viable rootkit but ok, let's run with it.

Changes to an assembly can be detected with a signature check but the CLR used by the author is blindly loading Strong Name assemblies. This is not how I understood the runtime to function in a default configuration. Without an exception made by sn.exe or inserted directly into HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\, any SN assembly will have its current file hash checked against the signed one as it is loaded. The author claims this verification is not occurring within the GAC. If so, call Microsoft for a bug fix.

Without this initial compromise the rest of the paper is useless. I'll wait for someone to explain why the CLR is not working as (I thought) it should.


SUMware
Premium
join:2002-05-21
kudos:2

1 edit

said by microserf v1 :

The author claims this verification is not occurring within the GAC. If so, call Microsoft for a bug fix.
said by whitepaper :
Microsoft response team assigned the GAC protection bypass case the track number of "MSRC 8566gs", but even if the GAC bypass will be fixed it'll surely be possible to mount the attacks described in this paper in some other way, since an attacker who has administrator level privileges on a machine can do everything anyway.

Conclusions
Modification of the framework behavior can lead to some very interesting results as seen in this paper. An attacker who has managed to compromise your machine can backdoor your framework, leaving rootkits behind without any traces. Those rootkits can turn the framework upside down, letting the attacker do everything he wants while his malicious code is hidden deep inside the framework DLL’s. As the owner of the machine, there’s not much you can do about that. You can use external file tampering detectors, such as tripwire, in a scenario where you have another machine that monitors your machine. Microsoft, as the developer of the Framework, should give the .NET Framework a kernel level modification protection.


NetFixer
Freedom is NOT free
Premium
join:2004-06-24
The 'Boro
Reviews:
·Vonage
·Cingular Wireless
·Comcast
·AT&T Southeast

said by Erez Metula :

As the owner of the machine, there's not much you can do about that.
Actually, that is not an entirely accurate statement. One can do as I have done for quite some time and simply refuse to install and use any application that uses the .NET Framework, and let the vendor know the reason why their application is unacceptable to you. The software vendors who utilize the .NET Framework probably don't care if you like it or not, but it never hurts to voice your opinion.
--
A well-regulated militia, being necessary to the security of a free State, the right of the people to keep and bear arms shall not be infringed.
»portscan.dcs-net.net
»nature-pics.com

OZO
Premium
join:2003-01-17
kudos:2

That is exactly my point as well. I refuse to participate in testing new and new incompatible frameworks on my computers. I understand that development with NET may be easier, but as a consumer - I'll better wait until it settles down to finally workable solution...
--
Keep it simple, it'll become complex by itself...


redwolfe_98
Premium
join:2001-06-11
kudos:1

reply to SUMware
i agree with you, netfixer.. i hate having "NETFramework" installed, but my ati (video card) driver-package requires it..

as far as i know, hewlett-packard "printer" driver-packages also require "NETFramework"..


OZO
Premium
join:2003-01-17
kudos:2

1 edit

What if you will install driver only - does it require .NET too?


redwolfe_98
Premium
join:2001-06-11
kudos:1

1 edit

said by OZO:

What if you will install driver only - does it require .NET too?
the ati driver, alone, does not require NETFramework, but the "catalyst control center" does require it..

i am not that familiar with working with "hewlett-packard" drivers, so i don't know if you can work around not having "NETFramework", with them, or not.. in my experience with installing the regular HP driver-packages, which is the only ones that i have used, NETFramework is installed as part of the installation-process, when the drivers are being installed..


NetFixer
Freedom is NOT free
Premium
join:2004-06-24
The 'Boro
Reviews:
·Vonage
·Cingular Wireless
·Comcast
·AT&T Southeast

1 edit

reply to redwolfe_98

said by redwolfe_98:

i agree with you, netfixer.. i hate having "NETFramework" installed, but my ati (video card) driver-package requires it..

as far as i know, hewlett-packard "printer" driver-packages also require "NETFramework"..
That sux for you.

Fortunately for me, the ATI video cards and HP printers in use on my Windows 2k & XP systems work just fine using the builtin O/S drivers (the same applies for my Linux systems), so no .NET crap was required on my Windows systems. I did try the ATI supplied RADEON package on one PC, but the overhead and security risks of the .NET crap made me remove it after a brief test. I saw no benefit to me for using the bloated ATI package.
--
A well-regulated militia, being necessary to the security of a free State, the right of the people to keep and bear arms shall not be infringed.
»portscan.dcs-net.net
»nature-pics.com

OZO
Premium
join:2003-01-17
kudos:2

reply to redwolfe_98
If in the printer package you have a folder with *.INI file along with set of other files (usually with *.dl_ extensions) you may install the driver directly. In this case you do not have to run any "setup" program from the package (and it will not install any .NET). That's the way I install my drivers.



salzan
Experienced Optimist
Premium
join:2004-01-08
WA State

reply to redwolfe_98

said by redwolfe_98:

the ati driver, alone, does not require NETFramework, but the "catalyst control center" does require it..
You can use ATI Tray Tools instead of the Catalyst Control Center. No need of .NET for ATI cards.

I have avoided .NET completely.


jdong
Eat A Beaver, Save A Tree.
Premium
join:2002-07-09
Rochester, MI
kudos:1

reply to SUMware
Well I'm not sure if I consider this much of a security problem -- I mean, replacing a .NET library with a malicious one with similar API calls but malicious payloads causing bad effects should NOT be a surprise.

That's like saying replacing Notepad with a reformatter causes you to lose data when clicking on a Notepad shortcut later on. You need to be priviledged in order to be able to tinker with the actual framework .dlls to begin with, at which point you can reign so much hell on the system that this is a moot point.
--
Ubuntu MOTU Developer and Forums Council



AB
Premium
join:2006-04-04
Leesburg, VA
kudos:3
Reviews:
·Verizon Online DSL

reply to redwolfe_98

said by redwolfe_98:

. . i am not that familiar with working with "hewlett-packard" drivers, so i don't know if you can work around not having "NETFramework", with them, or not.. in my experience with installing the regular HP driver-packages, which is the only ones that i have used, NETFramework is installed as part of the installation-process, when the drivers are being installed..
The HP AIO printer I use (1200 series, which is an older one) has no reliance upon .NET Framework.

SUMware
Premium
join:2002-05-21
kudos:2

reply to SUMware
As stated before:

said by whitepaper :
It is important to mention that the technique described in this paper is considered as a post exploitation type attack! Such attacks are usually deployed after an attacker has managed to penetrate a system (using some other attack) and want to leave backdoors and rootkits behind, for further exploitation. In other words, changing the Framework requires administrator level privileges.

And, although it goes without saying - you must have administrator level permissions to overwrite the DLL, since this is a post exploitation attack…


jdong
Eat A Beaver, Save A Tree.
Premium
join:2002-07-09
Rochester, MI
kudos:1

Right, exactly. And it's a shame people are suddenly using this to fear-monger the .NET framework as if somehow non-.NET native based runtimes are not affected by tampering in this manner?
--
Ubuntu MOTU Developer and Forums Council



AB
Premium
join:2006-04-04
Leesburg, VA
kudos:3
Reviews:
·Verizon Online DSL

said by jdong:

. . it's a shame people are suddenly using this to fear-monger the .NET framework as if somehow non-.NET native based runtimes are not affected by tampering in this manner?
You're saying then, that if I gave remote Administrative write permissions to some pimply-faced Russian teenager, he could do more than alter my .NET Framework .DLLs?

Is that what you're trying to claim?


jdong
Eat A Beaver, Save A Tree.
Premium
join:2002-07-09
Rochester, MI
kudos:1

said by AB:

You're saying then, that if I gave remote Administrative write permissions to some pimply-faced Russian teenager, he could do more than alter my .NET Framework .DLLs?

Is that what you're trying to claim?
Not only that -- I am also claiming that this CAN'T POSSIBLY HAPPEN if you don't use .NET. For the 20 year history of Microsoft operating systems there are ZERO incidents of some type of malware modifying native binary executables such that when they run, they do their task and then something subtly malicious. Can't think of anything like that until .NET strong name signature checking compromises came around!
--
Ubuntu MOTU Developer and Forums Council


AB
Premium
join:2006-04-04
Leesburg, VA
kudos:3
Reviews:
·Verizon Online DSL

said by jdong:

said by AB:

You're saying then, that if I gave remote Administrative write permissions to some pimply-faced Russian teenager, he could do more than alter my .NET Framework .DLLs?

Is that what you're trying to claim?
Not only that -- I am also claiming that this CAN'T POSSIBLY HAPPEN if you don't use .NET. For the 20 year history of Microsoft operating systems there are ZERO incidents of some type of malware modifying native binary executables such that when they run, they do their task and then something subtly malicious. Can't think of anything like that until .NET strong name signature checking compromises came around!
Thank you. Just so we're straight on that.

But I believe in giving young people scriptkiddies a fair chance, and so will be keeping .NET Framework v. 2.0 on this machine.

No remote write permissions, though-- I said I was fair, not easy.


Woody79_00
I run Linux am I still a PC?
Premium
join:2004-07-08
united state

reply to SUMware
This article is Snake Oil IMO

the attacker would have to have admin access to your machine, in other words, gotten past your firewall and cracked your password.

At this juncture, I don't care eif you have .Net installed or not, your owned regardless. Besides, why would they even both with a .Net rootkit anyways, when there are much easier methods of rootkitting a system?

this article is snakeoil for that reason. If someone gets admin access to your system, your owned no matter what you have installed. .Net is no more a security risk than any other runtime or compiler.


Kiwi
Premium
join:2003-05-26
USA/MidWest
kudos:1
Reviews:
·Comcast

said by Woody79_00:

This article is Snake Oil IMO

the attacker would have to have admin access to your machine, in other words, gotten past your firewall and cracked your password.

At this juncture, I don't care eif you have .Net installed or not, your owned regardless. Besides, why would they even both with a .Net rootkit anyways, when there are much easier methods of rootkitting a system?

this article is snakeoil for that reason. If someone gets admin access to your system, your owned no matter what you have installed. .Net is no more a security risk than any other runtime or compiler.
Mirroed my own thoughts. I work with .NET, but not by choice. Regardless, I do believe Woody nailed this down, certainly not a drive by thing for sure. There are a couple of other remarks that had been made, I noted my head nodding up and down

Thursday, 31-May 04:25:02 Terms of Use & Privacy | feedback | contact | Hosting by nac.net - DSL,Hosting & Co-lo
over 12.5 years online © 1999-2012 dslreports.com.
Most commented news this week
Hot Topics