RED TEAM OPERATIONS REPORT: "LGE" FORENSIC ANALYSIS (WINDOWS CLI MODE)
Operators: Red Team Lead & Tactical Operator Environment: Windows 11 (using Git Bash + sqlite3.exe) Objective: Surgical data extraction without GUI.
Operators: Red Team Lead & Tactical Operator Environment: Windows 11 (using Git Bash + sqlite3.exe) Objective: Surgical data extraction without GUI.
1. ENVIRONMENT PREPARATION (SETUP)
Sección titulada «1. PREPARACIÓN DEL ENTORNO (SETUP)»Before starting, let's ensure that the binary sqlite3.exe is in the case root directory (next to Agent Data).
We open our Git Bash terminal in the image directory and verify:
ls -F# Hauries de veure: Agent Data/ Live Data/ sqlite3.exe*2. TACTICAL EXECUTION (STEP BY STEP)
Sección titulada «2. EJECUCIÓN TÁCTICA (PASO A PASO)»We will copy and paste these commands directly into our Git Bash terminal.
2.1 Device UTC time (Time Freeze)
Sección titulada «2.1 Hora UTC del dispositivo (Time Freeze)»We will read the plain text file generated by the agent.
cat "Live Data/device_datetime_utc.txt"- Expected result: A date and time (e.g.,
2021-05-21 10:00:00).
2.2 Target email (Zoe)
Sección titulada «2.2 Email del objetivo (Zoe)»We will attack the contacts database. In modern Android (contacts3.db), the key table is usually view_data, which joins names and data.
./sqlite3.exe "Agent Data/contacts3.db" "SELECT display_name, data1 FROM view_data WHERE display_name LIKE '%Zoe%';"- Expected result:
Zoe Washburne|<email> - Note: If a table error occurs, we will try:
SELECT data1 FROM data WHERE display_name LIKE '%Zoe%';
2.3 TOR download time (Timestamp Analysis)
Sección titulada «2.3 Hora de descarga de TOR (Timestamp Analysis)»We will search the download DB. We need the lastmod field (last modification).
# Pas 1: Obtenir el Timestamp./sqlite3.exe "Agent Data/downloads.db" "SELECT title, lastmod FROM downloads WHERE title LIKE '%Orbot%' OR title LIKE '%Tor%';"-
Data obtained: A long number (e.g.,
1621518345123). -
Step 2: Conversion (From the terminal): We will copy the first 10 digits of the number (removing the milliseconds at the end) and execute:
date -u -d @1621518345 # Substitueix el número pel que hagis trobat
2.4 100% Charge (Log Grepping)
Sección titulada «2.4 Carga al 100% (Log Grepping)»We will look for patterns in the massive battery file. We will look for "RESET" and then see when it reaches 100%.
# Busquem les línies que contenen "RESET:TIME" i mostrem les 30 següents (-A 30)# Després filtrem per "Level: 100" o "status=full"grep -A 30 "RESET:TIME" "Live Data/Dumpsys Data/batterystats.txt" | grep "Level: 100" -B 5- Interpretation: We will look at the relative (+1h 20m...) or absolute timeline that appears in the log.
2.5 WiFi Password (Credential Dumping)
Sección titulada «2.5 Contraseña WiFi (Credential Dumping)»We will extract plaintext from the WiFi database.
./sqlite3.exe "Agent Data/wifi.db" "SELECT SSID, preSharedKey FROM wifi_configurations;"- Expected result: A list of networks. The password is in the second column. We will look for the most recent one (they usually appear in order of addition or connection).
2.6 App in foreground at 14:13:27 (Timeline)
Sección titulada «2.6 App en primer plano a las 14:13:27 (Timeline)»We will use grep to find the exact second in the usage logs.
grep "14:13:27" "Live Data/usage_stats.txt"- If nothing comes up: We will try
Live Data/Dumpsys Data/usagestats.txt. - Result: We will look for the line that says
MOVE_TO_FOREGROUND. The package is on the right (e.g.:com.android.settings).
2.7 Time on YouTube (Data Mining)
Sección titulada «2.7 Tiempo en YouTube (Data Mining)»We must find the aggregated entry for May 20. This is difficult with a single grep, so we will do it in two steps.
-
Locate the block for the day:
Ventana de terminal grep -n "2021-05-20" "Live Data/Dumpsys Data/usagestats.txt" | head -n 1(We will note the line number, e.g.: 1450)
-
Extract YouTube info: We will replace
1450with the number we found. We will display 500 lines from there and search for YouTube.Ventana de terminal tail -n +1450 "Live Data/Dumpsys Data/usagestats.txt" | head -n 500 | grep "com.google.android.youtube" -A 5 -
Calculation: We will take the value of
totalTime(in ms), divide it by 1000 (seconds) and convert it to hours/minutes.
3. MISSION CHECKLIST
Sección titulada «3. CHECKLIST DE MISIÓN»- UTC obtained (
cat). - Zoe's email obtained (
sqlite3). - TOR time converted (
date -d). - 100% load located (
grep). - Wifi Password exfiltrated (
sqlite3). - App 14:13:27 identified (
grep). - YouTube time calculated (
grep+ math).
Operators, we have the green light to execute.

