目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1359 元

100%

CVE-2017-13156 PoC — Android System(art) 权限许可和访问控制问题漏洞

来源
关联漏洞
标题: Android System(art) 权限许可和访问控制问题漏洞 (CVE-2017-13156)
Description:Android是美国谷歌(Google)公司和开放手持设备联盟(简称OHA)共同开发的一套以Linux为基础的开源操作系统。System(art)是使用在其中的一个ART模式运行环境。 Android中的System(art)存在提权漏洞。远程攻击者可利用该漏洞提升权限。以下版本受到影响:Android 5.1.1版本,6.0版本,6.0.1版本,7.0版本,7.1.1版本,7.1.2版本,8.0版本。
Description
Comprehensive Android security vulnerability demonstrations featuring CVE-2017-13156 (Janus), broadcast receiver exploitation, external storage threats, and rooted device attacks. Educational PoCs with working code, exploitation scripts, and security controls for developers and researchers. To be updated...
介绍
# 🚨 Android Security Threat Demonstrations Repository

> **A comprehensive collection of proof-of-concept Android security vulnerabilities and attack vectors**

This repository serves as an educational resource showcasing **real-world Android security threats** and their corresponding **mitigation strategies**. Each demonstration includes working code examples, detailed attack vectors, and security controls to help developers understand and prevent these vulnerabilities in production applications.

> **⚡ This repository is actively maintained and continuously expanding**

---

## 🎯 Repository Objectives

- **🔍 Demonstrate real Android vulnerabilities** with working proof-of-concept code
- **🛡️ Provide security controls** and mitigation strategies for each threat
- **📚 Educate developers** on common Android security pitfalls
- **🧪 Validate security tools** like MobSF and their vulnerability detection capabilities
- **⚡ Research cutting-edge** Android exploitation techniques

---

## 🗂️ Threat Categories Overview

### 🏆 **Featured Demo: Janus Vulnerability (CVE-2017-13156)**
> **My most comprehensive and technically advanced demonstration**

A complete reproduction of the infamous **Janus signature bypass vulnerability** that affected Android 6.0 and earlier versions.

**What it demonstrates:**
- **Dual-face APK construction** where PackageManager and ART Runtime parse the same file differently
- **Signature verification bypass** allowing malicious code execution with valid certificates
- **Custom Python toolchain** for APK manipulation and exploitation
- **Real-world validation** of MobSF's `minSdkVersion` security warnings

**Technical achievements:**
- ✅ Complete APK signature bypass on Android 6.0
- ✅ Malicious DEX injection with legitimate signature preservation
- ✅ Custom exploitation scripts (`make_janus_proper_old.py`, `scam_android.py`)
- ✅ Detailed forensic analysis with logcat evidence

[📁 **View Janus Vulnerability Demo →**](./JanusVuln/)

---

## 📦 Complete Threat Catalog

### 1. 🎭 **Application Impersonation & Phishing**

| Threat | Description | Demo Apps |
|--------|-------------|-----------|
| **Fake Banking App** | OCBC Bank UI clone with tampered backend endpoints | [`FakeApp/ocbcClone/`](./FakeApp/ocbcClone/) |

**Attack Vector:** APK decompilation → endpoint modification → repackaging → sideloading
**Impact:** Credential harvesting, financial fraud
**Mitigation:** App signing verification, secure distribution channels

---

### 2. 📡 **Broadcast Receiver Exploitation**

| Component | Description | Demo Apps |
|-----------|-------------|-----------|
| **Victim App** | Device cache cleaner with exposed sensitive receivers | [`Exposed BroadCastReceiver Threat/victimapp/`](./Exposed%20BroadCastReceiver%20Threat/victimapp/) |
| **Attacker App** | Malicious app exploiting weak broadcast permissions | [`Exposed BroadCastReceiver Threat/attackerapp/`](./Exposed%20BroadCastReceiver%20Threat/attackerapp/) |

**Attack Vector:** Custom permission bypass → broadcast replay → unauthorized actions
**Impact:** Remote triggering of sensitive functionality, DoS attacks
**Mitigation:** Signature-level permissions, internal-only receivers

[📁 **View Broadcast Receiver Demo →**](./Exposed%20BroadCastReceiver%20Threat/)

---

### 3. 🗂️ **External Storage Data Leakage**

| Component | Description | Demo Apps |
|-----------|-------------|-----------|
| **Secure Logger** | Encrypted credential logging with Android Keystore | [`READ_EXTERNAL_STORAGE Threat/mobile/`](./READ_EXTERNAL_STORAGE%20Threat/mobile/) |
| **Malicious Scanner** | Cookie Clicker game that secretly harvests external files | [`READ_EXTERNAL_STORAGE Threat/loggerMobile/`](./READ_EXTERNAL_STORAGE%20Threat/loggerMobile/) |

**Attack Vector:** `READ_EXTERNAL_STORAGE` permission abuse → recursive file scanning → data exfiltration
**Impact:** Sensitive data exposure, credential theft
**Mitigation:** AES encryption, Android Keystore, scoped storage (API 29+)

[📁 **View External Storage Demo →**](./READ_EXTERNAL_STORAGE%20Threat/)

