|
1 | | - |
2 | | -rule M_APT_VIRTUALPITA_1 |
3 | | -{ |
4 | | - meta: |
5 | | - author = "Mandiant" |
6 | | - md5 = "fe34b7c071d96dac498b72a4a07cb246" |
7 | | - description = "Finds opcodes to set a port to bind on 2233, encompassing the setsockopt(), htons(), and bind() from 40973d to 409791 in fe34b7c071d96dac498b72a4a07cb246 (may produce some FPs - comment by Florian Roth)" |
8 | | - modified = "2023-11-25" |
9 | | - score = 60 // reduced score by Florian Roth due to FPs |
10 | | - id = "bdfbe29a-f7db-50d9-a909-d4ca96cc0731" |
11 | | - strings: |
12 | | - $x = {8b ?? ?? 4? b8 04 00 00 00 [0 - 4] ba 02 00 00 00 be 01 00 00 00 [0 - 2] e8 ?? ?? ?? ?? 89 4? ?? 83 7? ?? 00 79 [0 - 50] ba 10 00 00 00 [0 - 10] e8} |
13 | | - condition: |
14 | | - uint32(0) == 0x464c457f and all of them |
| 1 | +rule M_APT_VIRTUALPITA_1 { |
| 2 | + meta: |
| 3 | + author = "Mandiant" |
| 4 | + md5 = "fe34b7c071d96dac498b72a4a07cb246" |
| 5 | + description = "Finds opcodes to set a port to bind on 2233, encompassing the setsockopt(), htons(), and bind() from 40973d to 409791 in fe34b7c071d96dac498b72a4a07cb246 (may produce some FPs - comment by Florian Roth)" |
| 6 | + modified = "2023-11-25" |
| 7 | + score = 60 // reduced score by Florian Roth due to FPs |
| 8 | + id = "bdfbe29a-f7db-50d9-a909-d4ca96cc0731" |
| 9 | + strings: |
| 10 | + $x = { 8b ?? ?? 4? b8 04 00 00 00 [0-4] ba 02 00 00 00 be 01 00 00 00 [0-2] e8 ?? ?? ?? ?? 89 4? ?? 83 7? ?? 00 79 [0-50] ba 10 00 00 00 [0-10] e8 } |
| 11 | + condition: |
| 12 | + uint32(0) == 0x464c457f and all of them |
15 | 13 | } |
16 | 14 |
|
17 | | -rule M_APT_VIRTUALPITA_2 |
18 | | -{ |
19 | | - meta: |
20 | | - author = "Mandiant" |
21 | | - md5 = "fe34b7c071d96dac498b72a4a07cb246" |
22 | | - description = "Finds opcodes to decode and parse the recieved data in the socket buffer in fe34b7c071d96dac498b72a4a07cb246. Opcodes from 401a36 to 401adc" |
23 | | - id = "6a59cc54-e1a0-594f-9efb-af63d5c05259" |
24 | | - strings: |
25 | | - $x = {85 c0 74 ?? c7 05 ?? ?? ?? ?? fb ff ff ff c7 8? ?? ?? ?? ?? 00 00 00 00 e9 ?? ?? ?? ?? 4? 8b 05 ?? ?? ?? ?? 4? 83 c0 01 4? 89 05 ?? ?? ?? ?? c7 4? ?? 00 00 00 00 e9 ?? ?? ?? ?? 8b 4? ?? 4? 98 4? 8d 9? ?? ?? ?? ?? 4? 8d ?? e0 4? 8b 0? 4? 89 0? 4? 8b 4? ?? 4? 89 4? ?? 8b 4? ?? 4? 98 4? 8d b? ?? ?? ?? ?? b? ?? ?? ?? ?? e8 ?? ?? ?? ?? c7 4? ?? 00 00 00 00 eb ?? 8b 4? ?? 8b 4? ?? 01 c1 8b 4? ?? 03 4? ?? 4? 98 0f b6 9? ?? ?? ?? ?? 8b 4? ?? 4? 98 0f b6 8? ?? ?? ?? ?? 31 c2 4? 63 c1 88 9? ?? ?? ?? ?? 83 4? ?? 01} |
26 | | - condition: |
27 | | - uint32(0) == 0x464c457f and all of them |
| 15 | +rule M_APT_VIRTUALPITA_2 { |
| 16 | + meta: |
| 17 | + author = "Mandiant" |
| 18 | + md5 = "fe34b7c071d96dac498b72a4a07cb246" |
| 19 | + description = "Finds opcodes to decode and parse the recieved data in the socket buffer in fe34b7c071d96dac498b72a4a07cb246. Opcodes from 401a36 to 401adc" |
| 20 | + id = "6a59cc54-e1a0-594f-9efb-af63d5c05259" |
| 21 | + strings: |
| 22 | + $x = { 85 c0 74 ?? c7 05 ?? ?? ?? ?? fb ff ff ff c7 8? ?? ?? ?? ?? 00 00 00 00 e9 ?? ?? ?? ?? 4? 8b 05 ?? ?? ?? ?? 4? 83 c0 01 4? 89 05 ?? ?? ?? ?? c7 4? ?? 00 00 00 00 e9 ?? ?? ?? ?? 8b 4? ?? 4? 98 4? 8d 9? ?? ?? ?? ?? 4? 8d ?? e0 4? 8b 0? 4? 89 0? 4? 8b 4? ?? 4? 89 4? ?? 8b 4? ?? 4? 98 4? 8d b? ?? ?? ?? ?? b? ?? ?? ?? ?? e8 ?? ?? ?? ?? c7 4? ?? 00 00 00 00 eb ?? 8b 4? ?? 8b 4? ?? 01 c1 8b 4? ?? 03 4? ?? 4? 98 0f b6 9? ?? ?? ?? ?? 8b 4? ?? 4? 98 0f b6 8? ?? ?? ?? ?? 31 c2 4? 63 c1 88 9? ?? ?? ?? ?? 83 4? ?? 01 } |
| 23 | + condition: |
| 24 | + uint32(0) == 0x464c457f and all of them |
28 | 25 | } |
29 | 26 |
|
30 | | -rule M_APT_VIRTUALPITA_3 |
31 | | -{ |
32 | | - meta: |
33 | | - author = "Mandiant" |
34 | | - md5 = "fe34b7c071d96dac498b72a4a07cb246" |
35 | | - description = "Finds opcodes from 409dd8 to 409e46 in fe34b7c071d96dac498b72a4a07cb246 to set the HISTFILE environment variable to 'F' with a putenv() after loading each character individually." |
36 | | - id = "29ea2db0-4ab2-5e9c-8d42-7590ceabf99a" |
37 | | - strings: |
38 | | - $x = {4? 8b 4? ?? c6 00 48 4? 8b 4? ?? 4? 83 c0 05 c6 00 49 4? 8b 4? ?? 4? 83 c0 01 c6 00 49 4? 8b 4? ?? 4? 83 c0 06 c6 00 4c 4? 8b 4? ?? 4? 83 c0 02 c6 00 53 4? 8b 4? ?? 4? 83 c0 07 c6 00 45 4? 8b 4? ?? 4? 83 c0 03 c6 00 54 4? 8b 4? ?? 4? 83 c0 08 c6 00 3d 4? 8b 4? ?? 4? 83 c0 04 c6 00 46 4? 8b 4? ?? 4? 83 c0 09 c6 00 00 4? 8b 7? ?? e8} |
39 | | - condition: |
40 | | - uint32(0) == 0x464c457f and all of them |
| 27 | +rule M_APT_VIRTUALPITA_3 { |
| 28 | + meta: |
| 29 | + author = "Mandiant" |
| 30 | + md5 = "fe34b7c071d96dac498b72a4a07cb246" |
| 31 | + description = "Finds opcodes from 409dd8 to 409e46 in fe34b7c071d96dac498b72a4a07cb246 to set the HISTFILE environment variable to 'F' with a putenv() after loading each character individually." |
| 32 | + id = "29ea2db0-4ab2-5e9c-8d42-7590ceabf99a" |
| 33 | + strings: |
| 34 | + $x = { 4? 8b 4? ?? c6 00 48 4? 8b 4? ?? 4? 83 c0 05 c6 00 49 4? 8b 4? ?? 4? 83 c0 01 c6 00 49 4? 8b 4? ?? 4? 83 c0 06 c6 00 4c 4? 8b 4? ?? 4? 83 c0 02 c6 00 53 4? 8b 4? ?? 4? 83 c0 07 c6 00 45 4? 8b 4? ?? 4? 83 c0 03 c6 00 54 4? 8b 4? ?? 4? 83 c0 08 c6 00 3d 4? 8b 4? ?? 4? 83 c0 04 c6 00 46 4? 8b 4? ?? 4? 83 c0 09 c6 00 00 4? 8b 7? ?? e8 } |
| 35 | + condition: |
| 36 | + uint32(0) == 0x464c457f and all of them |
41 | 37 | } |
42 | 38 |
|
43 | | -rule M_APT_VIRTUALPITA_4 |
44 | | -{ |
45 | | - meta: |
46 | | - author = "Mandiant" |
47 | | - md5 = "fe34b7c071d96dac498b72a4a07cb246" |
48 | | - description = "Finds opcodes from 401f1c to 401f4f in fe34b7c071d96dac498b72a4a07cb246 to decode text with multiple XORs" |
49 | | - id = "58d4db75-fcd5-50c2-93ba-a8a4718ac0f6" |
50 | | - strings: |
51 | | - $x = {4? 8b 4? ?? 4? 83 c1 30 4? 8b 4? ?? 4? 8b 10 8b 4? ?? 4? 98 4? 8b 04 ?? ?? ?? ?? ?? 4? 31 c2 4? 8b 4? ?? 4? 83 c0 28 4? 8b 00 4? c1 e8 10 0f b6 c0 4? 98 4? 8b 04} |
52 | | - condition: |
53 | | - uint32(0) == 0x464c457f and all of them |
| 39 | +rule M_APT_VIRTUALPITA_4 { |
| 40 | + meta: |
| 41 | + author = "Mandiant" |
| 42 | + md5 = "fe34b7c071d96dac498b72a4a07cb246" |
| 43 | + description = "Finds opcodes from 401f1c to 401f4f in fe34b7c071d96dac498b72a4a07cb246 to decode text with multiple XORs" |
| 44 | + id = "58d4db75-fcd5-50c2-93ba-a8a4718ac0f6" |
| 45 | + strings: |
| 46 | + $x = { 4? 8b 4? ?? 4? 83 c1 30 4? 8b 4? ?? 4? 8b 10 8b 4? ?? 4? 98 4? 8b 04 ?? ?? ?? ?? ?? 4? 31 c2 4? 8b 4? ?? 4? 83 c0 28 4? 8b 00 4? c1 e8 10 0f b6 c0 4? 98 4? 8b 04 } |
| 47 | + condition: |
| 48 | + uint32(0) == 0x464c457f and all of them |
54 | 49 |
|
55 | 50 | } |
56 | 51 |
|
57 | | -rule M_Hunting_Python_Backdoor_CommandParser_1 |
58 | | -{ |
59 | | - meta: |
60 | | - author = "Mandiant" |
61 | | - md5 = "61ab3f6401d60ec36cd3ac980a8deb75" |
62 | | - description = "Finds strings indicative of the vmsyslog.py python backdoor." |
63 | | - id = "15cbca01-24e6-5538-bcfd-c3222337aaf5" |
64 | | - strings: |
65 | | - $key1 = "self.conn.readInt8()" ascii |
66 | | - $key2 = "upload" ascii |
67 | | - $key3 = "download" ascii |
68 | | - $key4 = "shell" ascii |
69 | | - $key5 = "execute" ascii |
70 | | - $re1 = /def\srun.{,20}command\s?=\s?self\.conn\.readInt8\(\).{,75}upload.{,75}download.{,75}shell.{,75}execute/s |
71 | | - condition: |
72 | | - filesize < 200KB and all of them |
| 52 | +rule M_Hunting_Python_Backdoor_CommandParser_1 { |
| 53 | + meta: |
| 54 | + author = "Mandiant" |
| 55 | + md5 = "61ab3f6401d60ec36cd3ac980a8deb75" |
| 56 | + description = "Finds strings indicative of the vmsyslog.py python backdoor." |
| 57 | + id = "15cbca01-24e6-5538-bcfd-c3222337aaf5" |
| 58 | + strings: |
| 59 | + $key1 = "self.conn.readInt8()" ascii |
| 60 | + $key2 = "upload" ascii |
| 61 | + $key3 = "download" ascii |
| 62 | + $key4 = "shell" ascii |
| 63 | + $key5 = "execute" ascii |
| 64 | + $re1 = /def\srun.{0,20}command\s?=\s?self\.conn\.readInt8\(\).{,75}upload.{,75}download.{,75}shell.{,75}execute/s |
| 65 | + condition: |
| 66 | + filesize < 200KB and all of them |
73 | 67 | } |
0 commit comments