Skip to content

🎲 Intercept and modify getrandom syscalls from a process (x86-64 Linux).

Notifications You must be signed in to change notification settings

healeycodes/unrandom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 

Repository files navigation

🎲 unrandom

My blog post: Making Python Less Random


Force getrandom syscalls from a process to return zeroes on x86-64 Linux.


Start a Python REPL. Then build and run getrandom:

gcc -o unrandom unrandom.c
./unrandom <python's pid>

Call os.urandom in the REPL:

>>> import os
>>> os.urandom(8)
b'\x00\x00\x00\x00\x00\x00\x00\x00'
>>> os.urandom(8)
b'\x00\x00\x00\x00\x00\x00\x00\x00'

About

🎲 Intercept and modify getrandom syscalls from a process (x86-64 Linux).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages