mirror of
https://github.com/mandiant/capa.git
synced 2026-06-21 22:31:54 -07:00
main: suggest --os flag when ELF OS detection fails (#2869)
* main: suggest --os flag when OS detection fails for ELF files When capa cannot detect the target OS of an ELF file, it exits with an error. Some ELF files lack the standard metadata capa uses for OS detection (GNU ABI tag, OSABI field, library dependencies, etc.) even though they do target a valid OS (e.g. a stripped Linux binary using only raw syscalls). Add a hint to the unsupported-OS error message telling users they can specify the OS explicitly with the --os flag, matching the workaround recommended in the issue. Fixes #2577
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
-
|
||||
|
||||
### Bug Fixes
|
||||
- main: suggest --os flag in unsupported OS error message to help users override ELF OS detection @devs6186 #2577
|
||||
- render: escape sample-controlled strings before passing to Rich to prevent MarkupError @devs6186 #2699
|
||||
- Fixed insecure deserialization vulnerability in YAML loading @0x1622 (#2770)
|
||||
- loader: gracefully handle ELF files with unsupported architectures kamranulhaq2002@gmail.com #2800
|
||||
|
||||
@@ -327,6 +327,9 @@ def log_unsupported_os_error():
|
||||
logger.error(" ")
|
||||
logger.error(" capa currently only analyzes executables for some operating systems")
|
||||
logger.error(" (including Windows, Linux, and Android).")
|
||||
logger.error(" ")
|
||||
logger.error(" If you know the target OS, you can specify it explicitly, for example:")
|
||||
logger.error(" capa --os linux <sample>")
|
||||
logger.error("-" * 80)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user