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

adding hex string to rule #18

Open
bufu1003 opened this issue Jul 24, 2019 · 1 comment
Open

adding hex string to rule #18

bufu1003 opened this issue Jul 24, 2019 · 1 comment

Comments

@bufu1003
Copy link

Is there a workaround at the moment for adding a string of bytes to a rule in Yara's format?
Looked around in documentation/examples and I haven't found anything.

  • Eg:

    my_string = " 80 42 00 8b 4d 08 ba 01 00 00 00 ff d0 81 c4 00 01 00 00 5"

    Then programmatically build the rule such that I end up with:

    `$a = {80 42 00 8b 4d 08 ba 01 00 00 00 ff d0 81 c4 00 01 00 00 5}`
    

Thank you for help!

@matonis
Copy link
Owner

matonis commented Oct 24, 2019

I'm sorry for the delay a bit of a hectic summer. I believe rule.add_binary_as_string should work for you. Let me know if it doesn't.

rule.add_binary_as_string(data="4d5a9000??000000??000000ffff0000")

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

2 participants