Описание
Picklescan does not block ctypes
Summary
Picklescan doesnt flag ctypes module as a dangerous module, which is a huge issue. ctypes is basically a foreign function interface library and can be used to
- Load DLLs
- Call C functions directly
- Manipulate memory raw pointers.
This can allow attackers to achieve RCE by invoking direct syscalls without going through blocked modules. Another major issue that ctypes being allowed presents is that it can be used down the line to dismantle interpreter based python sandboxes as ctypes allow direct access to raw memory.
This is a more severe loophole than normal gadget chains and bypasses as raw memory access can be used for a lot of nefarious purposes down the line if left undetected
PoC
This will create a pickle file which is not detected by the latest version of picklescan as malicious
Пакеты
picklescan
< 0.0.33
0.0.33
8.9 High
CVSS4
Дефекты
8.9 High
CVSS4