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

Add the SigMaker IDA Pro plugin #913

Closed
wants to merge 1 commit into from

Conversation

d35ha
Copy link
Member

@d35ha d35ha commented Feb 21, 2024

Required by #719.

@d35ha d35ha self-assigned this Feb 21, 2024
@d35ha d35ha added 🆕 package New package request/idea/PR 🌀 FLARE-VM A package or feature to be used by FLARE-VM labels Feb 21, 2024
@d35ha d35ha changed the title Add the lighthouse IDA Pro plugin Add the SigMaker IDA Pro plugin Feb 21, 2024
@d35ha d35ha force-pushed the ida-plugin-SigMaker branch from 588a3d6 to 67f7e5f Compare February 21, 2024 10:05
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.

@d35ha thanks for your PRs to add IDA plugins! 😄

We can only merge PRs where the linter and test succeed. In this PR the linter is failing with:

packages\ida.plugin.sigmaker.vm\tools\chocolateyinstall.ps1 - Uses an invalid category: Set $category to a category in D:\a\VM-Packages\VM-Packages\categories.txt or exclude the package in the linter

We need to exclude packages without categories (no shortcut is created in the Tools directory) in the linter. Now we have ida.plugin.capa.vm in the EXCLUSIONS array. I suggest we change it by ida.plugin, which will exclude all IDA plugins.

Import-Module vm.common -Force -DisableNameChecking

try {
# Download the plugin
Copy link
Member

Choose a reason for hiding this comment

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

[nitpick] I think this comment is not needed, as this package only download a single file and the code is IMO clear.

VM-Assert-Path $pluginPath

# Install the plugin
$pluginsDir = New-Item "$Env:APPDATA\Hex-Rays\IDA Pro\plugins" -ItemType "directory" -Force
Copy link
Member

Choose a reason for hiding this comment

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

Create $pluginsDir before downloading the plugin and use $pluginPath = Join-Path $pluginsDir "SigMaker.dll" so that you don't have to move it afterwards as we do in ida.plugin.capa.vm.


try {
# Download the plugin
$pluginUrl = "https://github.com/A200K/IDA-Pro-SigMaker/releases/download/v1.0.0/SigMaker64.dll"
Copy link
Member

Choose a reason for hiding this comment

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

Please use consistent indentation here

Comment on lines +4 to +8
$pluginsDir = "$Env:APPDATA\Hex-Rays\IDA Pro\plugins"

# Uninstall plugin
$pluginPath = Join-Path $pluginsDir "SigMaker.dll"
Remove-Item $pluginPath -Force
Copy link
Member

Choose a reason for hiding this comment

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

I purpose to simplify the code:

Suggested change
$pluginsDir = "$Env:APPDATA\Hex-Rays\IDA Pro\plugins"
# Uninstall plugin
$pluginPath = Join-Path $pluginsDir "SigMaker.dll"
Remove-Item $pluginPath -Force
$pluginPath = "$Env:APPDATA\Hex-Rays\IDA Pro\plugins\SigMaker.dll"
Remove-Item $pluginPath -Force

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌀 FLARE-VM A package or feature to be used by FLARE-VM 🆕 package New package request/idea/PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants