请选择 进入手机版 | 继续访问电脑版

郁金香灬老师 游戏安全  驱动 逆向调试 C/C++编程  脚本 UE4/UE5

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 活动 交友 discuz
课程大纲和价格
官方联系方式2024在线课大纲QQ咨询
楼主: admin

隐藏进程 ProcessHider C++完整代码

[复制链接]

131

主题

29

回帖

34万

积分

管理员

积分
344245
QQ
发表于 2024-3-12 19:55:36 | 显示全部楼层 |阅读模式



完整 源代码下载 https://github.com/M00nRise/ProcessHider



#include <stdio.h>
#include <stdlib.h>
#include <Windows.h>
#include <tchar.h>
#include "../ProcessHider/Daemon.h"
#include "../ProcessHider/Preparations.h"
#include "..\Common\ArgumentsPassing.h"


BYTE *x86PayloadByteArr;
int x64PayloadSize;
BYTE *x64PayloadByteArr;
int x86PayloadSize;

//Get DLLs from the 32 bit file, using the mechanism specified there
BOOL getDLLs()
{
        HANDLE hMapFile;
        DWORD *pBuf;

        hMapFile = OpenFileMapping(
                FILE_MAP_ALL_ACCESS,   // read/write access
                FALSE,                 // do not inherit the name
                mappingName);               // name of mapping object

        if (hMapFile == NULL)
        {
                _tprintf(TEXT("Could not open file mapping object (%d).\n"),
                        GetLastError());
                return FALSE;
        }

        pBuf = (DWORD *)MapViewOfFile(hMapFile, // handle to map object
                FILE_MAP_ALL_ACCESS,  // read/write permission
                0,
                0,
                mappingSize);

        if (pBuf == NULL)
        {
                _tprintf(TEXT("Could not map view of file (%d).\n"),
                        GetLastError());

                CloseHandle(hMapFile);

                return FALSE;
        }
        x64PayloadByteArr = (BYTE *)pBuf[0];
        x64PayloadSize = pBuf[1];
        x86PayloadByteArr = (BYTE *)pBuf[2];
        x86PayloadSize = pBuf[3];
        HANDLE hMutex=OpenMutex(SYNCHRONIZE, FALSE, MutexName);
        if(hMutex==NULL) ERROR_PRINT("Can't find mutex to send ACK to 32 bit!")
        pBuf[numOfMappingItems - 1] = 0; //signal to 32 bit process
        ReleaseMutex(hMutex);
        UnmapViewOfFile(pBuf);
        CloseHandle(hMutex);
        CloseHandle(hMapFile);

        return TRUE;
}



int _tmain(int argc, _TCHAR* argv[])
{
        if (!getDLLs())
                return 1;
        BOOL InjectALL = FALSE;
        if(PrepareContents(argc, argv,&InjectALL))
        LaunchDaemon(InjectALL);
}


游戏安全课程 学员办理咨询联系QQ150330575 手机 139 9636 2600  免费课程 在 www.bilibili.com 搜 郁金香灬老师
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ咨询

QQ|Archiver|手机版|小黑屋|郁金香游戏技术

GMT+8, 2024-3-29 00:00 , Processed in 0.323503 second(s), 31 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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