Skip to content

Orbic-Rayhunter v1.2.0

Choose a tag to compare

@github-actions github-actions released this 28 Nov 11:00
· 26 commits to main since this release
155307f

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_headers sends ntfy
    Title/Priority/Tags derived from the notification type; default-off keeps today's plain POST.
  • ntfy endpoint auth (T-OR-046, patch 0002): optional ntfy_auth Authorization header
    (Bearer/Basic) for a protected topic. Secret: redacted from GET /api/config, preserved across a
    config round-trip that omits it, and dropped if ntfy_url changes (so the unauthenticated config
    API cannot repoint the URL and harvest the token).
  • Generic webhook sink (T-OR-047, patch 0003): optional webhook_url receives 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_url is 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_token POST Gotify JSON
    {title, message, priority} to <gotify_url>/message with an X-Gotify-Key header. gotify_token
    redacted + preserved like ntfy_auth.

Security / hardening (patch 0005, PR #16 review follow-up)

  • Notification HTTP client disables redirects (reqwest::redirect::Policy::none()): reqwest
    strips Authorization on a cross-origin 30x but not a custom X-Gotify-Key, so a redirecting
    proxy/captive portal could otherwise harvest the Gotify token. Credential header values are marked
    sensitive.
  • gotify_message_url drops any query/fragment so a ?token= cannot leak through the unredacted
    gotify_url in GET /api/config (the token belongs in the redacted gotify_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 payload timestamp is the detection time, not
    the retry time; sinks are delivered concurrently per tick so a hung sink cannot block the
    others; POST /api/test-notification now tests every configured sink and reports per-sink results.
  • Review follow-up refinements: a single redirect_safe_client() the worker and test_notification
    both use (the no-redirect policy lives in one place); whitespace-only webhook_url cleared like the
    other secrets; a slash-/query-only gotify_url that normalizes to empty is skipped; the
    gotify_url normalize-and-resolve logic is one tested resolve_gotify helper.
  • orx-cli hardening (orx alert set): validate_ntfy_url rejects embedded user: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-0600 temp with a unique
    name and removes the partial temp on error; .gitignore ignores orx-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 NAS InformationElement from a raw payload), and collect_events (run an analyzer over a
    sequence and gather its Events 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 on cargo 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 key null_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_cipher analyzer 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_util gains
    lte_rrc/bcch_dl_sch/dl_dcch builders that wrap raw RRC octets through the live lte_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 :24 root shell after
    a reboot without the admin password in argv. It runs the same SetRemoteAccessCfg injection as
    upstream's orbic-start-telnet but reads the password from the mode-600 file through the
    self-tested orbic-ui-read.py login path; --selftest asserts the payload still matches
    upstream's exploit string. docs/INSTALL.md and docs/BACKUP-AND-RECOVERY.md now 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 an identity_exposure map 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_measurement trait method (whose default delegates to report_skipped_packet,
    so time-based analyzers keep ticking) and a harness dispatch of the 0xB17F/0xB180 ML1 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_integrity catches. 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 -- a MobilityFromEUTRACommand CellChangeOrder 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 upstream imsi_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 a pycrate-rs fork pinned by full commit
    (doublegate/pycrate-rs@77b1cc8) until upstreamed; Debug/Serialize never 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.py and
    scripts/calib-analyzers.toml pull 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 (see re/notes/reproducible-build.md).
  • Built by .github/workflows/release.yml on ubuntu-24.04.

Pointers

  • Install, scope and current state: INSTALL.md, PROJECT-STATUS.md at this tag.
  • Backup/recovery and device safety: docs/BACKUP-AND-RECOVERY.md, docs/SECURITY-MODEL.md.
  • Full change history: CHANGELOG.md.