GithubHelp home page GithubHelp logo

Defect about yara-project HOT 4 CLOSED

GoogleCodeExporter avatar GoogleCodeExporter commented on June 15, 2024
Defect

from yara-project.

Comments (4)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 15, 2024
[deleted comment]

from yara-project.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 15, 2024
These rules are an example of the worst case scenario for yara. The [0-255] 
jump is simply too wide, they are allowed but they aren't recommended because 
they are really slow. If the first part of the strings would be longer, 
probably that wouldn't be a problem, but these [0-255] jumps are preceded by 
just two or three bytes. Whenever yara finds a match for those 2-3 bytes (and 
this should happen a lot), it has to scan the following 255 bytes trying to 
match the remaining part of the string, that's what make the scanning so slow. 
The problem is even worse with the string containing two of those jumps with 
just b801000000 in between, wich his a a very common pattern in executable 
files because is the Intel's opcode for mov eax,1. So, the problem here is not 
with some particular file in your dataset, the problem is the rule. 

My recommendation in this case would be removing the first bytes of the strings 
including the jump, for example, the string 
5657[0-255]b801000000f7d0ffc081c00100000081e889402626 is better written as 
b801000000f7d0ffc081c00100000081e889402626. The first two bytes don't make a 
lot of difference in the signature and the remaining string is long enough to 
be significant. With shorter strings like 505f[0-255]505e81e800764000 this 
approach imposes a lot more risk.

Original comment by [email protected] on 26 Jan 2012 at 9:11

from yara-project.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 15, 2024
After testing the given rule file with some files I've noticed that in fact it 
was taking even longer than I would expect because of the reasons discussed 
above. Actually the scan was never ending even with small files. So you were 
right, YARA was not simply taking long, it was completely hang. The issue has 
been fixed in r136.

Original comment by [email protected] on 31 Jan 2012 at 3:27

from yara-project.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 15, 2024

Original comment by [email protected] on 31 Jan 2012 at 3:27

  • Changed state: Fixed

from yara-project.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.