Suspicious Use of /dev/tcp
Detects suspicious command with /dev/tcp
Sigma rule (View on GitHub)
1title: Suspicious Use of /dev/tcp
2id: 6cc5fceb-9a71-4c23-aeeb-963abe0b279c
3status: test
4description: Detects suspicious command with /dev/tcp
5references:
6 - https://www.andreafortuna.org/2021/03/06/some-useful-tips-about-dev-tcp/
7 - https://book.hacktricks.xyz/shells/shells/linux
8 - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1046/T1046.md#atomic-test-1---port-scan
9author: frack113
10date: 2021-12-10
11modified: 2023-01-06
12tags:
13 - attack.reconnaissance
14logsource:
15 product: linux
16detection:
17 keywords:
18 - 'cat </dev/tcp/'
19 - 'exec 3<>/dev/tcp/'
20 - 'echo >/dev/tcp/'
21 - 'bash -i >& /dev/tcp/'
22 - 'sh -i >& /dev/udp/'
23 - '0<&196;exec 196<>/dev/tcp/'
24 - 'exec 5<>/dev/tcp/'
25 - '(sh)0>/dev/tcp/'
26 - 'bash -c ''bash -i >& /dev/tcp/'
27 - 'echo -e ''#!/bin/bash\nbash -i >& /dev/tcp/'
28 condition: keywords
29falsepositives:
30 - Unknown
31level: medium
References
Related rules
- AADInternals PowerShell Cmdlets Execution - ProccessCreation
- AADInternals PowerShell Cmdlets Execution - PsScript
- Azure AD Account Credential Leaked
- Bitbucket User Details Export Attempt Detected
- Bitbucket User Permissions Export Attempt