Ir al contenido

RED TEAM OPERATIONS REPORT: STATIC FORENSIC ANALYSIS (ANDROID)

Operators: Red Team Lead & Tactical Operator Objective: Android Logical Image (Target Dump) Tools: FTK Imager, SQLite (CLI/Browser), ALEAPP...

0views

Operators: Red Team Lead & Tactical Operator Objective: Android Logical Image (Target Dump) Tools: FTK Imager, SQLite (CLI/Browser), ALEAPP Estimated time: 1 hour

In this phase, we will analyze a disk image (or evidence folder) from a compromised device. Our goal is not just to "find the flag," but to understand the user's persistence and communication methodology.

We will divide the operation into three attack vectors:

  1. Structural Exploration (FTK Imager): Filesystem navigation.
  2. Data Mining (SQLite): Manual queries to native databases.
  3. Automated Intelligence (ALEAPP): Rapid event correlation.

2. VECTOR 1: STRUCTURAL EXPLORATION WITH FTK IMAGER

Sección titulada «2. VECTOR 1: EXPLORACIÓN ESTRUCTURAL CON FTK IMAGER»

We will use FTK Imager to mount the evidence as if it were a local disk and navigate without altering the metadata (software-based write-blocking).

The first task is to identify the victim.

  • Path: /system/build.prop
  • Procedure:
    1. Open FTK Imager -> Add Evidence Item -> Image File (or Folder if it is a logical extraction).
    2. Navigate to the folder system.
    3. Export or view the file build.prop.
    4. We look for the line ro.serialno.
  • Objective: Note the serial number.

We need to know what is installed to detect exfiltration vectors.

  • Path: /data/system/packages.xml (or packages.list)

  • Procedure:

    1. Locate the file packages.xml.
    2. Open it with a text editor or XML browser.
    3. We look for the <package> tag that has the most recent lastUpdateTime (it is a Unix timestamp).
  • Objective: Identify the last installed package.

    SELECT number, duration
    FROM calls
    ORDER BY duration DESC
    LIMIT 1;

We must follow these steps to ensure we are analyzing the evidence effectively. We will be able to visualize the device data and understand how the compromise occurred. Then, we will proceed to data mining and automated intelligence to obtain more information.

Android stores 90% of critical information in SQLite databases. We will extract these files with FTK Imager and analyze them locally.

  • Artifact: /data/data/com.android.providers.telephony/databases/mmssms.db

  • Action: We will export the .db file to our desktop.

  • Query (SQLite Studio / CLI): We will search for a hidden “flag” in the message body.

    SELECT address, date, body
    FROM sms
    WHERE body LIKE '%flag%';

    If it does not appear with “flag”, we will manually review the latest messages.

  • Artifact: /data/data/com.android.providers.contacts/databases/calllog.db

  • Action: We will export and analyze.

  • Query to find the maximum duration:

    SELECT number, duration
    FROM calls
    ORDER BY duration DESC
    LIMIT 1;

    (Note: Duration is usually in seconds).

  • Artifact: /data/data/com.android.providers.contacts/databases/contacts2.db
  • Action: We will export and analyze the data or raw_contacts table.
  • Mission: We will look for the “suspicious” contact list.
  • Procedure:
    1. We will open the data table.
    2. We will filter by the mimetype_id column that corresponds to “name” (it is usually 7, but varies).
    3. We will sort alphabetically or by _id.
    4. We will identify the penultimate name that looks suspicious (codewords, hacker aliases, etc.).
  • Artifact: /data/data/com.android.chrome/app_chrome/Default/History (Note: the file is named History without an extension, but it is a SQLite).

  • Action: We will export and open it with SQLite Browser.

  • Mission: We will find data upload locations (exfiltration sites).

  • Query:

    SELECT url, title, last_visit_time
    FROM urls
    WHERE url LIKE '%upload%' OR title LIKE '%upload%'
    ORDER BY last_visit_time DESC;

    We will look for URLs such as mega.nz, drive.google, anonfiles, etc.

  • Artifact: It is usually an XML or CONF file, not always a DB.
  • Path: /data/misc/bluedroid/bt_config.conf or /data/misc/bluetooth_manager/.
  • Procedure: We will open it with a text editor (Notepad++ / VS Code).
  • Objective: We will look for the Name field within the [Adapter] section. This is the device's visible name.

To speed up the process and corroborate manual findings, we will deploy ALEAPP (Android Logs Events And Protobuf Parser).

  1. We will open ALEAPP (GUI or CLI).
  2. We will select the folder where we have dumped the image/evidence.
  3. We will process and generate the HTML report.
  • Exfiltration Package:
    • We will go to the Installed Apps section.
    • We will look for package names related to file transfer (e.g., com.dropbox, mega.privacy, com.termux, FTP/SSH tools). One of them is the key.
  • MMS and Malicious Web:
    • We will go to the MMS section (different from SMS).
    • MMS can contain parts (parts table) with text or images. We will look for a message containing a URL. This website is the attack vector.
  • The User “Encrypted User”:
    • We will return to the Contacts section.
    • We will look for the contact with the Display Name “Encrypted User”.
    • We will look at the adjacent columns to find the email field.

Finally, ALEAPP or FTK Imager will show us the content of /sdcard/Download/.

  • Mission: Sensitive PDF document.
  • Action:
    1. We will extract the PDF from the Downloads folder.
    2. We will open it.
    3. We will read the content to obtain the final flag.

At the end of this session, we will have recorded in our report:

  1. Serial Number (System).
  2. Last App installed (Timeline).
  3. SMS Flag (Hidden data).
  4. Longest call duration (Behavior).
  5. Penultimate suspicious contact (Social Graph).
  6. Last upload URL (Intent).
  7. Bluetooth name (Device Info).
  8. Exfiltration package (App Analysis).
  9. Web in MMS (Network Indicator).
  10. Encrypted user email (Attribution).
  11. PDF Flag (Payload).

End of analysis report.