[📁 **View WRITE_EXTERNAL_STORAGE Demo too! →**](https://github.com/nictjh/android-mobile-banking-app/blob/proof/ScopedStorage/README.md)

---

### 4. 🔓 **Rooted Device Exploitation**

| Threat | Description | Demo Apps |
|--------|-------------|-----------|
| **Root-based DoS** | Battery optimizer that corrupts banking app session files | [`rootedDevice Threat/batteryBooster/`](./rootedDevice%20Threat/batteryBooster/) |

**Attack Vector:** Root privilege escalation → file system tampering → session corruption
**Impact:** Forced logouts, user experience degradation, app instability
**Mitigation:** Root detection, SafetyNet/Play Integrity API, secure storage

[📁 **View Rooted Device Demo →**](./rootedDevice%20Threat/)

---

## 🛠️ Technical Implementation Details

### 🔧 **Development Stack**
- **Frontend:** React Native (Expo & Native)
- **Backend:** Supabase, Node.js
- **Security:** Android Keystore, AES encryption (`crypto-js`)
- **Tools:** Python exploitation scripts, APK manipulation tools
- **Testing:** Android Studio AVD, multiple API levels (23-36)

### 📱 **Tested Environments**
- **Android 6.0 (API 23)** - Janus vulnerability target
- **Android 9.0 (API 28)** - External storage demos
- **Android 10+ (API 29+)** - Rooted Environment
- **Android 16 (API 36)** - Modern Security Controls
- **Architectures:** `arm64-v8a`, `x86_64`

### 🧪 **Attack Simulation Framework**
Each demo includes:
- ✅ **Victim application** (vulnerable target)
- ✅ **Attacker application** (exploitation tool)
- ✅ **Step-by-step reproduction** guide
- ✅ **Security controls** and mitigation examples
- ✅ **Real-world impact** analysis

---

## 🎓 Educational Value

### 📚 **Learning Outcomes**
After exploring this repository, developers will understand:

1. **Common Android vulnerability patterns** and their root causes
2. **Exploitation techniques** used by real-world attackers
3. **Security controls** that effectively prevent these attacks
4. **Tool validation** - why security scanners flag certain patterns
5. **Secure development practices** for Android applications

---

## 🚀 Quick Start Guide

### 1️⃣ **Environment Setup**
```bash
# Clone the repository
git clone https://github.com/nictjh/threatDemos.git
cd threatDemos

# Install Android SDK and build tools
# Set up Android Studio AVD emulators
# Install Node.js, Python 3, React Native CLI
```

### 2️⃣ **Running Demonstrations**
Each threat category has its own setup instructions: refer to the directory's `README.md`

```bash
# Example: Janus Vulnerability
cd "JanusVuln/"
python3 make_janus_proper_old.py app-release23.apk nuclear_mainapp.dex janus-test.apk
python3 scam_android.py janus-test.apk janus-final.apk

# Example: External Storage Threat
cd "READ_EXTERNAL_STORAGE Threat/mobile/"
npm install
npm run android
```

### 3️⃣ **Security Testing**
Run each demo in controlled environments:
- Use **Android Studio AVD** for safe testing
- Monitor with **adb logcat** for exploitation evidence
- Analyze APKs with **MobSF** to understand security warnings

---

## 🏆 Research Highlights

### 🥇 **Most Advanced Demo: Janus Vulnerability**
- **Complete CVE-2017-13156 reproduction** on Android 6.0
- **Custom Python exploitation framework** with multiple iteration attempts
- **Real signature bypass** with working APK installation
- **Forensic evidence** captured in logcat demonstrating code execution

### 🎯 **Real-World Relevance**
- **Banking app phishing** with pixel-perfect UI clones
- **Permission abuse** scenarios affecting millions of devices
- **Root exploitation** targeting financial applications
- **Defense validation** proving security control effectiveness

---

## �🛡️ Security Recommendations Collated

### 🔒 **For Developers**
1. **Always set minimum SDK versions** to latest patched Android releases
2. **Use signature-level permissions** for sensitive components
3. **Implement proper encryption** for external storage
4. **Validate APK signatures** and use Play App Signing
5. **Detect rooted environments** in security-sensitive apps

---

## 📊 Demo Statistics

| Metric | Count |
|--------|-------|
| **Total Threat Categories** | 4 |
| **Demo Applications** | 8+ |
| **CVEs Demonstrated** | 1 (CVE-2017-13156) |
| **Android API Levels Tested** | 23, 28, 29, 36 |
| **Custom Exploitation Scripts** | 6+ Python tools |
| **Documentation Files** | 10 detailed READMEs |

---

## 🧑‍💻 Author & Research

**Crafted by Nicholas Tok**
*CSA Cybersecurity Engineer Intern*

*Built with hours of reverse engineering, emulator debugging, and security research.*

---

## ⚠️ Ethical Use Disclaimer

This repository is intended **solely for educational and research purposes**. All demonstrations should be:
- Used only in **controlled testing environments**
- Never deployed against **systems you don't own**
- Utilized to **improve security**, not exploit vulnerabilities
- Shared responsibly within the **cybersecurity community**

The author assumes no responsibility for misuse of these educational materials.

---

文件快照

登录后查看神龙缓存的 POC 文件快照

登录查看
备注
    1. 建议优先通过来源进行访问。
    2. 本地 POC 快照面向订阅用户开放;当原始来源失效或无法访问时,本地镜像作为订阅权益的一部分提供。
    3. 持续抓取、验证、维护这份 POC 档案需要不少投入,因此本地快照已纳入付费订阅。您的订阅是让这份资料能继续走下去的关键,由衷感谢。 查看订阅方案 →