-
Notifications
You must be signed in to change notification settings - Fork 36
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
Migrate from go-yara to yara-x; improve performance and readability #734
Changes from 27 commits
dcac602
7810b35
e792cc2
cbeb769
0611ab5
0b3cee5
c731b9d
015dcf5
5998611
fc6d6d1
05da5c8
f1fedf3
62c07b6
297bd1e
3832c87
a82d52e
d3d639a
63746ef
9c11726
8a067ca
280b87b
f7949ed
980e2b2
6b20338
f627dd7
5b4980c
83dfa49
0270283
734e965
8c78280
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -118,16 +118,19 @@ The analyze mode emits a list of capabilities often seen in malware, categorized | |
Requirements: | ||
|
||
* [go](https://go.dev/) - the programming language | ||
* [yara](https://virustotal.github.io/yara/) - the rule language | ||
* [yara-x](https://virustotal.github.io/yara-x/) - the rule language | ||
* [pkgconf](http://pkgconf.org/) - required by Go to find C dependencies, included in many UNIX distributions | ||
|
||
Linux or macOS users can run the following command to install the necessary dependencies, other than Go: | ||
`yara-x` requires an underlying C API to function. For Wolfi users, this can be installed by running `apk add yara-x-compat`. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This aside feels unhelpful as few if any users will install this onto Wolfi from source code. Can we provide a macOS example instead? |
||
|
||
```shell | ||
brew install yara || sudo apt install libyara-dev \ | ||
|| sudo dnf install yara-devel || sudo pacman -S yara \ | ||
|| sudo zypper install yara | ||
For other devices, reference the documentation here for installation instructions: https://virustotal.github.io/yara-x/docs/api/c/c-/#building-the-c-library | ||
|
||
Running `cargo cinstall -p yara-x-capi --release` may encounter permission denied errors. If this is the case, run the following: | ||
``` | ||
cargo cinstall -p yara-x-capi --release --prefix=/tmp/yara-x | ||
``` | ||
|
||
And then copy the resulting files from `/tmp/yara-x` to `/usr/local/lib` and `/usr/local/include` (or the preferred `PKG_CONFIG_PATH`/`LD_LIBRARY_PATH` location(s)). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This feels kind of gross. Is there a separate build/install step in cargo? It'd be nice if we could tell folks to use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can test that out. IIRC There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated in I tested the |
||
|
||
Install malcontent: | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to wait until CI was running consistently before locking everything down.