<?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>Script-Based-Execution - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/script-based-execution/</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, 18 Sep 2026 19:17:52 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/script-based-execution/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>Suspicious Python Shell Command Execution</title><link>https://feed.craftedsignal.io/briefs/2026-09-suspicious-python-shell-execution/</link><pubDate>Fri, 18 Sep 2026 19:17:52 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-09-suspicious-python-shell-execution/</guid><description>This detection logic identifies potentially malicious activity where a Python process rapidly spawns multiple shell commands via '-c' arguments for host profiling, discovery, or lateral movement.</description><content:encoded><![CDATA[<p>This detection rule focuses on identifying suspicious activity on Linux and macOS systems where a Python interpreter initiates a rapid sequence of shell commands. Attackers frequently leverage Python to execute shell commands (e.g., <code>sh -c</code>) as part of a post-exploitation workflow. This allows them to profile the compromised host, locate sensitive data, pull down additional malicious payloads via <code>curl</code> or <code>wget</code>, and facilitate lateral movement or persistence.</p>
<p>The core indicator is the rapid execution of at least five distinct command lines containing at least four unique command patterns (such as environment enumeration, discovery utilities, or network tools) within a single one-minute window. This behavior is indicative of automated scripting used by a backdoor rather than standard administrative or application-level behavior. Defenders should focus on Python-led process trees that diverge from approved deployment or maintenance workflows.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker gains initial execution on a Linux or macOS host, often through a web shell or a malicious script.</li>
<li>The attacker executes a Python-based backdoor or script to facilitate hands-on-keyboard activity.</li>
<li>The Python process begins profiling the host environment by spawning child shell processes (e.g., <code>bash</code>, <code>sh</code>, <code>zsh</code>).</li>
<li>The shell child processes execute discovery commands such as <code>whoami</code>, <code>uname</code>, and <code>hostname</code> via <code>sh -c</code>.</li>
<li>The script iterates through system configuration or environment variables using commands like <code>env</code> or <code>find</code>.</li>
<li>The attacker uses the shell child processes to invoke <code>curl</code> or <code>wget</code> to retrieve follow-on payloads from external C2 infrastructure.</li>
<li>The script attempts to access sensitive files or modify system configurations to achieve persistence.</li>
<li>Final objective is achieved, such as credential theft, data exfiltration, or establishing a recurring command-and-control connection.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation allows attackers to gain full visibility into the host environment, extract credentials, and move laterally across the network. If left undetected, this activity leads to significant data breaches, unauthorized access to sensitive application secrets, and potential long-term persistence within the organization's infrastructure.</p>
<h2 id="recommendation">Recommendation</h2>
<p>Prioritize the implementation of process-creation telemetry to monitor for anomalous shell command patterns initiated by Python.</p>
<ul>
<li>Deploy the provided Sigma rule logic to your SIEM to monitor for Python processes spawning high volumes of shell children.</li>
<li>Implement egress filtering to block unauthorized connections from Python or shell interpreters to known untrusted infrastructure.</li>
<li>Audit all Python execution paths in temporary directories and restrict the ability of service accounts to spawn shell interpreters.</li>
<li>Investigate any occurrences flagged by the detection logic to confirm whether they originate from approved administrative scripts or unauthorized malicious payloads.</li>
</ul>
]]></content:encoded><category domain="severity">medium</category><category domain="type">advisory</category><category>execution</category><category>script-based-execution</category><category>python</category><category>linux</category><category>macos</category></item><item><title>Detection of ROT-Encoded Python Script Execution</title><link>https://feed.craftedsignal.io/briefs/2026-09-rot-obfuscated-python/</link><pubDate>Fri, 18 Sep 2026 19:09:46 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-09-rot-obfuscated-python/</guid><description>Adversaries utilize ROT-encoded Python scripts within packages to obfuscate malicious logic and evade security analysis on Windows and macOS systems.</description><content:encoded><![CDATA[<p>Adversaries are increasingly employing simple substitution ciphers, specifically the ROT cipher, to obfuscate Python scripts embedded within software packages. This technique is designed to hinder static analysis by security researchers and automated tools. When the Python interpreter loads these obfuscated components, the code is often decoded or deobfuscated in memory, providing an execution path for malicious activity.</p>
<p>This threat is particularly relevant to developer environments where third-party Python packages are frequently installed. By masking malicious functionality as legitimate library components, attackers increase the likelihood that the code will be executed within a trusted development context. Security operations teams should focus on identifying instances where the Python interpreter interacts with compiled bytecode files featuring specific naming patterns indicative of ROT-based obfuscation, particularly those following the 'rot_??.cpython-*.pyc' nomenclature.</p>
<h2 id="impact">Impact</h2>
<p>Successful exploitation allows attackers to execute malicious code on developer endpoints and CI/CD pipelines under the guise of legitimate Python packages. This can lead to credential theft, intellectual property exfiltration, or the establishment of persistent backdoors in internal build environments.</p>
<h2 id="recommendation">Recommendation</h2>
<p>Detection engineering teams should monitor for the execution of Python processes that concurrently access files matching known obfuscation patterns.</p>
<ul>
<li>Deploy the provided Sigma rule to your SIEM to monitor for Python processes interacting with files following the 'rot_??.cpython-*.pyc' naming convention.</li>
<li>Establish baseline behavior for Python execution in development environments to facilitate the identification of anomalous library loading.</li>
<li>Implement strict application control or allowlisting for packages utilized in production environments to minimize the risk of executing unauthorized code.</li>
</ul>
]]></content:encoded><category domain="severity">medium</category><category domain="type">advisory</category><category>defense-evasion</category><category>python</category><category>script-based-execution</category><category>obfuscation</category></item></channel></rss>