Skip to content

oelin/crimson

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Crimson

Crimson is a cache poisoning library which allows you to silently inject code into Python applications. This is achieved through unchecked hash invalidation.

Installation

pip install git+https://github.com/oelin/crimson 

Usage

Crimson allows you to poison any Python module without altering its source code. For instance, the code below poisons numpy so that it outputs pwned when imported.

>>> import crimson

>>> crimson.invalidate("venv/lib/python3.9/site-packages/numpy/__init__.py", "print('pwned')") 
>>> import numpy 

"pwned" 

Releases

No releases published

Packages

No packages published

Languages