Skip to content

About

This is a use case and a walkthrough on using MVT(Malware Verification Tool) to detect malware on an iOS device

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

iOS Malware Detection Workflow using MVT (Mobile Verification Toolkit)

This workflow is intended to guide students and digital forensics practitioners through the structured process of analyzing iOS filesystem images for potential spyware infections using MVT (Mobile Verification Toolkit). It details every key stage—from environment setup to confirming detection results—with references to useful resources.


1. Introduction and Purpose

The objective of this workflow is to empower investigators to systematically verify signs of mobile device compromise using MVT. Although MVT was developed by Amnesty International’s Security Lab to detect targeted attacks such as Pegasus spyware, it is extensible to any STIX2-based indicators of compromise (IOCs).


2. Getting Started with MVT

2.1 Setting Up the Environment

  • Ensure you're working on a Linux system (e.g., Kali, Ubuntu).
  • Create and activate a Python virtual environment:
    python3 -m venv leapp-env
    source leapp-env/bin/activate
  • Install MVT and dependencies:
    pip install mvt
    pip install mvt-ios
  • Reference: Official MVT Installation Guide

2.2 Preparing the Filesystem Image

  • Obtain the full logical image or filesystem dump from an iOS device.
  • Unzip or extract the image to a known directory, for example:
    unzip device_image.zip -d /media/user/extracted/filesystem1

3. Running the MVT iOS Filesystem Scan

3.1 Locating IOCs

3.2 Running the Analysis

  • Command to analyze the filesystem:
    mvt-ios check-fs --input /media/user/extracted/filesystem1 --output ~/Documents/mvt_results
  • This will analyze the extracted filesystem against all known indicators.

4. Understanding the Output

The scan produces results in the mvt_results directory. Key output files include:

  • filesystem_detected.json: Matches of IOC files
  • timeline_detected.csv: Time-aligned matches
  • applications.json: List of apps discovered

Important: If any detections are made, there will be files with a _detected.* suffix (e.g., filesystem_detected.json, timeline_detected.csv) in the output folder. These are the files you must examine to investigate possible compromises.

4.1 Reviewing Detections

Use the following command to review detections:

jq '.' filesystem_detected.json

Look for fields like:

"matched_indicator": {
  "value": "payload",
  "type": "processes",
  "name": "Pegasus"
}

5. Investigating and Verifying Matches

5.1 Locating Suspicious Files

Use find to locate files named in detections:

find /media/user/extracted/filesystem1 -type f -iname "payload"

5.2 Validating File Existence

Verify file type using:

file <path_to_payload>

Example:

file "/media/user/extracted/filesystem1/private/var/mobile/.../payload"

5.3 Hashing

Check if the file hash matches any known samples:

sha256sum <path_to_file>

You can then lookup these hashes on threat intelligence platforms such as:

5.4 Inspecting File Content

Use jq for JSON files:

jq '.' <file>

Use strings for binary files:

strings <file>

6. Interpreting Timeline Correlation

Review timeline_detected.csv to align suspicious activity with timestamps.

cat timeline_detected.csv

This helps establish when each detection occurred and whether it coincides with user activity.


7. Drawing Conclusions

In our example:

  • Two files named payload matched Pegasus indicators.
  • One was confirmed as a benign Uber shuttle advertisement JSON file.
  • The other, a Smartlook SDK capture, was also not inherently malicious.

Thus, both detections were false positives, likely flagged due to the generic use of "payload" in filenames.


8. Recommendations and Enhancements

  • Always inspect files before drawing conclusions from tool alerts.
  • Validate matches using hashes and VirusTotal if needed.
  • Correlate findings with app usage data and network activity.
  • Leverage multiple sources to support your conclusion.

9. Useful Tools and Resources


10. Final Notes

This workflow emphasizes cautious validation. MVT is a strong tool for identifying indicators, but each alert must be verified in forensic context. Encourage collaboration with experienced analysts where possible.

For advanced correlation, integrate timelines with system logs and application usage to reconstruct user behavior.


This workflow is intended for educational and investigative purposes in digital forensics.

About

This is a use case and a walkthrough on using MVT(Malware Verification Tool) to detect malware on an iOS device

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages