Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
libpeconv — 自定义 PE 加载与操作库,用于手动映射、IAT 挂钩、内存转储以及重建导入,以支持恶意软件分析与逆向工程。 | Kitploit
工具/GitHubGitHub/hasherezade/libpeconv
内存取证逆向工程恶意软件分析实用工具与框架二进制分析Payload 开发
GitHubhasherezade/libpeconv

libpeconv

自定义 PE 加载与操作库,用于手动映射、IAT 挂钩、内存转储以及重建导入,以支持恶意软件分析与逆向工程。

查看仓库
1.4k2074个月前Kitploit 审核通过

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享
网站

libPeConv

Build status Codacy Badge Commit activity Last Commit

License Platform Badge

用于加载和操作 PE 文件的库。

目标

libPEConv 的目标是创建一个用于自定义加载 PE 文件的“瑞士军刀”。它汇集了各种辅助函数,您可以快速将它们集成到自己的加载器中。例如:重新映射节区、应用重定位、加载导入、解析资源。

它不仅允许加载 PE 文件,还允许自定义某些步骤,例如 IAT 挂钩(通过提供自定义 IAT 解析器)和函数重定向。但是,它并不专注于内联挂钩,不应与 MS Detours 或 MinHook 等库混淆。

LibPeConv 可用于创建 PE 绑定器,因为它允许直接从资源中加载 PE,并将其当作本地代码一样集成。

此外,它还可以帮助您从内存中转储 PE,并重建其 IAT。

警告:使用 MUI 的应用程序不受支持。

基本示例

最简单的用例:使用 libPeConv 手动加载并运行您选择的 EXE。

root@kitploit:~
#include <Windows.h>
#include <iostream>

#include <peconv.h> // include libPeConv header

int main(int argc, char *argv[])
{
    if (argc < 2) {
        std::cout << "Args: <path to the exe>" << std::endl;
        return 0;
    }
    LPCSTR pe_path = argv[1];

    // manually load the PE file using libPeConv:
    size_t v_size = 0;
#ifdef LOAD_FROM_PATH
    //if the PE is dropped on the disk, you can load it from the file:
    BYTE* my_pe = peconv::load_pe_executable(pe_path, v_size);
#else
    size_t bufsize = 0;
    BYTE *buffer = peconv::load_file(pe_path, bufsize);

    // if the file is NOT dropped on the disk, you can load it directly from a memory buffer:
    BYTE* my_pe = peconv::load_pe_executable(buffer, bufsize, v_size);
#endif
    if (!my_pe) {
        return -1;
    }
	
    // if the loaded PE needs to access resources, you may need to connect it to the PEB:
    peconv::set_main_module_in_peb((HMODULE)my_pe);
    
    // load delayed imports (if present):
    const ULONGLONG load_base = (ULONGLONG)my_pe;
    peconv::load_delayed_imports(my_pe, load_base);
  
    // if needed, you can run TLS callbacks before the Entry Point:
    peconv::run_tls_callbacks(my_pe, v_size);
	
    //calculate the Entry Point of the manually loaded module
    DWORD ep_rva = peconv::get_entry_point_rva(my_pe);
    if (!ep_rva) {
        return -2;
    }
    ULONG_PTR ep_va = ep_rva + (ULONG_PTR) my_pe;
    //assuming that the payload is an EXE file (not DLL) this will be the simplest prototype of the main:
    int (*new_main)() = (int(*)())ep_va;

    //call the Entry Point of the manually loaded PE:
    return new_main();
}

另请参阅:https://github.com/hasherezade/libpeconv_tpl/blob/master/project_template/main.cpp

更多阅读

  • Wiki
  • 文档
  • 示例
  • 教程
  • 项目模板
下载工具