Repository navigation
Orbic-Rayhunter v1.2.0
Second enhancement release: the v1.2.0 IMSI-catcher detector suite. Eleven new [UPSTREAM]
analyzer/tooling patches (0006–0020) on top of the v1.1.x notification sinks — NAS and RRC
detectors, ML1 measurement plumbing, cell-identity consistency, and a recording-level
identity-exposure summary. Every detector ships off by default pending on-device
false-positive calibration (T-OR-061). Detector vectors are cross-validated with the reference
Python pycrate ASN.1 encoder against the Rust telcom_parser decoder; they are not yet validated
against a live capture (the device's built-in SIM is inactive). Requires a firmware rebuild and
device reinstall.
Added (daemon notification sinks + detectors, [UPSTREAM] patches)
- ntfy header enrichment (T-OR-045, patch 0001): opt-in
ntfy_headerssends ntfy
Title/Priority/Tagsderived from the notification type; default-off keeps today's plain POST. - ntfy endpoint auth (T-OR-046, patch 0002): optional
ntfy_authAuthorization header
(Bearer/Basic) for a protected topic. Secret: redacted fromGET /api/config, preserved across a
config round-trip that omits it, and dropped ifntfy_urlchanges (so the unauthenticated config
API cannot repoint the URL and harvest the token). - Generic webhook sink (T-OR-047, patch 0003): optional
webhook_urlreceives a JSON body
{source, type, message, timestamp}with no subscriber identifiers, independently of ntfy. The
notification worker now delivers to multiple sinks, each debounced/retried independently.
webhook_urlis treated as a secret (it may embed a token): redacted + preserved. Transport
errors are URL-stripped before logging so a private ntfy topic cannot leak into the daemon log. - Gotify sink (T-OR-049, patch 0004): optional
gotify_url/gotify_tokenPOST Gotify JSON
{title, message, priority}to<gotify_url>/messagewith anX-Gotify-Keyheader.gotify_token
redacted + preserved likentfy_auth.
Security / hardening (patch 0005, PR #16 review follow-up)
- Notification HTTP client disables redirects (
reqwest::redirect::Policy::none()): reqwest
stripsAuthorizationon a cross-origin 30x but not a customX-Gotify-Key, so a redirecting
proxy/captive portal could otherwise harvest the Gotify token. Credential header values are marked
sensitive. gotify_message_urldrops any query/fragment so a?token=cannot leak through the unredacted
gotify_urlinGET /api/config(the token belongs in the redactedgotify_token).- Empty-string secrets no longer send a blank header; a header value with invalid bytes fails closed
(the request is not sent unauthenticated); webhook payloadtimestampis the detection time, not
the retry time; sinks are delivered concurrently per tick so a hung sink cannot block the
others;POST /api/test-notificationnow tests every configured sink and reports per-sink results. - Review follow-up refinements: a single
redirect_safe_client()the worker andtest_notification
both use (the no-redirect policy lives in one place); whitespace-onlywebhook_urlcleared like the
other secrets; a slash-/query-onlygotify_urlthat normalizes to empty is skipped; the
gotify_urlnormalize-and-resolve logic is one testedresolve_gotifyhelper. orx-clihardening (orx alert set):validate_ntfy_urlrejects embeddeduser:pass@
userinfo (which leaked when the URL was printed) and checks the authority shape (non-empty host, a
bracketed IPv6 literal, an optional numeric non-zero port, and\as a path delimiter -- it is a
shape check, not full WHATWG host validation);
the config snapshot (pull::write_atomic) now writes via an O_EXCL, mode-0600temp with a unique
name and removes the partial temp on error;.gitignoreignoresorx-config-before-*.json.
These are patches/0001-0005 on the pinned upstream v0.13.0 daemon, validated on upstream's own gates
(cargo fmt, clippy -D warnings, 120 tests from cargo test -p rayhunter-daemon, daemon/web
check + tests). MQTT (T-OR-048) and a
persistent retry queue (T-OR-050) are deferred. On-device validation is batched with the analyzers phase.
Added (toward v1.2.0 — analyzer phase)
- Analyzer test harness (T-OR-051,
[UPSTREAM]patch 0006): shared#[cfg(test)]helpers in
lib/src/analysis/test_util—packet_time(deterministic timestamps),nas_plain(build a plain
LTE NASInformationElementfrom a raw payload), andcollect_events(run an analyzer over a
sequence and gather itsEvents for a golden comparison) — the foundation the detectors
(T-OR-052+) build on. The per-detector named vector builders grow with each analyzer, and the
capture scrubber (sanitizing a real QMDL for committed vectors) is deferred until on-device captures
exist (T-OR-061). Validated oncargo test -p rayhunter(lib). - NAS Reject (identity-forcing) detector (T-OR-052,
[UPSTREAM]patch 0007, config key
nas_reject_identity): flags an Attach/TAU/Service Reject carrying an identity-forcing EMM
cause (#9 "UE identity cannot be derived" -> Medium, #10 "implicitly detached" -> Low) -- the
NAS-Reject IMSI-catching path (the Devilray "identity reveal" blind spot that the Identity-Request
analyzer misses). It keys on the cause alone and does not (yet) confirm the reject was
integrity-unprotected or that an IMSI re-attach followed -- the NAS security-header type is not
preserved through the decrypted-NAS log, and the Attach Request's EPS mobile identity is not decoded
by the current parser. Off by default: #9/#10 also occur benignly (MME restart, GUTI/MME-pool
mismatch, idle-timer implicit detach), so it needs T-OR-061 on-device false-positive calibration. - Authentication failure / reject detector (T-OR-053,
[UPSTREAM]patch 0008, config key
auth_failure): flags a NAS Authentication Failure (EMM cause #20 MAC failure -> High, #21 synch
failure -> Low, #26 -> Medium) or an Authentication Reject (-> High). A false base station with
no access to the subscriber's home keys cannot produce a valid AUTN, so the USIM rejects the
challenge with an Authentication Failure (#20 is the direct signature, near-impossible benignly on
a home network); an Authentication Reject is sent by a network that cannot validate the UE or
injected by a rogue base station to invalidate the USIM. Stateless. Off by default: #21 also
fires on a genuine SQN resync or a
SIM swap, and an inactive/unprovisioned SIM draws a legitimate Authentication Reject on every
attach/auth retry (stateful suppression and dedup are tracked as T-OR-109), so it needs T-OR-061
calibration. - Null integrity (EIA0) detector (T-OR-055,
[UPSTREAM]patch 0009, config keynull_integrity):
flags a NAS Security Mode Command that selects the null integrity algorithm EIA0 (-> High). EIA0
leaves NAS signalling unauthenticated, so the network cannot be verified and signalling can be
forged -- a stronger false-base-station indicator than the null ciphering (EEA0) the existing
nas_null_cipheranalyzer covers. Stateless. Off by default: EIA0 is legitimate for an
unauthenticated emergency-services attach (accepted as a known false positive until T-OR-111 adds
emergency-attach suppression), so it needs T-OR-061 calibration. (NAS half only; the RRC Security
Mode Command and no-SMC-before-DRB parts are deferred to T-OR-111 pending RRC test vectors.) - RRC golden-vector test harness (T-OR-112,
[UPSTREAM]patch 0011):test_utilgains
lte_rrc/bcch_dl_sch/dl_dcchbuilders that wrap raw RRC octets through the livelte_rrc
decode path, seeded with identifier-free vectors captured from the device, so the RRC analyzers
(which upstream ships untested) can finally be unit-tested. Unblocks T-OR-056/T-OR-057. scripts/orbic-open-shell.py(T-OR-114): re-opens the non-persistent:24root shell after
a reboot without the admin password in argv. It runs the sameSetRemoteAccessCfginjection as
upstream'sorbic-start-telnetbut reads the password from the mode-600 file through the
self-testedorbic-ui-read.pylogin path;--selftestasserts the payload still matches
upstream's exploit string.docs/INSTALL.mdanddocs/BACKUP-AND-RECOVERY.mdnow show it as the
secret-safe re-open.- Recording-level identity-exposure summary (T-OR-060,
[UPSTREAM]patch 0020):rayhunter-check
now tallies, per recording, how often the network obtained or targeted a UE's permanent identity
(IMSI/IMEI) -- events from the identity-disclosure, IMSI-requested and IMSI-paging analyzers,
grouped by analyzer -- in the summary log and as anidentity_exposuremap in the JSON report.
A report-side aggregate over events the harness already produces; no analysis change. - Cell identity consistency detector (T-OR-059,
[UPSTREAM]patch 0019): flags an E-UTRAN cell
that advertises the same identity (ECGI = PLMN + cellIdentity, from SIB1) with two different
tracking area codes within one recording -- possible identity cloning or tracking-area rotation by
a false base station. Corroborative, Low, fires once per cell, off by default (cell_consistency);
keys on the full ECGI (so a shared cellIdentity across PLMNs is not a false positive) and never
logs the identifiers. The ECGI<->PCI correlation, GPS-stationary TAC change, MCC mismatch and
short-lived cells are deferred to T-OR-118. - ML1 measurement plumbing (T-OR-058,
[UPSTREAM]patch 0018): physical-layer serving/neighbor
cell measurements (PCI, EARFCN, RSRP) now reach analyzers through a new
Analyzer::report_measurementtrait method (whose default delegates toreport_skipped_packet,
so time-based analyzers keep ticking) and a harness dispatch of the0xB17F/0xB180ML1 log
bodies. Additive and backward-compatible (no public-enum change); carries no subscriber identity.
The measurement input a cell-identity-consistency analyzer (T-OR-059) consumes. - RRC null integrity (EIA0) detector (T-OR-111 part a,
[UPSTREAM]patch 0016): flags an RRC
configuration selecting the null integrity algorithm (EIA0 -> High) in a Security Mode Command or
a handover reconfiguration (securityConfigHO), leaving access-stratum signalling unauthenticated -- the AS-layer counterpart to the NAS EIA0 that
null_integritycatches. Off by default (rrc_null_integrity); emergency-case suppression is the
remaining stateful part of T-OR-111. - IMSI paging detector (T-OR-056,
[UPSTREAM]patch 0015): flags a PCCH paging record that
addresses a UE by its permanent IMSI instead of a temporary S-TMSI (Medium) -- a known
IMSI-catcher technique to confirm a target's presence (MME restoration is a benign cause). Reads only the identity type, never the paged digits.
Off by default (imsi_paging); comparing the paged IMSI to the device's own is T-OR-116. - Inter-RAT downgrade detector (T-OR-057,
[UPSTREAM]patch 0014): flags a network-directed
move off LTE toward a legacy RAT -- aMobilityFromEUTRACommandCellChangeOrder or Handover to 2G/GERAN
(High), a Handover to 3G/UTRA (Informational), a Handover or e-CSFB to CDMA2000 or a SIB8 CDMA2000
broadcast (Low); NR/E-UTRA ignored. Complements the broadcast-reselection analyzers. Off by default (rat_downgrade).
Vectors are TS 36.331 PDUs encoded with Python pycrate and decoded through telcom_parser. - Permanent-identity disclosure detector (T-OR-054,
[UPSTREAM]patch 0013): flags the UE
disclosing a permanent identity over NAS -- an Identity Response carrying the IMSI (Medium) or the
IMEI/IMEISV device identity (High), or an Attach Request using an IMSI as its EPS mobile identity
instead of a GUTI (Low). The response-side complement to upstreamimsi_requested; keys on the
message and identity type, never the digits. Off by default (identity_disclosure) pending
per-network calibration. Builds on T-OR-110. - Mobile-identity decoding (T-OR-110,
[UPSTREAM]patch 0012): the EPS mobile identity
(TS 24.301 9.9.3.12) and mobile identity (TS 24.008 10.5.1.4) IEs now decode to an identity type
(IMSI, IMEI, IMEISV, GUTI, TMSI) plus digits / GUTI parts / TMSI, instead of empty structs that
discarded the value octets. Lives in apycrate-rsfork pinned by full commit
(doublegate/pycrate-rs@77b1cc8) until upstreamed;Debug/Serializenever emit identity
values. Unblocks the identity-disclosure detector (T-OR-054). rayhunter-check --config(T-OR-113,[UPSTREAM]patch 0010): select which analyzers run by
loading a config's[analyzers]table, so offline re-analysis can exercise detectors that are off
by default (it otherwise ran only the default-on set). This is the reproducible calibration path.- Field-calibration tooling (T-OR-061):
scripts/calib-run.sh,scripts/calib-snapshot.pyand
scripts/calib-analyzers.tomlpull a device's recordings, re-score every message offline with
rayhunter-check --config(the v1.2.0 detectors enabled), and print a per-detector false-positive
table with a real per-message denominator, so their firing rate on real traffic can be measured
before deciding default-on/off. Captures stay out of the repo. See
docs/ANALYZERS.md ("Field calibration").
Release assets
| Asset | Target / role | Size | SHA-256 |
|---|---|---|---|
orx-x86_64-linux |
host CLI (orx), x86_64 Linux |
1038072 B | 70baaabd9377a4df14180becd0e4d57eadf87af3298812e1dd0e49801fdf402f |
rayhunter-daemon |
device daemon, armv7 musleabihf | 6165796 B | ec58da202b70a22fb084303c4ad4ec99fcbc9659c96ad7f39458ff7f3709d67a |
rootshell |
device root helper, armv7 musleabihf | 399700 B | bd913c4634f16a82f5b41854b5f77c424e3bca4bdf590de1f8b5d75e7e2b9298 |
SHA256SUMS lists these hashes; verify with sha256sum -c SHA256SUMS in the download directory.
Build provenance
- Tagged commit:
155307f6fa46556952e45e6cab927ba2a46aeec0 - Upstream pin: EFForg/rayhunter
cd462a1(cd462a1) - Rust toolchain:
1.98.0 - Daemon profile:
firmware(pq-tls, stripped, opt-level z, fat LTO), built in
messense/rust-musl-cross:armv7-musleabihf-- reproduces the upstream release
daemon to within a few hundred bytes (seere/notes/reproducible-build.md). - Built by
.github/workflows/release.ymlon ubuntu-24.04.
Pointers
- Install, scope and current state:
INSTALL.md,PROJECT-STATUS.mdat this tag. - Backup/recovery and device safety:
docs/BACKUP-AND-RECOVERY.md,docs/SECURITY-MODEL.md. - Full change history:
CHANGELOG.md.