Skip to content

Instantly share code, notes, and snippets.

@KarlVogel
Created August 28, 2017 14:18
Show Gist options
  • Save KarlVogel/2de84d386080d7d1b60209c8b8a43470 to your computer and use it in GitHub Desktop.
Save KarlVogel/2de84d386080d7d1b60209c8b8a43470 to your computer and use it in GitHub Desktop.
rhme3 challenge1
#!/usr/bin/env python
import sys
sys.path.insert(0, '../../')
from deadpool_dca import *
def processinput(iblock, blocksize):
s= '%0*x' % (2*16, iblock)
o = ""
for (op, code) in zip(s[0::2], s[1::2]):
o=o+str(chr(int(op,16)*16+int(code,16)))
return (o, ['--stdin'])
def processoutput(output, blocksize):
return int(''.join(output.split(' ')), 16)
T=TracerGrind('whitebox', processinput, processoutput, ARCH.amd64, 16, debug=False)
T.run(2000)
bin2daredevil(configs={'attack_sbox': {'algorithm':'AES', 'position':'LUT/AES_AFTER_SBOX'},
'attack_multinv':{'algorithm':'AES', 'position':'LUT/AES_AFTER_MULTINV'}})
@KarlVogel
Copy link
Author

Finally run: daredevil -c mem_addr1_rw1_2000_42808.attack_sbox.config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment