Giter Site home page Giter Site logo

Comments (5)

infosec-intern avatar infosec-intern commented on June 9, 2024 1

Working on pushing out the fix in 1.6.5 now. This did uncover another issue with improper identification of invalid escaped slashes too, which I'll try to fix & test more comprehensively. No need for that to interrupt this though. Great work @DissectMalware, and thanks again for bringing the issue up @Neo23x0. If you find more of these please don't hesitate to bring them up

from vscode-yara.

infosec-intern avatar infosec-intern commented on June 9, 2024 1

This looks fixed in version 1.6.5, which is now available in the marketplace. I'm gonna close this issue, but if this problem persists please feel free to reopen this or create a new issue.

from vscode-yara.

DissectMalware avatar DissectMalware commented on June 9, 2024
     {
      "name": "string.quoted.double.yara",
      "begin": "\"",
      "end": "[^\\\\]\"",
      "patterns": [
        {
          "name": "invalid.illegal.missing.escape.yara",
          "match": "[^\\\\]\\\\[^\\\\\"]"
        }
      ]
    }

changing [^\\\\]" to (?<=[^\\])(\((\\)*\))?" should solve the issue

zero or even numbers of backslash chars -> valid
odd numbers of backslash chars -> invalid

\\\\" -> valid
\\\\\" invalid

from vscode-yara.

DissectMalware avatar DissectMalware commented on June 9, 2024

Changed the following file

%USERPROFILE%.vscode\extensions\infosec-intern.yara-1.6.4\yara\syntaxes\yara.tmLanguage.json

    {
      "name": "string.quoted.double.yara",
      "begin": "\"",
      "end": "(?<=[^\\\\])(\\\\((\\\\\\\\)*\\\\))?\"",
      "patterns": [
        {
          "name": "invalid.illegal.missing.escape.yara",
          "match": "[^\\\\]\\\\[^\\\\\"]"
        }
      ]
    }

After saving the change and reopening the VS Code, you should see:

image

from vscode-yara.

infosec-intern avatar infosec-intern commented on June 9, 2024

Dang, I really thought I had this sewed up in that version. Thanks for opening the issue @Neo23x0 and the writeup @DissectMalware! I'll get to fixing this later today

from vscode-yara.

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.