WP Rocket Flaw Exploited to Plant PHP on WordPress Sites


What this means for your clients: If your website runs on WordPress with the WP Rocket speed add-on, ask whoever manages it to update it today and check for files nobody put there, because strangers have been trying to plant their own code on these sites since last week.
A speed setting common on sites optimized for Core Web Vitals let strangers write their own PHP onto WordPress servers. Patchstack saw the first attempt against WP Rocket, a caching plugin on more than 5 million sites, on November 25, 2026. One attacker worked by hand. By the next day the campaigns were automated, with tens of thousands of blocked attempts on November 26 alone.
As of 6:32 AM MST, Tuesday, December 1, 2026, Patchstack reports attackers are exploiting CVE-2026-125812 in the WP Rocket plugin to write and run their own PHP on WordPress sites that have LazyLoad for CSS background images or self-hosted Google Fonts turned on, and the fix is WP Rocket 3.24.2 or later plus a check for files planted before the update.
What happened
WP Rocket runs a small script in visitors' browsers that measures each page and reports back to the site. Patchstack explains the plugin trusts those reports too much: a crafted one makes the site download content from an attacker's server and save it as a PHP file, which then runs. No login is needed: any visitor can trigger remote code execution.
Only sites with one of two settings on are exposed: LazyLoad for CSS background images, or Self-host Google Fonts, which Patchstack calls Host Fonts Locally. Both are off by default but common on sites built for speed. Versions of the WordPress plugin before 3.24.2 are affected. WP Media says the affected releases are 3.15 through 3.24.1. WP Media's advisory puts the fix in 3.24.2, released November 19, so attacks began six days after the patch, as SecurityWeek notes.
Patchstack sees several independent operators hosting payloads on bare IP addresses, nip.io names, temporary trycloudflare.com tunnels and other WordPress sites that are likely compromised. nip.io and trycloudflare.com are legitimate services being abused, not attacker domains. BleepingComputer reports Patchstack blocked more than 25,000 malicious requests, and The Hacker News reports Wordfence blocked 135 attacks in a day. Blocked attempts are not breaches. Who is behind this, and what they did after writing a file, is unknown.
Why this matters for MSPs and small businesses
A speed plugin became a file upload form for strangers, and the settings that expose a site are the ones people turn on when a client says it is slow. A planted PHP file is a web shell in all but name. It runs as the web server, so it can read wp-config.php and its database password, add administrators, plant more backdoors or host the next victim's payload. On a WooCommerce store, that reaches the checkout page.
The update closes the hole and does nothing about what already came through it. Patchstack says so, and WP Media says attacker files or accounts need separate investigation. For web agencies and MSPs, dozens of sites share servers and one license account, and an expired license blocks the dashboard update. For MSP security teams, that makes this a patch management job across the fleet first, then a hunt. The same check covers small business security: any site that ran an old release with either setting on since November 25 needs a look.
What to do today
Update WP Rocket to 3.24.2 or later on every site and confirm it with WP-CLI: wp plugin get wp-rocket --field=version, adding --url for each Multisite subsite. If a site cannot update, turn off both settings under WP Rocket, Page Optimization, Image & Media (the Media tab before 3.24) and confirm they stay off. Across a fleet, WP Media's helper plugin turns off both features and installs with WP-CLI.
Then look for what came in. Check wp-content/uploads/, wp-content/wp-rocket-config/ and the top of wp-content/ for PHP files newer than the site's last deliberate change, including Patchstack's pattern, wp-media-*.php. Block Patchstack's ten addresses at the WAF now; expect new ones.
Indicator | Type | Patchstack context |
103.235.74.71 | IPv4 | Ikubaru (Indonesia), 5,352 blocked requests |
157.245.122.230 | IPv4 | DigitalOcean, 5,003 blocked requests |
152.89.170.194 | IPv4 | C1V Hosting (Italy), 3,455 blocked requests |
180.232.236.101 | IPv4 | Eastern Telecom (Philippines), 2,288 blocked requests |
103.235.74.72 | IPv4 | Ikubaru (Indonesia), 1,950 blocked requests |
201.79.120.217 | IPv4 | DigitalOcean, 1,938 blocked requests |
112.78.154.32 | IPv4 | Biznet (Indonesia), 1,876 blocked requests |
167.71.75.155 | IPv4 | DigitalOcean, 1,600 blocked requests |
43.163.8.253 | IPv4 | Aceville / Tencent Cloud (Singapore), 1,326 blocked requests |
51.79.199.209 | IPv4 | OVH (Singapore), 1,018 blocked requests |
wp-media-*.php | File name pattern | Planted PHP in wp-content/, wp-content/uploads/ or wp-content/wp-rocket-config/ |
Block PHP execution in uploads, deny outbound connections from the web server except to services the site needs, and on any site with a planted file, rotate the database password and salts.
How to hunt
Hunt web logs from November 19, 2026, and file events across full retention, because a planted file can sit for weeks. These threat hunting queries read access logs, EDR and DNS. On shared hosting with no endpoint agent, ask the host for file listings and outbound connection logs.
Test 1: which of your WordPress sites run WP Rocket
Purpose: sites serving WP Rocket's files, by site and host, plus listed sites with no recent logs.
Splunk
| tstats summariesonly=false fillnull_value="unknown" count min(_time) as first_seen max(_time) as last_seen from datamodel=Web where earliest="11/19/2026:00:00:00" (Web.uri_path="*/wp-content/plugins/wp-rocket/*" OR Web.site IN ("YOUR_SITE_HOST_1", "YOUR_SITE_HOST_2") OR Web.dest IN ("YOUR_SITE_HOST_1", "YOUR_SITE_HOST_2")) by Web.site Web.dest Web.uri_path
| rename Web.* as *
| eval site=if(site=="unknown", dest, site), rocket=if(like(uri_path, "%/wp-content/plugins/wp-rocket/%"), count, 0), rocket_time=if(rocket>0, last_seen, null()), rocket_start=if(rocket>0, first_seen, null())
| where rocket>0 OR in(site, "YOUR_SITE_HOST_1", "YOUR_SITE_HOST_2")
| stats sum(rocket) as rocket_hits sum(count) as events min(rocket_start) as first_seen max(rocket_time) as last_seen max(last_seen) as last_event values(dest) as hosts by site
| append [| makeresults | eval site=split("YOUR_SITE_HOST_1,YOUR_SITE_HOST_2", ",") | mvexpand site | eval events=0, rocket_hits=0 | fields site events rocket_hits]
| stats sum(events) as events sum(rocket_hits) as rocket_hits min(first_seen) as first_seen max(last_seen) as last_seen max(last_event) as last_event values(hosts) as hosts by site
| eval status=case(rocket_hits>0, "1 serves WP Rocket files: check version and settings",
events=0 OR last_event < relative_time(now(), "-1d"), "2 listed site with no web events in the last day: not cleared",
true(), "3 listed site with no WP Rocket requests: confirm with WP-CLI")
| convert ctime(first_seen) ctime(last_seen) ctime(last_event)
| table status site hosts rocket_hits events first_seen last_seen last_event
| sort status siteElastic
// Sites group by url.domain, or by the server's host.name when the access log carries no site name.
FROM YOUR_WEB_INDEX
| WHERE @timestamp >= TO_DATETIME("2026-11-19T00:00:00Z")
| EVAL site = COALESCE(url.domain, host.name),
rocket = url.path LIKE "*/wp-content/plugins/wp-rocket/*",
listed = site IN ("YOUR_SITE_HOST_1", "YOUR_SITE_HOST_2")
| WHERE rocket OR listed
| STATS rocket_hits = COUNT(*) WHERE rocket, first_seen = MIN(@timestamp) WHERE rocket, last_seen = MAX(@timestamp) WHERE rocket,
last_event = MAX(@timestamp), hosts = VALUES(host.name) BY site
| EVAL status = CASE(rocket_hits > 0, "1 serves WP Rocket files: check version and settings",
last_event < NOW() - 1 day, "2 listed site with no web events in the last day: not cleared",
"3 listed site with no WP Rocket requests: confirm with WP-CLI")
| SORT status, siteCrowdStrike
// Time picker: Nov 19, 2026 to now. Needs web server, CDN or WAF access logs in Falcon Next-Gen SIEM parsed to CPS (ECS) names.
// YOUR_SITE_HOST_1 and YOUR_SITE_HOST_2 name the WordPress sites you manage. Sites group by url.domain, or by host.name when the log carries no site name.
url.path=*
| case { url.domain=* | site := url.domain ; host.name=* | site := host.name ; * | site := "no site name logged" }
| case {
url.path=/\/wp-content\/plugins\/wp-rocket\//i | rocket := 1 | rocket_time := @timestamp ;
in(field=site, values=["YOUR_SITE_HOST_1", "YOUR_SITE_HOST_2"], ignoreCase=true) | rocket := 0 }
| groupBy([site], function=[sum(rocket, as=rocket_hits), count(as=events), min(rocket_time, as=first_seen), max(rocket_time, as=last_seen), max(@timestamp, as=last_event), collect([host.name])], limit=max)
| now()
| case {
test(rocket_hits > 0) | status := "1 serves WP Rocket files: check version and settings" ;
test(last_event < _now - 86400000) | status := "2 listed site with no web events in the last day: not cleared" ;
* | status := "3 listed site with no WP Rocket requests: confirm with WP-CLI" }
| sort([status, site], order=asc, limit=10000)Microsoft KQL
let start = datetime(2026-11-19);
let sites = dynamic(["YOUR_SITE_HOST_1", "YOUR_SITE_HOST_2"]);
_Im_WebSession(starttime=start)
| extend Rocket = Url contains "/wp-content/plugins/wp-rocket/", Site = coalesce(HttpHost, DvcHostname)
| where Rocket or Site in~ (sites)
| summarize RocketHits = countif(Rocket), FirstSeen = minif(TimeGenerated, Rocket), LastSeen = maxif(TimeGenerated, Rocket), LastEvent = max(TimeGenerated),
Hosts = make_set(DvcHostname, 10) by Site
| extend Status = case(RocketHits > 0, "1 serves WP Rocket files: check version and settings",
LastEvent < ago(1d), "2 listed site with no web events in the last day: not cleared",
"3 listed site with no WP Rocket requests: confirm with WP-CLI")
| order by Status asc, Site ascField mapping: Splunk CIM Web; Elastic url fields; CrowdStrike CPS url fields; Microsoft Sentinel _Im_WebSession. Web hunts group by site name, so start the Nginx log_format with $host or use Apache's vhost_combined format. A listed site missing here sends no logs and is not cleared. WP-CLI stays the source of truth.
Hunt 1: optimization reports from visitors who never loaded the page
Purpose: per site, sources that only POST to admin-ajax.php, and Patchstack's ten addresses.
Splunk
| tstats summariesonly=false fillnull_value="unknown" count values(Web.http_user_agent) as agents from datamodel=Web where earliest="11/19/2026:00:00:00" (Web.http_method="GET" OR (Web.http_method="POST" Web.uri_path="*/wp-admin/admin-ajax.php")) by _time span=1h Web.site Web.dest Web.src Web.http_method Web.status
| rename Web.* as *
| eval ajax_posts=if(http_method=="POST", count, 0), gets=if(http_method=="GET", count, 0), listed_hits=0,
ajax_status=if(http_method=="POST", status, null()), ajax_agents=if(http_method=="POST", agents, null())
| append [| tstats summariesonly=false fillnull_value="unknown" count as listed_hits from datamodel=Web where earliest="11/19/2026:00:00:00" Web.src IN ("103.235.74.71", "157.245.122.230", "152.89.170.194", "180.232.236.101", "103.235.74.72", "201.79.120.217", "112.78.154.32", "167.71.75.155", "43.163.8.253", "51.79.199.209") by _time span=1h Web.site Web.dest Web.src
| rename Web.* as *
| eval ajax_posts=0, gets=0]
| eval site=if(site=="unknown", dest, site)
| where src!="unknown"
| stats sum(ajax_posts) as ajax_posts sum(gets) as gets sum(listed_hits) as listed_hits values(ajax_status) as statuses values(ajax_agents) as agents by _time site src
| eval flag=case(listed_hits>0, "1 request from a Patchstack-listed address", ajax_posts>0 AND gets==0, "2 admin-ajax.php POST with no page request that hour")
| where isnotnull(flag)
| stats count as hours sum(ajax_posts) as posts dc(src) as source_count values(src) as sources values(statuses) as statuses values(agents) as agents min(_time) as first_hour max(_time) as last_hour by flag site
| convert ctime(first_hour) ctime(last_hour)
| sort flag siteElastic
FROM YOUR_WEB_INDEX
| WHERE @timestamp >= TO_DATETIME("2026-11-19T00:00:00Z") AND source.ip IS NOT NULL
| EVAL hour = DATE_TRUNC(1 hour, @timestamp), src = TO_STRING(source.ip), site = COALESCE(url.domain, host.name),
ajax_post = http.request.method == "POST" AND url.path LIKE "*/wp-admin/admin-ajax.php",
listed_ip = src IN ("103.235.74.71", "157.245.122.230", "152.89.170.194", "180.232.236.101", "103.235.74.72", "201.79.120.217", "112.78.154.32", "167.71.75.155", "43.163.8.253", "51.79.199.209")
| STATS ajax_posts = COUNT(*) WHERE ajax_post, gets = COUNT(*) WHERE http.request.method == "GET", listed_hits = COUNT(*) WHERE listed_ip,
statuses = VALUES(http.response.status_code) WHERE ajax_post, agents = VALUES(user_agent.original) WHERE ajax_post BY site, src, hour
| EVAL flag = CASE(listed_hits > 0, "1 request from a Patchstack-listed address",
ajax_posts > 0 AND gets == 0, "2 admin-ajax.php POST with no page request that hour",
NULL)
| WHERE flag IS NOT NULL
| STATS hours = COUNT(*), posts = SUM(ajax_posts), source_count = COUNT_DISTINCT(src), sources = VALUES(src), statuses = VALUES(statuses), agents = VALUES(agents), first_hour = MIN(hour), last_hour = MAX(hour) BY flag, site
| SORT flag, siteCrowdStrike
// Time picker: Nov 19, 2026 to now. Needs web server, CDN or WAF access logs in Falcon Next-Gen SIEM parsed to CPS (ECS) names, with the real client address in source.ip.
url.path=* source.ip=*
| case { url.domain=* | site := url.domain ; host.name=* | site := host.name ; * | site := "no site name logged" }
| hour := @timestamp - (@timestamp % 3600000)
| case { http.request.method="POST" | url.path=/\/wp-admin\/admin-ajax\.php$/i | ajax := 1 ; * | ajax := 0 }
| case { http.request.method="GET" | page := 1 ; * | page := 0 }
| case { in(field=source.ip, values=["103.235.74.71", "157.245.122.230", "152.89.170.194", "180.232.236.101", "103.235.74.72", "201.79.120.217", "112.78.154.32", "167.71.75.155", "43.163.8.253", "51.79.199.209"]) | listed := 1 ; * | listed := 0 }
| groupBy([site, source.ip, hour], function=[sum(ajax, as=ajax_posts), sum(page, as=gets), sum(listed, as=listed_hits)], limit=max)
| case {
test(listed_hits > 0) | flag := "1 request from a Patchstack-listed address" ;
test(ajax_posts > 0) | test(gets == 0) | flag := "2 admin-ajax.php POST with no page request that hour" }
| groupBy([flag, site], function=[count(as=hours), sum(ajax_posts, as=posts), count(source.ip, distinct=true, as=source_count), collect([source.ip]), min(hour, as=first_hour), max(hour, as=last_hour)], limit=max)
| sort([flag, site], order=asc, limit=10000)Microsoft KQL
let start = datetime(2026-11-19);
let listed = dynamic(["103.235.74.71", "157.245.122.230", "152.89.170.194", "180.232.236.101", "103.235.74.72", "201.79.120.217", "112.78.154.32", "167.71.75.155", "43.163.8.253", "51.79.199.209"]);
_Im_WebSession(starttime=start)
| where isnotempty(SrcIpAddr)
| extend Site = coalesce(HttpHost, DvcHostname), Hour = bin(TimeGenerated, 1h), AjaxPost = HttpRequestMethod == "POST" and Url matches regex @"/wp-admin/admin-ajax\.php(\?|$)"
| summarize AjaxPosts = countif(AjaxPost), Gets = countif(HttpRequestMethod == "GET"), ListedHits = countif(SrcIpAddr in (listed)),
Statuses = make_set_if(HttpStatusCode, AjaxPost, 5), Agents = make_set_if(HttpUserAgent, AjaxPost, 5) by Site, SrcIpAddr, Hour
| extend Flag = case(ListedHits > 0, "1 request from a Patchstack-listed address",
AjaxPosts > 0 and Gets == 0, "2 admin-ajax.php POST with no page request that hour", "")
| where isnotempty(Flag)
| summarize Hours = count(), Posts = sum(AjaxPosts), SourceCount = dcount(SrcIpAddr), Sources = make_set(SrcIpAddr, 50), Statuses = make_set(Statuses, 10), Agents = make_set(Agents, 10), FirstHour = min(Hour), LastHour = max(Hour) by Flag, Site
| order by Flag asc, Site ascField mapping: Test 1 sources plus method, source and status fields. False positives: a CDN serves page views, so origin logs see only the POST; use CDN logs or the real client address. Admins also POST, so the signal is a source that only POSTs.
Hunt 2: PHP files that appeared where they do not belong
Purpose: new PHP in uploads, wp-rocket-config or wp-content, and those paths answering 200.
Splunk
| tstats summariesonly=false fillnull_value="unknown" count min(_time) as first_seen max(_time) as last_seen values(Filesystem.action) as actions values(Filesystem.user) as users values(Filesystem.process_id) as pids from datamodel=Endpoint.Filesystem where earliest=0 Filesystem.file_name="*.php" Filesystem.file_path="*/wp-content/*" Filesystem.action IN ("created", "modified") by Filesystem.dest Filesystem.file_path Filesystem.file_name
| rename Filesystem.* as *
| eval flag=case(match(file_name, "^wp-media-.*\.php$"), "1 wp-media-*.php file written",
in(file_name, "index.php", "advanced-cache.php", "YOUR_KNOWN_PHP_1"), null(),
match(file_path, "/wp-content/(uploads/.+|wp-rocket-config/[^/]+|[^/]+)\.php$"), "2 PHP file written in uploads, wp-rocket-config or wp-content")
| where isnotnull(flag)
| append [| tstats summariesonly=false fillnull_value="unknown" count min(_time) as first_seen max(_time) as last_seen values(Web.src) as sources from datamodel=Web where earliest="11/19/2026:00:00:00" Web.status=200 Web.uri_path="*/wp-content/*.php" by Web.site Web.dest Web.uri_path
| rename Web.* as *
| where match(uri_path, "/wp-content/((uploads|wp-rocket-config)/.+|wp-media-[^/]*)\.php$")
| eval dest=if(site=="unknown", dest, site), file_path=uri_path, flag="1 planted PHP path answered 200"]
| stats sum(count) as events min(first_seen) as first_seen max(last_seen) as last_seen values(file_path) as paths values(actions) as actions values(users) as users values(pids) as pids values(sources) as sources by flag dest
| convert ctime(first_seen) ctime(last_seen)
| sort flag destElastic
// YOUR_KNOWN_PHP_1 names each site's WP Rocket config file and any drop-in you keep on purpose, such as object-cache.php.
FROM YOUR_ENDPOINT_INDEX, YOUR_WEB_INDEX
| WHERE (event.category == "file" AND event.type IN ("creation", "change") AND file.extension == "php" AND file.path LIKE "*/wp-content/*")
OR (@timestamp >= TO_DATETIME("2026-11-19T00:00:00Z") AND http.response.status_code == 200 AND url.path LIKE "*/wp-content/*.php")
| EVAL web = http.response.status_code IS NOT NULL, path = COALESCE(file.path, url.path), site = COALESCE(url.domain, host.name)
| EVAL flag = CASE(
web AND url.path RLIKE """.*/wp-content/((uploads|wp-rocket-config)/.+|wp-media-[^/]*)\.php""", "1 planted PHP path answered 200",
web, NULL,
file.name LIKE "wp-media-*.php", "1 wp-media-*.php file written",
file.name IN ("index.php", "advanced-cache.php", "YOUR_KNOWN_PHP_1"), NULL,
file.path RLIKE """.*/wp-content/(uploads/.+|wp-rocket-config/[^/]+|[^/]+)\.php""", "2 PHP file written in uploads, wp-rocket-config or wp-content",
NULL)
| WHERE flag IS NOT NULL
| STATS events = COUNT(*), first_seen = MIN(@timestamp), last_seen = MAX(@timestamp), paths = VALUES(path), writers = VALUES(process.name),
users = VALUES(user.name), sources = VALUES(source.ip) BY flag, site
| SORT flag, siteCrowdStrike
// Time picker: full retention, which also covers the web rows from Nov 19, 2026. File rows come from a FileVantage policy watching wp-content on each Linux web host; web rows need access logs parsed to CPS.
// YOUR_KNOWN_PHP_1 names each site's WP Rocket config file and any drop-in you keep on purpose, such as object-cache.php.
#event_simpleName=FileIntegrityMonitorRuleMatched or url.path=/\/wp-content\/.*\.php/i
| case {
url.path=* | path := url.path ;
ObjectAccessOperationType=5 | path := ObjectNameNew ;
in(field=ObjectAccessOperationType, values=["1", "2"]) | path := ObjectName }
| regex("(?<fname>[^/]+)$", field=path, strict=false)
| case {
url.path=* | http.response.status_code=200 | path=/\/wp-content\/((uploads|wp-rocket-config)\/.+|wp-media-[^\/]*)\.php$/i | flag := "1 planted PHP path answered 200" ;
url.path=* | flag := "skip" ;
fname=/^wp-media-.*\.php$/i | flag := "1 wp-media-*.php file written" ;
in(field=fname, values=["index.php", "advanced-cache.php", "YOUR_KNOWN_PHP_1"], ignoreCase=true) | flag := "skip" ;
path=/\/wp-content\/(uploads\/.+|wp-rocket-config\/[^\/]+|[^\/]+)\.php$/i | flag := "2 PHP file written in uploads, wp-rocket-config or wp-content" }
| flag!="skip"
| case { ComputerName=* ; aid=* | match(file="aid_master_main.csv", field=aid, include=ComputerName, ignoreCase=true, strict=false) ; * }
| case { ComputerName=* | host := ComputerName ; url.domain=* | host := url.domain ; host.name=* | host := host.name ; * | host := "unknown" }
| groupBy([flag, host], function=[count(as=events), min(@timestamp, as=first_seen), max(@timestamp, as=last_seen), collect([path, ImageFileName, source.ip])], limit=max)
| sort([flag, host], order=asc, limit=10000)Microsoft KQL
// Runs in Microsoft Sentinel with the Defender XDR connector, or in the unified Defender portal with Sentinel attached, so DeviceFileEvents and _Im_WebSession both resolve.
// YOUR_KNOWN_PHP_1 names each site's WP Rocket config file and any drop-in you keep on purpose, such as object-cache.php.
let start = datetime(2026-11-19);
let known = dynamic(["index.php", "advanced-cache.php", "YOUR_KNOWN_PHP_1"]);
let writes = DeviceFileEvents
| where FileName endswith ".php" and FolderPath has "/wp-content/" and ActionType in ("FileCreated", "FileModified", "FileRenamed")
| extend Flag = case(FileName matches regex @"^wp-media-.*\.php$", "1 wp-media-*.php file written",
FileName in~ (known), "",
FolderPath matches regex @"/wp-content/(uploads/.+|wp-rocket-config/[^/]+|[^/]+)\.php$", "2 PHP file written in uploads, wp-rocket-config or wp-content", "")
| where isnotempty(Flag)
| summarize Events = count(), FirstSeen = min(Timestamp), LastSeen = max(Timestamp), Paths = make_set(FolderPath, 20),
Writers = make_set(InitiatingProcessFileName, 10), Users = make_set(InitiatingProcessAccountName, 10) by Flag, Host = DeviceName;
let hits = _Im_WebSession(starttime=start)
| where HttpStatusCode == "200" and Url matches regex @"/wp-content/((uploads|wp-rocket-config)/[^?]+|wp-media-[^/?]*)\.php(\?|$)"
| extend Flag = "1 planted PHP path answered 200"
| summarize Events = count(), FirstSeen = min(TimeGenerated), LastSeen = max(TimeGenerated), Paths = make_set(Url, 20), Sources = make_set(SrcIpAddr, 20) by Flag, Host = coalesce(HttpHost, DvcHostname);
union writes, hits
| order by Flag asc, Host ascField mapping: Splunk Endpoint Filesystem; Elastic ECS file fields; CrowdStrike FileVantage with a policy on wp-content; Microsoft Defender DeviceFileEvents; plus Test 1 web fields. False positives: WP Rocket's per-domain config and drop-ins; name them in YOUR_KNOWN_PHP_1.
Hunt 3: the web server reaching out to fetch attacker code
Purpose: nip.io or trycloudflare.com lookups, PHP starting shells, and connections off your egress allowlist.
Splunk
| tstats summariesonly=false count min(_time) as first_seen max(_time) as last_seen from datamodel=Network_Traffic.All_Traffic where earliest="11/19/2026:00:00:00" All_Traffic.src_ip IN ("YOUR_WEB_HOST_IP_1", "YOUR_WEB_HOST_IP_2") by All_Traffic.src_ip All_Traffic.dest_ip
| rename All_Traffic.* as *
| where NOT (cidrmatch("10.0.0.0/8", dest_ip) OR cidrmatch("172.16.0.0/12", dest_ip) OR cidrmatch("192.168.0.0/16", dest_ip) OR cidrmatch("127.0.0.0/8", dest_ip) OR cidrmatch("169.254.0.0/16", dest_ip) OR cidrmatch("YOUR_EGRESS_ALLOWLIST_1", dest_ip) OR cidrmatch("YOUR_EGRESS_ALLOWLIST_2", dest_ip))
| eval host=src_ip, details=dest_ip, flag="2 web host connected or tried to connect to an address outside the private and allowlist ranges"
| append [| tstats summariesonly=false count min(_time) as first_seen max(_time) as last_seen values(DNS.query) as details from datamodel=Network_Resolution where earliest="11/19/2026:00:00:00" (DNS.query="*.nip.io" OR DNS.query="*.trycloudflare.com") DNS.src IN ("YOUR_WEB_HOST_IP_1", "YOUR_WEB_HOST_IP_2") by DNS.src
| rename DNS.src as host
| eval flag="1 web host looked up nip.io or trycloudflare.com"]
| append [| tstats summariesonly=false count min(_time) as first_seen max(_time) as last_seen values(Processes.process) as details from datamodel=Endpoint.Processes where earliest="11/19/2026:00:00:00" Processes.process_name IN ("sh", "bash", "dash", "curl", "wget", "python", "python3", "perl", "nc") by Processes.dest Processes.parent_process_name
| rename Processes.* as *
| where match(parent_process_name, "^(php.*|lsphp.*|apache2|httpd|nginx)$")
| eval host=dest, flag="1 PHP or web server process started a shell or downloader"]
| stats sum(count) as events min(first_seen) as first_seen max(last_seen) as last_seen values(details) as details by flag host
| convert ctime(first_seen) ctime(last_seen)
| sort flag hostElastic
FROM YOUR_ENDPOINT_INDEX
| WHERE @timestamp >= TO_DATETIME("2026-11-19T00:00:00Z") AND host.name IN ("YOUR_WEB_HOST_1", "YOUR_WEB_HOST_2")
| EVAL php_parent = process.parent.name RLIKE "(php.*|lsphp.*|apache2|httpd|nginx)",
php_proc = process.name RLIKE "(php.*|lsphp.*|apache2|httpd|nginx)",
tunnel = dns.question.name RLIKE """(.*\.)?(nip\.io|trycloudflare\.com)""" OR destination.domain RLIKE """(.*\.)?(nip\.io|trycloudflare\.com)"""
| EVAL flag = CASE(
tunnel, "1 web host looked up or reached nip.io or trycloudflare.com",
event.category == "process" AND event.type == "start" AND php_parent AND process.name IN ("sh", "bash", "dash", "curl", "wget", "python", "python3", "perl", "nc"), "1 PHP or web server process started a shell or downloader",
event.category == "network" AND network.direction == "egress" AND php_proc AND destination.ip IS NOT NULL AND NOT CIDR_MATCH(destination.ip, "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16", "127.0.0.0/8", "169.254.0.0/16", "YOUR_EGRESS_ALLOWLIST_1", "YOUR_EGRESS_ALLOWLIST_2"), "2 PHP worker connected or tried to connect to an address outside the private and allowlist ranges",
NULL)
| WHERE flag IS NOT NULL
| EVAL detail = CASE(tunnel, COALESCE(dns.question.name, destination.domain), event.category == "process", process.command_line, TO_STRING(destination.ip))
| STATS events = COUNT(*), first_seen = MIN(@timestamp), last_seen = MAX(@timestamp), details = VALUES(detail), processes = VALUES(process.name) BY flag, host.name
| SORT flag, host.nameCrowdStrike
// Time picker: Nov 19, 2026 to now. Needs the Falcon sensor on Linux web hosts, including its DnsRequest events.
// YOUR_WEB_HOST_1, YOUR_WEB_HOST_2 and the YOUR_EGRESS_ALLOWLIST ranges name your web servers and the outside services they need.
// Rows are scoped by host: a web server has no reason to look up nip.io or trycloudflare.com, whichever process asks.
#event_simpleName=/^(ProcessRollup2|DnsRequest|NetworkConnectIP4)$/ event_platform=Lin
| case { ComputerName=* ; * | match(file="aid_master_main.csv", field=aid, include=ComputerName, ignoreCase=true, strict=false) }
| in(field=ComputerName, values=["YOUR_WEB_HOST_1", "YOUR_WEB_HOST_2"], ignoreCase=true)
| case {
#event_simpleName=DnsRequest | DomainName=/(^|\.)(nip\.io|trycloudflare\.com)\.?$/i | flag := "1 web host looked up nip.io or trycloudflare.com" | detail := DomainName ;
#event_simpleName=ProcessRollup2 | ParentBaseFileName=/^(php.*|lsphp.*|apache2|httpd|nginx)$/i | ImageFileName=/\/(sh|bash|dash|curl|wget|python|python3|perl|nc)$/ | flag := "1 PHP or web server process started a shell or downloader" | detail := CommandLine ;
#event_simpleName=NetworkConnectIP4 | !cidr(RemoteAddressIP4, subnet=["10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16", "127.0.0.0/8", "169.254.0.0/16", "YOUR_EGRESS_ALLOWLIST_1", "YOUR_EGRESS_ALLOWLIST_2"]) | flag := "2 web host connected or tried to connect to an address outside the private and allowlist ranges" | detail := RemoteAddressIP4 }
| groupBy([flag, ComputerName], function=[count(as=events), min(@timestamp, as=first_seen), max(@timestamp, as=last_seen), collect([detail])], limit=max)
| sort([flag, ComputerName], order=asc, limit=10000)Microsoft KQL
let start = datetime(2026-11-19);
let webHosts = dynamic(["YOUR_WEB_HOST_1", "YOUR_WEB_HOST_2"]);
let allow = dynamic(["YOUR_EGRESS_ALLOWLIST_1", "YOUR_EGRESS_ALLOWLIST_2"]);
let shells = dynamic(["sh", "bash", "dash", "curl", "wget", "python", "python3", "perl", "nc"]);
let net = DeviceNetworkEvents
| where Timestamp >= start and DeviceName in~ (webHosts)
| extend Flag = case(RemoteUrl matches regex @"(?i)(^|\.)(nip\.io|trycloudflare\.com)(:|/|$)", "1 web host reached nip.io or trycloudflare.com",
InitiatingProcessFileName matches regex @"(?i)^(php.*|lsphp.*|apache2|httpd|nginx)$" and ActionType != "InboundConnectionAccepted" and RemoteIPType == "Public" and not(ipv4_is_in_any_range(RemoteIP, allow)), "2 PHP worker connected or tried to connect to a public address off the egress allowlist", "")
| where isnotempty(Flag)
| project Timestamp, DeviceName, Flag, Detail = iff(isnotempty(RemoteUrl), RemoteUrl, RemoteIP), Process = InitiatingProcessFileName;
let procs = DeviceProcessEvents
| where Timestamp >= start and FileName in (shells) and InitiatingProcessFileName matches regex @"(?i)^(php.*|lsphp.*|apache2|httpd|nginx)$"
| project Timestamp, DeviceName, Flag = "1 PHP or web server process started a shell or downloader", Detail = ProcessCommandLine, Process = FileName;
union net, procs
| summarize Events = count(), FirstSeen = min(Timestamp), LastSeen = max(Timestamp), Details = make_set(Detail, 20), Processes = make_set(Process, 10) by Flag, DeviceName
| order by Flag asc, DeviceName ascField mapping: Splunk Network_Resolution, Network_Traffic and Endpoint; Elastic dns, destination and process fields; CrowdStrike DnsRequest and NetworkConnectIP4; Microsoft Defender network and process tables. Splunk and CrowdStrike egress rows cover the whole host; their network events name no process. False positives: updates, license checks, payments and mail, so build the allowlist from a week of traffic.
Reading the results before you escalate
A Test 1 site on a release before 3.24.2 with either setting on needs the update and Hunts 1 to 3 back to November 19. A Hunt 1 hit means probing: on an old release with a setting on, go to Hunt 2; if patched or both settings were off, record it. A wp-media-*.php write or a planted path answering 200 in Hunt 2 means compromise and the start of incident response: copy the file and logs, remove it, check for new administrators and changed files, rotate credentials and search every site on that server for the same name. Any other Hunt 2 file is a lead until you open it and rule out WP Rocket's config, drop-ins and your own changes. A nip.io, trycloudflare.com or shell row in Hunt 3 means the host is compromised even if Hunt 2 was clean; rebuild if you cannot account for every change. An allowlist row is a lead until you name the destination. Clean results still mean keeping the update and blocking PHP in the uploads folder.
One next step
Today, list every WordPress site you manage, confirm WP Rocket 3.24.2 or later on each, and on any site that ran an older release with either setting on, check wp-content for PHP files you did not put there. The update closes the hole but leaves what came through it, and website security means checking both. For the Microsoft 365 side of your clients' risk, start with a free Inception Foresight M365 Assessment at inceptionsecurity.com/m365assessment.
Follow us on LinkedIn (Inception Security) and X (@inceptionsec).



