mandiant / strace Goto Github PK
View Code? Open in Web Editor NEWA DTrace on Windows Reimplementation
License: MIT License
A DTrace on Windows Reimplementation
License: MIT License
it seems that after using some kernel32.lib apis :
the tool returns :
12:10:06.446 INF #3 14976 Log has been initialized.
12:10:06.446 INF #3 14976 Starting DLL load
12:10:06.446 ERR #3 14976 [!] DLL Imports GetPrivateProfileStringA from KERNEL32.dll. Imports are not supported...fatal
12:10:06.446 ERR #3 14976 [!] DLL Imports GetFullPathNameA from KERNEL32.dll. Imports are not supported...fatal
12:10:06.446 ERR #3 14976 [!] DLL Load Failed
12:10:06.446 ERR #3 14976 [!] Plugin Loading Failed
or is it limited to the KernelLand apis only ?
The PID and FBT probe types can't be supported until the signing requirements of the dtrace system/kernel extensions is changed by microsoft - as they use the windows hypervisor which doesn't boot when SB and DSE are set to off. The ETW probe type however doesn't rely on the hypervisor and should be implementable. If someone wants to perform that research, lets chat here.
i keep having this error on the CLI .
[+] Opening driver
[+] Driver Opened Successfully
Input command: load, unload, exit
LOAD
Input command: load, unload, exit
LOAD
Input command: load, unload, exit
load
[+] Asking for plugin
Input command: load, unload, exit
load
Instead of blowing up the driver plugin architecture issue more, I figured I would create a separate issue. A lot of the plugins have a cut and paste of the same header files. I say we create a single shared include folder. There needs to be some thought into which projects will share what considering we have three subsystems here: STrace driver, plugins, CLI. This is a lot easier now that plugins live in drivers and we don't need a complex interface anymore.
If anyone wants to create a plugin there are a lot of little settings in the project that would lend better to a template. Also a lot of skeleton code. Instead of asking people to copy another plugin and make it work we can have a nice template for a new plugin.
Allow plugins to have configs. When logging syscalls we hardcode our target binary. We could support more than one binary, change binary on the fly, even have a follow children option.
Have a default config for a plugin then a way to read and write the plugin from the CLI.
ZwLoadDriver
and ZwUnloadDriver
GetProcAddress
ZwLoadDriver
and ZwUnloadDriver
require a Registry path. Since STrace is a single plugin architecture the plugin will always be Registry\Machine\System\CurrentControlSet\Services\StracePlugin
, with a binary path of \\systemroot\\system32\drivers\StracePlugin.sys
. It will be the responsibility of the CLI to rename the plugin chosen as done prior and copy it to StracePlugin.sys. When debugging the symbols will remain the original binary to help distinguish. Possibly add an IOCTL that returns the plugin name.Hi,
I compiled the entire project on VS Community 2022 without any errors. I ran the install script as admin, and it was completed successfully. But after rebooting with DSE disabled, the STrace service did not start.
As described in readme, I tried to start it manually but I'm having the following error.
I'm using a Windows 10 VM (Flare VM) on VirtualBox with nested virtualization enabled. Is there anyone else having this issue?
There's an issue with the DDK setup in the windows image being used. I am unsure how to resolve.
Hi, I made pdb-addr2line and saw the following comment in your code:
// if a line has no end rva, the start of the next block defines it's end. Lots of symbols are like this.
How up-to-date is that comment? Do you still get lots of symbols with a missing end_rva? I tried to mostly fix this issue in pdb-addr2line 0.7.2, with these commits:
mstange/pdb-addr2line@8787f38
mstange/pdb-addr2line@0bdb486
So I'd expect basically all symbols to have an end_rva now. If this is true, it might simplify your code.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.