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

Create Binary Ninja package #1229

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

sreinhardt
Copy link

Loosely copied Ida package to support Binary Ninja install. My understanding is this is free for personal use and adding a license enables any additional features or commercial use, so not sure how applicable free is?

Copy link

google-cla bot commented Jan 6, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@sreinhardt sreinhardt force-pushed the binja branch 3 times, most recently from 5835d8d to c461d41 Compare January 6, 2025 19:14
@Ana06 Ana06 self-requested a review January 10, 2025 11:04
Copy link
Member

@Ana06 Ana06 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sreinhardt thanks a lot for your contribution! 💐

As documented in the Coding Conventions page in our Wiki:

vm.common/vm.common.psm1 defines functions that start with VM- to reuse code among packages and make package creation easier. The VM- helper functions muss be used when possible.

You have used idafree.vm as an example. But it is not the best example, as it is a complicated package that can't use the VM-Install-With-Installer helper because we are in addition installing our own IDA launcher. I think in your case you should be able to use the VM-Install-With-Installer helper function. A good example to check is the package bindiff.vm, that uses that helper function (and consequently is much simpler).

The tool and id/package name should not include the free in this case as it is not included in the executable name (binaryninja.exe).

Import-Module vm.common -Force -DisableNameChecking

try {
$toolName = 'BinaryNinja Free'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As documented in the Coding Conventions page in our Wiki:

The name of the tool being installed (usually the file name with the .exe)

Suggested change
$toolName = 'BinaryNinja Free'
$toolName = 'binaryninja'

<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<id>binaryninja-free.vm</id>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As documented in the id section in our Wiki:

The id is the tool name (usually the file name with the .exe) lowercased and with the following format: toolname.vm or tool-name.vm. The id must be identical to the tool directory name.

Suggested change
<id>binaryninja-free.vm</id>
<id>binaryninja.vm</id>

<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<id>binaryninja-free.vm</id>
<version>4.2</version>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems the version is 4.2.6455:

Suggested change
<version>4.2</version>
<version>4.2.6455</version>

packageName = ${Env:ChocolateyPackageName}
fileType = 'exe'
silentArgs = '/S /ALLUSERS=1'
url = 'https://cdn.binary.ninja/installers/binaryninja_free_win64.exe'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

URLs that do not include the version are an issue as the hash changes when a new version is released breaking the package. We can still add this package, but depending how often the tool is updated, this is a blocker to add this package to the default FLARE-VM configuration, as broken packages confuse users. Do you know how often this tool is released? Is it possible to use a different URL that includes the version?

We verify some packages using SigCheck instead of hash verification because of this reason. At the moment we only do it for Google/Microsoft tools as documented in the Wiki. We are planing to extend this verification to Zimmerman tools in #1199

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

Successfully merging this pull request may close these issues.

2 participants