본문으로 건너뛰기
Skillpedia
보안35k · #7909

exploiting-insecure-data-storage-in-mobile

하는 일

이 도구는 모바일 앱이 기기에 민감한 정보를 안전하지 않게 저장하는지 확인합니다. 파일이나 데이터베이스에 노출될 수 있는 비밀번호, 개인 정보, 접근 키를 찾습니다.

사용하는 경우

  • ✓보안 테스터로서 앱이 데이터를 안전하게 저장하는지 확인하고 싶을 때.
  • ✓앱에서 비밀번호나 접근 토큰을 훔칠 수 있는지 테스트할 때.
  • ✓주민등록번호나 신용카드 번호 같은 개인 정보가 암호화 없이 저장되는지 확인하는 경우.

스킬 링크

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/exploiting-insecure-data-storage-in-mobile/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/exploiting-insecure-data-storage-in-mobile/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“Android에서 앱 X가 비밀번호를 안전하지 않게 저장하는지 확인해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

이 도구는 앱이 정보를 저장하는 설정 파일(예: Android의 SharedPreferences)과 데이터베이스(예: SQLite)를 찾습니다. 이 데이터가 암호화 없이 평문으로 되어 있는지 확인합니다. 그렇다면 기기에 접근할 수 있는 사람이 쉽게 읽을 수 있습니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Exploiting Insecure Data Storage in Mobile

When to Use

Use this skill when:

  • Assessing whether mobile applications store sensitive data securely on the device filesystem
  • Testing for credential leakage through SharedPreferences, SQLite databases, or plists
  • Evaluating keychain/keystore implementation for proper access control attributes
  • Performing data-at-rest security assessment during mobile penetration tests

Do not use this skill on production user devices without authorization -- data extraction techniques require physical access or root/jailbreak privileges.

Prerequisites

  • Rooted Android device or emulator with ADB access
  • Jailbroken iOS device with SSH access or Objection-patched IPA
  • ADB (Android Debug Bridge) for Android filesystem access
  • SQLite3 CLI for database inspection
  • Frida/Objection for runtime data extraction
  • Target application installed and exercised (logged in, data cached)

Legal Notice: This skill is for authorized security testing and educational purposes only. Unauthorized use against systems you do not own or have written permission to test is illegal and may violate computer fraud laws.

Workflow

Step 1: Map Application Data Storage Locations

Android storage paths:

# Internal storage (app-private, requires root)
/data/data/<package_name>/
├── shared_prefs/      # SharedPreferences XML files
├── databases/         # SQLite databases
├── files/             # General files
├── cache/             # Cached data
├── lib/               # Native libraries
└── app_webview/       # WebView data

# External storage (world-readable on older Android)
/sdcard/Android/data/<package_name>/

# Check for world-readable files
adb shell run-as <package_name> ls -la /data/data/<package_name>/

iOS storage paths:

# App sandbox (accessible via SSH on jailbroken device)
/var/mobile/Containers/Data/Application/<UUID>/
├── Documents/         # User data, backed up by default
├── Library/
│   ├── Preferences/   # NSUserDefaults plists
│   ├── Caches/        # Cache data
│   └── Application Support/
└── tmp/               # Temporary files

Step 2: Extract and Analyze SharedPreferences (Android)

# Pull SharedPreferences files
adb shell run-as <package_name> cat shared_prefs/*.xml

# Or on rooted device
adb pull /data/data/<package_name>/shared_prefs/ ./shared_prefs/

# Search for sensitive data
grep -ri "password\|token\|secret\|key\|session\|auth\|cookie" shared_prefs/

Common insecure storage patterns:

<!-- Plaintext credentials -->
<string name="user_password">mysecretpass123</string>
<string name="auth_token">eyJhbGciOiJIUzI1NiIs...</string>
<string name="api_key">sk-live-abc123def456</string>

<!-- Sensitive PII -->
<string name="user_ssn">123-45-6789</string>
<string name="credit_card">4111111111111111</string>

Step 3: Analyze SQLite Databases

# Pull databases
adb pull /data/data/<package_name>/databases/ ./databases/

# Open and inspect
sqlite3 databases/app.db
.tables
.schema users
SELECT * FROM users;
SELECT * FROM sessions;
SELECT * FROM tokens;

# Search all tables for sensitive columns
sqlite3 databases/app.db ".dump" | grep -i "password\|token\|secret\|credit"

Check for unencrypted SQLCipher databases:

# If database opens without password, it's unencrypted
sqlite3 databases/app.db "SELECT count(*) FROM sqlite_master;"
# Success = unencrypted (vulnerability)

Step 4: Inspect iOS Keychain Storage

# Using Objection
objection --gadget com.target.app explore
ios keychain dump

# Check protection class attributes
# kSecAttrAccessibleWhenUnlocked - OK for most data
# kSecAttrAccessibleAlways - VULNERABLE: accessible even when locked
# kSecAttrAccessibleAfterFirstUnlock - acceptable for background apps

Step 5: Assess External Storage and Backup Exposure

Android:

# Check if backup is enabled
aapt dump badging target.apk | grep -i "allowBackup"
# android:allowBackup="true" = vulnerability

# Extract backup data
adb backup -f backup.ab -apk <package_name>
java -jar abe.jar unpack backup.ab backup.tar
tar xvf backup.tar
# Inspect extracted data for sensitive information

# Check external storage
adb shell ls -la /sdcard/Android/data/<package_name>/

iOS:

# Check backup exclusion
# Files in Documents/ are backed up by default
# Check NSURLIsExcludedFromBackupKey attribute
objection --gadget com.target.app explore

…
자주 묻는 질문

Android의 SharedPreferences란 무엇인가요?

Android가 설정이나 토큰처럼 작은 데이터를 저장하는 간단한 파일입니다. 암호화 없이 비밀번호를 저장하는 데 쓰이면 보안 위험이 됩니다.

iOS의 Keychain이란 무엇인가요?

아이폰과 아이패드에서 비밀번호와 접근 키를 저장하는 안전한 위치입니다. 앱이 올바른 보호 기능을 사용하지 않으면 이 정보가 부적절하게 접근될 수 있습니다.

이 도구를 쓰려면 기기에 특별한 접근 권한이 필요한가요?

네, 보통 Android에서는 ‘root’ 권한, iOS에서는 ‘탈옥(jailbreak)’이나 기기에 대한 물리적 접근이 있어야 데이터가 저장된 파일을 살펴볼 수 있습니다.

상세 정보

작성자의 원본 설명

Identifies and exploits insecure local data storage vulnerabilities in Android and iOS mobile applications including unencrypted databases, world-readable files, insecure SharedPreferences, plaintext credential storage, and improper keychain/keystore usage. Use when performing mobile penetration testing focused on OWASP M9 (Insecure Data Storage) or assessing compliance with MASVS-STORAGE requirem

repo: mukul975/Anthropic-Cybersecurity-Skills

인기도

GitHub 스타
35k
순위
#7909
라이선스
Apache-2.0
업데이트
2026. 8. 31.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