blint 2.2.0__tar.gz → 2.2.1__tar.gz

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.
Files changed (36) hide show
  1. {blint-2.2.0 → blint-2.2.1}/PKG-INFO +1 -1
  2. {blint-2.2.0 → blint-2.2.1}/blint/analysis.py +37 -9
  3. {blint-2.2.0 → blint-2.2.1}/blint/binary.py +55 -16
  4. {blint-2.2.0 → blint-2.2.1}/blint/config.py +42 -1
  5. {blint-2.2.0 → blint-2.2.1}/blint/data/annotations/review_exe_go.yml +1 -0
  6. {blint-2.2.0 → blint-2.2.1}/blint/data/annotations/review_imports_pe.yml +39 -0
  7. {blint-2.2.0 → blint-2.2.1}/blint/data/annotations/review_monero_go.yml +1 -0
  8. {blint-2.2.0 → blint-2.2.1}/blint/data/annotations/review_rootkits_win.yml +1 -1
  9. {blint-2.2.0 → blint-2.2.1}/blint/data/annotations/review_symbols_antiforensic.yml +18 -7
  10. {blint-2.2.0 → blint-2.2.1}/blint/data/annotations/review_symbols_hooka.yml +1 -0
  11. {blint-2.2.0 → blint-2.2.1}/blint/data/rules.yml +7 -0
  12. {blint-2.2.0 → blint-2.2.1}/blint/utils.py +2 -2
  13. {blint-2.2.0 → blint-2.2.1}/pyproject.toml +1 -1
  14. {blint-2.2.0 → blint-2.2.1}/LICENSE +0 -0
  15. {blint-2.2.0 → blint-2.2.1}/README.md +0 -0
  16. {blint-2.2.0 → blint-2.2.1}/blint/__init__.py +0 -0
  17. {blint-2.2.0 → blint-2.2.1}/blint/android.py +0 -0
  18. {blint-2.2.0 → blint-2.2.1}/blint/checks.py +0 -0
  19. {blint-2.2.0 → blint-2.2.1}/blint/cli.py +0 -0
  20. {blint-2.2.0 → blint-2.2.1}/blint/cyclonedx/README.md +0 -0
  21. {blint-2.2.0 → blint-2.2.1}/blint/cyclonedx/__init__.py +0 -0
  22. {blint-2.2.0 → blint-2.2.1}/blint/cyclonedx/spdx.py +0 -0
  23. {blint-2.2.0 → blint-2.2.1}/blint/cyclonedx/spec.py +0 -0
  24. {blint-2.2.0 → blint-2.2.1}/blint/data/__init__.py +0 -0
  25. {blint-2.2.0 → blint-2.2.1}/blint/data/annotations/__init__.py +0 -0
  26. {blint-2.2.0 → blint-2.2.1}/blint/data/annotations/review_entries_generic.yml +0 -0
  27. {blint-2.2.0 → blint-2.2.1}/blint/data/annotations/review_entries_pe.yml +0 -0
  28. {blint-2.2.0 → blint-2.2.1}/blint/data/annotations/review_methods_generic.yml +0 -0
  29. {blint-2.2.0 → blint-2.2.1}/blint/data/annotations/review_methods_mips.yml +0 -0
  30. {blint-2.2.0 → blint-2.2.1}/blint/data/annotations/review_monero_generic.yml +0 -0
  31. {blint-2.2.0 → blint-2.2.1}/blint/data/annotations/review_monero_rust.yml +0 -0
  32. {blint-2.2.0 → blint-2.2.1}/blint/data/annotations/review_symbols_generic.yml +0 -0
  33. {blint-2.2.0 → blint-2.2.1}/blint/data/annotations/review_symbols_macho.yml +0 -0
  34. {blint-2.2.0 → blint-2.2.1}/blint/data/annotations/review_symbols_rust.yml +0 -0
  35. {blint-2.2.0 → blint-2.2.1}/blint/logger.py +0 -0
  36. {blint-2.2.0 → blint-2.2.1}/blint/sbom.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: blint
3
- Version: 2.2.0
3
+ Version: 2.2.1
4
4
  Summary: Linter and SBOM generator for binary files.
5
5
  Home-page: https://github.com/OWASP-dep-scan/blint
6
6
  License: MIT
@@ -21,7 +21,7 @@ from blint.checks import (check_nx, check_pie,
21
21
  check_virtual_size, check_authenticode,
22
22
  check_dll_characteristics, check_codesign,
23
23
  check_trust_info)
24
- from blint.config import PII_WORDS, get_int_from_env
24
+ from blint.config import FIRST_STAGE_WORDS, PII_WORDS, get_int_from_env
25
25
  from blint.logger import LOG, console
26
26
  from blint.utils import (create_findings_table, is_fuzzable_name, print_findings_table)
27
27
 
@@ -54,12 +54,20 @@ review_methods_dict = defaultdict(list)
54
54
  review_symbols_dict = defaultdict(list)
55
55
  review_imports_dict = defaultdict(list)
56
56
  review_entries_dict = defaultdict(list)
57
- review_rules_cache = {"PII_READ": {
58
- "title": "Detect PII Read Operations",
59
- "summary": "Can Retrieve Sensitive PII data",
60
- "description": "Contains logic to retrieve sensitive data such as names, email, passwords etc.",
61
- "patterns": PII_WORDS
62
- }}
57
+ review_rules_cache = {
58
+ "PII_READ": {
59
+ "title": "Detect PII Read Operations",
60
+ "summary": "Can Retrieve Sensitive PII data",
61
+ "description": "Contains logic to retrieve sensitive data such as names, email, passwords etc.",
62
+ "patterns": PII_WORDS
63
+ },
64
+ "LOADER_SYMBOLS": {
65
+ "title": "Detect Initial Loader",
66
+ "summary": "Behaves like a loader",
67
+ "description": "The binary behaves like a loader by downloading and executing additional payloads.",
68
+ "patterns": FIRST_STAGE_WORDS
69
+ },
70
+ }
63
71
 
64
72
  # Debug mode
65
73
  DEBUG_MODE = os.getenv("SCAN_DEBUG_MODE") == "debug"
@@ -309,7 +317,10 @@ def print_reviews_table(reviews, files):
309
317
  def json_serializer(obj):
310
318
  """JSON serializer to help serialize problematic types such as bytes"""
311
319
  if isinstance(obj, bytes):
312
- return obj.decode('utf-8')
320
+ try:
321
+ return obj.decode('utf-8')
322
+ except UnicodeDecodeError:
323
+ return ""
313
324
 
314
325
  return obj
315
326
 
@@ -494,7 +505,7 @@ class ReviewRunner:
494
505
  or self.review_entries_list
495
506
  ):
496
507
  return self._review_lists(metadata)
497
- return {}
508
+ return self._review_loader_symbols(metadata)
498
509
 
499
510
  def _review_lists(self, metadata):
500
511
  """
@@ -516,6 +527,7 @@ class ReviewRunner:
516
527
  if self.review_entries_list:
517
528
  self._review_entries(metadata)
518
529
  self._review_pii(metadata)
530
+ self._review_loader_symbols(metadata)
519
531
  return self.results
520
532
 
521
533
  def _review_imports(self, metadata):
@@ -562,6 +574,22 @@ class ReviewRunner:
562
574
  results["PII_READ"].append({"pattern": e, "function": e})
563
575
  self.results |= results
564
576
 
577
+ def _review_loader_symbols(self, metadata):
578
+ """
579
+ Reviews loader symbols.
580
+
581
+ Args:
582
+ metadata (dict): The metadata to review.
583
+
584
+ Returns:
585
+ dict: The results of the review.
586
+ """
587
+ entries_list = [f.get("name", "") for f in metadata.get("first_stage_symbols", [])]
588
+ results = defaultdict(list)
589
+ for e in entries_list[0:EVIDENCE_LIMIT]:
590
+ results["LOADER_SYMBOLS"].append({"pattern": e, "function": e})
591
+ self.results |= results
592
+
565
593
  def _review_symbols_exe(self, metadata):
566
594
  """
567
595
  Reviews symbols in the metadata.
@@ -9,7 +9,7 @@ import orjson
9
9
 
10
10
  import lief
11
11
 
12
- from blint.config import PII_WORDS, get_float_from_env, get_int_from_env
12
+ from blint.config import FIRST_STAGE_WORDS, PII_WORDS, get_float_from_env, get_int_from_env
13
13
  from blint.logger import DEBUG, LOG
14
14
  from blint.utils import camel_to_snake, calculate_entropy, check_secret, cleanup_dict_lief_errors, decode_base64
15
15
 
@@ -270,7 +270,7 @@ def parse_strings(parsed_obj):
270
270
  if (entropy and (entropy > MIN_ENTROPY or len(s) > MIN_LENGTH)) or secret_type:
271
271
  strings_list.append(
272
272
  {
273
- "value": (decode_base64(s) if s.endswith("==") else s),
273
+ "value": decode_base64(s) if s.endswith("==") else s,
274
274
  "entropy": entropy,
275
275
  "secret_type": secret_type,
276
276
  }
@@ -788,7 +788,6 @@ def add_elf_metadata(exe_file, metadata, parsed_obj):
788
788
  metadata["has_runpath"] = False
789
789
  elif runpath:
790
790
  metadata["has_runpath"] = True
791
- # This is getting renamed to symtab_symbols in lief 0.15.0
792
791
  symtab_symbols = parsed_obj.symtab_symbols
793
792
  metadata["static"] = bool(symtab_symbols and not isinstance(symtab_symbols, lief.lief_errors))
794
793
  dynamic_entries = parsed_obj.dynamic_entries
@@ -797,6 +796,10 @@ def add_elf_metadata(exe_file, metadata, parsed_obj):
797
796
  metadata["notes"] = parse_notes(parsed_obj)
798
797
  metadata["strings"] = parse_strings(parsed_obj)
799
798
  metadata["symtab_symbols"], exe_type = parse_symbols(symtab_symbols)
799
+ rdata_section = parsed_obj.get_section(".rodata")
800
+ text_section = parsed_obj.get_section(".text")
801
+ if not metadata["symtab_symbols"]:
802
+ add_elf_rdata_symbols(metadata, rdata_section, text_section)
800
803
  if exe_type:
801
804
  metadata["exe_type"] = exe_type
802
805
  metadata["dynamic_symbols"], exe_type = parse_symbols(parsed_obj.dynamic_symbols)
@@ -1114,10 +1117,16 @@ def add_pe_metadata(exe_file: str, metadata: dict, parsed_obj: lief.PE.Binary):
1114
1117
  break
1115
1118
  rdata_section = parsed_obj.get_section(".rdata")
1116
1119
  text_section = parsed_obj.get_section(".text")
1117
- if not rdata_section and text_section:
1118
- rdata_section = text_section
1119
- if (not metadata["symtab_symbols"] or metadata["exe_type"] != "gobinary") and rdata_section:
1120
- add_pe_rdata_symbols(metadata, rdata_section)
1120
+ # If there are no .rdata and .text section, then attempt to look for two alphanumeric sections
1121
+ if not rdata_section and not text_section:
1122
+ for section in parsed_obj.sections:
1123
+ if str(section.name).removeprefix(".").isalnum():
1124
+ if not rdata_section:
1125
+ rdata_section = section
1126
+ else:
1127
+ text_section = section
1128
+ if rdata_section or text_section:
1129
+ add_pe_rdata_symbols(metadata, rdata_section, text_section)
1121
1130
  metadata["exports"] = parse_pe_exports(parsed_obj.get_export())
1122
1131
  metadata["functions"] = parse_functions(parsed_obj.functions)
1123
1132
  metadata["ctor_functions"] = parse_functions(parsed_obj.ctor_functions)
@@ -1247,33 +1256,39 @@ def add_pe_optional_headers(metadata, optional_header):
1247
1256
  return metadata
1248
1257
 
1249
1258
 
1250
- def add_pe_rdata_symbols(metadata, rdata_section: lief.PE.Section):
1259
+ def add_pe_rdata_symbols(metadata, rdata_section: lief.PE.Section, text_section: lief.PE.Section):
1251
1260
  """Adds PE rdata symbols to the metadata dictionary.
1252
1261
 
1253
1262
  Args:
1254
1263
  metadata: The dictionary to store the metadata.
1255
1264
  rdata_section: .rdata section of the PE binary.
1265
+ text_section: .text section of the PE binary.
1256
1266
 
1257
1267
  Returns:
1258
1268
  The updated metadata dictionary.
1259
1269
  """
1260
- if not rdata_section or not rdata_section.content:
1261
- return metadata
1270
+ file_extns_from_rdata = r".*\.(go|s|dll|exe|pdb)"
1262
1271
  rdata_symbols = set()
1263
1272
  pii_symbols = []
1273
+ first_stage_symbols = []
1264
1274
  for pii in PII_WORDS:
1265
- for vari in (f"get{pii}", f"get_{camel_to_snake(pii)}"):
1266
- if rdata_section.search_all(vari):
1275
+ for vari in (f"get{pii}", f"get_{pii}", f"get_{camel_to_snake(pii)}", f"Get{pii}"):
1276
+ if (rdata_section and rdata_section.search_all(vari)) or (text_section and text_section.search_all(vari)):
1267
1277
  pii_symbols.append(
1268
1278
  {"name": vari.lower(), "type": "FUNCTION", "is_function": True, "is_imported": False})
1269
1279
  continue
1270
- str_content = codecs.decode(rdata_section.content.tobytes("A"), encoding="utf-8", errors="ignore")
1280
+ for sw in FIRST_STAGE_WORDS:
1281
+ if (rdata_section and rdata_section.search_all(sw)) or (text_section and text_section.search_all(sw)):
1282
+ first_stage_symbols.append(
1283
+ {"name": sw, "type": "FUNCTION", "is_function": True, "is_imported": True})
1284
+ str_content = codecs.decode(rdata_section.content.tobytes("A"), encoding="utf-8",
1285
+ errors="ignore") if rdata_section and rdata_section.content else ""
1271
1286
  for block in str_content.split(" "):
1272
- if "runtime." in block or "internal/" in block or ".go" in block or ".dll" in block:
1287
+ if "runtime." in block or "internal/" in block or re.match(file_extns_from_rdata, block):
1273
1288
  if ".go" in block:
1274
1289
  metadata["exe_type"] = "gobinary"
1275
1290
  for asym in block.split("\x00"):
1276
- if re.match(r".*\.(go|s|dll)$", asym):
1291
+ if re.match(file_extns_from_rdata + "$", asym):
1277
1292
  rdata_symbols.add(asym)
1278
1293
  if not metadata["symtab_symbols"]:
1279
1294
  metadata["symtab_symbols"] = []
@@ -1285,7 +1300,31 @@ def add_pe_rdata_symbols(metadata, rdata_section: lief.PE.Section):
1285
1300
  "is_imported": True
1286
1301
  } for s in sorted(rdata_symbols)
