Clutch: Cellular Security Monitor

Leave your phone at home. That's the advice. It's not always safe, not always practical, and not always right. Clutch was built around a better question: what if the device told you when the cellular layer stopped behaving like background infrastructure?

The advice is always the same. Leave your phone at home. Leave it in the hotel. Put it in a Faraday bag. Fly dark.

That advice comes from people who have never had to choose between carrying a camera and their safety. Between documentation and operational security. Between being present with a device and being present without one. It is correct in the abstract. It fails in the field.

Picture an arrest at a protest in the early 2000s, one of the largest in New York City history, the kind of crowd that filled midtown in every direction and made the news cycle stop. Pre-smartphone era. I had a film camera. They took it when they took me. Gave it back when they released me. I developed the film after.

The photographs survived.

That experience taught something the security community often misses in their "leave the phone at home" lectures: governments have procedures, and those procedures are not always your enemy. Law enforcement confiscates. It also returns. Evidence gets documented. Lawyers get involved. Rules exist, and they often get followed, not always, not everywhere, not under every administration, but more often than the pure paranoia model assumes. The threat is real. The threat is also not absolute. The problem is that when you are standing in a crowd in a contested environment, you do not know which situation you are in.

That is the actual problem Clutch is built to solve. Not "am I being surveilled" with a yes or no answer. But: is the cellular environment around me behaving like normal infrastructure, or is it behaving like something else? Enough signal to make a better decision. Not certainty. Visibility.

What Cell-Site Simulators Actually Do

An IMSI catcher, a Stingray, a DRT box, a cell-site simulator, impersonates cellular infrastructure to draw a device into an interaction. Signal strength is part of that story, alongside network selection rules and the protocol in use. The authentication boundary changes by generation. GSM/2G lacks mutual authentication; LTE includes it. LTE still has messages exchanged before security is established, which creates a different exposure. NIST's assessment explains both the older-network weakness and the pre-authentication surface.

An IMSI identifies a subscription. Collecting it can support tracking; interception capabilities depend on the protocol, deployment, and any further compromise. Possessing an IMSI does not by itself decrypt HTTPS. Downgrading a cellular connection and defeating TLS are different boundaries.

Indicators worth investigating, when the collector can actually measure them:

  • Unexpected technology downgrade. LTE to 3G or 2G can expose an older security model. It can also happen for ordinary coverage reasons, so it needs context. A radio-generation label does not reveal the negotiated cipher, and LTE/5G encryption cannot be described as an A5/3-to-A5/1 ladder.
  • Signal strength anomalies. A 25 dB jump between readings deserves investigation alongside handovers, movement, and the rest of the measurements. The readings are in dBm; their difference is in dB. The source now labels the difference in dB. Crossing a configured threshold is a lead, not evidence of a confirmed simulator.
  • Timing advance. This is a quantized radio timing measurement, not a precise distance fix. A zero value alone does not place a tower beside you. It needs a valid measurement, the protocol context, and corroborating indicators. Unavailable telemetry must stay unavailable rather than become a suspicious zero.
  • Tower ID irregularities. Cell IDs operate within known ranges for given areas. An ID that is out of range for your location, or that appears suddenly and disappears, is a pattern.
  • Unusual frequency behavior. Operating on non-standard frequencies or shifting frequency mid-session without a network-level explanation.

Three rules look for a sudden signal increase, a supplied disabled-cipher label, and a return to GSM/2G after recent LTE/4G/5G. Run them separately. Then put the conditions together and see what the pipeline actually emits.

The pipeline replay feeds the real analyze_measurement() method from a Clutch checkout. It keeps the five rule stages, history updates and finding storage. ML and console notifications are explicitly disabled for this run; the fixture bypasses constructor setup so it cannot load a saved model. No collector starts.

curl --fail --output clutch_pipeline_replay.py \
  https://ghostintheprompt.com/research/clutch_pipeline_replay.py
python3 clutch_pipeline_replay.py /path/to/clutch

The fixture supplies a 28 dB jump, a disabled cipher and a generation change in separate cases. A 20 dB boundary case, stable readings and an unknown cipher supply the controls. The recorded JSON includes the source hash and each finding's evidence.

The secrecy around these devices is documented. The ACLU of Illinois published its investigation into Chicago’s use, including the FBI nondisclosure agreement and its provision for requesting dismissal rather than disclosing protected equipment information. That is an evidence trail worth reading. An unusual radio reading at a protest still needs its own evidence before it becomes a confirmed deployment.

Red Team: How They Hide

A sophisticated IMSI catcher deployment tries to blend:

  • Signal strength normalized to plausible tower values, no obvious boost
  • Frequency matching the legitimate carrier in the area
  • Temporary deployment windows, bring it up, collect, bring it down before pattern analysis catches the anomaly
  • Multiple devices creating overlapping coverage to confuse correlation
  • No downgrade if the target is on a monitored whitelist and the operator wants passivity rather than intercept

What they cannot always hide: the physics. Timing advance anomalies under aggressive signal conditions. Cell ID behavior that does not match the infrastructure map. Correlated anomalies across multiple indicators at once, in the same time window, in a location where deployment is plausible.

No single indicator is proof. Correlation gives you a lead to investigate. It does not identify an operator or turn inferred telemetry into a measurement.

Blue Team: What Clutch Gives You

Clutch applies cellular-anomaly rules and statistical analysis to the measurements it receives. What reaches that analysis depends on the platform and collector. The synthetic tests exercise the detector; they do not establish live access to every field on an ordinary phone.

The detection stack:

  • iOS collector: imports CoreTelephony, but its cell ID fallback is built from carrier MCC/MNC, its cipher label is inferred from radio generation, and timing advance returns nil. Signal strength calls a private symbol with an entitlement requirement noted in source; field access has not been validated on a production device.
  • Signal pattern analysis: IsolationForest and DBSCAN anomaly detection on RSSI, timing advance, and technology layer
  • Downgrade rules: flag supplied technology/cipher changes. A generation-based cipher estimate must not be presented as a measured encryption negotiation.
  • Cell ID checks: operate on supplied identifiers; a carrier-derived fallback cannot establish serving-cell identity or location.
  • Protocol anomaly analysis: checks available telemetry. This does not demonstrate raw RF fingerprint capture by the phone app.
  • Multi-device coordination: WebSocket server for sharing threat data across a team in real time

Here is the actual analysis method. The row enters history before the detectors run. Each rule adds its findings, the optional ML stages follow, and the findings are stored and passed to the notification handler. Invalid signal input exits before history is changed.

    def analyze_measurement(self, measurement: CellularMeasurement) -> List[SecurityThreat]:
        """Analyze a cellular measurement for security threats."""
        threats = []
        signal = measurement.signal_strength
        if isinstance(signal, bool) or not isinstance(signal, (int, float)) or not math.isfinite(signal):
            self._record_input_status('measurement', ['signal_strength'])
            return threats
        self._record_input_status('measurement', [])

        # Update tower database
        tower_key = f"{measurement.tower.cell_id}_{measurement.tower.lac}"
        if tower_key not in self.tower_database:
            self.tower_database[tower_key] = measurement.tower
        else:
            # Update existing tower info
            existing_tower = self.tower_database[tower_key]
            existing_tower.last_seen = measurement.timestamp
            existing_tower.signal_strength_history.append(measurement.signal_strength)

        # Add to measurement history
        self.measurement_history.append(measurement)

        # Perform threat analysis
        threats.extend(self._detect_imsi_catcher(measurement))
        threats.extend(self._detect_signal_anomalies(measurement))
        threats.extend(self._detect_location_anomalies(measurement))
        threats.extend(self._detect_encryption_anomalies(measurement))
        threats.extend(self._detect_tower_behavior_anomalies(measurement))

        # Perform machine learning-based advanced analysis
        if ML_AVAILABLE:
            threats.extend(self._ml_anomaly_detection(measurement))
            threats.extend(self._advanced_pattern_analysis(measurement))

        # Add threats to database
        for threat in threats:
            self.security_threats.append(threat)
            self._handle_threat_notification(threat)

        return threats

The primary anomaly extractor produces thirteen fields. A separate pattern path produces seven fields per row across up to fifty measurements. The older article conflated those two paths. Both now reject missing quality, timing advance, or unknown technology/cipher labels instead of treating those fields as numeric zero. A supplied zero remains zero. This validates the input shape, not how a collector obtained it.

The iOS timing-advance field is still unavailable, its cipher label is still inferred, and its carrier-derived cell ID is still not a measured serving-cell identity. The new gates expose that gap rather than pretending the phone can supply a complete vector. Neither path demonstrates a fitted detector’s accuracy. IsolationForest contamination settings and DBSCAN outlier thresholds are configuration, not measured sensitivity or deployment prevalence.

Watch the two feature paths on the same ten rows. This is the complete feature replay. Keep clutch_pipeline_replay.py beside it, install NumPy in your working environment, and run python3 clutch_feature_replay.py /path/to/clutch:

#!/usr/bin/env python3
"""Inspect the real feature paths on complete synthetic rows; requires NumPy."""
from collections import deque
from datetime import datetime, timedelta
import json
import sys
from clutch_pipeline_replay import load_source, monitor_for

source, digest = load_source(sys.argv[1])
if not source.NUMPY_AVAILABLE:
    raise SystemExit('NumPy is required for this feature-path replay.')
monitor = monitor_for(source)
tower = source.CellularTower('fixture', 'fixture', '001', '01', 'GSM')
rows = [source.CellularMeasurement(
    datetime(2026, 10, 26, 12) + timedelta(seconds=i), tower, -90+i,
    signal_quality=0, timing_advance=0, technology='GSM',
    encryption_status='A5/1') for i in range(10)]
monitor.measurement_history = deque(rows)
primary = monitor._extract_ml_features(rows[-1])
pattern = monitor._extract_pattern_features()
assert len(primary) == 13 and pattern.shape == (10, 7)
assert primary[5] == 0 and pattern[-1, 6] == 1
print(json.dumps({'source_sha256': digest, 'primary_fields': len(primary),
                  'pattern_shape': list(pattern.shape),
                  'primary_latest_delta': float(primary[5]),
                  'pattern_latest_delta': float(pattern[-1, 6]),
                  'signal_quality_zero': float(primary[1]),
                  'timing_advance_zero': float(primary[8])}, indent=2))

The recorded result returns thirteen primary fields and a ten-by-seven pattern matrix. Supplied quality and timing zeros survive. The last pattern delta is 1 dB; the primary delta is zero because its history already contains the current reading. Same inputs, different feature semantics. That discrepancy is visible in code and output instead of buried behind the phrase “ML analysis.” No model fitting is involved.

Two further feature limits remain in the source. The primary signal-delta feature compares against history after the current row is appended, so that path can produce zero for the latest delta. Missing location features still fall back to zero. Correcting those semantics needs explicit feature/model versioning and new validation. This pass does not silently retrain a model around changed inputs.

Run the actual-source regression suite from the Clutch repository:

python3 -m unittest discover -s scripts -p test_measurement_inputs.py -v

Eight tests passed with real NumPy available. In the standard-library-only environment, six passed and the two NumPy vector tests explicitly skipped. The checks cover the missing timing field, legitimate zero values, invalid inputs, missing historical fields, the thirteen-field and seven-column shapes, cipher unknown versus disabled, and the signal-jump rule. No radio, phone, fitted sklearn model or live network was tested.

The complete pipeline produces these results from the eight replay cases:

Supplied conditionRecorded finding types and rule weights
-90 to -62 dBmIMSI_CATCHER_SUSPECTED, 0.7
-90 to -70 dBmNone: the jump must exceed 20 dB
A5/1 to NoneENCRYPTION_DOWNGRADE, 0.8 and 0.7
A5/1 to UnknownNone
LTE to GSM, cipher Unknown throughoutFORCED_TECHNOLOGY_DOWNGRADE, 0.6
Stable GSM/A5/1 readingsNone
28 dB jump, LTE to GSM, A5/1 to NoneFour findings: signal, disabled cipher, generation drop, cipher transition
Non-finite signal inputNo finding; input marked unavailable and history unchanged

The two encryption findings are real output from different stages. _detect_imsi_catcher() flags the disabled label at 0.8; _detect_encryption_anomalies() flags the transition at 0.7. Those weights are constants. They must not be summed into a combined confidence, and four findings do not mean four independent observations. This is exactly the duplication a downstream alert interface needs to expose.

The generation-drop rule uses a short history window. Its name says “forced”; the input establishes a transition, not who caused it. The replay leaves the name intact and supplies the evidence needed to read it correctly.

The mitigation suggestions are defaults. The tool is designed to be adjustable, threat models vary, and a journalist covering a protest in New York has a different operational picture than a fixer moving through a warzone. The sensitivity thresholds are configurable. The alert behavior is configurable. The system does not decide what you do. It gives you more information than you had before and lets you decide.

That is the whole design philosophy.

Who This Is For

The "leave your phone at home" crowd is not wrong about the threat. They are wrong about the operational reality for a lot of the people who face it.

A journalist covering a front line has sources on that phone. Navigation. Emergency contacts. The documentation of the day. Leaving it at the hotel is sometimes the right call. It is not always available as a call.

An activist organizing in a city with an active surveillance program needs to communicate. Operational silence is not always tactically superior to operational awareness.

A security team protecting an executive in a contested environment needs to know whether the cellular layer in that meeting room is clean.

A researcher needs to know whether the conference they are attending has been turned into a collection environment.

The threat is not uniform. The response should not be uniform either. A tool that gives you the cellular picture and lets you calibrate your response is more useful than advice that assumes you can afford to go dark.

Open Source Because It Has To Be

Surveillance detection software that asks for your trust without showing you what it is doing has a structural problem. The thing it is supposed to protect you from operates through opacity. A defensive tool should not imitate that.

Clutch is open source. The detection algorithms are readable. The data handling is auditable. The monitor retains a local threat database. The project also contains a remote-sharing server and client paths, so a deployment review must inspect the enabled services, bind address, transport and authentication before claiming that nothing leaves the device. A readable repository gives you somewhere to check that claim.

If the tool does not fit your threat model, fork it and build what does.

github.com/ghostintheprompt/clutch


Correction, October 25, 2026: Distinguished 2G authentication weaknesses from LTE pre-authentication exposure, separated cellular downgrade from TLS interception, corrected signal-difference units in prose, and stated collector limitations. The existing synthetic detector results remain the measured evidence; no new device, RF, or live-network test was run.

Correction, October 26, 2026: Added the missing timing-advance schema field, preserved unavailable feature inputs, corrected rule output and units against actual source, and replaced the invented combined alert with a recorded synthetic replay. Eight NumPy-backed tests pass; collector provenance, feature-versioning and device validation remain open.

GhostInThePrompt.com // The tower decides what your phone trusts. Clutch gives you a vote.