Skip to content

Implement the dump_process_memory action#140

Merged
panhania merged 4 commits intogoogle:masterfrom
CRefice:feature/dump-process-memory-action
Aug 6, 2025
Merged

Implement the dump_process_memory action#140
panhania merged 4 commits intogoogle:masterfrom
CRefice:feature/dump-process-memory-action

Conversation

@CRefice
Copy link
Collaborator

@CRefice CRefice commented Jul 30, 2025

This PR ports the YaraProcessMemoryDump action from the GRR client to RRG.
Only Linux is supported for now, and the relevant modules are gated behind #[cfg(target_os = "linux").

The implementation parses a process' memory maps from /proc/{pid}/maps and then reads its memory from /proc/{pid}/mem.
The memory is then chunked into batches as necessary and sent to the blob sink.

I have kept the interface (request and response protos) mostly the same as in the GRR action, but have omitted features related to process table scanning. So for now, callers of the action should know in advance the PIDs of the processes whose memory they're interested in. Maybe PID discovery can be delegated to a separate action in the future.

@CRefice CRefice force-pushed the feature/dump-process-memory-action branch 2 times, most recently from a56b0ed to 49aebff Compare July 30, 2025 16:17
@CRefice CRefice force-pushed the feature/dump-process-memory-action branch from 49aebff to c3db4c1 Compare August 6, 2025 10:16
Copy link
Member

@panhania panhania left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some nits left, but I don't want to stall your work until I am back, so I am going to merge for now. These are minor things that we can tweak anytime.

@panhania panhania changed the title Implement dump_process_memory action Implement the dump_process_memory action Aug 6, 2025
@panhania panhania merged commit 693bba8 into google:master Aug 6, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants