admin管理员组

文章数量:1531374

2023年12月14日发(作者:)

(完整word版)CE修改器傻瓜教程第9关

Cheat Engine 6。2 Tutorial Step 9 教程

作者:NGKiller@Gmail。Com 原创。 转载请注明作者!

第9关说明:

Step 9: Shared code: (PW=31337157) (密码在此)

This step will explain how to deal with code that is used for other object of the same type

Often when you've found health of a unit or your own player, you will find that if you remove

the code, it affects

enemies as well。

In these cases you must find out how to distinguish between your and the enemies objects.

Sometimes this is as easy as checking the first 4 bytes (Function pointer table) which often

point to a unique location

for the player, and sometimes it’s a team number, or a pointer to a pointer to a pointer to

a pointer to a pointer to a

playername。 It all depends on the complexity of the game, and your luck

The easiest method is finding what addresses the code you found writes to and then use the dissect

data feature to

compare against two structures。 (Your unit(s)/player and the enemies) And then see if you

can find out a way to

distinguish between them。(注意红色部分,已经提示我们要使用解析资料、结构这个功能,找到敌我分组数据)

When you have found out how to distinguish between you and the computer you can inject an

assembler script that

checks for the condition and then either do not execute the code or do something else。 (One

hit kills for example)

Alternatively, you can also use this to build a so called ”Array of byte” string which you

can use to search which will

result in a list of all your or the enemies players

In this tutorial I have implemented the most amazing game you will ever play.

It has 4 players. 2 Players belong to your team, and 2 Players belong to the computer.

Your task is to find the code that writes the health and make it so you win the game WITHOUT

freezing your health

To continue, press ”Restart game and autoplay” to test that your code is correct

Tip: Health is a float(生命值是一个浮点数据)

Tip2: There are multiple solutions

下面先用CE加载进程,并查询浮点数1001 (完整word版)CE修改器傻瓜教程第9关

点击教程中的Attach减少数值,然后加入变化的搜索结果.

同理查找500(浮点)并点击Attach,加入敌人的HP数值段,如下(不同电脑地址可能不同!): (完整word版)CE修改器傻瓜教程第9关

右击P1,选择:什么改写了这个地址。 (完整word版)CE修改器傻瓜教程第9关

点击教程中Player1处的Attach,调试窗口出现如下变化 (完整word版)CE修改器傻瓜教程第9关

点详细信息,打开

图中红色就是改写的代码,意思是将eax中的数值写入ebx+04这个地址指向的地址,注意用“[ ]”括起来的地址是一个指针,指向另一个地址。 (完整word版)CE修改器傻瓜教程第9关

这里我们记住偏移量是+04,后面解析数据时要用到

回到CE主窗口,点击任一一个地址,选择:浏览相关内存区域,会发现都指向250C6这个地址(不同电脑地址可能不同!)。说明当攻击敌人或者队友时,都是通过同一个程序调用输出数值(为什么可以用同一个程序调用指向不同的地方?因为ebx可以存储不同的位置指针,所以可以指向不同的地方,这个学过编程就明白了)

(完整word版)CE修改器傻瓜教程第9关

到这里,我们就要开始分析数据了,这是最重要的一个环节.

在内存查看器窗口中点击工具-解析资料、结构 (完整word版)CE修改器傻瓜教程第9关

这里要把先前查询到的4个地址都填写进去(不同电脑地址可能不同!),用来分析这4组数据有什么共同、不同点,然后为自动注入代码做准备. (完整word版)CE修改器傻瓜教程第9关

回到CE主窗口,看到这4个地址

(完整word版)CE修改器傻瓜教程第9关

在结构分析窗口,点击文件—加入额外的地址,再加3个,一同是4个,分别将先前的4个地址填写进去,记得前面我让你记住的偏移量吗?是+04(不同电脑偏移地址可能不同!),这里要注意把这个偏移量减掉

结构分析窗口还可以进行分组,这个自己尝试,我们将敌我分2个组,最终效果见图: (完整word版)CE修改器傻瓜教程第9关

(完整word版)CE修改器傻瓜教程第9关

点击结构—定义新的结构,一路点确定(3个对话框),开始结构分析。

当看到这个窗口,相信大家已经有了大概的修改框架,如图,玩家的名字、以及队伍分组(现在只能是猜测),都一目了然,这里要注意,我们要记下玩家分组的偏移量是10,即+10(不同电脑偏移地址可能不同!),这个是区别队友与敌人的标识,当然目前来说是我们的猜测,但实际上确实如此。 (完整word版)CE修改器傻瓜教程第9关

这里大家也许有个疑问,为什么要在地址后面—04呢?那么用player1举例说明。我们回头来看:什么改写了这个地址窗口—详细。 (完整word版)CE修改器傻瓜教程第9关

如图,打开Windows自带的计算机,选择程序员类型,改为十六进制,计算机一下018B7FE8+04=018B7FEC,你能看出什么?

这里你要懂一些编程方面的知识了。如果把一个人物的信息用编程语言来表示,那么就应该有如下结构:

struct people

{

string name;

float life;

……

};

这里,当一个结构开始,偏移量为0,name的偏移量+2,life的偏移量+4,(完整word版)CE修改器傻瓜教程第9关

依次类推,往后就是偏移量+数字了.这里我们看:

018B7FE8 +00 开始

018B7FE8 +04 =018B7FEC 血量

018B7FE8 +10 组

018B7FE8 +15 名字

这下明白了吗?我们要从这个结构的最开始进行分析,那么就要从018B7FE8开始,而这个怎么得来呢?从018B7FEC-04就可以了。其他玩家也是一样的.但在游戏中可能要比这个复杂得多,因为这个教程本来就是面向初学者,再不多说。

下面我们就开始代码注入,进行修改并完成这个教程。这里有2种方法.先说一种比较简单的。

现在我们已经确定,250C6这个地址(不同电脑地址可能不同!)是把计算的结果显示出来的,那么我就可以在这里下手进行判断,如果是队友,那么就不执行这个操作,直接用nop代替不做任何事,如果是敌人就按原来的代码执行,减去血量。

在内容查看窗口,选中250C6这一行,然后选择工具-自动汇编,然后选择模板—代码注入,弹出的对话框点确定。 (完整word版)CE修改器傻瓜教程第9关

(完整word版)CE修改器傻瓜教程第9关

自动生成的代码如下,我的说明是蓝色字体:

alloc(newmem,2048) //2kb should be enough

label(returnhere)

label(originalcode)

label(exit)

newmem: //this is allocated memory, you have read,write,execute access

//place your code here 这里开始写我们的代码

originalcode: 原始代码是这个,要注意下面有个 fldz,如果自己写代码,最后一句要把这个加上,至于为什么下面说明

mov [ebx+04],eax

fldz

exit:

jmp returnhere

”Tutorial—i386。exe”+250C6:

jmp newmem

returnhere: 最后从这儿退出

下面是我写的代码,说明继续为蓝色(如果复制的话请把蓝色字全删除掉)。

alloc(newmem,2048) //2kb should be enough

label(returnhere)

label(originalcode)

label(exit)

newmem: //this is allocated memory, you have read,write,execute access

//place your code here

cmp [ebx+10],1 对比组,记得分析窗口里的偏移量吧,+10是组,队友是1,敌人是2

je exit 如果是队友,则跳转到exit处

originalcode: 如果不是队友而是敌人,上面的je不会跳转,会继续执行这儿

mov [ebx+04],eax 原始的语句,让他减血

fldz

jmp returnhere 跳转退出

exit: 队友的话会跳转到这儿

nop 什么也不做(即不减血)

fldz 这个要加上,为什么加上,可以在注入后查看内存查看器窗口中,250C6下面的那一行在注入后消失了!而这一行的代码就是 fldz 为了不使程序出错,这一句一定要手动加上

jmp returnhere 跳转退出,返回原程序继续执行

”Tutorial—i386。exe"+250C6: (完整word版)CE修改器傻瓜教程第9关

jmp newmem

returnhere: 注入代码结束位置

点击运行,然后返回教程点击Restart game and Autoplay,会看到自己的队友不减血而敌人一会儿就挂了。

下面说第2种注入方法。

先来考虑一种情况,如果要队友、敌人减血,那么至少应该有一个“减”运算操作吧,那么我们在内存查看器窗口中,从250C6处往上翻,如果没有程序调用(call *****这样的代码),那么往上第一个减运算一定是减血操作了。我们往上看,到2509D(不同电脑地址可能不同!)这儿果然看到了fsubr(这代表什么意思请自觉汇编语言): (完整word版)CE修改器傻瓜教程第9关

好了,现在开始另一种注入方法,直接改写这儿的代码,如果是敌人就减血,如果是自己的队友就加血,而且可以实现一击必死(直接减敌人100W的血,他不死才怪)。

选中2509D这一行,点工具—自动汇编,然后点模板—代码注入。这里直接上我自己写的代码并附解释:

alloc(newmem,2048) //2kb should be enough

label(returnhere)

label(originalcode)

label(exit)

newmem: //this is allocated memory, you have read,write,execute access

//place your code here

cmp [ebx+10],1 判断是否是队友 (完整word版)CE修改器傻瓜教程第9关

je exit 如果是队友则跳转到exit处,否则继续往下执行

originalcode: 原始语句

fsubr dword ptr [ebx+04] 如果是敌人,直接减血

fstp dword ptr [ebp—30]

jmp returnhere 减血完毕,返回原程序

exit: 如果是队友来到这儿

fadd dword ptr [ebx+04] 改fsubr为fadd,执行加血命令

fstp dword ptr [ebp-30]

jmp returnhere 加血完毕,返回原程序

"Tutorial-i386。exe"+2509D:

jmp newmem

nop

returnhere: 返回原程序

好了,点击Restart game and autoplay,看到如下结果,队友不仅没减血,而且还加血了.搞定!

如何实现一击必死呢?可以参考如下代码,是CE论坛上找到的,不做说明,自己看吧。

//Made by svchost with Cheat Engine 6.2 RC 1

//4th May, 2012

[ENABLE]

alloc(StoreHealthAddress,2048)

label(StoreHealthAddressReturn) (完整word版)CE修改器傻瓜教程第9关

alloc(WriteHealthAddress,2048)

label(WriteHealthAddressReturn)

globalalloc(Player1_Dave,4)

globalalloc(Player2_Eric,4)

globalalloc(Enemy1_Hal,4)

globalalloc(Enemy2_Kitt,4)

label(WriteOrignal)

label(IsPlayer1_Dave)

label(IsPlayer2_Eric)

label(IsEnemy1_Hal)

label(IsEnemy2_Kitt)

//-—--——-—--—---————--——————---——-—---——--

// Read And Store Address For Later Comparison

//-—————-——------—--———----------——------—

//At ”tutorial-i386。exe”+2504C address, ebx is constant for Health Address Calculation

”"+2504C:

jmp StoreHealthAddress

nop

nop

nop

nop

nop

nop

StoreHealthAddressReturn:

StoreHealthAddress:

//From below I calculated Manually Health Address

//And stored at the Custom Address

//Note:-For Health address, add 4 to it。 [Player1_Dave],4

//means value at the [Player1_Dave] is the Health Address。

push ecx

mov ecx,[ebx+49C] // Offset-〉49C Player1

mov [Player1_Dave],ecx

pop ecx

push ecx

mov ecx,[ebx+4A0] // Offset—>4A0 Player2

mov [Player2_Eric],ecx (完整word版)CE修改器傻瓜教程第9关

pop ecx

push ecx

mov ecx,[ebx+4A4] // Offset->4A4 Enemy1

mov [Enemy1_Hal],ecx

pop ecx

push ecx

mov ecx,[ebx+4A8] // Offset—〉4A8 Enemy2

mov [Enemy2_Kitt],ecx

pop ecx

//From below it is orignal code at the ””+2504C

mov ebx,eax

mov esi,edx

mov [ebp—3C],00000000

jmp StoreHealthAddressReturn

//--------—-—-—-—--——-———-—————-————-—-—-—

// Write Address

//—-———-——-—--——---—--—--—----——--—-—-----

//At this Address Friendly as well as Enemy Health is Decreasing

"”+250C6:

jmp WriteHealthAddress

WriteHealthAddressReturn:

//Now I’m checking the Health address For each player seperately。

WriteHealthAddress:

cmp ebx,[Player1_Dave]

je IsPlayer1_Dave

cmp ebx,[Player2_Eric]

je IsPlayer2_Eric

cmp ebx,[Enemy1_Hal]

je IsEnemy1_Hal

cmp ebx,[Enemy2_Kitt]

je IsEnemy2_Kitt

jmp WriteOrignal

jmp WriteHealthAddressReturn

(完整word版)CE修改器傻瓜教程第9关

//—-——--——--——-——-—-—-————-—-—-————-

IsPlayer1_Dave:

mov [ebx+04],(float)99999

fldz

jmp WriteHealthAddressReturn

IsPlayer2_Eric:

mov [ebx+04],(float)99999

fldz

jmp WriteHealthAddressReturn

IsEnemy1_Hal:

mov [ebx+04],(float)0

fldz

jmp WriteHealthAddressReturn

IsEnemy2_Kitt:

mov [ebx+04],(float)0

fldz

jmp WriteHealthAddressReturn

//—-—-——-—--—---———-——-——-——--—--—-—

WriteOrignal:

mov [ebx+04],eax

fldz

jmp WriteHealthAddressReturn

[DISABLE]

dealloc(StoreHealthAddress)

""+2504C:

mov ebx,eax

mov esi,edx

mov [ebp-3C],00000000

dealloc(WriteHealthAddress)

"Tutorial—”+250C6:

mov [ebx+04],eax

fldz

注意上面的偏移地址有所不同,要记得按自己的实际情况来修改。

第8关、9关视频教程下载地址(下载后设置下载地址为其他颜色即可查(完整word版)CE修改器傻瓜教程第9关

看):下载地址

http://pan。baidu。com/share/link?shareid=52597&uk=2802192375

作者:NGKiller@Gmail。Com 原创. 转载请注明作者!

本文标签: 地址代码注入队友教程