Sdr rf attack

From brucesongs/kali-claw · View interactive version

Sdr rf attack is an AI agent skill from the GitHub repository brucesongs/kali-claw. Software Defined Radio and RF signal attacks encompass a broad range of offensive techniques targeting wireless communication systems.

How to use this skill

Skill file

Skill: SDR and RF Signal Attacks

Supplementary Files:

- payloads.md -- Complete payload collection organized by attack type (SDR setup, spectrum scanning, GSM/LTE analysis, RFID exploitation, keyfob replay, protocol reverse engineering, GNURadio development -- 11 major categories)

- test-cases.md -- Structured test case templates (8 cases covering hardware setup, spectrum scanning, GSM interception, LTE analysis, RFID capture, keyfob replay, protocol reverse engineering, and GNURadio flowgraph development)

- guides/sdr-signal-capture-analysis-guide.md -- SDR fundamentals: hardware setup, frequency scanning, signal capture, spectrum analysis, and waterfall visualization

- guides/gsm-lte-basestation-attack-guide.md -- GSM/LTE attacks: gr-gsm configuration, network discovery, SMS/call capture, IMSI catcher concepts, and lawful interception methodology

- guides/rfid-rf-replay-attack-guide.md -- RF replay attacks: RFID capture/replay, keyfob rolling code analysis, garage door testing, urh protocol analysis, and custom GNURadio replay

- guides/gps-spoofing-guide.md -- GPS signal structure, spoofing attacks, detection methods, practical HackRF examples

- guides/zigbee-ble-sdr-guide.md -- ZigBee and BLE SDR analysis, packet capture, replay attacks, key extraction, RF fingerprinting

- guides/rfid-nfc-deep-dive-guide.md -- RFID/NFC protocol analysis, MIFARE Classic/DESfire attacks, NFC relay attacks, cloning countermeasures

- guides/sub-ghz-iot-attack-guide.md -- Sub-GHz IoT protocols (433MHz/868MHz), weather station attacks, garage door replay, smart home device manipulation

- guides/satellite-signal-analysis-guide.md -- Satellite signal capture, AIS ship tracking, ADS-B aircraft monitoring, NOAA weather satellite decoding

Summary

Sdr Rf Attack skill domain covering security operations.

Tools: gnuradio, gr-gsm, hackrf, rtl-sdr, urh, gqrx, inspectrum

Domain: security

Description

Software Defined Radio and RF signal attacks encompass a broad range of offensive techniques targeting wireless communication systems. This skill domain covers the complete attack lifecycle from hardware setup and spectrum reconnaissance through signal capture, protocol reverse engineering, and targeted exploitation of radio systems including GSM cellular networks, LTE/4G infrastructure, RFID/NFC devices, automotive keyfobs, garage door openers, and IoT protocols (Zigbee, LoRa).

Core Attack Surfaces:

Related Skills:


Use Cases

  1. Cellular Network Security Assessment: Authorized GSM/LTE network penetration testing to evaluate interception resistance, test encryption implementation (A5/1, A5/3), and assess vulnerability to IMSI catcher attacks in controlled environments.
  2. RFID Access Control Testing: Evaluate physical access control systems that rely on RFID badges by capturing and analyzing radio transmissions, testing for replay vulnerabilities, and verifying encryption implementation.
  3. Automotive Keyfob Security Audit: Test vehicle entry systems for susceptibility to relay attacks, rolling code implementation flaws, and signal replay vulnerabilities under authorized engagement scope.
  4. IoT Wireless Protocol Assessment: Analyze custom and standard IoT radio protocols (Zigbee, LoRa, proprietary sub-GHz) for authentication bypass, data exfiltration, and injection vulnerabilities.
  5. Spectrum Monitoring and Compliance: Conduct authorized spectrum surveys to identify unauthorized transmissions, detect rogue devices, and verify RF emission compliance.
  6. Radio Protocol Reverse Engineering: Reverse engineer proprietary or undocumented radio protocols to identify security weaknesses in industrial control systems, building automation, or custom wireless links.
  7. GNURadio Custom Tool Development: Build specialized SDR tools for unique engagement requirements including custom demodulators, protocol-specific decoders, and automated replay systems.

Core Tools

| Tool | Purpose | Command Example |

|------|---------|-----------------|

| gnuradio | Graphical signal processing flowgraph design and execution for custom SDR applications | gnuradio-companion -> Drag Osmocom Source -> Demod -> File Sink -> Execute |

| gr-gsm | GSM network interception, decode, and analysis using GNURadio blocks | grgsm_scanner -> grgsm_capture -> grgsm_decode for full GSM traffic analysis |

| hackrf | HackRF hardware control for wideband signal capture and transmission (1 MHz - 6 GHz) | hackrf_transfer -r capture.raw -f 433920000 -s 8000000 -l 32 -g 20 |

| rtl-sdr | Low-cost SDR reception using RTL2832U dongles, spectrum power measurements | rtl_power -f 433M:434M:1k -i 10 -e 60 power.csv for spectrum survey |

| urh | Universal Radio Hacker for interactive protocol reverse engineering and replay | urh -> Load capture -> Auto-detect modulation -> Assign labels -> Replay |

| gqrx | Real-time spectrum visualization and signal monitoring with waterfall display | gqrx -> Set device -> Tune frequency -> Adjust FFT -> Record signal |

| inspectrum | Offline captured signal visualization with spectrogram and layer analysis | inspectrum capture.raw -r 8000000 -f 433920000 for signal analysis |


Methodology

Phase 1: Reconnaissance -- Spectrum Survey

  1. Identify target frequency band using gqrx for real-time monitoring
  2. Perform wideband spectrum scan with rtl_power to map active frequencies
  3. Record signal activity patterns and timing characteristics
  4. Identify modulation type and bandwidth of target signals
  5. Document frequency allocations and correlate with known services

Phase 2: Signal Capture and Analysis

  1. Configure SDR hardware for target frequency (center frequency, sample rate, gain)
  2. Capture raw I/Q samples using hackrf_transfer or GNURadio flowgraph
  3. Analyze captured signals in inspectrum for modulation and framing
  4. Identify signal structure: preamble, sync word, payload, checksum

Phase 3: Protocol Reverse Engineering

  1. Load captured signals into urh for interactive analysis
  2. Auto-detect modulation parameters (ASK, FSK, PSK, OOK)
  3. Decode bitstream and identify protocol fields
  4. Map field values to protocol functions (address, command, checksum)
  5. Validate protocol understanding against multiple captures

Phase 4: Exploitation

  1. Craft targeted transmissions based on reverse-engineered protocol
  2. Test replay attacks against fixed-code systems
  3. Analyze rolling code implementation for weaknesses
  4. Execute authorized exploitation within engagement scope

Phase 5: Reporting

  1. Document all findings with frequency and modulation details
  2. Record proof-of-concept captures and replay demonstrations
  3. Provide remediation recommendations for identified vulnerabilities
  4. Include spectrum analysis evidence and timeline of activities

Practical Steps

Step 1: Hardware Setup and Verification

# Verify HackRF One is detected
hackrf_info

# Check RTL-SDR dongle
rtl_test -t

# Calibrate HackRF using GPSDO or known signal
hackrf_transfer -r /dev/null -f 100000000 -s 8000000 -l 32 -g 20

Step 2: Spectrum Reconnaissance

# Wideband scan of sub-GHz ISM band (433 MHz region)
rtl_power -f 433000000:434000000:1000 -i 1 -e 60 ism_scan.csv

# Visualize spectrum data
python3 -c "
import numpy as np
data = np.loadtxt('ism_scan.csv', delimiter=',')
print(f'Frequencies scanned: {data.shape[0]}')
print(f'Max power: {data.max():.1f} dB')
print(f'Min power: {data.min():.1f} dB')
"

# Monitor specific frequency in real-time
rtl_fm -f 433920000 -s 200000 -r 48000 - | play -r 48000 -t s16 -L -c 1 -

Step 3: Signal Capture

# Capture keyfob transmission at 433.92 MHz
hackrf_transfer -r keyfob_capture.raw -f 433920000 -s 8000000 -l 32 -g 20 -n 80000000

# Capture RFID reader transmission at 13.56 MHz
hackrf_transfer -r rfid_capture.raw -f 13560000 -s 8000000 -l 32 -g 20 -n 80000000

