Skip to content

WP1d: LD_PRELOAD detection on process exec #4

Description

@Brad-Edwards

Context

LD_PRELOAD is the simplest injection vector on Linux. No detection of it at exec time.

Work

  • New daemon/preload_detect.{h,c}: on PROCESS_EXEC events, read /proc/<pid>/environ, scan for LD_PRELOAD=. Emit OWL_EVENT_LIB_UNEXPECTED (0x0203) if found.
  • New tests/test_preload_detect.c
  • Modify daemon/event_pipeline.c: call preload check on exec events

Tests

5 unit tests (LD_PRELOAD present, absent, null environ, partial read, multiple env vars). 1 E2E.

Part of v2.0.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions