# Vehicle Soc Forensics

> Use when triaging vehicle security alerts in a SOC or performing forensic acquisition on a vehicle you own or are authorized to examine. Covers vehicle log sources and their limits, CAN and Ethernet evidence preservation, telematics and infotainment artefacts, timeline reconstruction across vehicle and backend logs, and chain of custody for vehicle evidence. Also use when an incident response plan needs vehicle-specific detection use cases and evidence handling.

- Skill: `mizazhaider-ceh/vehicle-soc-forensics` (Agent Skill)
- Install (CLI): `npx get-skill add mizazhaider-ceh/vehicle-soc-forensics`
- Raw SKILL.md: https://api.skillmd.com/api/skills/mizazhaider-ceh/vehicle-soc-forensics/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: mizazhaider-ceh (https://skillmd.com/u/mizazhaider-ceh)
- Updated: 2026-11-22
- Page: https://skillmd.com/skills/mizazhaider-ceh/vehicle-soc-forensics

---


A vehicle security incident leaves evidence in places a conventional
SOC rarely looks, CAN logs with no sender authentication, telematics
records held by a backend, infotainment storage, and diagnostic
trouble codes that may be symptoms or may be noise. The vehicle
clock, the backend clock, and the analyst clock rarely agree, and
volatile vehicle state disappears when the vehicle powers down. This
sub-skill covers triage and forensic handling for vehicles you own
or are authorized to examine, with preservation before analysis and
a timeline that accounts for every clock involved.

## Quick Workflow

1. Preserve first, volatile vehicle state, diagnostic logs, and
   backend records are captured before any analysis changes them.
2. Record the vehicle identity, software versions, and power state
   at the time of acquisition, plus who handled the vehicle.
3. Inventory the log sources available, vehicle, telematics backend,
   charger or fleet system, and mobile app, with their retention.
4. Build a timeline in one reference timezone, noting each source
   clock offset explicitly.
5. Correlate vehicle events with backend events, looking for the
   same session, command, or message ID on both sides.
6. Test each hypothesis against the evidence, and record which
   evidence supports or contradicts it.
7. Separate attack artefacts from faults, a failing sensor and a
   spoofed signal can look alike in a single log.
8. Write the incident record with the chain of custody, the
   evidence hashes, and the gaps where a source was unavailable.

## 1. Evidence preservation and hashing

Acquisition order matters, volatile before non-volatile, and every
acquired file is hashed immediately so later analysis can prove
the copy matches the original. Work on copies, never on original
vehicle storage.

```bash
# Acquire a vehicle log export to a working copy, then hash it
cp /mnt/vehicle_logs/diagnostic_export.log ./evidence/diag_export.log
sha256sum ./evidence/diag_export.log > ./evidence/diag_export.sha256
cat ./evidence/diag_export.sha256
# Acquire a CAN recording the same way, with its own hash file
cp /mnt/vehicle_logs/can_capture.log ./evidence/can_capture.log
sha256sum ./evidence/can_capture.log > ./evidence/can_capture.sha256
```

```python
# Verify every evidence file still matches its recorded hash
import hashlib
import pathlib

for hash_file in sorted(pathlib.Path("evidence").glob("*.sha256")):
    recorded = hash_file.read_text().split()[0]
    target = hash_file.with_suffix("").with_suffix(".log")
    if not target.exists():
        # Hash files are named <name>.sha256 for <name>.log
        target = pathlib.Path(str(hash_file).replace(".sha256", ".log"))
    digest = hashlib.sha256(target.read_bytes()).hexdigest()
    status = "OK" if digest == recorded else "MISMATCH - stop and investigate"
    print(f"{target}: {status}")
```

## 2. Timeline reconstruction across vehicle and backend logs

Normalize timestamps before correlating anything. A vehicle event
that appears to precede its backend cause by minutes is usually a
clock offset, not time travel, and the offset is measured from
events visible in both logs, such as a remote command and its
vehicle execution.

```python
# Normalize timestamps from two sources to one reference timezone
from datetime import datetime, timezone, timedelta

# Offsets measured from an event visible in both logs.
# Vehicle clock runs 4 minutes behind the backend clock in this example.
vehicle_offset = timedelta(minutes=4)

def normalize_vehicle_time(raw):
    parsed = datetime.fromisoformat(raw)
    return (parsed + vehicle_offset).astimezone(timezone.utc)

events = [
    ("vehicle", "2026-10-27T08:12:00+00:00", "remote unlock executed"),
    ("backend", "2026-10-27T08:16:05+00:00", "remote unlock requested"),
]
for source, raw, description in sorted(events, key=lambda e: e[1]):
    print(f"{source}: {raw} - {description}")
# After normalization the vehicle execution follows the backend
# request by seconds, which matches the expected command flow.
```

```bash
# Build a combined timeline with a simple merge of normalized logs
# Each source log is first converted to UTC, then merged and sorted.
sort -m vehicle_timeline_utc.log backend_timeline_utc.log \
  > combined_timeline.log
head -20 combined_timeline.log
```

## 3. Detection use cases and triage checklist

Detection use cases trace back to the threat model, so each use case
names the attack it detects, the log source it needs, and the false
positive it is most likely to produce. Triage starts with the
highest fidelity source and works outward, rather than starting
from the noisiest alert.

```python
# Vehicle SOC use case catalogue, one entry per detection
use_cases = [
    {
        "attack": "CAN injection from a compromised ECU",
        "source": "CAN IDS alerts plus gateway logs",
        "false_positive": "diagnostic session traffic",
    },
    {
        "attack": "unauthorized remote command",
        "source": "telematics backend command log",
        "false_positive": "owner command from a new device",
    },
    {
        "attack": "keyless relay unlock",
        "source": "passive entry logs plus key presence data",
        "false_positive": "owner unlock with key nearby",
    },
]
for case in use_cases:
    print(f"{case['attack']} - source: {case['source']} - "
          f"watch for: {case['false_positive']}")
```

## Edge cases

- Volatile evidence loss: powering down a vehicle can clear
  diagnostic trouble codes and volatile logs, so the power state
  decision is made before any other handling, and the reasoning is
  recorded.
- Clock drift and timezone: vehicle clocks drift and may use local
  time without a timezone marker, so offsets are measured, never
  assumed, and unmarked timestamps are flagged as uncertain.
- Missing backend retention: telematics backends may retain
  detailed logs only briefly, so a preservation request to the
  backend is sent as early as the vehicle acquisition starts.
- Privacy limits: vehicle logs contain location and personal data,
  so acquisition is scoped to the incident window and the
  authorization that covers it, and unrelated data is excluded.
- Fault versus attack ambiguity: a single anomalous signal proves
  neither, so conclusions require corroboration from a second
  source, such as a backend record or a second vehicle bus.
- Chain of custody gaps: any period where the vehicle was handled
  without a record weakens the evidence, so gaps are stated in the
  incident record rather than smoothed over.

## Key references

- ISO 21434, road vehicles cybersecurity engineering, for incident
  response, vulnerability handling, and the threat analysis that
  detection use cases trace back to.
- ISO 27037, guidelines for identification, collection, acquisition
  and preservation of digital evidence, for handling and chain of
  custody practice applied to vehicle evidence.
- The parent skill automotive-threat-model, for the attack paths and
  risk ranking that prioritize which alerts get triaged first.
- Vehicle manufacturer diagnostic documentation for the specific
  vehicle under examination, used to interpret trouble codes and
  log formats before drawing conclusions.

