Files
ctfkit/templates/__pycache__/re_skeleton.cpython-312.pyc
T

24 lines
2.2 KiB
Plaintext
Raw Normal View History

Ë
¿�j­ãó:—dZddlZd„Zd„Z edk(red«‚y)uŸ
RE (reverse engineering) skeleton — copy & fill. (p4-team style)
Common p4 patterns:
* Extract bytes from a .rodata / data dump (IDA "db 30h" lines) -> often just
RSA key material. See 'reversing_is_amazing': parse the bytes, RSA.importKey,
then decrypt the given ciphertext.
* Symbolic execution / path constraint solving with angr.
* Binary parsing / patching with lief; emulation with unicorn.
éNcóΗg}|j«D]·}tjd|«}|sŒ|jd«j d«d}tj
d|«D]`}|dxs|d} |j
|dr|jd«s|dr|j«s t|d«n
t|««ŒbŒ¹t|«S#t$rYŒ{wxYw)z>Parse lines like: .rodata:0000 db 30h, 82h, 2, 5Ch ; commentz
\bdb\b\s+(.*)éú;rz([0-9a-fA-F]+)h?|(\d+)Úhé) Ú
splitlinesÚreÚsearchÚgroupÚsplitÚfindallÚappendÚendswithÚisdigitÚintÚ
ValueErrorÚbytes)Ú dump_textÚoutÚlineÚmÚbodyÚtokÚvals útemplates/re_skeleton.pyÚbytes_from_rodatarsä€à
€CØ×$Ñ$Ó&ò ˆÜ �I‰IÐ&¨Ó -ˆÙØ Ø�w‰w�q‹z×Ñ Ó$ QÑ'ˆÜ—:‘:Ð7¸Ó>ò ˆCØ�a‘&Ò"˜C ™FˆCð
Ø—
‘
¨C°ªF°s·|±|ÀCÔ7HØ šF¨3¯;©;¬=ô˜s Bœ<Ü?BÀ3»xõIñ ð ô �‹:Ðøôò
Ùð
úsÁ8ACÃ C$Ã#C$có²—ddlm}ddlm}t |«}|j t
|««}|t||j|j««S)Nr)ÚRSA)Ú