# Analyze captured signal with inspectrum
inspectrum keyfob_capture.raw -r 8000000

Step 4: Protocol Analysis with urh

# Launch urh with captured signal
urh keyfob_capture.raw

# Or use urh CLI for automated analysis
urh_cli -p keyfob_capture.raw -mod auto -s 8000000

Step 5: GSM Network Analysis

# Scan for GSM base stations
grgsm_scanner -b GSM900

# Capture GSM downlink
grgsm_capture -f 935000000 -s 8000000 -g 40 -c 80000000 gsm_capture.raw

# Decode captured GSM data
grgsm_decode -m MC -t gsm_capture.raw

Defense Perspective

Detection and Monitoring

Hardening Recommendations

Compliance Considerations

Countermeasures by Attack Type

| Attack Vector | Countermeasure | Implementation Difficulty |

|---------------|----------------|--------------------------|

| RFID Replay | Encrypted challenge-response (DESFire EV2/EV3) | Medium |

| Keyfob Replay | Rolling codes with 40+ bit counters, Time-based authentication | High |

| GSM Interception | A5/4 encryption, network-level IMSI catcher detection | Very High |

| IoT Protocol Sniffing | AES-128 link-layer encryption, frequency hopping | Medium |

| Signal Jamming | Spread spectrum, adaptive frequency agility | High |

| IMSI Catcher | Network-based detection, mutual authentication (EAP-AKA) | Very High |

SDR Hardware Comparison

Understanding the capabilities and limitations of different SDR hardware platforms is essential for selecting the right tool for each assessment scenario. The following comparison covers the most commonly used platforms in security testing.

| Platform | Frequency Range | Bandwidth | TX/RX | Sample Rate | Approx. Cost | Best For |

|----------|----------------|-----------|-------|-------------|--------------|----------|

| RTL-SDR v3 | 24-1766 MHz | 2.4 MHz | RX only | 2.4 MSPS | $30 | Receive-only tasks: spectrum monitoring, ADS-B, AIS, NOAA, GSM downlink |

| HackRF One | 1-6000 MHz | 20 MHz | TX + RX | 20 MSPS | $330 | Wideband TX/RX: replay attacks, signal generation, protocol testing |

| BladeRF 2.0 micro | 47-6000 MHz | 56 MHz | TX + RX | 61 MSPS | $480 | Full-duplex GSM/LTE testing, MIMO applications |

| USRP B210 | 70-6000 MHz | 56 MHz | TX + RX | 61 MSPS | $1200 | Professional-grade research, wideband MIMO, high-fidelity capture |

| LimeSDR | 100 kHz-3.8 GHz | 30 MHz | TX + RX | 30 MSPS | $300 | Cost-effective full-duplex, GSM base station emulation |

| PlutoSDR | 325-3800 MHz | 20 MHz | TX + RX | 20 MSPS | $200 | Learning platform, WiFi/Bluetooth band testing |

| YardStick One | 281-960 MHz | Limited | TX + RX | Limited | $100 | Sub-GHz IoT testing, Keyfob cloning, specific protocol testing |

Selection Guidelines:

Signal Identification Workflow

Efficiently identifying unknown signals is a core skill for SDR security assessment. This workflow provides a systematic approach to signal identification, from initial discovery through protocol classification.

Step 1: Wideband Spectrum Survey

Use rtl_power or hackrf_sweep to identify active frequencies across the target band. Look for power peaks above the noise floor and note their frequencies, bandwidths, and duty cycles.

Step 2: Signal Capture

Tune to identified frequencies and capture raw I/Q samples at sufficient sample rate (at least 2x the signal bandwidth, preferably 4-8x). Use hackrf_transfer or rtl_sdr for capture.

Step 3: Visual Analysis

Open captured signals in inspectrum to identify modulation type visually. OOK appears as discrete amplitude levels, FSK shows frequency displacement, and PSK shows constant envelope with phase changes.

Step 4: Automated Modulation Detection

Use URH (Universal Radio Hacker) to auto-detect modulation parameters. URH can identify OOK, ASK, FSK, PSK, and QAM modulations along with symbol rate and center frequency offset.

