[Cheat Engine] Tutorial 4~6 Write-Up

두비니

·

2021. 7. 20. 22:45

 

 


Cheat Engine Tutorial

Level 4~6


 

 

 

1. Level 4

 

봅시당

Step 4: Floating points (PW=890124)
In the previous tutorial we used bytes to scan, but some games store information in so called 'floating point' notations. 
(probably to prevent simple memory scanners from finding it the easy way)
a floating point is a value with some digits behind the point. (like 5.12 or 11321.1)

Below you see your health and ammo. Both are stored as Floating point notations, but health is stored as a float and ammo is stored as a double.
Click on hit me to lose some health, and on shoot to decrease your ammo with 0.5
 
You have to set BOTH values to 5000 or higher to proceed.

Exact value scan will work fine here, but you may want to experiment with other types too.

Hint: It is recommended to disable "Fast Scan" for type double

 

 

이번 문제는 다 똑같은데 자료형이 다르네요. 각각 float와 double인데, 자료형에 대해서는 다 안다는 가정 하에 진행하도록 하겠습니다.

 

 

자, 자료형은 어디서 바꿀 수 있냐! 오른쪽의 Value Types에서 마음대로 바꿀 수 있습니당. 그래서 일단 health를 찾기 위해서 float의 값으로 바꾸고 찾아봅시다. exact로 100 넣어줄게요

 

 

벌써 후보값이 2개로 줄여졌긴 하네요ㅎㅎ 그래도 여기서 hit me를 통해서 완벽하게 찾아주겠습니다.

 

 

짜잔, hit me는 한번 클릭할때마다 0.5씩 줄어서 이렇게 되네영

이거와 같은 방법으로 ammo도 찾아내서 값을 5000으로 바꾸면 됩니당

 

 

굳굳

 

 

2. Level 5

드가자

Step 5: Code finder (PW=888899)
Sometimes the location something is stored at changes when you restart the game, or even while you're playing.. In that case you can use 2 things to still make a table that works.
In this step I'll try to describe how to use the Code Finder function.

The value down here will be at a different location each time you start the tutorial, so a normal entry in the address list wouldn't work.
First try to find the address. (you've got to this point so I assume you know how to)
When you've found the address, right-click the address in Cheat Engine and choose "Find out what writes to this address". A window will pop up with an empty list.
Then click on the Change value button in this tutorial, and go back to Cheat Engine. If everything went right there should be an address with assembler code there now.
Click it and choose the replace option to replace it with code that does nothing. That will also add the code address to the code list in the advanced options window. (Which gets saved if you save your table)

Click on stop, so the game will start running normal again, and close to close the window.
Now, click on Change value, and if everything went right the Next button should become enabled.

Note: When you're freezing the address with a high enough speed it may happen that next becomes visible anyhow

자 여기서부터는 좀 깔끔하게 값을 정리하고 들어갑시당

 

자 지문을 읽어보면 change button 버튼을 누르면 값이 랜덤하게 바뀌는데, 이 버튼을 눌러도 값이 바뀌지 않게끔 하는 것이 다음 단계로 가는 조건입니다.

그럼 일단 이 value자체를 찾는 것이 먼저일 것 같네요.

 

 

자 일단 이전 단계에서 해왔던 방법으로 value의 위치를 찾았어요!

근데 여기서 즐겨찾기에 값을 추가해서 값을 일시적으로 바꾸는건 의미가 없습니다.

결론적으로 우리가 필요한건 10번을 더하든, 100번을 더하든 값이 변하지 않는 것이겠죠?

 

우선 저 984를 더블클릭해서 추가해주고, 오른쪽 클릭을 합시다.

 

 

그러면 find out what writes to this address로 들어오게 되는데, 그때 어떤 창이 뜬다면 yes를 누르고 들어옵시다.

 

처음 창이 뜨면 저런 창이 아니라 빈 창일텐데, 이건 change value를 한번 눌러줘서 해결합시다.

그러면 다음과 같이 change value라는 버튼을 누르면, mov [eax], edx가 실행되는 것을 알 수 있습니다.

아마도 eax가 value의 값일 거고, edx는 랜덤으로 생성되는 값이겠죠?

여기서는 두 가지 선택을 할 수 있습니다.

 

1. NOP (아무런 일도 일어나지 않음)

2. move [eax], (상수값 아무거나)

 

둘 중 어떤 걸 해도 값은 변하지 않기 때문에, 편한 걸 하시면 될 것 같습니다.

 

 

 

3. Level 6

 

고고

Step 6: Pointers: (PW=098712)
In the previous step I explained how to use the Code finder to handle changing locations. But that method alone makes it difficult to find the address to set the values you want.
That's why there are pointers:

At the bottom you'll find 2 buttons. One will change the value, and the other changes the value AND the location of the value.
For this step you don't really need to know assembler, but it helps a lot if you do.

First find the address of the value. When you've found it use the function to find out what accesses this address.
Change the value again, and a item will show in the list. Double click that item. (or select and click on more info) and a new window will open with detailed information on what happened when the instruction ran.
If the assembler instruction doesn't have anything between a '[' and ']' then use another item in the list.
If it does it will say what it think will be the value of the pointer you need.
Go back to the main cheat engine window (you can keep this extra info window open if you want, but if you close it, remember what is between the [ and ] ) and do a 4 byte scan in hexadecimal for the value the extra info told you.
When done scanning it may return 1 or a few hundred addresses. Most of the time the address you need will be the smallest one. Now click on manually add and select the pointer checkbox.

The window will change and allow you to type in the address of a pointer and a offset.
Fill in as address the address you just found.
If the assembler instruction has a calculation (e.g: [esi+12]) at the end then type the value in that's at the end. else leave it 0. If it was a more complicated instruction look at the calculation.

example of a more complicated instruction:
[EAX*2+EDX+00000310] eax=4C and edx=00801234.
In this case EDX would be the value the pointer has, and EAX*2+00000310 the offset, so the offset you'd fill in would be 2*4C+00000310=3A8.  (this is all in hex, use calc.exe from windows in scientific mode to calculate)

Back to the tutorial, click OK and the address will be added, If all went right the address will show P->xxxxxxx, with xxxxxxx being the address of the value you found. If thats not right, you've done something wrong.
Now, change the value using the pointer you added in 5000 and freeze it. Then click Change pointer, and if all went 
right the next button will become visible.


extra:
And you could also use the pointer scanner to find the pointer to this address

 

6레벨이 5레벨과 다른 점은 주소도 다함께 바뀌는 포인터의 개념이 추가되었다는 것입니다. 

포인터의 값이 바뀌어서 참조값이 바뀌는 식인데, 포인터의 값이 바뀌더라도 값이 5000으로 유지되도록 하는 것이 이 레벨의 목표입니다.

 

 

자 일단 선택지 자체는 value와 pointer의 두개니깐 value만 바뀌서 얘가 어디있는지 확인해봅시다.

아마 이 값 자체를 찾는건 쉬울거고,

 

 

다음과 같이 change value를 눌렀을 때 잘 따라오는걸 볼 수 있습니다.

 

 

그러나 change pointer를 누르는 경우, 더이상 값을 따라가지 못하는 모습을 볼 수 있습니다. 이건 그냥 주소값 자체가 달라져서 그렇습니다.

 

자 일단 다시 이 값을 찾아와봅시다.

 

찾아와서 우클릭한 뒤, find out what access this address를 클릭합시다.

 

 

창을 불러오고, change value를 누르면 다음과 같이 어셈코드가 뜨는 것을 볼 수 있습니다.

 

여기서 두 번째에 있는 mov [edx], eax에서 more info를 눌러줍니다.

이걸 선택하는 이유는 edx가 참조하는 값을 eax가 들어가는 것이기 때문에, edx의 주소값을 알 수 있다면 포인터 참조값 뿐만아니라 포인터 자체의 값이 바뀌어도 상관없기 때문입니다.

 

아무튼 more info를 확인하면

 

 

edx의 주소값이 0x019E2FD8인것을 볼 수 있습니다.

자 그럼 이 0x19E2FD8의 값이 담겨있는 포인터의 주소를 찾으면 되겠죠?

 

네, 값을 들고와보면 주소가 0x6426B0이므로 이걸로 수동 포인터 등록을 해줍니다.

 

 

저는 이렇게 되는데, 여러분은 값이 다 다를거니깐 각자 맞는 값을 대입해주셔야 합니다

아무튼 이렇게 등록한 이후로는 5000으로 값을 바꿔주고 acitve 상태를 꺼주면 됩니다. 끝!

 

 

 

'War Games' 카테고리의 다른 글

[Prompt Injection]  (0) 2023.05.28
[abex' Crackme] crackme2.exe  (0) 2023.04.11
[abex' Crackme] crackme1.exe  (0) 2023.03.16
[Cheat Engine] Tutorial Level 7 Write-Up  (0) 2021.07.21
[Cheat Engine] Tutorial 1~3 Write-Up  (0) 2021.07.19