{"id":7937,"date":"2025-10-25T10:03:27","date_gmt":"2025-10-25T10:03:27","guid":{"rendered":"https:\/\/serisec.com\/index.php\/2025\/10\/25\/new-malware-attack-using-variable-functions-and-cookies-to-evade-and-hide-their-malicious-scripts\/"},"modified":"2025-10-25T10:03:27","modified_gmt":"2025-10-25T10:03:27","slug":"new-malware-attack-using-variable-functions-and-cookies-to-evade-and-hide-their-malicious-scripts","status":"publish","type":"post","link":"https:\/\/serisec.com\/index.php\/2025\/10\/25\/new-malware-attack-using-variable-functions-and-cookies-to-evade-and-hide-their-malicious-scripts\/","title":{"rendered":"New Malware Attack Using Variable Functions and Cookies to Evade and Hide Their Malicious Scripts"},"content":{"rendered":"<p>    New Malware Attack Using Variable Functions and Cookies to Evade and Hide Their Malicious Scripts<br \/>\n \t<BR><br \/>\n<BR><\/BR><br \/>\n    <!-- no image --><br \/>\n \t<BR><br \/>\n<BR><\/BR><\/p>\n<div>\n<p>A sophisticated malware campaign targeting WordPress sites has emerged, utilizing PHP variable functions and cookie-based obfuscation to evade traditional security detection mechanisms.<\/p>\n<p>The attack represents an evolution in obfuscation techniques, where threat actors fragment malicious code across multiple HTTP cookies and dynamically reconstruct executable functions at runtime.<\/p>\n<p>This approach makes static analysis significantly more challenging, as the malicious intent remains hidden until all cookie components are assembled and executed.<\/p>\n<p>The malware has been detected over 30,000 times in September 2025 alone, demonstrating its widespread deployment and continued effectiveness against vulnerable websites.<\/p>\n<p>The attack vector primarily targets PHP-based web applications, particularly WordPress installations, by injecting backdoor scripts that accept commands through specially crafted cookies.<\/p>\n<p>Unlike traditional <a href=\"https:\/\/cybersecuritynews.com\/chatgpt-powered-malware-analysis\/\" target=\"_blank\" rel=\"noreferrer noopener\">malware<\/a> that embeds complete malicious payloads within files, this campaign distributes function names and encoded parameters across numbered cookie indices.<\/p>\n<p>Once deployed, the malware waits for specific cookie configurations before activating, requiring attackers to send precisely structured requests containing all necessary components.<\/p>\n<p>This conditional execution serves dual purposes: evading automated security scans that may trigger the script without proper cookies, and preventing unauthorized access by other malicious actors who discover the backdoor.<\/p>\n<p>Wordfence researchers <a href=\"https:\/\/www.wordfence.com\/blog\/2025\/10\/malware-using-variable-functions-and-cookies-for-obfuscation\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">identified<\/a> multiple variants of this malware family during routine incident response operations, adding samples to their threat intelligence database containing over 4.4 million unique malicious signatures.<\/p>\n<p>The detection came through analysis of compromised sites where conventional signature-based scanning initially struggled to flag the heavily <a href=\"https:\/\/cybersecuritynews.com\/researchers-obfuscated-weaponized-net-assemblies\/\" target=\"_blank\" rel=\"noreferrer noopener\">obfuscated<\/a> code.<\/p>\n<p>Analysis revealed that while individual variants differ in implementation details, they share core characteristics including dense obfuscation, excessive array lookups, and deliberate cookie validation checks that act as authentication mechanisms for attackers.<\/p>\n<h2 class=\"wp-block-heading\" id=\"h-technical-implementation-and-code-execution-chain\"><strong>Technical Implementation and Code Execution Chain<\/strong><\/h2>\n<p>The malware operates through a multi-stage execution chain that leverages PHP\u2019s variable function capability, where appending parentheses to any variable causes PHP to execute a function matching the variable\u2019s string value.<\/p>\n<p>In examined samples, the script begins by storing the <code>$_COOKIE<\/code> superglobal into a local variable and validating that exactly 11 cookies are present, with one containing the specific string \u201carray11\u201d.<\/p>\n<p>The malware then concatenates cookie values to reconstruct function names, such as combining cookies containing \u201cbase64_\u201d and \u201cdecode\u201d to form the complete <code>base64_decode<\/code> function name.<\/p>\n<p>The execution chain demonstrates sophisticated layering:-<\/p>\n<pre class=\"wp-block-code\"><code>$locale[79] = $locale[79] . $locale[94];\n$locale[23] = $locale[79]($locale[23]);<\/code><\/pre>\n<p>This reconstructs <code>base64_decode<\/code>, then decodes another cookie containing \u201cY3JlYXRlX2Z1bmN0aW9u\u201d to produce \u201ccreate_function\u201d. The malware subsequently uses <code>create_function<\/code> with attacker-controlled parameters to generate arbitrary executable code.<\/p>\n<p>Later variants employ string replacement techniques, transforming obfuscated strings like \u201cbasx649fxcofx\u201d into \u201cbase64_decode\u201d by replacing characters \u2018x\u2019, \u2018f\u2019, and \u20189\u2019 with \u2018e\u2019, \u2018d\u2019, and \u2018_\u2019 respectively.<\/p>\n<p>This multi-layered approach defeats pattern-matching detection while maintaining full <a href=\"https:\/\/cybersecuritynews.com\/chrome-remote-code-execution-vulnerability\/\" target=\"_blank\" rel=\"noreferrer noopener\">remote code execution<\/a> capabilities through serialized payloads delivered via cookie parameters.<\/p>\n<p class=\"has-text-align-center has-background\" style=\"background:linear-gradient(180deg,rgb(238,238,238) 91%,rgb(169,184,195) 100%)\"><strong>Follow us on\u00a0<a href=\"https:\/\/news.google.com\/publications\/CAAqMggKIixDQklTR3dnTWFoY0tGV041WW1WeWMyVmpkWEpwZEhsdVpYZHpMbU52YlNnQVAB?hl=en-IN&amp;gl=IN&amp;ceid=IN:en\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Google News<\/a>,\u00a0<a href=\"https:\/\/www.linkedin.com\/company\/cybersecurity-news\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">LinkedIn<\/a>,\u00a0and\u00a0<a href=\"https:\/\/x.com\/cyber_press_org\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">X<\/a>\u00a0to Get More Instant Updates<\/strong>,\u00a0<strong>Set CSN as a Preferred Source in\u00a0<a href=\"https:\/\/www.google.com\/preferences\/source?q=cybersecuritynews.com\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Google<\/a>.<\/strong><\/p>\n<p>The post <a href=\"https:\/\/cybersecuritynews.com\/new-malware-attack-using-variable-functions\/\">New Malware Attack Using Variable Functions and Cookies to Evade and Hide Their Malicious Scripts<\/a> appeared first on <a href=\"https:\/\/cybersecuritynews.com\/\">Cyber Security News<\/a>.<\/p>\n<\/div>\n<p> \t<BR><br \/>\n <BR><\/BR><br \/>\n    Tushar Subhra Dutta<br \/>\n \t<BR><br \/>\n<BR><\/BR><br \/>\n<a href=\"https:\/\/cybersecuritynews.com\/new-malware-attack-using-variable-functions\/\">Go to cyber-security-news<\/a><br \/>\n \t<BR><br \/>\n <BR><\/BR><\/p>\n","protected":false},"excerpt":{"rendered":"<p>New Malware Attack Using Variable Functions and Cookies to Evade and Hide Their Malicious Scripts A sophisticated malware campaign targeting WordPress sites has emerged, utilizing PHP variable functions and cookie-based obfuscation to evade traditional security detection mechanisms. The attack represents an evolution in obfuscation techniques, where threat actors fragment malicious code across multiple HTTP cookies [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[129,63,649],"tags":[130],"class_list":["post-7937","post","type-post","status-publish","format-standard","hentry","category-cyber-security","category-cyber-security-news","category-threats","tag-cyber-security-news"],"_links":{"self":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/posts\/7937"}],"collection":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/comments?post=7937"}],"version-history":[{"count":0,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/posts\/7937\/revisions"}],"wp:attachment":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/media?parent=7937"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/categories?post=7937"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/tags?post=7937"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}