Skip to content

pychecksec v0.2

Latest

Choose a tag to compare

@0xUnd3adBeef 0xUnd3adBeef released this 29 Jan 10:47
b558858

Added .pth poisoning checks
Improved import shadowing detection
Minor changes to sys.path detection

Checks covered so far :

  • Target script permission checks (read/write)
  • Writable parent directory detection (swap/plant risk)
  • Writable sys.path entries (import order influence)
  • Imported modules resolving from writable locations
  • Writable pycache directories tied to imported modules
  • Import shadowing opportunities + already-shadowed imports
  • Python startup hook checks (sitecustomize.py, usercustomize.py)
  • Namespace package injection conditions
  • Environment poisoning (PYTHONPATH, PYTHONHOME, LD_PRELOAD, LD_LIBRARY_PATH)