private void solveStep5() { RESOLVED_ADDRESSES[4] = MODULE_ADDRESSES[0] + BASE_CODE_ADDRESS_STEP5; //Step #1: Read value from the resolved address Console.WriteLine("*************************"); Console.WriteLine("Address => {0}", Hax.Dec2Hex(RESOLVED_ADDRESSES[4])); Console.WriteLine("STEP5 Before (BYTES): {0}", Hax.Bytes2Hex(Hax.GetBytesFromAddress(myProcess, RESOLVED_ADDRESSES[4], 2))); //Step #2: Write value to the address Console.WriteLine("Setting STEP5 to nops"); Hax.NopOutAddress(myProcess, RESOLVED_ADDRESSES[4], 2); //Step #3: Show the new value Console.WriteLine("STEP5 After (BYTES): {0}", Hax.Bytes2Hex(Hax.GetBytesFromAddress(myProcess, RESOLVED_ADDRESSES[4], 2))); }
private void solveStep7() { RESOLVED_ADDRESSES[6] = MODULE_ADDRESSES[0] + BASE_CODE_ADDRESS_STEP7; //Step #1: Read value from the resolved address Console.WriteLine("*************************"); Console.WriteLine("Address => {0}", Hax.Dec2Hex(RESOLVED_ADDRESSES[6])); Console.WriteLine("STEP7 Before (BYTES): {0}", Hax.Bytes2Hex(Hax.GetBytesFromAddress(myProcess, RESOLVED_ADDRESSES[6], 7))); //Step #2: Write value to the address byte[] newVal = new byte[] { 0x83, 0x83, 0xA4, 0x04, 0x00, 0x00, 0x02 }; Console.WriteLine("Setting STEP7 to add2"); Hax.WriteBytesToAddress(myProcess, RESOLVED_ADDRESSES[6], newVal); //Step #3: Show the new value Console.WriteLine("STEP7 Before (BYTES): {0}", Hax.Bytes2Hex(Hax.GetBytesFromAddress(myProcess, RESOLVED_ADDRESSES[6], 7))); }
public CETutorial() { //Step #1: Find target process Console.WriteLine("*************************"); Console.WriteLine("trying to get process {0}", PROCESS_NAME); myProcess = Hax.GetProcessByName(PROCESS_NAME); if (myProcess == null) { return; } Console.WriteLine("myProcess.id => {0}", myProcess.Id); //Step #2: Resolve module base address Console.WriteLine("*************************"); Console.WriteLine("Trying to get module address"); MODULE_ADDRESSES[0] = Hax.GetModuleAddress(myProcess, MODULE_NAME[0]); Console.WriteLine("Module Address = {0}", Hax.Dec2Hex(MODULE_ADDRESSES[0])); while (true) { Console.Write("What step to finish: "); int input = int.Parse(Console.ReadLine()); if (input == 0) { break; } else if (input == 1) { Console.WriteLine("No need :)"); } else if (input == 2) { solveStep2(); } else if (input == 3) { solveStep3(); } else if (input == 4) { solveStep4(); } else if (input == 5) { solveStep5(); } else if (input == 6) { solveStep6(); } else if (input == 7) { solveStep7(); } else if (input == 8) { solveStep8(); } else { Console.WriteLine("NOT SUPPORTED"); } } }