top of page

Drupal Installer: Patched Sites Can Still Be Taken Over

Writer: Inception Security
Inception Security
17 minutes ago
14 min read
Four-panel comic. Step 1, The MSP patches a client Drupal site: a technician at a laptop showing Drupal updated says Patched. We're good. Step 2, The installer page is still reachable: a hooded figure at a door labeled install.php says This door is still open. Step 3, The attacker takes over the site: the figure wearing a crown labeled Admin at a desk says This site is mine now. Step 4, Block the installer, then hunt the logs: the install.php door is padlocked and a screen reads Hunt install.php hits, with the line Blocked. Now we check. The footer reads Patched is not the same as safe. Inception Security.

What this means for your clients: If you run a Drupal site, or a provider hosts one, last week's update can leave the door open. The installer page can still let someone take over the site, and the admin screens will not warn you. Ask your provider to block that page today.


If someone reran the installer on one of your clients' Drupal sites last week and made themselves the admin, where would you see it? Drupal's SA-CORE-2026-019 says sites that applied last week's installer fix can still be taken over through install.php if they sit in an unusual or incomplete install state, and that nothing in the admin UI shows it. This is being exploited in the wild. CISA added CVE-2026-136716 on November 27 with a November 30 federal deadline, so a Drupal installer that still answers is a risk until you block it, check the site, and hunt.


As of 8:06 AM MST, Saturday, November 28, 2026, Drupal says the installer flaw fixed in SA-CORE-2026-019 is being exploited in the wild, the fixed releases are 10.6.23, 11.3.23 and 11.4.14 followed by a database update, and CISA lists it as a known exploited vulnerability.


What happened


Drupal ships install.php, and Composer puts it back whenever it installs or updates core. SA-CORE-2026-017, on November 18, warned that under specific conditions an attacker can use the installer to attempt to reinstall Drupal, leading to a site takeover or remote code execution, with a later report of exploitation as early as 12:00 PM MST on November 19. The November 25 advisory, an access bypass rated Highly critical 21/25, says sites in unusual or incomplete install states, including production, stayed vulnerable. A compromised site can leave that state behind, so check every site whose installer stayed reachable after SA-CORE-2026-017. A takeover can replace user 1's username, email, password and timezone, add admin accounts and plant PHP files. Drupal published no IPs, hashes or domains and named no actor. An update hook must run after 10.6.23, 11.3.23 or 11.4.14, and end-of-life branches (11.2, 10.5 and older) get no code fix; block the installer until you upgrade.


Why this matters for MSPs and small businesses


For MSPs and small businesses, this hits client marketing sites, staging copies and multisites that nobody watches daily. A takeover makes the attacker the administrator of content, forms, users and anything the site connects to. A planted PHP file on a shared web server can reach other sites on the same box and credentials in settings.php. Pipelines that skip the database update leave the install state unrepaired while dashboards show a patched version.


What to do today


Block the Drupal installer at the web server with a prefix match, and remove the file in the build. Then save the logs; some hosts keep only a few days. Drupal's securing guide gives an Apache Location rule (in server config, not .htaccess) and an nginx "^~" prefix rule; test /core/install.php, /install.php and /core/install.php/foo and confirm each returns 403 or 404. Blocking install.php does not affect update.php.


Before the database update, capture install_task, install_time, install_session_token and user 1, because the update changes some of them. Drupal's compromise check is the list to run on each site:


