question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error running capa as library on a specific sample

See original GitHub issue

Description

Got the following error:

loading : 100%|█████████████████████████████████████████████████████████████████████████████████████████████| 702/702 [00:00<00:00, 995.80 rules/s]
matching: 100%|█████████████████████████████████████████████████████| 875/875 [00:10<00:00, 82.74 functions/s, skipped 398 library functions (45%)]
Traceback (most recent call last):
  File "C:\Users\Rony\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\Rony\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\Rony\AppData\Local\Programs\Python\Python39\Scripts\capa.exe\__main__.py", line 7, in <module>
  File "C:\Users\Rony\AppData\Local\Programs\Python\Python39\lib\site-packages\capa\main.py", line 1137, in main
    print(capa.render.default.render(meta, rules, capabilities))
  File "C:\Users\Rony\AppData\Local\Programs\Python\Python39\lib\site-packages\capa\render\default.py", line 213, in render
    doc = rd.ResultDocument.from_capa(meta, rules, capabilities)
  File "C:\Users\Rony\AppData\Local\Programs\Python\Python39\lib\site-packages\capa\render\result_document.py", line 549, in from_capa
    meta=RuleMetadata.from_capa(rule),
  File "C:\Users\Rony\AppData\Local\Programs\Python\Python39\lib\site-packages\capa\render\result_document.py", line 497, in from_capa
    return cls(
  File "pydantic\main.py", line 341, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 1 validation error for RuleMetadata
examples
  none is not an allowed value (type=type_error.none.not_allowed)

Steps to Reproduce

  1. pip install flare-capa
  2. run capa e58b9bbb7bcdf3e901453b7b9c9e514fed1e53565e3280353dccc77cde26a98e
  3. Get the following error : See description

Expected behavior:

CAPA should extract the information as expected.

Actual behavior:

See description

Versions

capa 4.0.0 windows 10 python 3.9

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
doomedravencommented, Aug 18, 2022

someone need to watch releases 😛 that of specific rule of vs-obfuscation

2reactions
mr-tzcommented, Aug 15, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

Error running capa as library on a specific sample - PullAnswer
I'm reopening this because it seems that the above error can only be produced with this sample ...
Read more >
capa/installation.md at master - GitHub
To install capa as a Python library use pip to fetch the flare-capa module. Note: This method is appropriate for integrating capa in...
Read more >
Open Problem Library - WeBWorK_wiki
This mechanism is built into WeBWorK's library browser. In particular, one can search hierarchically by course, chapter, or section. To a ...
Read more >
capa 2.0: Better, Stronger, Faster - Mandiant
We believe that capa needs to focus its attention on the programmer's logic and ignore supporting library code. For example, highly ...
Read more >
Inspect the capabilities of ELF binaries with this open source tool
Given that most malware is Windows-based, earlier Capa versions only ... It is instead an ELF executable that runs directly from the Linux ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found