1287
1302
  ]
1288
- metadata["pii_symbols"] = pii_symbols
1303
+ if pii_symbols:
1304
+ metadata["pii_symbols"] = pii_symbols
1305
+ if first_stage_symbols:
1306
+ metadata["first_stage_symbols"] = first_stage_symbols
1307
+ return metadata
1308
+
1309
+
1310
+ def add_elf_rdata_symbols(metadata, rdata_section: lief.PE.Section, text_section: lief.PE.Section):
1311
+ """Adds ELF rdata symbols to the metadata dictionary.
1312
+
1313
+ Args:
1314
+ metadata: The dictionary to store the metadata.
1315
+ rdata_section: .data section of the ELF binary.
1316
+ text_section: .text section of the ELF binary.
1317
+
1318
+ Returns:
1319
+ The updated metadata dictionary.
1320
+ """
1321
+ first_stage_symbols = []
1322
+ for sw in FIRST_STAGE_WORDS:
1323
+ if (rdata_section and rdata_section.search_all(sw)) or (text_section and text_section.search_all(sw)):
1324
+ first_stage_symbols.append(
1325
+ {"name": sw, "type": "FUNCTION", "is_function": True, "is_imported": True})
1326
+ if first_stage_symbols:
1327
+ metadata["first_stage_symbols"] = first_stage_symbols
1289
1328
  return metadata
1290
1329
 
1291
1330
 
@@ -1230,7 +1230,7 @@ secrets_regex = {
1230
1230
  "email": [re.compile(r"(?<=mailto:)[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+.[a-zA-Z0-9.-]+")],
1231
1231
  "ip": [
1232
1232
  re.compile(
1233
- r"^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9]).){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])$"
1233
+ r"^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9]).){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])(:[0-9]+)?$"
1234
1234
  )
1235
1235
  ],
1236
1236
  }
@@ -1268,6 +1268,7 @@ def get_int_from_env(name, default):
1268
1268
  return int(get_float_from_env(name, default))
1269
1269
 
1270
1270
 
1271
+ # PII related symbols
1271
1272
  PII_WORDS = (
1272
1273
  "FirstName",
1273
1274
  "LastName",
@@ -1293,3 +1294,43 @@ PII_WORDS = (
1293
1294
  "AgentStatus",
1294
1295
  "LastLoginTime"
1295
1296
  )
1297
+
1298
+ # Some symbols to look for in a first-stage payload
1299
+ FIRST_STAGE_WORDS = (
1300
+ "System.ServiceProcess",
1301
+ "System.IO.Compression",
1302
+ "System.Reflection.Emit",
1303
+ "ICryptoTransform",
1304
+ "LoadAssembly",
1305
+ "GetEncodedData",
1306
+ "add_AssemblyResolve",
1307
+ "CreateDecryptor",
1308
+ "GetExecutingAssembly",
1309
+ "GetModules",
1310
+ "get_IsFamilyOrAssembly",
1311
+ "/proc/%d/cmdline",
1312
+ "/proc/%s/exe",
1313
+ "/proc/self/exe",
1314
+ "/proc/net/route",
1315
+ "/etc/resolv.conf",
1316
+ "/usr/lib/systemd/systemd",
1317
+ "/usr/compress/bin/",
1318
+ "/usr/libexec/openssh/sftp-server",
1319
+ "/usr/sbin/reboot",
1320
+ "/usr/bin/reboot",
1321
+ "/usr/sbin/shutdown",
1322
+ "/usr/bin/shutdown",
1323
+ "/usr/sbin/poweroff",
1324
+ "/usr/bin/poweroff",
1325
+ "/usr/sbin/halt",
1326
+ "/usr/bin/halt",
1327
+ "virtualboxemulunit",
1328
+ "virtualboximportunit",
1329
+ "virtualboxunit",
1330
+ "qvirtualboxglobalsunit",
1331
+ "Uvirtualboxdisasm",
1332
+ "loaderx86.dll",
1333
+ "ZwProtectVirtualMemory",
1334
+ "shlwapi.dll",
1335
+ "DeleteCriticalSection"
1336
+ )
@@ -4,6 +4,7 @@ group: EXE_REVIEWS
4
4
  exe_type:
5
5
  - gobinary
6
6
  - x86_64-executable
7
+ - x86_64-exec
7
8
  rules:
8
9
  - id: FILE_IOUTIL
9
10
  title: IO util functions used
@@ -41,6 +41,11 @@ rules:
41
41
  - CreateSocketHandle
42
42
  - CreateThread
43
43
  - CreateThreadpool
44
+ - GetCurrentThread
45
+ - GetThreadLocale
46
+ - ExitProcess
47
+ - FreeLibrary
48
+ - ExitThread
44
49
  - id: PROCESS_STATUS_API
45
50
  title: Process status api used
46
51
  summary: Queries about processes and device drivers
@@ -464,6 +469,8 @@ rules:
464
469
  - CreateHardLink
465
470
  - BackupEventLog
466
471
  - CreateFileMapping
472
+ - SetFileAttributes
473
+ - SetFilePointer
467
474
  - id: WIN_BCRYPT_API
468
475
  title: Win bcrypt api functions used
469
476
  summary: Can Encrypt Files
@@ -1973,6 +1980,14 @@ rules:
1973
1980
  description: |
1974
1981
  Shell Windows API allows applications to access functions provided by the operating system shell, and to change and enhance it.
1975
1982
  patterns:
1983
+ - DllInstall
1984
+ - GetProcessReference
1985
+ - ParseURLA
1986
+ - ParseURLW
1987
+ - PathFindFileName
1988
+ - PathFindOnPath
1989
+ - PathIsSystemFolder
1990
+ - PathIsUNCServerShare
1976
1991
  - FindExecutableA
1977
1992
  - FindExecutableW
1978
1993
  - InitNetworkAddressControl
@@ -1994,6 +2009,30 @@ rules:
1994
2009
  - GetManagedApplications
1995
2010
  - InstallApplication
1996
2011
  - UninstallApplication
2012
+ - SHCreateThread
2013
+ - SHCreateStreamOnFile
2014
+ - SHOpenRegStream
2015
+ - SHRegCreateUSKey
2016
+ - SHQueryValueEx
2017
+ - SHQueryInfoKey
2018
+ - UrlCreateFromPath
2019
+ - PathMatchSpec
2020
+ - SHBindToFolderIDListParent
2021
+ - SHBrowseForFolder
2022
+ - SHCreateDefaultContextMenu
2023
+ - SHCreateShellItem
2024
+ - SHFormatDrive
2025
+ - SHGetDesktopFolder
2026
+ - SHGetFolderPath
2027
+ - SHGetFolderPathAndSubDir
2028
+ - SHGetKnownFolder
2029
+ - SHGetSpecialFolderLocation
2030
+ - SHILCreateFromPath
2031
+ - SHPathPrepareForWrite
2032
+ - SHSetKnownFolderPath
2033
+ - SignalFileOpen
2034
+ - Win32DeleteFile
2035
+ - shlwapi.dll
1997
2036
  - id: KERNEL_API
1998
2037
  title: Kernel api functions used
1999
2038
  summary: Manipulates Windows Kernel & Drivers
@@ -4,6 +4,7 @@ group: SYMBOL_REVIEWS
4
4
  exe_type:
5
5
  - gobinary
6
6
  - x86_64-executable
7
+ - x86_64-exec
7
8
  rules:
8
9
  - id: MONERO_API_GO
9
10
  title: Detect use of Monero wallet
@@ -3,6 +3,7 @@ text: Review for Windows rootkits
3
3
  group: METHOD_REVIEWS
4
4
  exe_type:
5
5
  - x86_64-executable
6
+ - x86_64-exec
6
7
  - PE32
7
8
  - PE64
8
9
  rules:
@@ -67,7 +68,6 @@ rules:
67
68
  - BeIsStringNull
68
69
  - BeIsStringTerminated
69
70
  - BeUnSupportedFunction
70
-
71
71
  - id: NIDHOGG
72
72
  title: Detect Nidhogg
73
73
  summary: Provides Tools for Gaining Privileged Access and Injecting Malicious Code
@@ -4,6 +4,7 @@ group: SYMBOL_REVIEWS
4
4
  exe_type:
5
5
  - genericbinary
6
6
  - x86_64-executable
7
+ - x86_64-exec
7
8
  - gobinary
8
9
  - PE32
9
10
  - PE64
@@ -29,7 +30,6 @@ rules:
29
30
  - MeltFile
30
31
  - SysmonUnload
31
32
  - _RtlAdjustPrivilege
32
-
33
33
  - id: PUPY
34
34
  title: Pupy Post-Exploitation Framework
35
35
  summary: Detect Erasing of Evidence of Exploitation
@@ -129,9 +129,20 @@ rules:
129
129
  - pupycompile
130
130
  - pupygen
131
131
  - run_pupy
132
-
133
-
134
-
135
-
136
-
137
-
132
+ - id: RAW_NET_ACCESS
133
+ title: Raw Network API
134
+ summary: Detect use of Network API
135
+ description: |
136
+ Low-level network and dns API functions are used to prevent detection.
137
+ patterns:
138
+ - opennameservers.c
139
+ - closenameservers.c
140
+ - read_etc_hosts_r.c
141
+ - dnslookup.c
142
+ - __read_etc_hosts_r
143
+ - __open_nameservers
144
+ - getRandomIP
145
+ - __libc_connect
146
+ - __GI_gethostbyname2_r
147
+ - gethostbyname.c
148
+ - connect.c
@@ -4,6 +4,7 @@ group: SYMBOL_REVIEWS
4
4
  exe_type:
5
5
  - gobinary
6
6
  - x86_64-executable
7
+ - x86_64-exec
7
8
  - genericbinary
8
9
  rules:
9
10
  - id: HOOKA
@@ -13,6 +13,7 @@
13
13
  exe_types:
14
14
  - genericbinary
15
15
  - x86_64-executable
16
+ - x86_64-exec
16
17
  - gobinary
17
18
  - PE32
18
19
  - PE64
@@ -34,6 +35,7 @@
34
35
  exe_types:
35
36
  - genericbinary
36
37
  - x86_64-executable
38
+ - x86_64-exec
37
39
  - gobinary
38
40
  - PE32
39
41
  - PE64
@@ -61,6 +63,7 @@
61
63
  exe_types:
62
64
  - genericbinary
63
65
  - x86_64-executable
66
+ - x86_64-exec
64
67
  - gobinary
65
68
  - mips-executable
66
69
  - id: CHECK_CANARY
@@ -79,6 +82,7 @@
79
82
  exe_types:
80
83
  - genericbinary
81
84
  - x86_64-executable
85
+ - x86_64-exec
82
86
  - dotnetbinary
83
87
  - mips-executable
84
88
  - id: CHECK_RPATH
@@ -123,6 +127,7 @@
123
127
  - gobinary
124
128
  - dotnetbinary
125
129
  - x86_64-executable
130
+ - x86_64-exec
126
131
  - id: CHECK_AUTHENTICODE
127
132
  title: Missing Authenticode
128
133
  description: |
@@ -138,6 +143,7 @@
138
143
  - gobinary
139
144
  - dotnetbinary
140
145
  - x86_64-executable
146
+ - x86_64-exec
141
147
  - id: CHECK_DLL_CHARACTERISTICS
142
148
  title: Missing dll Security Characteristics
143
149
  description: |
@@ -174,6 +180,7 @@
174
180
  - genericbinary
175
181
  - gobinary
176
182
  - x86_64-executable
183
+ - x86_64-exec
177
184
  - id: CHECK_TRUST_INFO
178
185
  title: Requires Elevated Execution
179
186
  description: |
@@ -12,7 +12,7 @@ from pathlib import Path
12
12
 
13
13
  from ar import Archive
14
14
  import lief
15
- from defusedxml.ElementTree import fromstring
15
+ from defusedxml.ElementTree import fromstring, ParseError
16
16
  from rich import box
17
17
  from rich.table import Table
18
18
 
@@ -322,7 +322,7 @@ def parse_pe_manifest(manifest):
322
322
  for ele in child.iter():
323
323
  attribs_dict[ele.tag.rpartition("}")[-1]] = ele.attrib
324
324
  return attribs_dict
325
- except (TypeError, AttributeError, IndexError) as e:
325
+ except (TypeError, AttributeError, IndexError, ParseError) as e:
326
326
  LOG.debug(f"Caught {type(e)}: {e} while parsing PE manifest.")
327
327
  return {}
328
328
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "blint"
3
- version = "2.2.0"
3
+ version = "2.2.1"
4
4
  description = "Linter and SBOM generator for binary files."
5
5
  authors = ["Prabhu Subramanian <prabhu@appthreat.com>", "Caroline Russell <caroline@appthreat.dev>"]
6
6
  license = "MIT"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes