All Projects → n4r1b → ferrisetw

n4r1b / ferrisetw

Licence: other
Basically a KrabsETW rip-off written in Rust

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to ferrisetw

EVTX-ETW-Resources
Event Tracing For Windows (ETW) Resources
Stars: ✭ 142 (+545.45%)
Mutual labels:  tracing, etw
NanoSoft
A forum system built using plain php dedicated for C#.NET Developers
Stars: ✭ 20 (-9.09%)
Mutual labels:  microsoft
thundra-agent-python
Thundra Lambda Python Agent
Stars: ✭ 36 (+63.64%)
Mutual labels:  tracing
auxlib
Full reversing of the Microsoft Auxiliary Windows API Library and ported to C
Stars: ✭ 19 (-13.64%)
Mutual labels:  microsoft
gpu-pathtracer
physically based path tracer on gpu
Stars: ✭ 44 (+100%)
Mutual labels:  tracing
Splunk-ETW
A Splunk Technology Add-on to forward filtered ETW events.
Stars: ✭ 26 (+18.18%)
Mutual labels:  etw
azure-data-services-go-fast-codebase
Code base for the Azure Data Services Go Fast Framework. A framework for rapid deployment and configuration of common Azure Data Services Architectures.
Stars: ✭ 58 (+163.64%)
Mutual labels:  microsoft
powerapps-packagedeployer-template
Enhanced deployment capabilities when deploying with the Power Apps Package Deployer.
Stars: ✭ 18 (-18.18%)
Mutual labels:  microsoft
uptrace
Open source APM: OpenTelemetry traces, metrics, and logs
Stars: ✭ 1,187 (+5295.45%)
Mutual labels:  tracing
perforator
Record "perf" performance metrics for individual functions/regions of an ELF binary.
Stars: ✭ 33 (+50%)
Mutual labels:  tracing
Azure-Sentinel-4-SecOps
Microsoft Sentinel SOC Operations
Stars: ✭ 140 (+536.36%)
Mutual labels:  microsoft
ContextMenuForWindows11
Add Custom Context Menu For Windows11
Stars: ✭ 693 (+3050%)
Mutual labels:  microsoft
go-distsys
Distributed Systems programming examples in the Go programming language.
Stars: ✭ 101 (+359.09%)
Mutual labels:  tracing
active-directory-b2c-javascript-hellojs-singlepageapp
A single page app, implemented with an ASP.NET Web API backend, that signs up & signs in users using Azure AD B2C and calls the web API using OAuth 2.0 access tokens.
Stars: ✭ 63 (+186.36%)
Mutual labels:  microsoft
Microsoft365
Manage Microsoft 365 with PowerShell
Stars: ✭ 30 (+36.36%)
Mutual labels:  microsoft
libedge
Microsoft Edge Microsoft Edge主页算法
Stars: ✭ 17 (-22.73%)
Mutual labels:  microsoft
Performance-Engineers-DevOps
This repository helps performance testers and engineers who wants to dive into DevOps and SRE world.
Stars: ✭ 35 (+59.09%)
Mutual labels:  microsoft
latex in word
LaTeX equation edition in a macro-enabled Word document
Stars: ✭ 29 (+31.82%)
Mutual labels:  microsoft
javaagent
Hypertrace OpenTelemetry Java agent with payload/body and headers data capture.
Stars: ✭ 13 (-40.91%)
Mutual labels:  tracing
ETWNetMonv3
ETWNetMonv3 is simple C# code for Monitoring TCP Network Connection via ETW & ETWProcessMon/2 is for Monitoring Process/Thread/Memory/Imageloads/TCPIP via ETW + Detection for Remote-Thread-Injection & Payload Detection by VirtualMemAlloc Events (in-memory) etc.
Stars: ✭ 32 (+45.45%)
Mutual labels:  etw

FerrisETW 🦀

Basically a KrabsETW rip-off written in Rust, hence the name Ferris 🦀

All credits go to the team at Microsoft who develop KrabsEtw, without it, this project probably wouldn't be a thing.

Motivation

Since lately I've been working very closely with ETW and Rust, I thought that having a tool that would simplify ETW management written in Rust and available as a crate for other to consume would be pretty neat and that's where this crate comes into play 🔥

Examples

You can find a few examples within the Examples folder. If you are familiar with KrabsETW you'll see that is very similar In case you've never used KrabsETW before, the examples are very straight forward and should be easy to follow. If you have any issues don't hesitate in asking.

The following snippet shows the basic usage of the library

fn wmi_callback(record: EventRecord, schema_locator: &mut SchemaLocator) {
    // We locate the Schema for the Event
    match schema_locator.event_schema(record) {
        Ok(schema) => {
            // We filter the event by EventId
            if schema.event_id() == 12 {
                // We obtain the Parser for the Schema
                let mut parser = Parser::create(&schema);
                // We parse the data from the Event based on the names of the fields of the Event
                // Type annotations or Fully Qualified Syntax are needed when calling TryParse
                let op: String = parser
                    .try_parse("Operation")
                    .unwrap_or(String::from("Operation missing"));
                let provider_name: String = parser
                    .try_parse("ProviderName")
                    .unwrap_or(String::from("ProviderName missing"));
                // Could also use String as type
                let provider_guid: GUID =
                    parser.try_parse("ProviderGuid").unwrap_or(GUID::zeroed());
                println!(
                    "WMI-Activity -> ProviderName {}, ProviderGuid: {:?}, Operation: {}",
                    provider_name, provider_guid, op
                );
            }
        }
        Err(err) => println!("Error {:?}", err),
    };
}

fn main() {
    // We first build a Provider
    let wmi_provider = Provider::new()
        .by_guid("1418ef04-b0b4-4623-bf7e-d74ab47bbdaa") // Microsoft-Windows-WMI-Activity
        .add_callback(wmi_callback)
        .build()
        .unwrap();
  
    // We enable the Provider in a new Trace and start the trace
    // This internally will launch a new thread
    let mut trace = UserTrace::new().enable(wmi_provider).start().unwrap();

    std::thread::sleep(Duration::new(20, 0));
  
    // We stop the trace
    trace.stop();
}

Documentation

I'm having some trouble to get docs.rs to build the documentation for the crate so at the moment is being hosted on my domain. FerrisETW Doc

Notes

  • The project is still WIP, there's still plenty of things to evaluate/investigate and things to fix and do better. Any help would be greatly appreciated, also any issues you may have!

  • The types available for parsing are those that implement the trait TryParse for Parser, basic types are already implemented. In the near future I'll add more :)

  • I tried to keep dependencies as minimal as possible, also you'll see I went with the new windows-rs instead of using the winapi. This is a personal decision mainly because I believe the Windows bindings is going to be the "standard" to interact with the Windows API in the near future.

  • Although I encourage everyone to use Rust, I do believe that, at the moment, if you plan on interacting with ETW in a production level and the programming language is not a constraint you should definitely go with KrabsETW as a more robust and tested option. Hopefully in next iterations I'll be able to remove this disclaimer 😃

Acknowledgments

  • First of all, the team at MS who develop KrabsETW!!
  • Shaddy for, pretty much, teaching me all the Rust I know 😃
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].