Skip to content

Add pipe interposition exploit via dup2#36

Open
nataliakokoromyti wants to merge 2 commits intogpu-mode:masterfrom
nataliakokoromyti:exploit/pipe-interpose
Open

Add pipe interposition exploit via dup2#36
nataliakokoromyti wants to merge 2 commits intogpu-mode:masterfrom
nataliakokoromyti:exploit/pipe-interpose

Conversation

@nataliakokoromyti
Copy link
Contributor

to change timing results by rerouting through a background filter there's also a way to do it using dup2() as in the example below. instead of having to modify the FILE struct as in the previous PR, we can just call dup2() and os.pipe() to swap the fd out.

Uses dup2() to reroute the output pipe fd through a background
filter thread that rewrites timing values. The original fd number
is preserved but now points to a new pipe, while the filter thread
reads from it and writes modified data to the saved original fd.
Updated class description and defense strategy in comments.
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.

1 participant