drush user:information --uid=1
drush state:get install_task
drush state:get install_session_token
drush php-eval "var_dump(date('Y-m-d\TH:i:s', (int) \Drupal::state()->get('install_time')))"
drush sql:query "SELECT u.uid, u.name, u.mail, FROM_UNIXTIME(u.created), FROM_UNIXTIME(u.changed), FROM_UNIXTIME(u.login) FROM users_field_data u WHERE u.uid = 1 OR u.uid IN (SELECT entity_id FROM user__roles WHERE roles_target_id = 'administrator') ORDER BY u.changed DESC"
ls -l web/sites/*/settings.php
grep -nE "^\s*\\\$settings\[['\"]hash_salt['\"]\]" web/sites/*/settings.php
find web/sites/*/files -path '*/php/twig/*' -prune -o \( -name '*.php*' -o -name '.htaccess' \) -newermt 2026-11-17 -print

Set user 1's email to one you control and reset its password. If any check looks wrong, save the database and files, rebuild from Git or composer install, restore the database from before the first suspicious installer request, rotate every secret including hash_salt and database credentials, and log everyone out. Then update to 10.6.23, 11.3.23 or 11.4.14, run update.php or drush updatedb, and write down the time. Updating alone does not clean a compromised site. Make "code deployed, database updates run, installer blocked" a pipeline check, inventory every hosted Drupal site, and keep 30 days of web logs off the server.


How to hunt


Hunt from November 17, 2026, a day before Drupal's first advisory, through today; go back further if retention allows. The hunts read web access logs in Splunk, Elastic, CrowdStrike and Microsoft KQL, plus Linux file and process events for Hunts 2 and 3. Swap each YOUR_ name for your own.


Test 1: which of your sites still answer on the installer


Purpose: every site, method, status and response size for /core/install.php and /install.php, plus a coverage row. A 403 or 404 means the installer is blocked. A small 200 is usually the already-installed page and means the installer is still reachable.


Splunk


| tstats summariesonly=false count min(_time) as first max(_time) as last avg(Web.bytes_out) as avg_bytes from datamodel=Web where earliest="11/17/2026:00:00:00" (Web.uri_path="/core/install.php*" OR Web.uri_path="/install.php") by Web.dest Web.uri_path Web.http_method Web.status
| rename Web.* as *
| eval flag=case(status=="403" OR status=="404", "3 blocked: installer returned ".status,
    status=="200", "2 installer reachable: block it today and run Hunt 1",
    true(), "3 installer request: review the status")
| append [ | tstats summariesonly=false count min(_time) as first max(_time) as last dc(Web.dest) as hosts from datamodel=Web where earliest="11/17/2026:00:00:00"
    | appendpipe [ | stats count as rows | where rows==0 | eval count=0 ]
    | eval dest="ALL HOSTS", flag=case(count==0, "1 no web telemetry since Nov 17: source missing",
        first>strptime("2026-11-18", "%Y-%m-%d"), "2 web data starts after Nov 17: short coverage",
        true(), "4 coverage: web telemetry flowing since Nov 17") ]
| convert ctime(first) ctime(last)
| table flag dest uri_path http_method status avg_bytes count hosts first last
| sort flag

Elastic


FROM YOUR_WEB_INDEX
| WHERE @timestamp >= TO_DATETIME("2026-11-17T00:00:00Z") AND (data_stream.dataset IN ("nginx.access", "apache.access") OR http.request.method IS NOT NULL)
| EVAL path = COALESCE(url.path, "")
| EVAL inst = path LIKE "/core/install.php*" OR path == "/install.php"
| EVAL key = CASE(inst, CONCAT(COALESCE(host.name, "no host"), " | ", path, " | ", COALESCE(http.request.method, "-"), " | ", TO_STRING(http.response.status_code)), "ALL HOSTS")
| STATS events = COUNT(*), hosts = COUNT_DISTINCT(host.name), first_seen = MIN(@timestamp), last_seen = MAX(@timestamp), avg_bytes = AVG(http.response.body.bytes) BY key
| EVAL flag = CASE(key == "ALL HOSTS" AND first_seen > TO_DATETIME("2026-11-18T00:00:00Z"), "2 web data starts after Nov 17: short coverage",
    key == "ALL HOSTS", "4 coverage: web telemetry flowing since Nov 17",
    ENDS_WITH(key, " | 403") OR ENDS_WITH(key, " | 404"), "3 blocked: installer returned a deny code",
    ENDS_WITH(key, " | 200"), "2 installer reachable: block it today and run Hunt 1",
    "3 installer request: review the status")
| SORT flag

CrowdStrike


// Time picker: Nov 17, 2026 to now.
// Reads the CrowdStrike nginx package (parser f5networks-nginx, #event.dataset=nginx.access) and Apache package (parser apache_access, #logtype=apache-access-log).
(#event.dataset=nginx.access OR #logtype=apache-access-log)
| coalesce([server_name, host.name, @collect.host, "no host"], as=site)
| coalesce([url.path, url.original, url], as=path)
| replace("\\?.*$", with="", field=path, as=path)
| coalesce([http.request.method, method], as=meth)
| coalesce([http.response.status_code, status_code], as=code)
| coalesce([http.response.body.bytes, response_size], as=bytes)
| case {
    path=/^\/core\/install\.php/ | key := format("%s | %s | %s | %s", field=[site, path, meth, code]) ;
    path=/^\/install\.php$/ | key := format("%s | %s | %s | %s", field=[site, path, meth, code]) ;
    * | key := "ALL HOSTS" }
| groupBy([key], function=[count(as=events), count(site, distinct=true, as=hosts), min(@timestamp, as=first), max(@timestamp, as=last), avg(bytes, as=avg_bytes)], limit=max)
| case {
    key="ALL HOSTS" | test(first > 1794960000000) | flag := "2 web data starts after Nov 17: short coverage" ;
    key="ALL HOSTS" | flag := "4 coverage: web telemetry flowing since Nov 17" ;
    key=/ \| 403$/ | flag := "3 blocked: installer returned a deny code" ;
    key=/ \| 404$/ | flag := "3 blocked: installer returned a deny code" ;
    key=/ \| 200$/ | flag := "2 installer reachable: block it today and run Hunt 1" ;
    * | flag := "3 installer request: review the status" }
| sort(flag, order=asc, limit=1000)

Microsoft KQL


// Apache HTTP Server and IIS logs reach _Im_WebSession through Microsoft's built-in parsers. Microsoft ships no nginx web session parser, so add your own ASimWebSession function for nginx.
let start = datetime(2026-11-17);
let web = _Im_WebSession(starttime=start)
    | where EventType == "WebServerSession" and Url matches regex @"^(https?://[^/]+)?/(core/)?install\.php"
    | extend Path = tostring(split(Url, "?")[0]), Method = HttpRequestMethod, Status = toint(HttpStatusCode), Bytes = toreal(coalesce(column_ifexists("HttpResponseBodyBytes", long(null)), column_ifexists("DstBytes", long(null)))), Site = tostring(Dvc);
let coverage = _Im_WebSession(starttime=start)
    | where EventType == "WebServerSession"
    | summarize Events = count(), First = min(TimeGenerated), Last = max(TimeGenerated)
    | extend Flag = case(Events == 0, "1 no web telemetry since Nov 17: source missing",
        First > start + 1d, "2 web data starts after Nov 17: short coverage",
        "4 coverage: web telemetry flowing since Nov 17"), Path = "ALL SESSIONS", Site = "", Method = "", Status = int(null), Bytes = real(null);
let inventory = web
    | summarize Events = count(), First = min(TimeGenerated), Last = max(TimeGenerated), AvgBytes = avg(Bytes) by Site, Path, Method, Status
    | extend Flag = case(Status in (403, 404), "3 blocked: installer returned a deny code",
        Status == 200, "2 installer reachable: block it today and run Hunt 1",
        "3 installer request: review the status");
union isfuzzy=true coverage, inventory
| order by Flag asc

Field mapping: Splunk CIM Web; Elastic ECS url and http fields on nginx.access and apache.access; CrowdStrike nginx package (CPS fields) and Apache package (url, method, status_code, response_size); Microsoft Sentinel _Im_WebSession (Url, HttpRequestMethod, HttpStatusCode), which includes IIS. An empty Elastic or CrowdStrike result clears nothing until you confirm those web logs are in that index.


Hunt 1: installer requests that did more than knock


Purpose: POST requests that returned 302 or 303, oversized responses, URLs that carry op= or id=, path suffixes, and five-minute bursts from one source.


Splunk


| tstats summariesonly=false count min(_time) as first max(_time) as last max(Web.bytes_out) as max_bytes values(Web.url) as urls from datamodel=Web where earliest="11/17/2026:00:00:00" (Web.uri_path="/core/install.php*" OR Web.uri_path="/install.php*") by Web.dest Web.src Web.uri_path Web.http_method Web.status
| rename Web.* as *
| eval YOUR_SIZE_MULTIPLIER=3, u=mvjoin(urls, " ")
| eval flag=case(http_method="POST" AND (status="302" OR status="303"), "1 POST to the installer returned a redirect",
    like(uri_path, "/core/install.php/%") OR like(uri_path, "/install.php/%"), "1 installer path with a suffix",
    like(u, "%op=%") OR like(u, "%id=%") OR like(uri_path, "%op=%") OR like(uri_path, "%id=%"), "1 installer request carried op= or id=",
    max_bytes > 2048 * YOUR_SIZE_MULTIPLIER, "2 installer response well above the 2 KB already-installed page")
| where isnotnull(flag)
| append [ | tstats summariesonly=false count min(_time) as first max(_time) as last from datamodel=Web where earliest="11/17/2026:00:00:00" (Web.uri_path="/core/install.php*" OR Web.uri_path="/install.php*") by _time span=5m Web.dest Web.src
    | rename Web.* as *
    | eval YOUR_BURST_THRESHOLD=10
    | where count > YOUR_BURST_THRESHOLD
    | eval flag="2 burst of installer requests from one source in 5 minutes", uri_path="", http_method="", status="", max_bytes=""
    ]
| convert ctime(first) ctime(last)
| table flag dest src uri_path http_method status max_bytes count first last
| sort flag

Elastic


FROM YOUR_WEB_INDEX
| WHERE @timestamp >= TO_DATETIME("2026-11-17T00:00:00Z") AND (data_stream.dataset IN ("nginx.access", "apache.access") OR http.request.method IS NOT NULL)
| EVAL path = COALESCE(url.path, ""), q = COALESCE(url.query, url.original, ""), bytes = http.response.body.bytes
| WHERE path LIKE "/core/install.php*" OR path LIKE "/install.php*"
| EVAL bucket = DATE_TRUNC(5 minutes, @timestamp)
| STATS events = COUNT(*), first_seen = MIN(@timestamp), last_seen = MAX(@timestamp), maxb = MAX(bytes),
    post_redir = COUNT(*) WHERE http.request.method == "POST" AND http.response.status_code IN (302, 303),
    op_id = COUNT(*) WHERE q LIKE "*op=*" OR q LIKE "*id=*" OR path LIKE "*op=*" OR path LIKE "*id=*",
    suffix = COUNT(*) WHERE path LIKE "/core/install.php/*" OR path LIKE "/install.php/*"
    BY host.name, source.ip, bucket
| EVAL YOUR_SIZE_MULTIPLIER = 3, YOUR_BURST_THRESHOLD = 10
| EVAL flag = CASE(post_redir > 0, "1 POST to the installer returned a redirect",
    suffix > 0, "1 installer path with a suffix",
    op_id > 0, "1 installer request carried op= or id=",
    maxb > 2048 * YOUR_SIZE_MULTIPLIER, "2 installer response well above the 2 KB already-installed page",
    events > YOUR_BURST_THRESHOLD, "2 burst of installer requests from one source in 5 minutes",
    NULL)
| WHERE flag IS NOT NULL
| SORT flag, first_seen

CrowdStrike


// Time picker: Nov 17, 2026 to now. YOUR_SIZE_MULTIPLIER=3 and YOUR_BURST_THRESHOLD=10 are starting values; tune them to your traffic.
// Reads the CrowdStrike nginx package (#event.dataset=nginx.access) and Apache package (#logtype=apache-access-log).
(#event.dataset=nginx.access OR #logtype=apache-access-log)
| coalesce([server_name, host.name, @collect.host, "no host"], as=site)
| coalesce([url.original, url], as=q)
| coalesce([url.path, url.original, url], as=path)
| replace("\\?.*$", with="", field=path, as=path)
| coalesce([http.request.method, method], as=meth)
| coalesce([http.response.status_code, status_code], as=code)
| coalesce([http.response.body.bytes, response_size], as=bytes)
| coalesce([source.ip, client], as=src)
| path=/^\/(core\/)?install\.php/
| slot := @timestamp / 300000
| math:floor(slot, as=win)
| case { meth="POST" code=/^30[23]$/ | post_redir := 1 ; * | post_redir := 0 }
| case { path=/^\/(core\/)?install\.php\/.*/ | suffix := 1 ; * | suffix := 0 }
| case { q=/[?&](op|id)=/ | op_id := 1 ; * | op_id := 0 }
| groupBy([site, src, win], function=[count(as=events), min(@timestamp, as=first), max(@timestamp, as=last), max(bytes, as=max_bytes), sum(post_redir, as=post_redir), sum(suffix, as=suffix), sum(op_id, as=op_id)], limit=max)
| default(field=[max_bytes], value=0)
| YOUR_SIZE_MULTIPLIER := 3
| YOUR_BURST_THRESHOLD := 10
| case {
    test(post_redir > 0) | flag := "1 POST to the installer returned a redirect" ;
    test(suffix > 0) | flag := "1 installer path with a suffix" ;
    test(op_id > 0) | flag := "1 installer request carried op= or id=" ;
    test(max_bytes > 2048 * YOUR_SIZE_MULTIPLIER) | flag := "2 installer response well above the 2 KB already-installed page" ;
    test(events > YOUR_BURST_THRESHOLD) | flag := "2 burst of installer requests from one source in 5 minutes" }
| sort(flag, order=asc, limit=1000)

Microsoft KQL


// YOUR_SIZE_MULTIPLIER=3 and YOUR_BURST_THRESHOLD=10 are starting values; tune them to your traffic.
// Apache HTTP Server and IIS logs reach _Im_WebSession through Microsoft's built-in parsers. Microsoft ships no nginx web session parser, so add your own ASimWebSession function for nginx.
let start = datetime(2026-11-17);
let YOUR_SIZE_MULTIPLIER = 3.0;
let YOUR_BURST_THRESHOLD = 10;
let web = _Im_WebSession(starttime=start)
    | where EventType == "WebServerSession" and Url matches regex @"^(https?://[^/]+)?/(core/)?install\.php"
    | extend Path = tostring(split(Url, "?")[0]), Query = Url, Method = HttpRequestMethod, Status = toint(HttpStatusCode), Bytes = toreal(coalesce(column_ifexists("HttpResponseBodyBytes", long(null)), column_ifexists("DstBytes", long(null)))), Host = SrcIpAddr, Site = tostring(Dvc);
let ev = web
    | extend Bucket = bin(TimeGenerated, 5m);
let sized = ev
    | summarize Events = count(), First = min(TimeGenerated), Last = max(TimeGenerated), MaxB = max(Bytes),
        PostRedir = countif(Method == "POST" and Status in (302, 303)),
        OpId = countif(Query contains "op=" or Query contains "id=" or Path contains "op=" or Path contains "id="),
        Suffix = countif(Path matches regex @"/(core/)?install\.php/.*")
        by Site, Host
    | extend Flag = case(PostRedir > 0, "1 POST to the installer returned a redirect",
        Suffix > 0, "1 installer path with a suffix",
        OpId > 0, "1 installer request carried op= or id=",
        MaxB > 2048 * YOUR_SIZE_MULTIPLIER, "2 installer response well above the 2 KB already-installed page",
        "");
