Query: alert when Detects suspicious shell commands or program code that may be executed or used in command line to establish a reverse sh
Matching passage: Sigma rule: Detects suspicious shell commands or program code that may be executed or used in command line to establish a reverse sh. Logsource: linux. Rule: title: Suspicious Reverse Shell Command Line id: 738d9bcf-6999-4fdb-b4ac-3033037db8ab status: test description: Detects suspicious shell commands or program code that may be executed or used in command line to establish a reverse shell references: - https://alamot.github.io/reverse_shells/ author: Florian Roth (Nextron Systems) date: 2019-04-02 modified: 2021-11-27 tags: - attack.execution - attack.t1059.004 logsource: product: linux detection: keywords: - BEGIN {s = "/inet/tcp/0/ - bash -i >& /dev/tcp/ - bash -i >& /dev/udp/ - sh -i >$ /dev/udp/ - sh -i >$ /dev/tcp/ - '&& while read line 0<&5; do' - /bin/bash -c exec 5<>/dev/tcp/ - /bin/bash -c exec 5<>/dev/udp/ - 'nc -e /bin/sh ' - /bin/sh | nc - 'rm -f backpipe; mknod /tmp/backpipe p && nc ' - ;socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp"));if(connect(S,sockaddr_in($p,inet_aton($i)))) - ;STDIN->fdopen($c,r);$~->fdopen($c,w);system$_ while<>; - /bin/sh -i <&3 >&3 2>&3 - uname -a; w; id; /bin/bash -i - $sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2); $stream.Write($sendbyte,0,$sendbyte.Length); $stream.Flush()}; - ;os.dup2(s.fileno(),0);os.dup2(s.fileno(),1);os.dup2(s.fileno(),2);os.putenv('HISTFILE','/dev/null'); - .to_i;exec sprintf("/bin/sh -i <&%d >&%d 2>&%d",f,f,f) - ;while(cmd=c.gets);IO.popen(cmd,"r"){|io|c.print - 'socat exec:''bash -li'',pty,stderr,setsid,sigint,sane tcp:' - rm -f /tmp/p; mknod /tmp/p p && - ' | /bin/bash | telnet ' - ',echo=0,raw tcp-listen:' - 'nc -lvvp ' - xterm -display 1 condition: keywords falsepositives: - Unknown level: high
Near-miss passage: Sigma rule: Detects modifications or creations of Windows Defender's default threat action settings based on severity to 'allow' or. Logsource: windows / registry_event. Rule: title: Windows Defender Threat Severity Default Action Modified id: 5a9e1b2c-8f7d-4a1e-9b3c-0f6d7e5a4b1f related: - id: 1e8a9b4d-3c2a-4f9b-8d1e-7c6a5b4f3d2e type: similar status: experimental description: 'Detects modifications or creations of Windows Defender''s default threat action settings based on severity to ''allow'' or take ''no action''. This is a highly suspicious configuration change that effectively disables Defender''s ability to automatically mitigate threats of a certain severity level, allowing malicious software to run unimpeded. An attacker might use this technique to bypass defenses before executing payloads. ' references: - https://learn.microsoft.com/en-us/powershell/module/defender/set-mppreference - https://learn.microsoft.com/en-us/windows-hardware/customize/desktop/unattend/security-malware-windows-defender-threatseveritydefaultaction - https://research.splunk.com/endpoint/7215831c-8252-4ae3-8d43-db588e82f952 - https://gist.github.com/Dump-GUY/8daef859f382b895ac6fd0cf094555d2 - https://thedfirreport.com/2021/10/18/icedid-to-xinglocker-ransomware-in-24-hours/ author: Matt Anderson (Huntress) date: 2025-07-11 tags: - attack.defense-impairment - attack.t1685 logsource: category: registry_event product: windows detection: selection: TargetObject|contains: \Microsoft\Windows Defender\Threats\ThreatSeverityDefaultAction\ TargetObject|endswith: - \1 - \2 - \4 - \5 Details: - DWORD (0x00000006) - DWORD (0x00000009) condition: selection falsepositives: - Legitimate administration via scripts or tools (e.g., SCCM, Intune, GPO enforcement). Correlate with administrative activity. - Software installations that legitimately modify Defender settings (less common for these specific keys). level: high