Skip to content

Convert DLL Plugin Architecture To Driver Architecture #21

Description

@tarterp

Converting to a Driver Plugin brings a simpler architecture:

  1. Drivers are loaded and unloaded using ZwLoadDriver and ZwUnloadDriver
  2. No manual mapping required which makes symbolic debugging easier
  3. Still use export functions, this requires custom GetProcAddress
  4. Simpler interfaces from kernel to plugin
  5. No more programming as a user dll, but run in kernel.

Architecture Decisions

  1. Keep exports, other ideas that were investigate: Driver Callbacks, Calling Drivers
  2. Minimize Plugin API functions
  3. 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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions