Beispiel #1
0
        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)));
        }
Beispiel #2
0
        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)));
        }