Skip to content

Instantly share code, notes, and snippets.

@Jonney
Jonney / unflower_cms.py
Created Feb 22, 2020 — forked from LeadroyaL/unflower_cms.py
Unicorn实战(一):去掉libcms.so的花指令
View unflower_cms.py
from elftools.elf.constants import P_FLAGS
from elftools.elf.elffile import ELFFile
from unicorn import Uc, UC_ARCH_ARM, UC_MODE_LITTLE_ENDIAN, UC_HOOK_CODE, UC_PROT_READ, UC_PROT_WRITE, UC_PROT_EXEC
from unicorn.arm_const import *
from capstone import Cs, CS_ARCH_ARM, CS_MODE_THUMB, CsInsn
from keystone import Ks, KS_MODE_THUMB, KS_ARCH_ARM
# 找到.text节
filename = "./libcms.so"