Giter Club home page Giter Club logo

binaryninja-msp430's People

Contributors

joshwatson avatar lucasduffey avatar psifertex 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

Watchers

 avatar  avatar  avatar  avatar

binaryninja-msp430's Issues

`branch_target` is not properly calculated

Binary Ninja version: 1.1.989 Personal
Microcorruption level: Chernobyl

On address 0x4bbc, Microcorruption's debugger decodes the instruction as 4bbc: 923c jmp #0x4ce2 <run+0x17c> and Binary Ninja decodes the instruction as 00004bbc 923c jmp 0x44e2L, which off by 0x800. This is being caused by the if-statement line 984 (which, according to the comment, checks if the offset is negative). I'm not entirely sure of the correct fix for this issue, but I suspect the condition needs to be changed.

Backwards lifting of cmp-then-jhs branches

Consider this code (from MSP430x2xx Family User's Guide (Rev. J), section 3.4.6.24):

2020-12-06-094115_752x125_scrot

Disassembled, in binja, everything seems fine:

2020-12-06-094059_999x435_scrot

But once lifted to LLIL, the operands of the >= are reversed!

2020-12-06-094106_1077x391_scrot

I'm not really familiar enough with binja lifting (or in fact with the MSP430) to be sure which part the issue is in, but it definitely seems wrong! (I encountered this first in real code, where a static binary-search over different possible values was nonsensical, as comparisons were against numbers that would be illegal at that point in the program flow).

JLO lifting condition backwards

Explicit example can be seen in Jakarta level in Microcorruption. The JLO lifting target is backwards, the ASM is:
disassembly

Meanwhile the lifting is :
llil_bug

Simple fix of adding LLFC.UGT condition to flags and swapping around the condition in the lifter.

msp430 doesn't show up in the Architecture list

am i doing something wrong?

i opened a binary memory dump file, and attempted to choose the MSP430 architecture from the drop-down box when prompted. it's not there.

i'm on 3.0.3234-dev.

DefaultCallingConvention attributes problem

Binary Ninja version

1.1.931-dev Personal

Log error

Traceback (most recent call last):
  File "~/Library/Application Support/Binary Ninja/plugins/msp430/__init__.py", line 1089, in <module>
    arch.register_calling_convention(DefaultCallingConvention(arch))
  File "/Applications/Binary Ninja.app/Contents/MacOS/plugins/../../Resources/python/binaryninja/callingconvention.py", line 52, in __init__
    raise ValueError("Must specify either handle or architecture and name")
ValueError: Must specify either handle or architecture and name
Python plugin 'msp430' could not be loaded

I believe that it is intended for the object DefaultCallingConvention(arch) to have the attributes architecture and name set to Architecture['msp430'] and 'default', but arch.register_calling_convention() does not recognize them to be set.

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.