`

国外CE使用

 
阅读更多

All .exe and .dll files when loaded into memory are referred to as "modules".

When adding addresses to your Cheat Engine table, and especially when using pointers you will often find the address listed like this:

 

Or maybe like this:
server.dll + 004EE83

This is using relative offset from the address of a module. Too see if an address is offset from a certain module make sure you enable this:

 

Then in memory viewer use "Go To Address" to the address. Regardless of if it is data or code, this will tell you what module it is offset from.

To view all the modules loaded by the process in Cheat Engine and view their addresses do this:

 

Also you can use Dissect PE Headers to view relative information:


MZ-Start is the address of the module as it is currently loaded into memory. Preferred ImageBase is parsed straight from the PE Header and is the location that it prefers to be loaded into. If this memory address is already taken, it will relocate.

When an .exe is executed, the windows loader create a process for it and give it it's own virtual memory space. The loader loads the executable into memory and then any .dlls that are called by the process. The PE header for the .dll defines a ImageBase address. The windows loader will try to load the .dll into the virtual memory space of the process that requires it. If that space is already occupied, it will be loaded into a different location. If this happens hardcodes addresses in our hacks will not work.

Now let's say we have a pointer:
ac_client.exe + 109B74

Now the ImageBase pulled from the PE header of ac_client.exe is "00400000"
We can only have one executable for each process which is an empty memory space until ac_client.exe is loaded. There is nothing blocking ac_client.exe from loading into it's ImageBase. So the base address of a .exe is always the same.

The ONLY time when a .exe isn't loaded into the imagebase stored in the PE headers is when ASLR(Address Space Layout Randomization) is enabled on the OS and the DynamicBase flag is set to enable the OS to randomize virtual address of the module.

We can just evaluate this before placing it in the code.
ac_client.exe + 109B74
00400000 + 109B74
509B74

This is the definition of a static address, it may be relative to the base address of an executable in the binary on disk, but it is always static in memory after relocations have occured.

But for .DLL's that can be relocated:

"server.dll + 004EE83" works in Cheat Engine because Cheat Engine evaluates the address of server.dll. CE will get the address of server.dll and replace it with the adress that the module is loaded.
So lets say the address of module server.dll is 0x10000000, cheat Engine will evaluate:

server.dll + 004EE83
0x10000000 + 004EE83
1004EE83

The above evaluation is done by cheat engine while the program is running.

But when you are trying to use this in an external trainer you need to evaluate "server.dll" + 004EE83 yourself. There are multiple ways of doing this and we will discuss one of them now.

To do this externally you can use this function that has been widely used named dwGetModuleBaseAddress.

Basically it uses the windows API CreateToolhelp32Snapshot to get a snapshot of all loaded modules for the given process, it then iterates through all the loaded modules and finds the module with the module name you give it. It returns a uintptr_t to the module address. You input the ProcessID and the name of the module and it ouputs the address of the module.

Includes:

C++:Copy to clipboard
//Place these with your other includes
#include <tlhelp32.h>
#include <tchar.h>

Function Prototype:

C++:Copy to clipboard
//Place this in the global namespace anywhere before the function is defined and called.
uintptr_t GetModuleBaseAddress(DWORD dwProcID, const TCHAR *szModuleName)

Function Definition:

C++:Copy to clipboard
//Place this anywhere in the global namespace
uintptr_t GetModuleBaseAddress(DWORD dwProcID, const TCHAR *szModuleName)
{
    uintptr_t ModuleBaseAddress = 0;
    HANDLE hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE | TH32CS_SNAPMODULE32, dwProcID);
    if (hSnapshot != INVALID_HANDLE_VALUE)
    {
        MODULEENTRY32 ModuleEntry32;
        ModuleEntry32.dwSize = sizeof(MODULEENTRY32);
        if (Module32First(hSnapshot, &ModuleEntry32))
        {
            do
            {
                if (_tcsicmp(ModuleEntry32.szModule, szModuleName) == 0)
                {
                    ModuleBaseAddress = (uintptr_t)ModuleEntry32.modBaseAddr;
                    break;
                }
            } while (Module32Next(hSnapshot, &ModuleEntry32));
        }
        CloseHandle(hSnapshot);
    }
    return ModuleBaseAddress;
}

The Function Call

C++:Copy to clipboard
uintptr_t serverdllBaseAddress = 0;
serverdllBaseAddress = GetModuleBaseAddress(dwProcId, _T("server.dll"));

 

 

分享到:
评论

相关推荐

    批量号码导入通讯录软件-海外版ce.zip

    主要是国外的手机号解决“+”加号的问题,很多导入都不显示加号,这个只需要把要加的号码放在前面就好了比如说,8613500000000,会自动加上+8613500000000存进去手机也会显示这个+号,具体使用方法可以参考博文:...

    Docker CE18.03.1 win64

    dockerCE win64 最新版,这个经常国外网站断流下载很慢,搬运到CSDN来,大小375M。

    CE检测标准大全

    国外需要CE认证,涉及很多方面。最近的CE检测标准大全,可以查找相关行业CE最新的标准。

    kettle pdi-ce-9.2.0.0-290.zip(百度网盘地址含取件码)WIN+MAC+LINUX

    Pentaho Data Integration(原名 kettle),业界使用最广泛的企业级开源可视化 ETL 数据清洗系统,特别适合企业数据研究人员、DBA 等,用于企业内部系统间数据集成、搭建数据仓库等,既可处理主流数据库,也能处理...

    pdi-ce-8.2.0.0-11.zip

    Kettle是一款国外开源的ETL工具,纯java编写,可以在Windows、Linux、Unix上运行,数据抽取高效稳定。 Kettle 中文名称叫水壶,该项目的主程序员MATT 希望把各种数据放到一个壶里,然后以一种指定的格式流出

    Kettle8.3.0&pdi-ce-8.3.0.0-371

    Kettle是一款国外开源的ETL工具,纯Java编写,可以在Windows、Linux、Unix上运行,无需安装,数据抽取高效稳定。以百度网盘形式提供kettle文件下载

    CENC Mobile(for Android)

    2、实时接收国家地震台网中心地震监测结果(国内3.0级,国外6.0级); 3、实时接收美国USGS地震监测结果(全球2.5级); 4、对于源为USGS且震级大于5.0级地震,系统提供历史地震、历史CMT、ShakeMap等应急信息数据...

    kettle-9.2.0.4-R pdi-ce-9.2.0.4-591 亲测可用

    - 官方提供的下载链接通常位于国外服务器,因此下载速度可能会受到网络状况的影响。 - 如果遇到下载速度慢的问题,可以尝试使用第三方平台提供的资源,如本例中的百度网盘链接,以提高下载效率。 - **安装配置...

    计为自动化全线产品通过CE认证.rar

    随着全球化的深入发展,世界各国间的贸易往来日益频繁,而产品的国际认证则成为企业拓展海外市场的关键。深圳计为自动化技术有限公司在业界获得显著成就,其全线产品成功通过CE认证,意味着其产品能够打开广阔的欧洲...

    深圳计为自动化全线产品通过CE认证.rar

    5. **文档与标识**:产品需配备完整的用户手册、技术规格书等,明确标注CE标志,以便用户了解正确使用和维护方法。 6. **持续监控**:获得CE认证后,制造商还需要持续监测产品以确保其始终符合规定要求,进行必要的...

    游戏内存扫描非CE,ArtMoney

    游戏内存扫描非CE,ArtMoney是一款来自国外的专业游戏辅助软件,它主要被用来进行游戏内存数据的搜索和修改,帮助玩家在游戏中找到并更改特定数值,例如角色的生命值、金币数量等。ArtMoney并非 Cheat Engine(CE)...

    认证标志大全.cdr

    各种认证标志cdr,中国名牌 中国电工认证质量体系认证IOS认证驰名商标CCC认证 CE认证等诸多认证

    基于嵌入式FPGA的数字化便携式LaBr_3(Ce)γ谱仪.pdf

    本文主要介绍了一种基于...而国外的数字化谱仪虽然采用FPGA和嵌入式处理器的架构,但系统复杂度较高。本文提出的数字化便携式LaBr_3(Ce)谱仪,凭借其在单片FPGA内完成所有功能的特点,展现了系统小型化和高性能的特点。

    boot2docker.iso的v17.10.0-ce版本

    国外资源,免费,提供国内下载路径,在使用docker toolbox的docker quickstart terminal进行启动时,无法启动,替换为这个iso版本就可以启动

    安装docker-ce及docker-compose 的脚本

    一步安装 docker-ce 及 docker-compose 的脚本,功能如下: 1、卸载旧版本 2、安装需要的依赖软件包 ...由于采用了国内镜像进行docker-ce、docker-compose的安装,所以下载速度和国外站点比,速度飞快。

    Kettle下载 pdi-ce-5.0.1.A-stable.zip网盘资源

    Kettle简介:Kettle是一款国外开源的ETL工具,纯java编写,可以在Window、Linux、Unix上运行,数据抽取高效稳定。Kettle 中文名称叫水壶,该项目的主程序员MATT 希望把各种数据放到一个壶里,然后以一种指定的格式...

    国外开源Wince全能播放器TCPMP源码

    TCPMP(The Core Pocket Media Player)是一款在国外广受赞誉的开源媒体播放器,尤其在Windows CE(Wince)平台上,它以其强大的兼容性和出色的性能而闻名。源码的开放使得开发者能够深入理解其内部工作原理,进一步...

    科比F6变频器 驱动器 安装编程使用手册,国外下载来的

    变频器驱动器符合欧盟的安全要求,具有CE标志。用户可以从KEB Automation KG的网站下载欧盟声明书。 保修和责任 ------------- 变频器驱动器的保修和责任按照KEB Automation KG的销售条件进行。用户需要按照销售...

    magento-ce-2.4.2-p1-2021-04-22-10-49-09.zip

    因为国外网速太慢了,所以下载后分享给需要的人。magento-ce-2.4.2-p1-2021-04-22-10-49-09

Global site tag (gtag.js) - Google Analytics