Bit-Slicer can be used with MacOS Sierra. Hopefully High Sierra support when it's released, but we'll see. With this tool you can write scripts for code injection, AoB scans, and automated tasks. Here are some examples.
CODE INJECTION EXAMPLE:
This example will inject code to "base+0x87D41" in Flappy Golf 2 with the new instructions:
Code:
sub edx, 0x1
mov [rdi+rax], edx
pop rbp
ret
To add a script to your Bit Slicer slice table you would go to the top menu and press "Variable > Add Variable > Script" or the hotkey CMD + '.
Code:
#Inject our code
from bitslicer import VirtualMemoryError, DebuggerError
class Script(object):
def __init__(self):
ADDRESS_TO_HOOK_INTO = vm.base() + 0x87D41 #pointing to some instruction in memory
self.destinationAddress = vm.allocate()
self.originalBytes = debug.bytesBeforeInjection(ADDRESS_TO_HOOK_INTO, self.destinationAddress)
debug.injectCode(ADDRESS_TO_HOOK_INTO, self.destinationAddress, debug.assemble("\n".join(['sub edx, 0x1','mov [rdi+rax], edx','pop rbp','ret'])))
def finish(self):
debug.writeBytes(ADDRESS_TO_HOOK_INTO, self.originalBytes)
vm.deallocate(self.destinationAddress)
AoB SCAN EXAMPLE:
Here is how you would write a script to do an array of bytes scan to find an address and change the value. This process can take quite a while to find the address, so wait about 15 seconds.
In this example we will use Flappy Golf 2, and scanning for the array of bytes:
Code:
?? ?? 00 00 00 00 00 ?7 02 00 00 00 00 00 00 ?? ?? ?? 00 ?? 60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
and waiting 15 seconds before we write 900 to the first address found. Giving us 900 blue eggs in the game.
To add a script to your Bit Slicer slice table you would go to the top menu and press "Variable > Add Variable > Script" or the hotkey CMD + '.
Code:
#900 blue eggs
from bitslicer import VirtualMemoryError, DebuggerError
FAST_TIME_INTERVAL = 15.0
class Script(object):
def __init__(self):
debug.log("Starting to scan for address, please wait 15 seconds...")
self.timePassed = 0.0
self.addresses = vm.scanByteString("?? ?? 00 00 00 00 00 ?7 02 00 00 00 00 00 00 ?? ?? ?? 00 ?? 60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00")
def execute(self, deltaTime):
self.timePassed += deltaTime
if self.timePassed >= FAST_TIME_INTERVAL:
if len(self.addresses) > 0:
debug.log("Writing to address: " + str(hex(self.addresses[0])))
vm.writeInt32(self.addresses[0], 900)
self.timePassed -= FAST_TIME_INTERVAL
def finish(self):
debug.log("finished")
I have 8 example .slice tables to show and 2 videos that show the entire process, but last time I put links in my posts they were taken down. If an admin is reading this, please let me know if it's ok or not.