Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid field name "imphash" #77

Closed
dbarzin opened this issue Jun 28, 2022 · 12 comments
Closed

invalid field name "imphash" #77

dbarzin opened this issue Jun 28, 2022 · 12 comments

Comments

@dbarzin
Copy link
Contributor

dbarzin commented Jun 28, 2022

I have this error when starting Pandora :

2022-06-28 08:12:08,023 yara INFO:Initializing yara-1
2022-06-28 08:12:08,024 yara INFO:Initializing yara-2
2022-06-28 08:12:08,024 yara_signature_base INFO:Initializing yara_signature_base-1
2022-06-28 08:12:08,038 yara_signature_base CRITICAL:Unable to initialize rules: /home/didier/pandora/yara_repos/signature-base/yara/apt_tick_weaponized_usb.yar(34): invalid field name "imphash"
2022-06-28 08:12:08,038 yara_signature_base INFO:Initializing yara_signature_base-2
2022-06-28 08:12:08,046 yara_signature_base CRITICAL:Unable to initialize rules: /home/didier/pandora/yara_repos/signature-base/yara/apt_tick_weaponized_usb.yar(34): invalid field name "imphash"
@Rafiot
Copy link
Contributor

Rafiot commented Jun 28, 2022

You have a few options to solve this problem:

  • use ubuntu 22.04
  • compile yara manually and reinstall yara python
  • disable the yara_signature_base module by removing yara_signature_base.yml

@dbarzin
Copy link
Contributor Author

dbarzin commented Jun 28, 2022

As I user Ubuntu 22.04, I have disabled the yara_signature_base module.

@Rafiot
Copy link
Contributor

Rafiot commented Jun 28, 2022

Hmm, that's weird, the version of yara should work fine on 22.04. I'll investigate.

@Foxi352
Copy link

Foxi352 commented Jun 30, 2022

I can confirm Didier's findings. I installed on brand new Ubuntu 22.04 VM exactly following your readme.md and have the same result, except for a different .yar file:

2022-06-30 10:32:43,700 yara_signature_base INFO:Initializing yara_signature_base-1
2022-06-30 10:32:43,905 yara_signature_base CRITICAL:Unable to initialize rules: /opt/pandora/yara_repos/signature-base/yara/gen_mimikatz.yar(149): invalid field name "imphash"
2022-06-30 10:32:43,905 yara_signature_base INFO:Initializing yara_signature_base-2
2022-06-30 10:32:43,947 yara_signature_base CRITICAL:Unable to initialize rules: /opt/pandora/yara_repos/signature-base/yara/gen_mimikatz.yar(149): invalid field name "imphash"

@Rafiot
Copy link
Contributor

Rafiot commented Jun 30, 2022

Can you try what is listed here: VirusTotal/yara-python#179

There might be a missing dependency in the install guide.

Weirdly enough, the worker starts fine in the github action, so if thatś the problem, the dependency is installed there: https://github.com/pandora-analysis/pandora/runs/7116339334?check_suite_focus=true#step:9:281

@dbarzin
Copy link
Contributor Author

dbarzin commented Jul 5, 2022

To fix :

pip install yara-python

@Rafiot
Copy link
Contributor

Rafiot commented Jul 5, 2022

This is weird, yara-python is in the pyproject.toml file. Did you install the project with poetry install?

@dbarzin
Copy link
Contributor Author

dbarzin commented Jul 5, 2022 via email

@Rafiot
Copy link
Contributor

Rafiot commented Jul 5, 2022

and you ran pip install yara-python from inside the virtualenv (after running poetry shell)?

@dbarzin
Copy link
Contributor Author

dbarzin commented Jul 6, 2022

I do not have installed yara-python from the virtualenv

@Foxi352
Copy link

Foxi352 commented Jul 6, 2022

@Rafiot I did a new clean install as per your readme instructions, only without the apparmor part for now.
But before installing and running poetry, i did sudo apt install libssl-dev as found in the link you provided VirusTotal/yara-python#179 (comment)

This seems to solve the problem

2022-07-06 07:20:24,243 yara INFO:Initializing yara-1
2022-07-06 07:20:24,283 yara INFO:Initializing yara-2
2022-07-06 07:20:24,288 yara_signature_base INFO:Initializing yara_signature_base-1
2022-07-06 07:20:25,263 yara_signature_base INFO:Initializing yara_signature_base-2

@Rafiot
Copy link
Contributor

Rafiot commented Jul 6, 2022

nice, good catch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants