吾爱破解 - 52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 1882|回复: 18
上一主题 下一主题
收起左侧

[原创] 【Source Insight 4 CracKed】更方便的 Source Insight 4 补丁及注册机

  [复制链接]
跳转到指定楼层
楼主
YukiIsait 发表于 2025-5-2 10:05 回帖奖励
本帖最后由 YukiIsait 于 2025-5-2 10:26 编辑

本文前言

Source Insight 4 是一款非常强大的源代码编辑器和代码分析工具,而对于其授权过程的逆向分析网上已经有许多文章了(本文结尾也贴了几个参考的帖子),本文不再赘述,这里仅分享一个本人编写的更方便的补丁及其实现方式,集成了联网验证补丁和注册机的功能,用于自动通过其授权而无需修改任何文件(众所周知添加不是修改x)。

实现原理

通过在 Source Insight 4 的程序目录中伪造并代理其导入的系统库 msimg32.dll 来注入其进程(使用本人制作的小工具 ProxyPESourceGenerator 生成用于代理 msimg32.dll 的源代码),并使用微软的 Detours 库劫持其哈希校验和联网校验功能后自动生成授权文件以本地激活。

劫持校验

  • 劫持哈希校验功能部分

    BOOL Patch::CryptVerifySignatureW(HCRYPTHASH hHash, const BYTE* pbSignature, DWORD dwSigLen, HCRYPTKEY hPubKey, LPCWSTR szDescription, DWORD dwFlags) {
        // 跳过签名验证
        return TRUE;
    }
  • 劫持联网校验功能部分

    HINTERNET Patch::InternetOpenW(LPCWSTR lpszAgent, DWORD dwAccessType, LPCWSTR lpszProxy, LPCWSTR lpszProxyBypass, DWORD dwFlags) {
        // 阻止检查授权,防止序列号被加入在线黑名单
        // 检查授权的 UA 是 Source Insight,检查更新的 UA 是 SourceInsight/4.0
        if (std::wcscmp(lpszAgent, L"Source Insight") == 0) {
            SetLastError(ERROR_ACCESS_DENIED);
            return NULL;
        }
        return internetOpenW(lpszAgent, dwAccessType, lpszProxy, lpszProxyBypass, dwFlags);
    }

授权文件生成

  • 生成序列号部分

    wchar_t LicenseSerial::GenerateRandomLetterOrDigit() {
        std::uniform_int_distribution<uint16_t> distribution(0, 35);
        uint16_t randomValue = distribution(randomEngine);
        if (randomValue < 10) {
            return L'0' + randomValue;
        } else {
            return L'A' + randomValue - 10;
        }
    }
    
    wchar_t LicenseSerial::GenerateRandomRGDF() {
        std::uniform_int_distribution<uint16_t> distribution(0, 3);
        switch (distribution(randomEngine)) {
            case 0:
                return L'R';
            case 1:
                return L'G';
            case 2:
                return L'D';
            default:
                return L'F';
        }
    }
    
    std::wstring LicenseSerial::Generate() {
        std::wstring serial(19, L'-');
        wchar_t* serialData = serial.data();
        serialData[0] = L'S';
        serialData[1] = L'4';
        serialData[2] = L'S';
        serialData[3] = L'G';
        serialData[5] = GenerateRandomLetterOrDigit();
        serialData[6] = GenerateRandomRGDF();
        serialData[7] = GenerateRandomLetterOrDigit();
        serialData[8] = GenerateRandomLetterOrDigit();
        for (size_t i = 0; i < 4; i++) {
            serialData[i + 10] = GenerateRandomLetterOrDigit();
        }
        for (size_t i = 0; i < 4; i++) {
            uint8_t hash = substitutionTable[serialData[0] + i];
            for (size_t j = 1; j < 15; j++) {
                hash = substitutionTable[serialData[j] ^ hash];
            }
            serialData[i + 15] = alphabetTable[hash % 26];
        }
        return serial;
    }
  • 生成授权文件部分

    void License::EnsureAvailability() {
        // 获取 %ProgramData%\Source Insight\4.0\si4.lic 文件路径,如果父目录不存在则创建
        std::array<wchar_t, MAX_PATH> commonAppDataPath;
        if (SHGetFolderPathW(nullptr, CSIDL_COMMON_APPDATA, nullptr, 0, commonAppDataPath.data()) != S_OK) {
            throw std::runtime_error("Failed to get CSIDL_COMMON_APPDATA path, error code: " + std::to_string(GetLastError()));
        }
        std::filesystem::path licenseFilePath = std::filesystem::path(commonAppDataPath.data()) / L"Source Insight" / L"4.0" / L"si4.lic";
        std::filesystem::create_directories(licenseFilePath.parent_path());
    
        // 如果 License 文件不存在或不包含 SourceInsight4Patch 字符串,则生成一个新的
        std::wfstream licenseFile;
        licenseFile.exceptions(std::ifstream::failbit | std::ifstream::badbit);
        if (std::filesystem::exists(licenseFilePath)) {
            licenseFile.open(licenseFilePath, std::ios::in);
            std::span<const wchar_t> magic(L"SourceInsight4Patch", 19);
            std::istreambuf_iterator<wchar_t> end;
            if (std::search(std::istreambuf_iterator<wchar_t>(licenseFile), end, magic.begin(), magic.end()) != end) {
                licenseFile.close();
                return;
            }
            licenseFile.close();
        }
        licenseFile.open(licenseFilePath, std::ios::out | std::ios::trunc);
        LicenseSerial licenseSerial;
        std::chrono::time_point now = std::chrono::system_clock::now();
        licenseFile << std::format(L"<SourceInsightLicense>\n" \
                                   L"    <LicenseProperties ActId=\"\"\n" \
                                   L"                       HWID=\"\"\n" \
                                   L"                       Serial=\"{:s}\"\n" \
                                   L"                       LicensedUser=\"SourceInsight4Patch\"\n" \
                                   L"                       Organization=\"www.52pojie.cn\"\n" \
                                   L"                       Email=\"\"\n" \
                                   L"                       Type=\"Standard\"\n" \
                                   L"                       Version=\"4\"\n" \
                                   L"                       MinorVersion=\"0\"\n" \
                                   L"                       Date=\"{:%Y-%m-%d}\" />\n" \
                                   L"    <Signature Value=\"SourceInsight4Patch\" />\n" \
                                   L"</SourceInsightLicense>", licenseSerial.Generate(), now);
        licenseFile.close();
    }

使用方式

  1. 从官网下载并安装 Source Insight 4。
  2. msimg32.dll 复制到 Source Insight 4 的安装目录中。
  3. 运行 Source Insight 4 即可正常使用。

使用说明

  1. Source Insight 4 具有网络验证功能,本工具通过劫持 InternetOpenW 并根据其联网验证的 UA 来阻止其验证以及上传序列号的功能,而又不影响其检测更新的功能,这样本工具生成的序列号将不会被上传到黑名单
  2. Source Insight 4 内置了一些硬编码的黑名单序列号,本工具通过首次启动时随机生成序列号来规避,如果真的撞大运了(?)恰巧遇到自动生成的序列号在黑名单中,可以手动删除 %ProgramData%\Source Insight\4.0\si4.lic 并重启软件来重新生成序列号。
  3. Source Insight 4 在检查更新时会联网下载黑名单序列号列表,你懂的,如果真的撞大运了(?)按上述方法解决即可。

相关链接

参考帖子

免责声明

本补丁仅供技术交流使用。我们感谢软件作者的辛勤努力,强烈鼓励用户支持正版,以便软件得以持续改进和更新。未经软件作者许可,不得将本补丁用于商业用途或侵犯版权行为。使用本补丁所产生的一切后果由用户自行承担,与补丁提供者无关。

免费评分

参与人数 13威望 +1 吾爱币 +32 热心值 +12 收起 理由
Hmily + 1 + 20 + 1 感谢发布原创作品,吾爱破解论坛因你更精彩!
askme765cs + 1 + 1 感谢发布原创作品,吾爱破解论坛因你更精彩!
csa + 1 + 1 谢谢@Thanks!
Carinx + 1 + 1 用心讨论,共获提升!
fang5358028 + 1 + 1 谢谢@Thanks!
sunil + 1 + 1 鼓励转贴优秀软件安全工具和文档!
theStyx + 1 + 1 谢谢@Thanks!
nowns + 1 + 1 感谢发布原创作品,吾爱破解论坛因你更精彩!
elvischoo + 1 + 1 谢谢@Thanks!
xiatiandegushi + 1 + 1 感谢发布原创作品,吾爱破解论坛因你更精彩!
sunsjw + 1 谢谢@Thanks!
qqcs6 + 1 + 1 谢谢@Thanks!
q51658258 + 1 + 1 用心讨论,共获提升!

查看全部评分

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

沙发
285623531 发表于 2025-5-2 17:41
下下来,学习一下。
3#
ABCDWWWc123 发表于 2025-5-2 19:49
4#
colaraa 发表于 2025-5-2 22:44
5#
jasmine叶 发表于 2025-5-2 23:00
小白等心血来潮时也来学习一下。
6#
iysheng 发表于 2025-5-3 06:53
看着不错哦
7#
nowns 发表于 2025-5-3 07:17
感谢楼主的分享
8#
Lty20000423 发表于 2025-5-3 08:43
source insight是干嘛的?
9#
artour 发表于 2025-5-3 10:15
Lty20000423 发表于 2025-5-3 08:43
source insight是干嘛的?

软件工作者才用,大型源程序编辑修改,很强大,以前用过好像还免费,现在收费了!
10#
sunsjw 发表于 2025-5-3 10:39
伸手党的福音
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则

返回列表

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2025-5-26 09:06

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表