프로젝트
GitHub에서 보기
lycheech33/chomper
소개
iOS 실행 파일과 라이브러리에 포함된 암호화 알고리즘을 에뮬레이션하는 경량 프레임워크입니다.
보안 및 개인정보 보호What you can do
- Emulation of ELF and Mach-O binaries
- Support for a subset of iOS system libraries (from iOS 14.4.0)
측정된 스타 증가
- in 24h
- 0
- in 7 days
- +1
- in 15 days
- +6
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalChomper
Chomper is a lightweight emulation framework based on Unicorn. It is mainly used to emulate cryptographic algorithms in iOS executables and libraries. In addition, it also provides limited support for Android native libraries.
Features
- Emulation of ELF and Mach-O binaries
- Support for a subset of iOS system libraries (from iOS 14.4.0)
Requirements
- Python 3.9+
- Unicorn 2.0.0+
Installation
Install the stable version from PyPI:
$ pip install chomper
Or install the latest version from GitHub:
$ pip install git+https://github.com/sledgeh4w/chomper.git
Clone rootfs repository:
$ git clone https://github.com/sledgeh4w/rootfs.git
Usage
Emulate iOS executables.
from chomper import Chomper
from chomper.const import ARCH_ARM64, OS_IOS
# For iOS, system libraries will be automatically loaded from `rootfs_path`
emu = Chomper(
arch=ARCH_ARM64,
os_type=OS_IOS,
rootfs_path="rootfs/ios",
)
# Load program
discover = emu.load_module("samples/ios/com.xingin.discover/8.74/discover")
s = "Mocha"
# Construct arguments
input_str = emu.create_string(s)
input_len = len(s)
result_buf = emu.create_buffer(120)
buf_size = 120
result_len_ptr = emu.create_buffer(8)
# Call function
emu.call_address(discover.base + 0x324EF10, input_str, input_len, result_buf, buf_size, result_len_ptr)
result_len = emu.read_u64(result_len_ptr)
result = emu.read_bytes(result_buf, result_len)
Working with Objective-C.
from chomper import Chomper
from chomper.const import ARCH_ARM64, OS_IOS
from chomper.objc import ObjcRuntime
emu = Chomper(
arch=ARCH_ARM64,
os_type=OS_IOS,
rootfs_path="rootfs/ios",
)
objc = ObjcRuntime(emu)
emu.load_module("samples/ios/cn.com.scal.sichuanair/zsch")
# Use this context manager to ensure that Objective-C objects can be automatically released
with objc.autorelease_pool():
# Find class
zsch_rsa_class = objc.find_class("ZSCHRSA")
# Create NSString object
input_str = objc.create_ns_string("Mocha")
# Call Objective-C method
req_sign = zsch_rsa_class.call_method("getReqSign:", input_str)
# Convert NSString object to C string
result_ptr = req_sign.call_method("UTF8String")
result = emu.read_string(result_ptr)
Emulate Android native libraries.
from chomper import Chomper
from chomper.const import ARCH_ARM64, OS_ANDROID
emu = Chomper(
arch=ARCH_ARM64,
os_type=OS_ANDROID,
rootfs_path="rootfs/android",
)
# Load dependency libraries
emu.load_module("rootfs/android/system/lib64/libz.so")
libszstone = emu.load_module("samples/android/com.shizhuang.duapp/libszstone.so")
s = "Mocha"
input_str = emu.create_string(s)
input_len = len(s)
result_buf = emu.create_buffer(1024)
result_len = emu.call_address(libszstone.base + 0x2F1C8, input_str, input_len, result_buf)
result = emu.read_bytes(result_buf, result_len)
Examples
There are some signing and encryption examples in apps.
관련 프로젝트 살펴보기
불러오는 중…