CAPE-parsers 0.1.42__py3-none-any.whl → 0.1.44__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: CAPE-parsers
3
- Version: 0.1.42
3
+ Version: 0.1.44
4
4
  Summary: CAPE: Malware Configuration Extraction
5
5
  License: MIT
6
6
  Keywords: cape,parsers,malware,configuration
@@ -23,7 +23,7 @@ Requires-Dist: pefile
23
23
  Requires-Dist: pycryptodomex (>=3.20.0)
24
24
  Requires-Dist: rat-king-parser (>=4.1.0)
25
25
  Requires-Dist: ruff (>=0.7.2)
26
- Requires-Dist: unicorn (==2.1.1)
26
+ Requires-Dist: unicorn (>=2.1.1)
27
27
  Requires-Dist: yara-python (>=4.5.1)
28
28
  Description-Content-Type: text/markdown
29
29
 
@@ -1,6 +1,5 @@
1
1
  cape_parsers/CAPE/__init__.py,sha256=JcY8WPKzUFYgexwV1eyKIuT1JyNZzMJjBynlPSzxY_I,7
2
2
  cape_parsers/CAPE/community/AgentTesla.py,sha256=T1gUd28eoCGA5by3ylAAK1naenF0fE3jgYx7UBkCRDk,3559
3
- cape_parsers/CAPE/community/Amadey.py,sha256=LuYt72sYa_c_srekD-H5hzZZQUlcGaeY1iT2HXO2YwE,1258
4
3
  cape_parsers/CAPE/community/Arkei.py,sha256=kXn949PC2CksavsL1BgvKgiAUDcq2NQUirosCTQcDF0,3790
5
4
  cape_parsers/CAPE/community/AsyncRAT.py,sha256=0nGLNnwnO93SPbCTgoIMvkh6_smuzQxDcYtL77afGx8,1001
6
5
  cape_parsers/CAPE/community/AuroraStealer.py,sha256=UUoxgJtDan3fE1r8aDEKweC_URkV97QHBp1Hq_n7ShI,2419
@@ -107,7 +106,7 @@ cape_parsers/utils/blzpack_lib.so,sha256=5PJtnggw8fV5q4DlhwMJk4ZadvC3fFTsVTNZKvE
107
106
  cape_parsers/utils/dotnet_utils.py,sha256=pzQGbCqccz7DRv8T_i1JURlrKDIlDT2axxViiFF9hsU,1672
108
107
  cape_parsers/utils/lznt1.py,sha256=X-BmJtP6AwYSl0ORg5dfSt-NIuXbHrtCO5kUaaJI2C8,4066
109
108
  cape_parsers/utils/strings.py,sha256=a-nbvP9jYST7b6t_H37Ype-fK2jEmQr-wMF5a4i04e4,3062
110
- cape_parsers-0.1.42.dist-info/LICENSE,sha256=88c01_HLG8WPj7R7aU_b-O-UoF38vrrifvcko4KDxcE,1069
111
- cape_parsers-0.1.42.dist-info/METADATA,sha256=Oh2BVCGc0yb_4cW3oR2f11JlCKhkXaZoY25ZbSVIZEw,1149
112
- cape_parsers-0.1.42.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
113
- cape_parsers-0.1.42.dist-info/RECORD,,
109
+ cape_parsers-0.1.44.dist-info/LICENSE,sha256=88c01_HLG8WPj7R7aU_b-O-UoF38vrrifvcko4KDxcE,1069
110
+ cape_parsers-0.1.44.dist-info/METADATA,sha256=4VjbNtdc_w3GCdccHiWb_--tggZS7VT0OpdUG-Cu9DQ,1149
111
+ cape_parsers-0.1.44.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
112
+ cape_parsers-0.1.44.dist-info/RECORD,,
@@ -1,43 +0,0 @@
1
- import base64
2
- import re
3
-
4
- str_hash_data = 'd6052c4fe86a6346964a6bbbe2423e20'
5
- str_alphabet = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 '
6
-
7
- def is_ascii(s):
8
- return all(c < 128 or c == 0 for c in s)
9
-
10
- def decrypt(str_data, str_hash_data, str_alphabet):
11
- str_hash = ''
12
-
13
- for i in range(len(str_data)):
14
- str_hash += str_hash_data[i % len(str_hash_data)]
15
-
16
- out = ''
17
-
18
- for i in range(len(str_data)):
19
- if str_data[i] not in str_alphabet:
20
- out += str_data[i]
21
- continue
22
- alphabet_count = str_alphabet.find(str_data[i])
23
- hash_count = str_alphabet.find(str_hash[i])
24
- index_calc = (alphabet_count + len(str_alphabet) - hash_count) % len(str_alphabet)
25
- out += str_alphabet[index_calc]
26
-
27
- return base64.b64decode(out)
28
-
29
- file_data = open('/tmp/amadey.bin','rb').read()
30
-
31
- strings = []
32
- for m in re.finditer(rb'[a-zA-Z =0-9]{4,}',file_data):
33
- strings.append(m.group().decode('utf-8'))
34
-
35
- for s in strings:
36
- try:
37
- temp = decrypt(s, str_hash_data, str_alphabet)
38
- if is_ascii(temp) and len(temp) > 3:
39
- print(temp.decode('utf-8'))
40
- except:
41
- continue
42
-
43
- decrypt('1RydQIOr3Zcp6emn RYv8IGzgUKS6r5ThSdqDVBERAP2Ir 0JQ1=', str_hash_data, str_alphabet)