Step 5: Protocol Decoding

Once modulation is identified, decode the bitstream and look for protocol structures: preambles, sync words, headers, payloads, and checksums. Cross-reference with known protocol databases (Flipper Zero Sub-GHz database, SigIDWiki).

Step 6: Protocol Fingerprinting

Match captured signal characteristics against known protocol signatures including frequency, modulation, baud rate, preamble pattern, and frame structure.

RF Attack Categories

SDR-based attacks can be categorized by their objective and technique. Understanding these categories helps assessment planning and scope definition.

| Category | Objective | Example Techniques | Typical Targets |

|----------|-----------|--------------------|-----------------|

| Reconnaissance | Gather intelligence from RF emissions | Spectrum scanning, signal intercept, protocol decode | All wireless systems |

| Eavesdropping | Capture and decode private communications | GSM interception, WiFi sniffing, RFID reading | Cellular, WiFi, RFID, IoT |

| Replay | Re-transmit previously captured signals | Keyfob replay, garage door replay, IoT command replay | Fixed-code systems, IoT devices |

| Spoofing | Transmit counterfeit signals to deceive receivers | GPS spoofing, ADS-B injection, AIS ghost vessels | Navigation, tracking systems |

| Jamming | Deny service by overwhelming the receiver | CW jamming, swept jamming, protocol-aware jamming | All wireless systems |

| Relay | Forward signals between two parties in real-time | NFC relay, keyfob relay, Bluetooth relay | Access control, automotive |

| Cryptanalysis | Break encryption protecting RF communications | KEEX attack, KeeLoq cryptanalysis, CRYPTO1 recovery | Encrypted RF protocols |

| Protocol Exploitation | Exploit protocol-level vulnerabilities | Authentication bypass, command injection, firmware update hijack | IoT devices, industrial systems |

| Side-Channel | Extract secrets from RF emanations | TEMPEST, EM emanation analysis, power analysis | Computing equipment, HSMs |

| Supply Chain | Compromise devices through RF components | Malicious SDR firmware, backdoor radio channels | Critical infrastructure |

Counter-Surveillance

Counter-surveillance with SDR involves detecting, locating, and neutralizing unauthorized radio surveillance devices. This defensive application of SDR technology is relevant to physical security assessments and TSCM (Technical Surveillance Countermeasures) operations.

Detection Techniques

  1. Spectrum monitoring: Continuously scan for unauthorized transmissions across all accessible frequency bands. Look for signals that appear during sensitive activities or meetings.
  2. Non-linear junction detection (NLJD): Detect semiconductor junctions in electronic devices by illuminating them with RF energy and detecting harmonic reflections.
  3. Correlation analysis: Compare signal timing with known activities to identify surveillance devices that activate in response to movement or conversation.
  4. Thermal imaging: Complement RF detection with thermal imaging to locate devices based on heat signatures.
  5. RF direction finding: Use multiple SDR receivers or a rotating directional antenna to triangulate the source of suspicious transmissions.

Common Surveillance Device Signatures

| Device Type | Frequency | Modulation | Detection Method |

|-------------|-----------|------------|------------------|

| Audio bug (analog) | 300-900 MHz | FM/NFM | Wideband FM scan with audio demodulation |

| Audio bug (digital) | 2.4 GHz | GFSK/OFDM | WiFi band monitoring, protocol analysis |

| GPS tracker | 1575.42 MHz (receive) | N/A | Detect GSM/cellular uplink for data exfil |

| Camera (wireless) | 2.4/5.8 GHz | OFDM | WiFi scanner, video signal detection |

| Cellular interceptor | 900/1800/2100 MHz | GSM/LTE | IMSI catcher detection apps, SDR analysis |

SDR Legal Considerations

Operating SDR equipment for security assessment requires awareness of applicable laws and regulations. The legal framework varies significantly by jurisdiction, but the following principles are broadly applicable.

Transmission Regulations

Interception Laws

Authorization Requirements

Jurisdiction-Specific Notes

Detection Methods

RF Spectrum Monitoring

SIEM Detection Rules

Defense Evasion Techniques

Transmission Stealth

ADS-B Spoofing Stealth

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.