let bursts = ev
    | summarize Events = count(), First = min(TimeGenerated), Last = max(TimeGenerated) by Site, Host, Bucket
    | where Events > YOUR_BURST_THRESHOLD
    | extend Flag = "2 burst of installer requests from one source in 5 minutes", MaxB = real(null), PostRedir = long(null), OpId = long(null), Suffix = long(null);
union sized, bursts
| where isnotempty(Flag)
| order by Flag asc, First asc

Field mapping: same web fields as Test 1, plus Splunk Web.url and Elastic url.query or url.original. YOUR_SIZE_MULTIPLIER and YOUR_BURST_THRESHOLD are starting values (3 and 10); tune them to your traffic. False positives: scanners with a small GET 200 belong in Test 1.


Hunt 2: PHP files in the files directory


Purpose: web requests or PHP files under /sites/*/files/ except /files/php/twig/, and settings.php file events since November 17.


Splunk


| tstats summariesonly=false count min(_time) as first max(_time) as last from datamodel=Web where earliest="11/17/2026:00:00:00" (Web.uri_path="*/sites/*/files/*.php*" AND NOT Web.uri_path="*/files/php/twig/*") by Web.dest Web.src Web.uri_path Web.http_method Web.status
| rename Web.* as *
| eval flag="1 web request to PHP in the files directory", object=uri_path, host=dest
| append [ | tstats summariesonly=false count min(_time) as first max(_time) as last from datamodel=Endpoint.Filesystem where earliest="11/17/2026:00:00:00" ((Filesystem.file_path="*/sites/*/files/*.php*" AND NOT Filesystem.file_path="*/files/php/twig/*") OR Filesystem.file_name="settings.php" OR Filesystem.file_path="*/settings.php") by Filesystem.dest Filesystem.file_path Filesystem.file_name Filesystem.action
    | rename Filesystem.* as *
    | eval object=file_path, host=dest
    | eval flag=if(file_name=="settings.php" OR like(file_path, "%settings.php"), "2 settings.php file event since Nov 17", "1 PHP file in the files directory") ]
