Week 7 Flashcards

1
Q

Generic Exploit Mitigation Protections

A

Memory corruption issues in operating systems, including Android, have been exploited by attackers.

Security measures are introduced to prevent and respond to such exploits, aiming to make exploitation more difficult.

Android’s exploit mitigations are derived from the Linux kernel.

Android applications can include native code, which can be exploited if accessible.

Android’s exploit mitigations have been in place since version 4.0 (Ice Cream Sandwich).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Stack Cookies - EM

A

Detects stack-based overflows.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

safe_iop - EM

A

Mitigates integer overflows.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

dlmallocextensions - EM

A

Prevents vulnerabilities like double free() in heap management.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

callocextensions - EM

A

Addresses integer overflows during memory allocations.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Format String Protections - EM

A

Guards against format string vulnerabilities exploitation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

NX - EM

A

Blocks execution of code on the stack or heap.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Partial ASLR - EM

A

Randomizes memory segment locations to thwart ROP attacks.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

PIE Support - EM

A

Randomizes all memory components for ASLR, including app_process and linker.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

RELRO and BIND_NOW - EM

A

Makes process data sections read-only to prevent GOT overwrites.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

FORTIFY_SOURCE L1 - EM

A

Substitutes vulnerable C functions to prevent memory corruption.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

FORTIFY_SOURCE L2 - EM

A

Enhances protection with fortified function versions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

SELinux Permissive - EM

A

Implements access control policies, logging without enforcement.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

SELinux Enforcing - EM

A

Actively enforces specified security policies.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Understanding the Security Model

A

The security model requires a definition of authorized actions for apps.

Apps must know what they can do and whether other apps are authorized for specific actions.

This requires a clearly defined concept of app identity.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Rooting

A

Methods include placing an ‘su’ binary in /system/bin or xbin.

In code:
Runtime.getRuntime().exec(new String[]{“su”, “-c”, “id”});

Android root manager applications prompt the user for permission.

Post-exploit custom version of ‘su’, for persistence: provided by drozer in the ‘tools.setup.minimalsu’ module.

^^ Uses setuid(0) & setgid(0) for no user prompts.

17
Q

Rooting Methods

A

Common rooting methods involve using exploits or leveraging unlocked bootloaders.

18
Q

Using an Exploit - Gingerbreak

A

The Gingerbreak exploit targets the Volume Manager (vold) in Android versions 2.2 to 3.0.

It involves an array access error and manipulation of the Global Offset Table (GOT) to execute the ‘sh’ binary as root.

Users need to have ‘log’ group access to exploit this vulnerability.

19
Q

Using an Exploit – Exynos Abuse – Exploiting Custom Drivers

A

Custom drivers for hardware can contain vulnerabilities.

An exploit found in Samsung Galaxy S3 devices with Exynos.

Involved a block device, /dev/exynos-
mem, which allowed mapping kernel memory to user
space.

The exploit altered code comparisons (setresuid), granting root access.

Bypassed kptr_restrict, which normally prevents applications from reading kernel pointers.

20
Q

Using an Exploit – Samsung Admire Vulnerability via Symlinks

A

Loose file permissions in Samsung Admire allowed root access.

An attacker created a symlink and triggered an app crash to write files with world-writable permissions.

This exploit was specific to Samsung Admire.

21
Q

Using an Exploit – Acer Iconia – Exploiting SUID Binaries

A

SUID binaries owned by root and executable by anyone are prime targets for root exploit developers.

A vulnerability in the Acer Iconia A100’s SUID binary named cmdclient allowed command injection, enabling arbitrary command execution with root privileges.

22
Q

Reverse-Engineering Applications

A

Reverse-engineering is the process of analyzing and understanding applications without source code.

Tools like Dexdump, Smali, Baksmali, Dex2jar, JD-GUI, and Apktool help with disassembling and decompiling applications.

23
Q

Disassembling DEX Bytecode

A

DEX files contain Dalvik bytecode, which can be converted into a low-level assembly format.

The ‘dexdump’ tool is used for disassembling DEX files.

Smali and Baksmali are tools that help convert DEX files into more readable class files.

24
Q

Decompiling DEX Bytecode

A

Decompiling DEX files can be more informative than disassembled code.

Dex2jar is a tool for converting DEX files to Java Class files.

JD-GUI can decompile JAR files back into Java source code.

25
Q

Decompiling Optimized DEX Bytecode

A

DEX files for system apps are typically pre-optimized and stored as ODEX files.

The ‘oatdump’ tool can disassemble OAT files.

Tools like ‘oat2dex’ can extract DEX files from OAT files.

26
Q

Reversing Native Code in Android

A

Native components in Android apps are often in machine code for ARM, x86, or MIPS.

Tools like IDA, Apktool, Jadx, and JAD assist in reverse-engineering native code.

Android’s ART system converts DEX files into OAT files, which can also be reverse-engineered.

27
Q

Dealing with ART

A

The ‘oatdump’ tool can disassemble OAT files, similar to ‘dexdump’ for DEX files.

‘oat2dex’ is a script that extracts DEX files from OAT files for reverse engineering.