← Back to SOC feed Coverage →

Detects suspicious pre and post hooks in Arch install files

yara HIGH signature-base
florian-roth
This rule was pulled from an open-source repository and enriched with AI. Validate in a test environment before deploying to production.
View original rule at signature-base →
Retrieved: 2026-08-07T11:00:00Z · Confidence: medium

Hunt Hypothesis

This detection identifies adversaries who manipulate installation scripts by injecting malicious pre- and post-installation hooks to establish persistence or execute initial payloads within Azure Sentinel-monitored environments. Proactive hunting for this behavior is critical because such hook modifications often occur silently during routine software updates, allowing attackers to evade standard signature-based defenses while gaining early foothold access before broader system compromise occurs.

YARA Rule

rule SUSP_LNX_ARCH_Install_Hook_Jun26 {
   meta:
      description = "Detects suspicious pre and post hooks in Arch install files"
      author = "Marius Benthin"
      date = "2026-06-15"
      reference = "https://aur.archlinux.org/cgit/aur.git/commit/?h=hearthstone-linux-gui-bin&id=ecf810ac853e7149abd4e0c793b2517e9737edb8"
      reference2 = "https://aur.archlinux.org/cgit/aur.git/commit/?h=python-django-js-asset&id=af09b1cf1b59"
      hash = "47c076099e6715ffb0bd357b6832175741e77b88972033cd1f9b55b6ff7e5519"
      hash = "ef735bca8cb2acafe70831e33ed468a3046a61147af694000761970415c7eef1"
      score = 70
   strings:
      $sa1 = "pre_install() {"
      $sa2 = "post_install() {"
      $sa3 = "pre_upgrade() {"
      $sa4 = "post_upgrade() {"
      $sa5 = "pre_remove() {"
      $sa6 = "post_remove() {"

      $sb1 = "npm install "
      $sb2 = "&& 'b''u''n'"

      $fp1 = "#!/bin/sh"
   condition:
      filesize < 5KB
      and 1 of ($sa*)
      and 1 of ($sb*)
      and not 1 of ($fp*)
}

Deployment Notes

This YARA rule can be deployed in the following contexts:

This rule contains 9 string patterns in its detection logic.

References

False Positive Guidance

Here are 4 specific false positive scenarios for the rule “Detects suspicious pre and post hooks in Arch install files,” along with suggested filters or exclusions:

Original source: https://github.com/Neo23x0/signature-base/blob/main/yara/susp_aur_packages.yar