| # | Technique | Module | unsafe_globals? | Modelscan |
|---|---|---|---|---|
| 1 | PyDLL PyRun_SimpleString | ctypes.PyDLL | NO | No issues |
| 2 | importlib + methodcaller | importlib, operator.methodcaller | NO | No issues |
| 3 | code.InteractiveInterpreter | code.InteractiveInterpreter | NO | No issues |
exploit_pydll.joblib — Uses ctypes.PyDLL(None).PyRun_SimpleString() to execute arbitrary Python via CPython C APIexploit_importlib.joblib — Uses importlib.import_module('os') + operator.methodcaller('system', cmd) for shell RCEexploit_code_interpreter.joblib — Uses code.InteractiveInterpreter().runsource() to execute arbitrary Python1modelscan scan -p exploit_pydll.joblib
2# -> "No issues found!"unsafe_globals blocklist does NOT include:ctypes → PyDLL/PyRun_SimpleStringimportlib → import_moduleoperator.methodcaller (only attrgetter is blocked)code → InteractiveInterpreter