Obfuscated IP Download Activity

Detects use of an encoded/obfuscated version of an IP address (hex, octal...) in an URL combined with a download command

Sigma rule (View on GitHub)

 1title: Obfuscated IP Download Activity
 2id: cb5a2333-56cf-4562-8fcb-22ba1bca728d
 3status: test
 4description: Detects use of an encoded/obfuscated version of an IP address (hex, octal...) in an URL combined with a download command
 5references:
 6    - https://h.43z.one/ipconverter/
 7    - https://twitter.com/Yasser_Elsnbary/status/1553804135354564608
 8    - https://twitter.com/fr0s7_/status/1712780207105404948
 9author: Florian Roth (Nextron Systems), X__Junior (Nextron Systems)
10date: 2022-08-03
11modified: 2023-11-06
12tags:
13    - attack.discovery
14logsource:
15    category: process_creation
16    product: windows
17detection:
18    selection_command:
19        CommandLine|contains:
20            - 'Invoke-WebRequest'
21            - 'iwr '
22            - 'wget '
23            - 'curl '
24            - 'DownloadFile'
25            - 'DownloadString'
26    selection_ip_1:
27        CommandLine|contains:
28            - ' 0x'
29            - '//0x'
30            - '.0x'
31            - '.00x'
32    selection_ip_2:
33        CommandLine|contains|all:
34            - 'http://%'
35            - '%2e'
36    selection_ip_3:
37        # http://81.4.31754
38        - CommandLine|re: 'https?://[0-9]{1,3}\.[0-9]{1,3}\.0[0-9]{3,4}'
39        # http://81.293898
40        - CommandLine|re: 'https?://[0-9]{1,3}\.0[0-9]{3,7}'
41        # http://1359248394
42        - CommandLine|re: 'https?://0[0-9]{3,11}'
43        # http://0121.04.0174.012
44        - CommandLine|re: 'https?://(0[0-9]{1,11}\.){3}0[0-9]{1,11}'
45        # http://012101076012
46        - CommandLine|re: 'https?://0[0-9]{1,11}'
47        # For octal format
48        - CommandLine|re: ' [0-7]{7,13}'
49    filter_main_valid_ip:
50        CommandLine|re: 'https?://((25[0-5]|(2[0-4]|1\d|[1-9])?\d)(\.|\b)){4}'
51    condition: selection_command and 1 of selection_ip_* and not 1 of filter_main_*
52falsepositives:
53    - Unknown
54level: medium

References

Related rules

to-top