
🐍 Exploit Python per CVE-2021-45010
🐍 PoC Python inventato per CVE-2021-45010. Tiny File Manager < 2.4.7
usage: main.py [-h] -u URL -l USERNAME -p PASSWORD [-g GUI_PATH] [-r FS_RELPATH]
options:
-h, --help show this help message and exit
-u URL, --url URL Base URL
-l USERNAME, --username USERNAME
Username
-p PASSWORD, --password PASSWORD
Password
-g GUI_PATH, --gui-path GUI_PATH
GUI relative path for upload (default: /)
-r FS_RELPATH, --fs-relpath FS_RELPATH
Filesystem relative path (from web root) to write to
Tiny File Manager controlla il percorso relativo (come visto nella GUI) per i permessi di scrittura prima di tentare il caricamento. In alcuni casi è necessario trovare un percorso relativo scrivibile nella GUI prima di tentare di sfruttare il directory traversal.
// tinyfilemanager.php (2.4.3)
$targetPath = $path . $ds;
if ( is_writable($targetPath) ) {
$fullPath = $path . '/' . $_REQUEST['fullpath'];
Se la root web effettiva non è scrivibile dall'utente in esecuzione, specificare il percorso relativo a uno che lo sia.
python3 -m pip install cve_2021-45010-1.0.0-py3-none-any.whl