-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1243 from Ana06/idapro
Add idapro.vm
- Loading branch information
Showing
29 changed files
with
180 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,14 @@ | ||
$ErrorActionPreference = 'Continue' | ||
Import-Module vm.common -Force -DisableNameChecking | ||
|
||
try { | ||
$toolName = 'fakenet' | ||
$category = 'Networking' | ||
|
||
VM-Uninstall $toolName $category | ||
|
||
# Remove Desktop shortcut to FakeNet tool directory | ||
$desktopShortcut = Join-Path ${Env:UserProfile} "Desktop\fakenet_logs.lnk" | ||
Remove-Item $desktopShortcut -Force -ea 0 | ||
} catch { | ||
VM-Write-Log-Exception $_ | ||
} | ||
$toolName = 'fakenet' | ||
$category = 'Networking' | ||
|
||
VM-Uninstall $toolName $category | ||
|
||
# Remove Desktop shortcut to FakeNet tool directory | ||
$desktopShortcut = Join-Path ${Env:UserProfile} "Desktop\fakenet_logs.lnk" | ||
Remove-Item $desktopShortcut -Force -ea 0 | ||
|
||
# Refresh Desktop as shortcut is used in FLARE-VM LayoutModification.xml | ||
VM-Refresh-Desktop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
$ErrorActionPreference = 'Continue' | ||
Import-Module vm.common -Force -DisableNameChecking | ||
|
||
$toolName = 'idafree' | ||
$toolName = 'ida' | ||
$category = 'Disassemblers' | ||
|
||
VM-Remove-Tool-Shortcut $toolName $category | ||
|
||
# Remove binary from PATH | ||
Uninstall-BinFile -Name $toolName | ||
|
||
# Manually silently uninstall | ||
VM-Uninstall-With-Uninstaller "IDA Freeware*?8.4" $category "EXE" "--mode unattended" | ||
# Silently uninstall | ||
VM-Uninstall-With-Uninstaller "IDA Freeware*" $category "EXE" "--mode unattended" | Out-Null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd"> | ||
<metadata> | ||
<id>idapro.vm</id> | ||
<version>0.0.0.20250116</version> | ||
<authors>Hex-Rays</authors> | ||
<description>IDA Pro 9 is an interactive DisAssembler and debugger. The installation requires an IDA Pro installer `ida-pro_9*.exe` (and optionally a license file) in the Desktop. Get your installer from https://hex-rays.com/ida-pro.</description> | ||
<dependencies> | ||
<dependency id="common.vm" version="0.0.0.20240509" /> | ||
<!-- IDA Pro requires Python3 and the rpyc library --> | ||
<dependency id="libraries.python3.vm" version="0.0.0.20241213" /> | ||
</dependencies> | ||
</metadata> | ||
</package> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
$ErrorActionPreference = 'Stop' | ||
Import-Module vm.common -Force -DisableNameChecking | ||
|
||
try { | ||
$toolName = 'ida' | ||
$category = 'Disassemblers' | ||
|
||
$installerPaths = Resolve-Path "${Env:USERPROFILE}\Desktop\ida-pro_9*.exe" | ||
if ($installerPaths.count -eq 0) { | ||
throw "An IDA Pro installer 'ida-pro_9*.exe' in the Desktop is required. Get your installer from https://hex-rays.com/ida-pro" | ||
} | ||
elseif ($installerPaths.count -gt 1) { | ||
# Only one installer supported (prospective change) | ||
throw "Several IDA Pro installers found in Desktop, only 1 installer is supported." | ||
} | ||
$installerPath = $installerPaths | Select-Object -first 1 | ||
VM-Write-Log "INFO" "Installing IDA Pro: $installerPath" | ||
|
||
# Run installer | ||
$packageArgs = @{ | ||
packageName = $env:ChocolateyPackageName | ||
file = $installerPath | ||
fileType = 'exe' | ||
# unclear what the required argument `--install_python` expects | ||
silentArgs = '--mode unattended --install_python flare' | ||
} | ||
Install-ChocolateyInstallPackage @packageArgs | Out-Null | ||
|
||
# Wait for IDA to be installed | ||
Start-Sleep -Seconds 10 | ||
$executablePath = Resolve-Path "${Env:ProgramFiles}\IDA Professional 9*\ida.exe" | ||
VM-Assert-Path $executablePath | ||
|
||
Install-BinFile -Name $toolname -Path $executablePath | ||
|
||
# Delete "IDA Teams Visual Client" Desktop shortcut | ||
# Do not delete "IDA Professional 9.0", as it is useful to drag binaries to it | ||
$desktopShortcut = Resolve-Path "${Env:Public}\Desktop\IDA Teams Visual Client*" | ||
if ($null -ne $desktopShortcut) { Remove-Item $desktopShortcut -Force -ea 0 } | ||
|
||
# Add ida to the Tools directory, use directly (instead of ida_launcher.exe) to avoid taskbar duplication | ||
VM-Install-Shortcut -toolName $toolName -category $category -executablePath $executablePath | ||
|
||
# Download ida_launcher.exe and store it in %RAW_TOOLS_DIR% | ||
# ida_launcher.exe is a custom binary that searches for the latest ida64.exe and executes it | ||
$launcherName = 'ida_launcher' | ||
$launcherSource = 'https://raw.githubusercontent.com/mandiant/VM-Packages/119ba385de053b01b0d1732d60ad1b1152496dc2/ida_launcher/ida_launcher.exe' | ||
$launcherPath = Join-Path ${Env:RAW_TOOLS_DIR} "$launcherName.exe" | ||
$launcherChecksum = "a98241e476150d053d67d149c1b54816c8306db51e0987613ec25a0f8ad22006" | ||
Get-ChocolateyWebFile -PackageName $launcherName -FileFullPath $launcherPath -Url $launcherSource -Checksum $launcherChecksum -ChecksumType "sha256" | ||
VM-Assert-Path $launcherPath | ||
|
||
# Use ida_launcher.exe in the right click option "Open with IDA" | ||
$icon = Resolve-Path "${Env:ProgramFiles}\IDA*\$toolName.ico" | Select-Object -last 1 | ||
VM-Add-To-Right-Click-Menu $launcherName 'Open with IDA' "`"$launcherPath`" `"%1`"" "$icon" | ||
|
||
|
||
# Create IDA user directory (also if no license file is copied as it makes it easier to manually add the license file) | ||
$idaDir = "${Env:APPDATA}\Hex-Rays\IDA Pro" | ||
New-Item $idaDir -ItemType "directory" -Force | Out-Null | ||
|
||
# Copy license file to IDA user directory if present in Desktop | ||
$licensePaths = Resolve-Path "${Env:USERPROFILE}\Desktop\idapro_9*.hexlic" | ||
if ($licensePaths.count -eq 0) { | ||
VM-Write-Log "WARN" "No IDA Pro license file 'idapro_9*.hexlic' found in Desktop." | ||
VM-Write-Log "WARN" "Get your license file from https://hex-rays.com/ida-pro and copy it to IDA user directory before launching IDA Pro." | ||
} | ||
else { | ||
# Copy license file(s) | ||
ForEach ($licensePath in $licensePaths) { | ||
VM-Write-Log "INFO" "Copying license file to IDA user directory: $licensePath" | ||
Copy-Item $licensePath $idaDir | ||
} | ||
} | ||
|
||
# Refresh Desktop as shortcut is used in FLARE-VM LayoutModification.xml | ||
VM-Refresh-Desktop | ||
} catch { | ||
VM-Write-Log-Exception $_ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
$ErrorActionPreference = 'Continue' | ||
Import-Module vm.common -Force -DisableNameChecking | ||
|
||
$toolName = 'ida' | ||
$category = 'Disassemblers' | ||
|
||
# Remove binary from PATH | ||
Uninstall-BinFile -Name $toolName | ||
|
||
# Replace tool shortcut's target by ida_launcher.exe | ||
$launcherPath = Join-Path ${Env:RAW_TOOLS_DIR} "ida_launcher.exe" | ||
$icon = Resolve-Path "${Env:ProgramFiles}\IDA*\$toolName.ico" | Select-Object -first 1 | ||
VM-Install-Shortcut -toolName $toolName -category $category -executablePath $launcherPath -IconLocation $icon | ||
|
||
# Silently uninstall | ||
VM-Uninstall-With-Uninstaller "IDA Pro*" $category "EXE" "--mode unattended" | Out-Null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.