<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:webfeeds="http://webfeeds.org/rss/1.0"><channel><title>Init-Scripts - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/init-scripts/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata. Fed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Fri, 11 Sep 2026 12:50:06 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/init-scripts/feed.xml" rel="self" type="application/rss+xml"/><image><url>https://feed.craftedsignal.io/favicon-32x32.png</url><title>CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/</link><width>32</width><height>32</height></image><webfeeds:icon>https://feed.craftedsignal.io/favicon.svg</webfeeds:icon><item><title>Linux Persistence via System V Init Script Manipulation</title><link>https://feed.craftedsignal.io/briefs/2026-09-linux-init-d-persistence/</link><pubDate>Fri, 11 Sep 2026 12:50:06 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-09-linux-init-d-persistence/</guid><description>Adversaries gain persistence on Linux systems by creating or modifying initialization scripts in /etc/init.d/ or /etc/init/, allowing for malicious code execution with root privileges during system boot.</description><content:encoded><![CDATA[<p>Adversaries targeting Linux systems frequently leverage legacy initialization directories to establish persistence. By placing malicious scripts or binaries within the /etc/init.d/, /etc/init/, or /etc/inittab directories, attackers ensure their code executes during the system startup process. Although modern Linux distributions have largely transitioned to systemd, the systemd-sysv-generator utility remains active on many systems to maintain backward compatibility, automatically converting these legacy files into functional systemd services.</p>
<p>When these scripts are processed, they typically execute with root-level privileges, providing the adversary with a highly privileged foothold. This technique is frequently observed in malware such as HiddenWasp, which utilizes these mechanisms to ensure survival across reboots. Detecting this behavior requires visibility into file creation and modification events within sensitive system directories, filtered against legitimate package management activity that may perform similar operations during software updates or system maintenance.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker gains initial access to a Linux system (e.g., via exploit, credential theft, or web shell).</li>
<li>Attacker escalates privileges to root to gain write access to system directories.</li>
<li>Attacker crafts a malicious shell script or binary containing the desired payload.</li>
<li>Attacker writes the file to /etc/init.d/ or /etc/init/ to register it as a startup service.</li>
<li>Attacker marks the file as executable using the chmod utility.</li>
<li>The systemd-sysv-generator utility detects the new file and converts it into a systemd service unit.</li>
<li>Upon the next system reboot, the initialization process triggers the script, executing the malicious payload with root privileges.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation allows attackers to maintain long-term persistence on compromised Linux servers, enabling data exfiltration, lateral movement, and command-and-control communication. Because the scripts run as root, this persistence mechanism is exceptionally difficult to remove without full incident response intervention. This technique affects any Linux environment where legacy System V initialization compatibility is maintained, particularly legacy infrastructure or servers configured to support older service management workflows.</p>
<h2 id="recommendation">Recommendation</h2>
<ol>
<li>Deploy the Sigma rule provided below to monitor for suspicious file creation in initialization directories.</li>
<li>Baseline authorized software installation paths and package manager binaries (e.g., apt, dnf, rpm) to reduce false positives in the detection rule.</li>
<li>Regularly audit the /etc/init.d/ and /etc/init/ directories for unauthorized or unrecognized scripts.</li>
<li>Utilize the Osquery queries provided in the source metadata to perform routine integrity checks on these directories.</li>
<li>If an unauthorized script is discovered, isolate the host and perform a full forensic analysis to identify the initial compromise vector and hidden backdoors.</li>
</ol>
]]></content:encoded><category domain="severity">low</category><category domain="type">advisory</category><category>persistence</category><category>linux</category><category>init-scripts</category></item></channel></rss>