ClrGuard

Discussion in 'other security issues & news' started by itman, Sep 30, 2017.

  1. itman

    itman Registered Member

    Joined:
    Jun 22, 2010
    Posts:
    8,593
    Location:
    U.S.A.
    Interesting new tool in development:
    https://github.com/endgameinc/ClrGuard

    Casey Smith recently tested it against an exploited MSBuild exec with Mimikatz Inside

    CLRGuard - Let's Kick the Door Down. Part One
    http://subt0x10.blogspot.com/
     
    Last edited: Sep 30, 2017
  2. WildByDesign

    WildByDesign Registered Member

    Joined:
    Sep 24, 2013
    Posts:
    2,587
    Location:
    Toronto, Canada
    This is not recommended for production systems yet but has tremendous potential for blocking many .NET/C# related application whitelisting bypasses which are typically nearly impossible to control. I've been playing with ClrGuard for a couple of days now and following with a good amount of curiosity.
     
  3. EASTER

    EASTER Registered Member

    Joined:
    Jul 28, 2007
    Posts:
    11,126
    Location:
    U.S.A. (South)
    Like these new experimental concepts. The more the merrier.

    @WildByDesign is quite right it has excellent potential!
     
  4. itman

    itman Registered Member

    Joined:
    Jun 22, 2010
    Posts:
    8,593
    Location:
    U.S.A.
    The concept behind CLRGuard is good. Its current execution method is not. Nor is it new or unique. Zemana Anti-logger loads its hook .dll into at process startup via AppInitDll reg. key. Anything sitting in AppInitDll reg. key is a security risk and Microsoft deprecated its use some time ago. Malware can and has modified settings in that reg. key including removal of security software hooks resident there.

    Enhancements are need to set the hook dynamically and only in vulnerable Windows processes such as system utilities that are currently being abused by malware developers. The most common tactic being to hide the UAC evaluation request.
     
  5. itman

    itman Registered Member

    Joined:
    Jun 22, 2010
    Posts:
    8,593
    Location:
    U.S.A.
  6. WildByDesign

    WildByDesign Registered Member

    Joined:
    Sep 24, 2013
    Posts:
    2,587
    Location:
    Toronto, Canada
    A nice article about capturing details of in memory .NET attacks and some coverage of ClrGuard as well.

    Hunting For In-Memory .NET Attacks
    Link: https://www.endgame.com/blog/technical-blog/hunting-memory-net-attacks

     
  7. itman

    itman Registered Member

    Joined:
    Jun 22, 2010
    Posts:
    8,593
    Location:
    U.S.A.
    I am somewhat distressed over the AV vendors lack of attention to .Net based malware. I hope CLRGuard will at least point then in the right direction. Also using dynamic versus static hooking since permanent hooks can be disabled.
     
  8. itman

    itman Registered Member

    Joined:
    Jun 22, 2010
    Posts:
    8,593
    Location:
    U.S.A.
    Even if .Net malware can be eventually successfully detected, you can be attacked prior to .Net process execution:
    http://subt0x10.blogspot.com/2017/06/attacking-clr-appdomainmanager-injection.html
     
  9. WildByDesign

    WildByDesign Registered Member

    Joined:
    Sep 24, 2013
    Posts:
    2,587
    Location:
    Toronto, Canada
    Updated build today to add a hook for the LoadModule function as it was recently shown to have abuse potential as discovered by Matt Graeber.(@mattifestation).

    Link: https://github.com/endgameinc/ClrGuard/tree/master/dist

    Regarding: https://twitter.com/dez_/status/980809640161267717
    * see thread and go to top

    The real meat and potatoes: https://gist.github.com/mattifestation/8958b4c18d8bca9e221b29252cfee26b
    A stealthier method of loading a .NET PE in memory - via the Assembly.LoadModule method
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.