mandiant / mandiant/STrace

Harden against PEB stomping in UM

Open
#34 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
379
Forks
52
PR merge metrics
No merged PRs in 30d

Description

* Usermode reads should use https://github.com/mandiant/STrace/blob/7e2d56c23ec89566fd82667b7f220037480a4e6b/C/STrace/DynamicTrace.cpp#L5 or at least ProbeForRead to restrict addresses we read to UM and catch with __try __except if they're invalid addresses.

* Guard against PEB / Module lists stomping. Cycles can be created not including the list head/end causing infinite loops in the module walks

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the usermode-read logic and module-walking code in the repository, then compare the proposed approach in DynamicTrace.cpp and the ProbeForRead documentation. Reproduce or inspect cases involving invalid usermode addresses and cyclic PEB/module lists. Done means reads are safely guarded and module walks terminate even when list cycles exclude the head.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
operating-systems, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.