Detectionlowtest

Potentially Suspicious Shell Script Creation in Profile Folder

Detects the creation of shell scripts under the "profile.d" path.

Convert In Phoenix Studio

Open this Sigma rule in the converter with the YAML preloaded and ready for backend selection.

Launch
Joseliyo SanchezCreated Fri Jun 0213f08f54-e705-4498-91fd-cce9d9cee9f1linux
Log Source
LinuxFile Event
ProductLinux← raw: linux
CategoryFile Event← raw: file_event

Events for file system activity including creation, modification, and deletion.

Detection Logic
Detection Logic1 selector
detection:
    selection:
        TargetFilename|contains: '/etc/profile.d/'
        TargetFilename|endswith:
            - '.csh'
            - '.sh'
    condition: selection
False Positives

Legitimate shell scripts in the "profile.d" directory could be common in your environment. Apply additional filter accordingly via "image", by adding specific filenames you "trust" or by correlating it with other events.

Regular file creation during system update or software installation by the package manager

MITRE ATT&CK
Rule Metadata
Rule ID
13f08f54-e705-4498-91fd-cce9d9cee9f1
Status
test
Level
low
Type
Detection
Created
Fri Jun 02
Path
rules/linux/file_event/file_event_lnx_susp_shell_script_under_profile_directory.yml
Raw Tags
attack.persistence
View on GitHub