| convert ctime(first) ctime(last)
| table flag host object http_method status action count first last
| sort flag

Elastic


FROM YOUR_WEB_INDEX, YOUR_ENDPOINT_INDEX
| WHERE @timestamp >= TO_DATETIME("2026-11-17T00:00:00Z")
| EVAL path = TO_LOWER(COALESCE(url.path, "")), fpath = TO_LOWER(COALESCE(file.path, "")), fname = TO_LOWER(COALESCE(file.name, ""))
| EVAL flag = CASE(path LIKE "/sites/*/files/*.php*" AND NOT path LIKE "*/files/php/twig/*", "1 web request to PHP in the files directory",
    event.category == "file" AND (fname == "settings.php" OR fpath LIKE "*/settings.php"), "2 settings.php file event since Nov 17",
    event.category == "file" AND fpath LIKE "*/sites/*/files/*.php*" AND NOT fpath LIKE "*/files/php/twig/*", "1 PHP file in the files directory",
    NULL)
| WHERE flag IS NOT NULL
| EVAL object = CASE(fpath != "", fpath, path)
| STATS events = COUNT(*), first_seen = MIN(@timestamp), last_seen = MAX(@timestamp) BY flag, host.name, object
| SORT flag

CrowdStrike


// Time picker: Nov 17, 2026 to now.
// Web half: CrowdStrike nginx package (#event.dataset=nginx.access) and Apache package (#logtype=apache-access-log).
// File half: Falcon Linux NewScriptWritten, which records the script in FilePath and FileName.
(#event.dataset=nginx.access OR #logtype=apache-access-log OR (#event_simpleName=NewScriptWritten event_platform=Lin))
| case {
    #event_simpleName=NewScriptWritten | path := format("%s%s", field=[FilePath, FileName]) | host := aid | kind := "file" ;
    * | coalesce([url.path, url.original, url], as=path) | coalesce([server_name, host.name, @collect.host, "no host"], as=host) | kind := "web" }
| replace("\\?.*$", with="", field=path, as=path)
| (path=/\/sites\/[^\/]+\/files\/.*\.php/i path!=/\/files\/php\/twig\//i) OR (kind="file" path=/\/settings\.php$/i)
| case {
    kind="file" path=/\/settings\.php$/i | flag := "2 settings.php file event since Nov 17" ;
    kind="file" | flag := "1 PHP file in the files directory" ;
    * | flag := "1 web request to PHP in the files directory" }
| groupBy([flag, host, path], function=[count(as=events), min(@timestamp, as=first), max(@timestamp, as=last)], limit=max)
| sort(flag, order=asc, limit=1000)

Microsoft KQL


// Web half: Apache and IIS through _Im_WebSession. File half needs Linux servers onboarded to Defender.
let start = datetime(2026-11-17);
let web = _Im_WebSession(starttime=start)
    | where EventType == "WebServerSession" and Url matches regex @"/sites/[^/]+/files/.*\.php" and Url !contains "/files/php/twig/"
    | extend Flag = "1 web request to PHP in the files directory", Object = tostring(split(Url, "?")[0]), Device = tostring(Dvc);
let files = DeviceFileEvents
    | where Timestamp >= start
    | extend P = tolower(strcat(FolderPath, "/")), N = tolower(FileName)
    | where (N matches regex @"\.php\d*$" and P contains @"/sites/" and P contains @"/files/" and P !contains @"/files/php/twig/")
        or N == "settings.php"
    | extend Flag = iff(N == "settings.php", "2 settings.php file event since Nov 17", "1 PHP file in the files directory"),
        Object = strcat(FolderPath, "/", FileName), Device = DeviceName, TimeGenerated = Timestamp;
union isfuzzy=true web, files
| summarize Events = count(), First = min(TimeGenerated), Last = max(TimeGenerated) by Flag, Device, Object
| order by Flag asc

Field mapping: Splunk CIM Web and Endpoint.Filesystem; Elastic url.path and file.path; CrowdStrike web fields as in Test 1 plus Linux NewScriptWritten (FilePath and FileName); Defender DeviceFileEvents on Linux servers with MDE. False positives: the Twig cache under files/php/twig is excluded; Drupal also creates .htaccess files in the files directory, so compare those with a backup.


Hunt 3: the web server starting a shell


Purpose: php-fpm, apache2, httpd or nginx starting sh, bash, dash, curl, wget, python, perl, nc or base64. Pair hits with crontab and ~/.ssh/authorized_keys checks.


Splunk


| tstats summariesonly=false count min(_time) as first max(_time) as last values(Processes.process) as process from datamodel=Endpoint.Processes where earliest="11/17/2026:00:00:00" (Processes.parent_process_name="php-fpm*" OR Processes.parent_process_name="apache2" OR Processes.parent_process_name="httpd" OR Processes.parent_process_name="nginx" OR Processes.parent_process_name="httpd*") (Processes.process_name="sh" OR Processes.process_name="bash" OR Processes.process_name="dash" OR Processes.process_name="curl" OR Processes.process_name="wget" OR Processes.process_name="perl" OR Processes.process_name="nc" OR Processes.process_name="base64" OR Processes.process_name="python*") by Processes.dest Processes.parent_process_name Processes.process_name
| rename Processes.* as *
| eval flag="1 web server started a shell or transfer tool"
| convert ctime(first) ctime(last)
| table flag dest parent_process_name process_name process count first last
| sort flag

Elastic


FROM YOUR_ENDPOINT_INDEX
| WHERE @timestamp >= TO_DATETIME("2026-11-17T00:00:00Z") AND event.category == "process"
| EVAL parent = TO_LOWER(COALESCE(process.parent.name, "")), pname = TO_LOWER(COALESCE(process.name, ""))
| WHERE (parent IN ("apache2", "httpd", "nginx") OR parent LIKE "php-fpm*" OR parent LIKE "httpd*")
    AND (pname IN ("sh", "bash", "dash", "curl", "wget", "perl", "nc", "base64") OR pname LIKE "python*")
| STATS events = COUNT(*), first_seen = MIN(@timestamp), last_seen = MAX(@timestamp), cmds = VALUES(process.command_line) BY host.name, parent, pname
| EVAL flag = "1 web server started a shell or transfer tool"
| SORT first_seen

CrowdStrike


// Time picker: Nov 17, 2026 to now.
#event_simpleName=ProcessRollup2 event_platform=Lin
| ParentBaseFileName=/^(php-fpm.*|apache2|httpd.*|nginx)$/i
| ImageFileName=/\/(sh|bash|dash|curl|wget|python[0-9.]*|perl|nc|base64)$/i
| groupBy([aid, ParentBaseFileName, ImageFileName, CommandLine, UID], function=[count(as=events), min(@timestamp, as=first), max(@timestamp, as=last)], limit=max)
| flag := "1 web server started a shell or transfer tool"
| sort(first, order=asc, limit=1000)

Microsoft KQL


let start = datetime(2026-11-17);
DeviceProcessEvents
| where Timestamp >= start
| where InitiatingProcessFileName in~ ("apache2", "httpd", "nginx") or InitiatingProcessFileName startswith "php-fpm" or InitiatingProcessFileName startswith "httpd"
| where FileName in~ ("sh", "bash", "dash", "curl", "wget", "perl", "nc", "base64") or FileName startswith "python"
| extend Flag = "1 web server started a shell or transfer tool"
| summarize Events = count(), First = min(Timestamp), Last = max(Timestamp), Cmds = make_set(ProcessCommandLine, 10)
    by Flag, DeviceName, InitiatingProcessFileName, FileName, AccountName
| order by First asc

Field mapping: Splunk CIM Endpoint.Processes; Elastic process.parent.name and process.name; CrowdStrike ProcessRollup2 on Linux; Defender DeviceProcessEvents. False positives: some modules shell out for image tools, PDF work or drush from cron, so baseline by command line per site.


Reading the results before you escalate


A Test 1 result of 200 means the installer is reachable, not a confirmed compromise. Block it today, then run Hunt 1 and the site checks. A Hunt 1 hit (POST plus redirect, large response, op= or id=, path suffix, or burst) makes the site suspect: note the earliest time, then run the drush checks and Hunts 2 and 3. A confirmed Hunt 2 or Hunt 3 hit, or a red site check (user 1 changed, an unknown admin account, install_session_token set, unexplained install_time, extra hash_salt, or PHP outside php/twig), means you treat the site as compromised. Follow Drupal's rebuild steps, then review other sites on the same server. If Test 1 shows source missing or short coverage, fix logging before you call the site clean. A site missing from Test 1 is not cleared: test /core/install.php and confirm its logs reach your SIEM.


One next step


This week, add a deploy check that fails if /core/install.php answers with anything but 403 or 404, or if database updates are pending. For the identity side of this risk, start with a free Inception Foresight M365 Assessment at inceptionsecurity.com/m365assessment.


bg-map-white.png

INCEPTION SECURITY™

A cybersecurity company with in depth knowledge of the threat landscape and security controls.

NAVIGATION

GET IN TOUCH

© 2025 All Rights Reserved by INCEPTION SECURITY™ .

bottom of page