Compare commits

..

View file

@ -1,6 +1,3 @@
// Made specifically for IDA 9.4 beta1
// May not work for other versions of this software including future ones
const fs = require('fs'); const fs = require('fs');
const crypto = require('crypto'); const crypto = require('crypto');
@ -22,7 +19,7 @@ const license = {
issued_on: '2025-07-20 00:00:00', issued_on: '2025-07-20 00:00:00',
owner: 'auth', owner: 'auth',
product_id: 'IDAPRO', product_id: 'IDAPRO',
product_version: '9.4', product_version: '9.2',
add_ons: [], add_ons: [],
features: [], features: [],
} }
@ -31,12 +28,11 @@ const license = {
}; };
function addons(license) { function addons(license) {
var addons = [ //update as needed, doesnt include cloud addons var addons = [ //update as needed
'LUMINA', 'TEAMS', 'LUMINA', 'TEAMS',
'HEXX86', 'HEXX64', 'HEXARM', 'HEXARM64', 'HEXX86', 'HEXX64', 'HEXARM', 'HEXARM64',
'HEXMIPS', 'HEXMIPS64', 'HEXPPC', 'HEXPPC64', 'HEXMIPS', 'HEXMIPS64', 'HEXPPC', 'HEXPPC64',
'HEXRV', 'HEXRV64', 'HEXARC', 'HEXARC64', 'HEXRV', 'HEXRV64', 'HEXARC', 'HEXARC64'
'HEXV850', 'HEXDALVIK'
]; ];
addons.forEach((addon, i) => { addons.forEach((addon, i) => {
@ -64,12 +60,8 @@ function sort(obj) {
} }
} }
const cModulus = Buffer.from("3f0307607fed562fd5a163adc40fcc603373caa28414e64cdc4552a555b13ad4b3ad0a812800a03195300fd71634b90edb0d69ea710efebb2b0b9e72da2effb149de70bcbfa94b86af01ce455dbbd5fa987207651c7b60c2e4cafd0654188d98c30f64dc084d8547f0ac32db91124af82b3b15bf922a31f1d5e332f27615cea7", "hex"); const cModulus = Buffer.from("edfd42cbf978546e8911225884436c57140525650bcf6ebfe80edbc5fb1de68f4c66c29cb22eb668788afcb0abbb718044584b810f8970cddf227385f75d5dddd91d4f18937a08aa83b28c49d12dc92e7505bb38809e91bd0fbd2f2e6ab1d2e33c0c55d5bddd478ee8bf845fcef3c82b9d2929ecb71f4d1b3db96e3a8e7aaf93", "hex");
const privateKey = Buffer.from("8b3f5fdfad7f87239734c530e2ecebeb4fa48d79518756c15fd54636801cf7ea6367100566bf8b52b16bec05258d8426ea94c15841ab2d37802c07349df4c208584e86d25a6bfb82966cb2ddcd3d654e9994e814ca470577362a937cc984e404a0b68d173aab3180130118e1b03ed209a9d8757560a85a3c9b0d3380e7907c4f", "hex"); const privateKey = Buffer.from("77c86abbb7f3bb134436797b68ff47beb1a5457816608dbfb72641814dd464dd640d711d5732d3017a1c4e63d835822f00a4eab619a2c4791cf33f9f57f9c2ae4d9eed9981e79ac9b8f8a411f68f25b9f0c05d04d11e22a3a0d8d4672b56a61f1532282ff4e4e74759e832b70e98b9d102d07e9fb9ba8d15810b144970029874", "hex");
const V54 = 127;
const V56 = 95;
const PADKEY = Buffer.from("e2a7c300dfcc777f89b57500d8151c7fb1d97b3f9f170393311234ceeb9e377ae2a7c300dfcc777f89b57500d8151c7fb1d97b3f9f170393311234ceeb9e377ae2a7c300dfcc777f89b57500d8151c7fb1d97b3f9f170393311234ceeb9e377ae2a7c300dfcc777f89b57500d8151c7fb1d97b3f9f170393311234ceeb9e37", "hex");
function encrypt(message) { function encrypt(message) {
let modulusBuf = 0n; let modulusBuf = 0n;
@ -101,17 +93,16 @@ function encrypt(message) {
function patch(filePath, search, replace) { function patch(filePath, search, replace) {
try { try {
const buf = fs.readFileSync(filePath); const buf = fs.readFileSync(filePath);
let count = 0, idx = buf.indexOf(search); const idx = buf.indexOf(search);
while (idx !== -1) { if (idx !== -1) {
buf.set(replace, idx); buf.set(replace, idx);
count++;
idx = buf.indexOf(search, idx + search.length);
}
if (count > 0) {
fs.writeFileSync(filePath, buf); fs.writeFileSync(filePath, buf);
console.log(`Patched ${filePath} (${count} occurrence${count === 1 ? '' : 's'})`); console.log(`Patched ${filePath}`);
} else { return;
}
else {
console.error(`Pattern not found in ${filePath}`); console.error(`Pattern not found in ${filePath}`);
return;
} }
} catch (err) { } catch (err) {
console.error(`Error reading or writing file: ${filePath}`); console.error(`Error reading or writing file: ${filePath}`);
@ -121,19 +112,17 @@ function patch(filePath, search, replace) {
} }
function sign(payload) { function sign(payload) {
var dataStr = sort({ payload }); var data = { payload };
var hash = crypto.createHash('sha256').update(dataStr).digest(); // 32 bytes var dataStr = sort(data);
var U = Buffer.alloc(V54, 0); var buffer = Buffer.alloc(128, 0);
hash.copy(U, V56); buffer.fill(0x42, 0, 33); // first 33 bytes filled with 0x42
var block = Buffer.alloc(V54);
for (var i = 0; i < V54; i++) block[i] = U[i] ^ PADKEY[i];
if (block[0] === 0) block[0] ^= 1;
var sig = encrypt(block); var hash = crypto.createHash('sha256').update(dataStr).digest();
var out = Buffer.alloc(128, 0); hash.copy(buffer, 33); // copy hash after first 33 bytes
sig.copy(out, 0);
return out.toString('hex').toUpperCase(); var encrypted = encrypt(buffer);
return encrypted.toString('hex').toUpperCase();
} }
license.signature = sign(license.payload); license.signature = sign(license.payload);
@ -142,8 +131,8 @@ fs.writeFileSync('idapro.hexlic', sort(license));
console.log('License written to idapro.hexlic'); console.log('License written to idapro.hexlic');
// --- Patcher --- // --- Patcher ---
const search = Buffer.from("29f4481f796f9f66f2ff13cc4ab5b54f60845db603ba2c0bac8a9bc4b6cbdefc5c62bfc2f5ee850ac45ea97ad347e8b56dba5085af8c8aad9cc2ec626ca78a068006d658f68651da31a0a77c65a70ed73a40d53b08edd403c095aa0bcffa52f313ebcacaaa2ce5024a4e2b9aa70fc6092f38ae094d71e43f7690b5ddd3e9e4f7", "hex"); const search = Buffer.from('EDFD425CF978', 'hex');
const replace = Buffer.from("a107b71c8a08ba5350934f7cf6e81be3a24dc2e35f7200d80cbd70b37ed6811dd2146d3cb7e20ad19b2544c0ef14c5c66ffbbdf226ec3f3d544c04385303ca4a7179299340022f5d50948bcf8a60307e2c196329e51a5296dc419e40fef3ef7c6f015a09ebd979e79615338985643e666c14897f9f597e11f44341f496d56861", "hex"); const replace = Buffer.from('EDFD42CBF978', 'hex');
["ida.dll", "ida32.dll", "libida.so", "libida32.so", "libida.dylib", "libida32.dylib"].forEach(file => { ["ida.dll", "ida32.dll", "libida.so", "libida32.so", "libida.dylib", "libida32.dylib"].forEach(file => {
if (fs.existsSync(file)) { if (fs.existsSync(file)) {