Part 14 - Hacking Boolean Primitive Datatype
For a complete table of contents of all the lessons please click below as it will give you a brief of each lesson in addition to the topics it will cover. https://github.com/mytechnotalent/hacking\_c-\_arm64
Today we hack the boolean from the last lesson.
Let’s fire up radare2 in write mode.
radare2 -w ./0x04_asm64_boolean_primitive_datatype
Let’s auto analyze.
aaa
Seek to main.
s main
View disassembly.
v
Let’s get back to the terminal view.
q
All we have to do is write assembly to 0x00000009bc and specify 0x0.
[0x000009b4]> wa movz w0, 0x0 @ 0x00000009bc
Written 4 byte(s) (movz w0, 0x0) = wx 00008052
[0x000009b4]>
Let’s quit and run the new binary from the terminal.
[0x000009b4]> q
kali@kali:~/Documents/0x04_asm64_boolean_primitive_datatype$ ./0x04_asm64_boolean_primitive_datatype
0
As you can see we successfully and permanently hacked the binary! What was originally true or 1 is now false _or _0.
In our next lesson we will work with the integer primitive datatype.
当前内容版权归 mytechnotalent 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 mytechnotalent .