{"id":1397,"date":"2025-11-17T14:43:35","date_gmt":"2025-11-17T14:43:35","guid":{"rendered":"https:\/\/orkenyi.hu\/?p=1397"},"modified":"2026-11-02T12:43:00","modified_gmt":"2026-11-02T12:43:00","slug":"cloaking-malware-case-study","status":"publish","type":"post","link":"https:\/\/orkenyi.hu\/en\/amikor-a-weboldal-titokban-oldalakat-hoz-letre-egy-cloaking-malware-esettanulmany\/","title":{"rendered":"When a website secretly creates pages: A cloaking malware case study"},"content":{"rendered":"<p class=\"wp-block-paragraph\">Keeping WordPress websites secure requires constant attention. In a recent case we came across a particularly sneaky type of attack that had been running unnoticed on a client's website for years. This story shows how sophisticated modern hacking techniques are, and why proactive website maintenance is essential.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The hidden threat: what is cloaking malware?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The website we examined showed a strange pattern: Google Search Console was warning about spam content, while visitors noticed nothing unusual. For the owner everything worked fine, the admin area looked flawless and the pages loaded.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This type of attack is called <strong>cloaking<\/strong>, and it is one of the most dangerous WordPress security threats. The essence of the method is that the malicious code can tell different types of visitors apart:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>It shows normal users and the site owner the flawless, original content<\/li>\n\n\n\n<li>It serves search engine bots (such as Googlebot) completely different, spam content<\/li>\n\n\n\n<li>It shows no errors or anomalies in the admin area<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">This kind of attack is especially dangerous because it can run for months, even years, without anyone noticing. The client sees nothing suspicious, visitors don't complain, while in the background the site's search engine optimisation and reputation are being damaged all the time.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Discovering the problem: Google Search Console warnings<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The infection was first flagged by Google Search Console warnings. Two critical messages came in:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>&#8220;Content flagged as spam&#8221;<\/strong> : Google detected that the website was serving spam content<\/li>\n\n\n\n<li><strong>&#8220;Cloaking suspected&#8221;<\/strong> : the system identified suspicious differences between the content shown to different users<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">These signals called for an immediate professional investigation. Experience shows that when Google sends warnings like these, the problem is already serious and long-standing.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Results of the in-depth investigation<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">During a detailed review of the website's file system, we identified several suspicious and clearly infected files. The most shocking discovery was that the infected files were hiding in WordPress's <code>uploads<\/code> folder, a place that normally only holds uploaded images, videos and documents.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">The infected files we found:<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>eere.htm<\/code> : an HTML file used to store spam content<\/li>\n\n\n\n<li><code>root.htm<\/code> : more malicious HTML content<\/li>\n\n\n\n<li><code>huc.php<\/code> : a PHP script that ran the cloaking logic<\/li>\n\n\n\n<li><code>huv.php<\/code> : an additional infected PHP file<\/li>\n\n\n\n<li><code>license.txt<\/code> : a fake licence file that actually contained the cloaker's configuration<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Together these files formed a complex system whose job was to load spam content dynamically, segment users, and bypass WordPress's basic security mechanisms.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The most dangerous discovery: a modified functions.php<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The investigation revealed that the infected files weren't only in the uploads folder. The biggest problem was caused by a modification to the <code>functions.php<\/code> file in the site's active theme. This file is the most critical component of a WordPress theme and fundamentally affects how the site works.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The injected code did exactly the following:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>User agent check<\/strong> : it checked the visitor's browser identifier, looking for keywords such as &#8220;google&#8221;, &#8220;googlebot&#8221; and &#8220;bot&#8221;<\/li>\n\n\n\n<li><strong>IP address check<\/strong> : it compared the visitor's IP address with Google's documented IP ranges<\/li>\n\n\n\n<li><strong>Content swap<\/strong> : if it identified a Google bot, it immediately loaded the spam HTML files<\/li>\n\n\n\n<li><strong>Plugin manipulation<\/strong> : it automatically deactivated the cache and minify plugins using the <code>deactivate_plugins()<\/code> function<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">This last point explained the previously inexplicable fact that the site's layout was sometimes &#8220;broken&#8221;. The infection periodically switched off the performance optimisation plugins the site needed to work properly.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Why are cloaking attacks so hard to spot?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The effectiveness of cloaking malware comes from its invisibility. Several factors help these attacks stay hidden for years:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>No visual change<\/strong> : for the site owner, everything works as usual<\/li>\n\n\n\n<li><strong>The WordPress admin looks clean<\/strong> : there are no error messages or warnings<\/li>\n\n\n\n<li><strong>Visitors notice nothing<\/strong> : only search engine bots see the spam content<\/li>\n\n\n\n<li><strong>Deeply hidden files<\/strong> : the infected files are in places the average user never looks<\/li>\n\n\n\n<li><strong>Legitimate file names<\/strong> : the file names don't raise suspicion at first glance<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">According to expert estimates, a well-hidden cloaking infection can go unnoticed for as long as 3 to 5 years, constantly damaging the site's search rankings and reputation.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The likely origin of the infection: a vulnerability in an outdated plugin<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The investigation revealed that the site was running an old appointment booking system that the owner had previously insisted on keeping. This was the source of the problem:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The plugin hadn't received a single update since 2022<\/li>\n\n\n\n<li>The developers had stopped supporting and maintaining it<\/li>\n\n\n\n<li>Known security holes were documented in earlier versions of the plugin<\/li>\n\n\n\n<li>The plugin was still active and running on the site<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Abandoned plugins like this are hackers' favourite targets. Automated bots constantly scan websites looking for components with known vulnerabilities. When they find one, running the exploit is child's play:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>The bot identifies the vulnerable plugin<\/li>\n\n\n\n<li>It exploits the security hole<\/li>\n\n\n\n<li>It uploads the malicious files<\/li>\n\n\n\n<li>It embeds the cloaker code into critical system files<\/li>\n\n\n\n<li>It covers its tracks<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">This scenario fits the pattern we saw perfectly.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Steps of the clean-up process<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Removing the infection completely took careful, multi-step work:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Identifying infected files<\/strong> : combing through with manual and automated tools<\/li>\n\n\n\n<li><strong>Cleaning the uploads folder<\/strong> : removing every suspicious .php, .htm and other executable file<\/li>\n\n\n\n<li><strong>Restoring functions.php<\/strong> : cleaning the theme's critical file or restoring it to its original state<\/li>\n\n\n\n<li><strong>Checking the root directory<\/strong> : reviewing the PHP files in the root directory<\/li>\n\n\n\n<li><strong>Database check<\/strong> : looking for suspicious entries and options<\/li>\n\n\n\n<li><strong>.htaccess check<\/strong> : reviewing the server configuration file<\/li>\n\n\n\n<li><strong>Full update<\/strong> : updating WordPress core, every plugin and the theme<\/li>\n\n\n\n<li><strong>Removing unnecessary components<\/strong> : especially outdated, unsupported plugins<\/li>\n\n\n\n<li><strong>Repeated checks<\/strong> : validating that the clean-up was successful<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Throughout the process, the most important thing was completeness. A single infected file or line of code is enough for the attack to come back.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">What would have happened if we hadn't noticed in time?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The long-term consequences of cloaking infections can be disastrous:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Google penalty<\/strong> : the site can be permanently removed from search results<\/li>\n\n\n\n<li><strong>Loss of traffic<\/strong> : organic visitors disappear completely<\/li>\n\n\n\n<li><strong>Domain blacklisting<\/strong> : the domain can end up on other sites' spam filters<\/li>\n\n\n\n<li><strong>Hosting suspension<\/strong> : the provider may suspend the account<\/li>\n\n\n\n<li><strong>Brand damage<\/strong> : the business name becomes associated with spam pages<\/li>\n\n\n\n<li><strong>Business losses<\/strong> : lost customers and orders<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">These problems can sometimes last for weeks or months, even after the infection has been completely removed, until Google re-indexes and re-evaluates the site.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Key lessons<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">This case teaches several important lessons about WordPress security:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Don't use outdated plugins!<\/strong> If a plugin hasn't been updated for more than 6 to 12 months and the developer doesn't respond, remove it from the site. No feature is worth the security risk.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>The uploads folder is not for storing executable code.<\/strong> Any .php or other script file in this folder is an immediate red flag.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Theme files are off limits.<\/strong> functions.php and other critical files should never be modified by hand or by automation unless you know exactly what you are doing.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Cloaking can only be detected by an expert investigation.<\/strong> An everyday user won't notice anything, which is why regular professional website audits are necessary.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Why is ongoing maintenance essential?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A WordPress kiv\u00e1l\u00f3 tartalomkezel\u0151 rendszer, de biztons\u00e1goss\u00e1ga teljes m\u00e9rt\u00e9kben a <a href=\"https:\/\/orkenyi.hu\/en\/weboldal-karbantartas\/\">karbantart\u00e1s<\/a> min\u0151s\u00e9g\u00e9t\u0151l f\u00fcgg. Egy professzion\u00e1lisan karbantartott weboldal:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Is updated regularly (WordPress core, plugins, themes)<\/li>\n\n\n\n<li>Only uses actively supported components<\/li>\n\n\n\n<li>Is free of unnecessary elements<\/li>\n\n\n\n<li>Goes through regular security checks<\/li>\n\n\n\n<li>Is protected by appropriate security measures<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">A single abandoned, unupdated plugin is enough to infect a website for years without the owner ever noticing the problem, until it's too late.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Summary<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">This case study shows how sophisticated and invisible modern hacking techniques can be. With cloaking malware, the attack succeeds precisely because normal use shows no sign of the infection.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We successfully removed the infection from the website, and the system is now clean and secure. But the case is a reminder: website security is not a one-off task but an ongoing activity that requires expertise, attention and proactive thinking.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>If you feel something isn't right with your website, or you'd like a thorough security audit, <a href=\"https:\/\/orkenyi.hu\/en\/kapcsolat\/\" target=\"_blank\" rel=\"noreferrer noopener\">contact us<\/a>. We'll help protect your website and your business from hidden threats.<\/strong><\/p>","protected":false},"excerpt":{"rendered":"<p>A WordPress weboldalak biztons\u00e1g\u00e1nak fenntart\u00e1sa folyamatos odafigyel\u00e9st ig\u00e9nyel. Egy nemr\u00e9giben kezelt esetben szembes\u00fclt\u00fcnk egy k\u00fcl\u00f6n\u00f6sen rafin\u00e1lt t\u00edpus\u00fa t\u00e1mad\u00e1ssal, amely \u00e9vekig \u00e9szrev\u00e9tlen\u00fcl m\u0171k\u00f6d\u00f6tt az \u00fcgyf\u00e9l weboldal\u00e1n. Ez a t\u00f6rt\u00e9net j\u00f3l szeml\u00e9lteti, hogy a modern hackel\u00e9si technik\u00e1k mennyire kifinomultak, \u00e9s mi\u00e9rt elengedhetetlen a proakt\u00edv weboldal-karbantart\u00e1s. A rejt\u0151zk\u00f6d\u0151 fenyeget\u00e9s: Mi az a cloaking malware? A vizsg\u00e1lt weboldalon k\u00fcl\u00f6n\u00f6s [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1401,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_seopress_titles_title":"Cloaking malware: amikor a weboldal titkos oldalakat gy\u00e1rt","_seopress_titles_desc":"Val\u00f3s esettanulm\u00e1ny egy rejt\u0151zk\u00f6d\u0151 WordPress t\u00e1mad\u00e1sr\u00f3l, ami \u00e9vekig \u00e9szrev\u00e9tlen maradt. Hogyan m\u0171k\u00f6dik a cloaking malware, \u00e9s hogyan el\u0151zhet\u0151 meg?","_seopress_robots_index":"","_seopress_robots_follow":"","_seopress_robots_imageindex":"","_seopress_robots_snippet":"","_seopress_robots_primary_cat":"none","_seopress_robots_breadcrumbs":"","_seopress_robots_freeze_modified_date":"","_seopress_robots_custom_modified_date":"","_seopress_robots_canonical":"","_seopress_social_fb_title":"","_seopress_social_fb_desc":"","_seopress_social_fb_img":"","_seopress_social_fb_img_attachment_id":0,"_seopress_social_fb_img_width":0,"_seopress_social_fb_img_height":0,"_seopress_social_twitter_title":"","_seopress_social_twitter_desc":"","_seopress_social_twitter_img":"","_seopress_social_twitter_img_attachment_id":0,"_seopress_social_twitter_img_width":0,"_seopress_social_twitter_img_height":0,"_seopress_redirections_value":"","_seopress_redirections_enabled":"","_seopress_redirections_enabled_regex":"","_seopress_redirections_logged_status":"both","_seopress_redirections_param":"","_seopress_redirections_type":301,"_seopress_analysis_target_kw":"","_seopress_news_disabled":"","_seopress_video_disabled":"","_seopress_video":[],"_seopress_pro_schemas_manual":[],"_seopress_pro_rich_snippets_disable_all":"","_seopress_pro_rich_snippets_disable":[],"_seopress_pro_schemas":[],"footnotes":""},"categories":[6,5],"tags":[],"temakor":[],"class_list":["post-1397","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technikai-segiteg","category-weboldal"],"_links":{"self":[{"href":"https:\/\/orkenyi.hu\/en\/wp-json\/wp\/v2\/posts\/1397","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/orkenyi.hu\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/orkenyi.hu\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/orkenyi.hu\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/orkenyi.hu\/en\/wp-json\/wp\/v2\/comments?post=1397"}],"version-history":[{"count":2,"href":"https:\/\/orkenyi.hu\/en\/wp-json\/wp\/v2\/posts\/1397\/revisions"}],"predecessor-version":[{"id":2143,"href":"https:\/\/orkenyi.hu\/en\/wp-json\/wp\/v2\/posts\/1397\/revisions\/2143"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/orkenyi.hu\/en\/wp-json\/wp\/v2\/media\/1401"}],"wp:attachment":[{"href":"https:\/\/orkenyi.hu\/en\/wp-json\/wp\/v2\/media?parent=1397"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/orkenyi.hu\/en\/wp-json\/wp\/v2\/categories?post=1397"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/orkenyi.hu\/en\/wp-json\/wp\/v2\/tags?post=1397"},{"taxonomy":"temakor","embeddable":true,"href":"https:\/\/orkenyi.hu\/en\/wp-json\/wp\/v2\/temakor?post=1397"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}