Giter VIP home page Giter VIP logo

fekernshh's Introduction

FeKernShh - Neuter FeKern by unloading its driver

Usage: FeKernShh.exe <hunt|kill>

FeKern's driver it is always loaded at altitude 388360. The objective of this tool is to challenge the assumption that FireEye Activity Monitor are always collecting events. FeKernShh locates and unloads the driver using this strategy:

1. Uses fltlib!FilterFindFirst and fltlib!FilterFindNext to enumerate drivers on the system in place of crawling the registry.
2a. If a driver is found at altitude 388360, it uses kernel32!OpenProcessToken and advapi32!AdjustTokenPrivileges to grant itself SeLoadDriverPrivilege. 2b. If a driver was not found at 388360, it walks HKLM\SYSTEM\CurrentControlSet\Services looking for a "FeKern Instance" subkey and if found, assigns the required permission as desrcibed above. 3. If it was able get the required privilege, it calls fltlib!FilterUnload to unload the driver.

Defensive Guidance

There are a few interesting events surrounding this tactic that should be evaluated:

  • Sysmon Event ID 255 - Error message with a detail of DriverCommunication
  • Windows System Event ID 1 - From the source "FilterManager" stating File System Filter '\<DriverName\>' (Version 0.0, \<Timstamp\>) unloaded successfully.
  • Windows Security Event ID 4672 - SeLoadDriverPrivileges being granted to an account other than SYSTEM
  • Sysmon Event ID 1/Windows Security Event 4688 - Abnormal high-integrity process correlating with the driver unload. This event would be the last before the driver error in Sysmon

Mitre ATT&CK References: T1054, T1089

Credits ๐Ÿ™Œ

This is a PoC of an adaptation of excelent work of Shhmon repository by Matt Hand (@matterpreter).

Additional info

Allocated altitudes

Filter Manager Concepts

fekernshh's People

Contributors

socketz avatar

Stargazers

 avatar

Watchers

 avatar

fekernshh's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.