Download Text - ETH E-Collection
Transcript
A.1. Samsung GT-B3740 USB LTE Stick, Firmware B3740BUKA2
A.1.2
1
2
Custom Stub: halt hook thumb2 eq.wrap
# Enable Thumb2
.syntax unified
3
4
5
.section .rodata
msg:
.string "CUSTOM_1 LR: 0x%08x\n"
6
7
8
9
10
11
12
13
.section .text
PUSH
{R0 - R12, LR}
LDR
R0, =msg
MOV
R1, LR
BL
TARGET
// designed to call printf
CUSTOM_2
// additional instructions (e.g. mask interrupts),
call compression routine
POP
{R0 - R12, LR}
14
15
16
_end:
B
A.1.3
1
2
3
4
5
6
7
8
9
10
11
2
Custom Stub: memcpy.pp
.section .text
_start:
PUSH
{R0 - R12, LR}
LDR
R3, =0x636d656d
PUSH
{LR}
BL
TARGET
ADD
SP, #4
POP
{R0 - R12}
BL
REPLACED_STUFF
POP
{LR}
BX
LR
A.1.4
1
_end
Custom Stub: strcat.pp
# Enable Thumb2
.syntax unified
3
4
5
6
7
8
9
.section .text
_start:
PUSH
{R0 - R12, LR}
EOR
R2, R2
LDR
R3, =0x61637473
PUSH
{LR}
49