Code Monkey home page Code Monkey logo

vulnfanatic's Introduction

VulnFanatic (3.6)

Author: Martin Petran

Binary Ninja assistant plugin for vulnerability research.

Description:

This plugin aims to assist during the vulnerability research process by providing a capability to scan the binary for potential occurrences of known vulnerabilities such as Use-after-free, buffer overflow or format string related issues. Along with the scanner, this plugin also includes a simple highlighter tool which should provide further aid during the follow-up manual analysis of the issues found by teh scanner.

Highlighter

The highlighter part of the plugin can be used after selecting an instruction. This feature allows you to highlight Assembly and HLIL blocks that lead to current block. Another feature also allows you to highlight either HLIL or Assembly variables. This provides ability to trace all points of interest for given variables.

Scanner

Scanner is using set of rules to perform basic analysis to detect any potentially vulnerable function calls. Issues that are found by this component are marked with tags that reflect the priority for a follow-up manual analysis. Following are the priority categories:

  • πŸŸ₯ High - Detected conditions are likely to lead to vulnerability.
  • 🟧 Medium - Detected conditions could theoretically lead to vulnerability.
  • 🟨 Low - Detected conditions are unlikely to lead to vulnerability.
  • 🟦 Info - Detected conditions were not clear enough to determine if the call is secure or not.

Example of discovered issue:

Sample

Please note that by no means this plugin provides a zero effort way to find vulnerabilities. However, it should assist you in prioritizing specific places in binaries which are worth investigating.

Minimum Version

This plugin requires the following minimum version of Binary Ninja:

  • 2263

License

This plugin is released under an Apache license.

vulnfanatic's People

Contributors

martyx00 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vulnfanatic's Issues

some notice (Awesome project)

Hey Bro. Thank you for you're job! It's really help me to up my skills in binary research.

if you allow i want to say few words:

1 - it will be coool if you add some searching of one-byte-overflow.
for example when we use memcpy(var1,va2,len) and before len = strlen(some_heap_address)
something like that. this will reduce false-negative.

1.5 - i think it's possible to add some additional check to false-positive when we found something.
for example when we control var2 in memmove(var1, var2, len), but len is constant. or, len = &var1 - &var2 for example and &var1 > &var2

2 - if we try to analize some binary like "lighthttpd" - we get a fall. i dont know why :) but i can give some more log if needed.

Thank you again. Gr33t1ng5 fr0m Ukr41n3 πŸ‘

Format String Detection Broken

Awesome tool, by the way.

Not sure if this is due to something new in Binary Ninja or the particular binary I'm working on, but there are a lot of *printf calls that use an offset within a larger string that points to a format specifier, e.g:

snprintf(&var_2003c, 0x18, &(*"kill -15 %d")[9], blah)

VulnFanatic is flagging this as a format string vulnerability, presumably because it thinks it is pointing to some user-controlled buffer.

deprecated as of 3.4.4146. Use add_tag instead

Hi! When I run the tool, the following problem occurs:

[Default] C:\Users\aaa\AppData\Roaming\Binary Ninja\plugins\VulnFanatic\scanner\scanner31.py:102: DeprecatedWarning: create_tag is deprecated as of 3.4.4146. Use add_tag instead.
[Default] tag = xref.function.source_function.create_tag(self.current_view.tag_types["[VulnFanatic] "+conf], f'{test["name"]}: {test["details"]}\n', True)
[Default] D:\Program Files\Vector35\BinaryNinja\plugins..\python\binaryninja\function.py:799: DeprecatedWarning: create_tag is deprecated as of 3.4.4146. Use add_tag instead
[Default] return self.view.create_tag(type, data, auto)
[Default] C:\Users...\AppData\Roaming\Binary Ninja\plugins\VulnFanatic\scanner\scanner31.py:103: DeprecatedWarning: add_user_address_tag is deprecated as of 3.4.4146. Use add_tag instead.
[Default] xref.function.source_function.add_user_address_tag(xref.address, tag)

This is a version issue. Binaryninja3.5+ replaces some of the list apis like create_tag with add_tag.
We can also find clues in the official documents. However, when I try to change the api, I get more errors.
Can you help solve this problem?

Best regards,
lst-oss

Overzealous UaF/Double Free detection.

Hi. First off want to say that this is a pretty great tool and helps cut down on research time. Like everything it's prone to false positvies or negatives but it's been doing well so far.

Except when the C++ standard library is concerned. You see, these all point to the same call.

Screen Shot 2021-02-18 at 4 07 32 PM

This very egregious result all points to one function. if you just glance over HLIL, you can see what might look like a double-free or use-after-free issue.
Screen Shot 2021-02-18 at 4 08 58 PM
Screen Shot 2021-02-18 at 4 09 17 PM

Except for the fact that if you actually look at the HLIL, it appears to be walking the arguments and freeing them. No occurence of freeing the same argument twice, nothing that looks like (to me) a use-after-free. Then again, I'm still learning the ropes of HLIL.

I can send the binary in question, though as it's a private affair it'd have to be over email or something. Either way, I'd suggest tuning the UaF/Double free/Free "issues" in general to be a lot less zealous, and if possible, ignore C++ standard library functions, because I doubt that if this were present, it'd have made it past the C++ standards committee.

Keep up the good work, regardless. Aside from the problems with free/operator delete, it has found actual bugs and does cut down on research time. If you can provide an email to where I can share the binary (and a few others that have had similar issues) I'd be happy to help you investigate the issue.

Best regards,
impost0r

New version don't work at all :(

Hello!

How are you?

A long time pass from my last using of you're plug-in.
I was happy seeing new version, but suddenly i found, that is doesn't work at all.

Nor errors or python crashes, niter any vulns.
So, i rolls back and it work again.

But throw python exceptions and leak a platy of memory.

So, what info should i send to help me and maybe other peoples to be happy?

:3

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.