danielpoliakov / lisa

Sandbox for automated Linux malware analysis.
Apache License 2.0
474 stars 91 forks source link

Consistently getting KeyError: 'minopsz' #21

Open xxdesmus opened 3 years ago

xxdesmus commented 3 years ago

Hi there,

Thank you for sharing this amazing project. I set things up, and when I try to analyze any sample I always get the same KeyError: 'minopsz' error.

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/celery/app/trace.py", line 405, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/celery/app/trace.py", line 697, in __protected_call__
    return self.run(*args, **kwargs)
  File "/home/lisa/lisa/web_api/tasks.py", line 80, in full_analysis
    master.run()
  File "/home/lisa/lisa/analysis/top_level.py", line 69, in run
    sub_output = analyzer.run_analysis()
  File "/home/lisa/lisa/analysis/static_analysis.py", line 34, in run_analysis
    self._r2_info()
  File "/home/lisa/lisa/analysis/static_analysis.py", line 62, in _r2_info
    'min_opsize': info['bin']['minopsz'],
KeyError: 'minopsz'

am I missing something obvious?

AlbertoFDR commented 3 years ago

Hi, I think that's because r2 last version has change the data structure of the command.

In the next photo you can see that "minopsz" is now part of 'core' and not 'bin': screen1

One possible solution inside lisa/analysis/static_analysis.py (I don't know 100% if works 😊): screen2

inshaltahir commented 3 years ago

currently having the same issue. I tried the solution mentioned here but its not working. The "Key Error: minopsz" is gone but I see no analysis on the web interface and no report is generated for the sample.

evlp commented 2 years ago

Yep same here

xchaoinfo commented 2 years ago

https://github.com/danieluhricek/LiSa/blob/897fc5133e368273f5fd78339f72a5c3c1e490ce/lisa/analysis/static_analysis.py#L30 drop ["-2"] and with @AlbertoFDR solution.

it works. radare2 v5.5.0

inshaltahir commented 2 years ago

Oh this actually worked. Thank You so much.

jrespeto commented 2 years ago

https://github.com/danieluhricek/LiSa/pull/30

cnagavenkat commented 1 year ago

I'm still facing KeyError: 'minopsz' , after modifying the "static_analysis.py" with the mentioned changes. what else am I missing, can someone help me in resolving this issue? image image

marugish commented 1 year ago

I'm still facing KeyError: 'minopsz' , after modifying the "static_analysis.py" with the mentioned changes. what else am I missing, can someone help me in resolving this issue? image image

Hi! Did you manage to fix this error?

mikereiter commented 4 months ago

Also having this problem, please help