Views
No views yet
/tmp (echo/id). Do not modify to run real commands.malicious_pkgmod.pt with the default torch.package.PackageImporter(...).load_pickle() API executes code, while modelscan and picklescan scan the file and report no issues — a model-scanner false-negative. The malicious logic lives in packaged module source (benignmod.py), executed via find_class → import_module → compile(..., "exec"); the embedded pickle carries no dangerous opcodes (GLOBAL benignmod.Widget + STOP).pip install torch==2.13.0 modelscan==0.8.8 picklescan==1.0.4 # Python 3.10+1# scanners report CLEAN even though they scan the embedded pickle
2modelscan -p malicious_pkgmod.pt # -> "No issues found! 🎉"
3picklescan -p malicious_pkgmod.pt # -> "Infected files: 0, Dangerous globals: 0"
4
5# default-API load executes code
6rm -f /tmp/huntr_pkgmod_pwned
7python load_pkgmod.py # -> marker: True pwned-pkgmod-<user>
8cat /tmp/huntr_pkgmod_pwned__reduce__/posix.system variant of the same archive is flagged CRITICAL by both scanners — proving the evasion is specific to the module-source technique, not an unsupported-format skip.malicious_pkgmod.pt (PoC), build_malicious_pkgmod.py (craft), load_pkgmod.py (loader), ref_interned.pt (benign reference).