Skip to content

Latest commit

History

History
31 lines (19 loc) 路 872 Bytes

README.md

File metadata and controls

31 lines (19 loc) 路 872 Bytes

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')") 
>>>importnumpy 

"pwned"