oscura 0.5.0__py3-none-any.whl → 0.5.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. oscura/__init__.py +1 -1
  2. oscura/analyzers/digital/__init__.py +0 -48
  3. oscura/analyzers/digital/extraction.py +0 -195
  4. oscura/analyzers/protocols/__init__.py +1 -22
  5. oscura/automotive/__init__.py +1 -1
  6. oscura/automotive/dtc/data.json +2763 -0
  7. oscura/export/__init__.py +0 -12
  8. oscura/export/wireshark/README.md +15 -15
  9. oscura/exporters/json_export.py +0 -47
  10. oscura/inference/active_learning/README.md +7 -7
  11. oscura/pipeline/composition.py +10 -2
  12. oscura/reporting/__init__.py +0 -7
  13. oscura/reporting/templates/index.md +13 -13
  14. oscura/schemas/bus_configuration.json +322 -0
  15. oscura/schemas/device_mapping.json +182 -0
  16. oscura/schemas/packet_format.json +418 -0
  17. oscura/schemas/protocol_definition.json +363 -0
  18. oscura/utils/autodetect.py +1 -5
  19. oscura-0.5.1.dist-info/METADATA +583 -0
  20. {oscura-0.5.0.dist-info → oscura-0.5.1.dist-info}/RECORD +23 -28
  21. oscura/analyzers/digital/ic_database.py +0 -498
  22. oscura/analyzers/digital/timing_paths.py +0 -339
  23. oscura/analyzers/digital/vintage.py +0 -377
  24. oscura/analyzers/digital/vintage_result.py +0 -148
  25. oscura/analyzers/protocols/parallel_bus.py +0 -449
  26. oscura/export/wavedrom.py +0 -430
  27. oscura/exporters/vintage_logic_csv.py +0 -247
  28. oscura/reporting/vintage_logic_report.py +0 -523
  29. oscura/visualization/digital_advanced.py +0 -718
  30. oscura/visualization/figure_manager.py +0 -156
  31. oscura-0.5.0.dist-info/METADATA +0 -407
  32. {oscura-0.5.0.dist-info → oscura-0.5.1.dist-info}/WHEEL +0 -0
  33. {oscura-0.5.0.dist-info → oscura-0.5.1.dist-info}/entry_points.txt +0 -0
  34. {oscura-0.5.0.dist-info → oscura-0.5.1.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,583 @@
1
+ Metadata-Version: 2.4
2
+ Name: oscura
3
+ Version: 0.5.1
4
+ Summary: Unified hardware reverse engineering framework. Extract all information from any system through signals and data. Unknown protocol discovery, state machine extraction, CRC recovery, security analysis. 16+ protocols, IEEE-compliant measurements.
5
+ Project-URL: Homepage, https://github.com/oscura-re/oscura
6
+ Project-URL: Documentation, https://github.com/oscura-re/oscura/tree/main/docs
7
+ Project-URL: Repository, https://github.com/oscura-re/oscura
8
+ Project-URL: Changelog, https://github.com/oscura-re/oscura/blob/main/CHANGELOG.md
9
+ Project-URL: Issue Tracker, https://github.com/oscura-re/oscura/issues
10
+ Project-URL: Discussions, https://github.com/oscura-re/oscura/discussions
11
+ License-Expression: MIT
12
+ License-File: LICENSE
13
+ Keywords: automotive-protocols,can-bus,crc-recovery,device-replication,embedded-systems,exploitation,hardware-reverse-engineering,hardware-security,i2c,ieee-compliance,logic-analyzer,obd-ii,oscilloscope,protocol-analysis,protocol-decoder,protocol-inference,reverse-engineering,right-to-repair,security-research,signal-analysis,spectral-analysis,spi,state-machine-learning,uart,unknown-protocol,vulnerability-analysis,waveform-analysis
14
+ Classifier: Development Status :: 3 - Alpha
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Intended Audience :: Information Technology
17
+ Classifier: Intended Audience :: Science/Research
18
+ Classifier: Intended Audience :: Telecommunications Industry
19
+ Classifier: License :: OSI Approved :: MIT License
20
+ Classifier: Operating System :: OS Independent
21
+ Classifier: Programming Language :: Python :: 3
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Programming Language :: Python :: 3.13
24
+ Classifier: Topic :: Scientific/Engineering
25
+ Classifier: Topic :: Scientific/Engineering :: Information Analysis
26
+ Classifier: Topic :: Security
27
+ Classifier: Topic :: System :: Hardware
28
+ Classifier: Topic :: System :: Hardware :: Hardware Drivers
29
+ Classifier: Typing :: Typed
30
+ Requires-Python: >=3.12
31
+ Requires-Dist: click<9.0.0,>=8.1.0
32
+ Requires-Dist: dpkt<2.0.0,>=1.9.0
33
+ Requires-Dist: jinja2<4.0.0,>=3.1
34
+ Requires-Dist: matplotlib<4.0.0,>=3.7.0
35
+ Requires-Dist: numpy<3.0.0,>=1.24.0
36
+ Requires-Dist: pandas<3.0.0,>=2.0.0
37
+ Requires-Dist: psutil<7.0.0,>=5.9.0
38
+ Requires-Dist: pyyaml<7.0.0,>=6.0
39
+ Requires-Dist: scipy<2.0.0,>=1.10.0
40
+ Requires-Dist: tm-data-types<1.0.0,>=0.3.0
41
+ Provides-Extra: all
42
+ Requires-Dist: asammdf<9.0.0,>=8.0.0; extra == 'all'
43
+ Requires-Dist: cantools<40.0.0,>=39.4.0; extra == 'all'
44
+ Requires-Dist: check-jsonschema<1.0.0,>=0.29.0; extra == 'all'
45
+ Requires-Dist: h5py<4.0.0,>=3.0.0; extra == 'all'
46
+ Requires-Dist: hypothesis<7.0.0,>=6.0.0; extra == 'all'
47
+ Requires-Dist: interrogate<2.0.0,>=1.7.0; extra == 'all'
48
+ Requires-Dist: ipython<9.0.0,>=8.0.0; extra == 'all'
49
+ Requires-Dist: jupyter<2.0.0,>=1.0.0; extra == 'all'
50
+ Requires-Dist: nbconvert<8.0.0,>=7.0.0; extra == 'all'
51
+ Requires-Dist: networkx<4.0.0,>=3.0; extra == 'all'
52
+ Requires-Dist: nptdms<2.0.0,>=1.7.0; extra == 'all'
53
+ Requires-Dist: openpyxl<4.0.0,>=3.0.0; extra == 'all'
54
+ Requires-Dist: pytest-benchmark<6.0.0,>=4.0.0; extra == 'all'
55
+ Requires-Dist: pytest-cov<8.0.0,>=6.0; extra == 'all'
56
+ Requires-Dist: pytest-timeout<3.0.0,>=2.3.0; extra == 'all'
57
+ Requires-Dist: pytest<10.0.0,>=8.0; extra == 'all'
58
+ Requires-Dist: python-can<5.0.0,>=4.4.0; extra == 'all'
59
+ Requires-Dist: python-pptx<1.0.0,>=0.6.21; extra == 'all'
60
+ Requires-Dist: pyvisa-py<1.0.0,>=0.7.0; extra == 'all'
61
+ Requires-Dist: pyvisa<2.0.0,>=1.13.0; extra == 'all'
62
+ Requires-Dist: pywavelets<2.0.0,>=1.0.0; extra == 'all'
63
+ Requires-Dist: rapidfuzz<4.0.0,>=3.0.0; extra == 'all'
64
+ Requires-Dist: reportlab<6.0.0,>=4.4.7; extra == 'all'
65
+ Requires-Dist: rigolwfm<2.0.0,>=1.0.0; extra == 'all'
66
+ Requires-Dist: scapy<3.0.0,>=2.5.0; extra == 'all'
67
+ Requires-Dist: types-pyyaml<7.0.0,>=6.0; extra == 'all'
68
+ Requires-Dist: yamllint<2.0.0,>=1.35; extra == 'all'
69
+ Provides-Extra: analysis
70
+ Requires-Dist: networkx<4.0.0,>=3.0; extra == 'analysis'
71
+ Requires-Dist: openpyxl<4.0.0,>=3.0.0; extra == 'analysis'
72
+ Requires-Dist: pywavelets<2.0.0,>=1.0.0; extra == 'analysis'
73
+ Provides-Extra: automotive
74
+ Requires-Dist: asammdf<9.0.0,>=8.0.0; extra == 'automotive'
75
+ Requires-Dist: cantools<40.0.0,>=39.4.0; extra == 'automotive'
76
+ Requires-Dist: python-can<5.0.0,>=4.4.0; extra == 'automotive'
77
+ Requires-Dist: scapy<3.0.0,>=2.5.0; extra == 'automotive'
78
+ Provides-Extra: dev
79
+ Requires-Dist: check-jsonschema<1.0.0,>=0.29.0; extra == 'dev'
80
+ Requires-Dist: hypothesis<7.0.0,>=6.0.0; extra == 'dev'
81
+ Requires-Dist: interrogate<2.0.0,>=1.7.0; extra == 'dev'
82
+ Requires-Dist: pytest-benchmark<6.0.0,>=4.0.0; extra == 'dev'
83
+ Requires-Dist: pytest-cov<8.0.0,>=6.0; extra == 'dev'
84
+ Requires-Dist: pytest-timeout<3.0.0,>=2.3.0; extra == 'dev'
85
+ Requires-Dist: pytest<10.0.0,>=8.0; extra == 'dev'
86
+ Requires-Dist: types-pyyaml<7.0.0,>=6.0; extra == 'dev'
87
+ Requires-Dist: yamllint<2.0.0,>=1.35; extra == 'dev'
88
+ Provides-Extra: fuzzy
89
+ Requires-Dist: rapidfuzz<4.0.0,>=3.0.0; extra == 'fuzzy'
90
+ Provides-Extra: hardware
91
+ Requires-Dist: pyvisa-py<1.0.0,>=0.7.0; extra == 'hardware'
92
+ Requires-Dist: pyvisa<2.0.0,>=1.13.0; extra == 'hardware'
93
+ Provides-Extra: hdf5
94
+ Requires-Dist: h5py<4.0.0,>=3.0.0; extra == 'hdf5'
95
+ Provides-Extra: jupyter
96
+ Requires-Dist: ipython<9.0.0,>=8.0.0; extra == 'jupyter'
97
+ Requires-Dist: jupyter<2.0.0,>=1.0.0; extra == 'jupyter'
98
+ Requires-Dist: nbconvert<8.0.0,>=7.0.0; extra == 'jupyter'
99
+ Provides-Extra: oscilloscopes
100
+ Requires-Dist: nptdms<2.0.0,>=1.7.0; extra == 'oscilloscopes'
101
+ Requires-Dist: rigolwfm<2.0.0,>=1.0.0; extra == 'oscilloscopes'
102
+ Provides-Extra: reporting
103
+ Requires-Dist: python-pptx<1.0.0,>=0.6.21; extra == 'reporting'
104
+ Requires-Dist: reportlab<6.0.0,>=4.4.7; extra == 'reporting'
105
+ Provides-Extra: routing
106
+ Requires-Dist: rapidfuzz<4.0.0,>=3.0.0; extra == 'routing'
107
+ Description-Content-Type: text/markdown
108
+
109
+ # Oscura
110
+
111
+ **Hardware Reverse Engineering Framework**
112
+
113
+ Extract complete system understanding from any signal source—oscilloscopes, logic analyzers, network captures, side-channel traces—through:
114
+
115
+ - Unknown protocol reverse engineering (physical layer detection, message format inference, field boundaries, CRC recovery)
116
+ - State machine extraction and protocol behavior analysis
117
+ - Side-channel cryptanalysis (power analysis, timing attacks, EM leakage)
118
+ - IEEE-compliant measurements and signal characterization
119
+
120
+ [![CI](https://github.com/oscura-re/oscura/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/oscura-re/oscura/actions/workflows/ci.yml)
121
+ [![Code Quality](https://github.com/oscura-re/oscura/actions/workflows/code-quality.yml/badge.svg?branch=main)](https://github.com/oscura-re/oscura/actions/workflows/code-quality.yml)
122
+ [![codecov](https://codecov.io/gh/oscura-re/oscura/graph/badge.svg)](https://codecov.io/gh/oscura-re/oscura)
123
+ [![PyPI version](https://img.shields.io/pypi/v/oscura)](https://pypi.org/project/oscura/)
124
+ [![Python 3.12+](https://img.shields.io/badge/python-3.12+-blue.svg)](https://www.python.org/downloads/)
125
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
126
+
127
+ ---
128
+
129
+ ## Vision
130
+
131
+ Hardware systems are obscured through proprietary protocols, undocumented interfaces, cryptographic obfuscation, and black-box designs. Whether imposed by vendors, governments, or time itself—**Oscura illuminates what others obscure.**
132
+
133
+ **Built For:**
134
+
135
+ - **Security researchers** analyzing embedded systems, IoT vulnerabilities, side-channel leakage
136
+ - **Hardware engineers** validating signal integrity, power supply design, EMC compliance
137
+ - **Protocol developers** testing implementations against IEEE standards
138
+ - **Automotive engineers** analyzing CAN/LIN/FlexRay for diagnostics and security research
139
+ - **Right-to-repair advocates** documenting and replicating undocumented interfaces
140
+ - **Academic researchers** studying signal processing, cryptanalysis, and hardware security
141
+ - **Vintage computing enthusiasts** preserving and analyzing retro hardware (1960s–present)
142
+ - **Defense and intelligence analysts** for forensics and threat assessment
143
+
144
+ **What We Enable:**
145
+
146
+ - **Protocol Reverse Engineering**: CRC recovery, message format inference, state machine extraction for security research, protocol development, right-to-repair documentation
147
+ - **Signal Intelligence**: Auto-classify unknown signals (digital/analog, periodicity, SNR) to guide reverse engineering strategy
148
+ - **Cryptographic Analysis**: Side-channel attacks (DPA/CPA, timing, mutual information) for vulnerability assessment and implementation validation
149
+ - **Automotive Reverse Engineering**: CAN/LIN/FlexRay analysis (differential, stimulus-response, hypothesis-driven discovery) for aftermarket, diagnostics, security research (no vendor lock-in)
150
+ - **Debug Interface Analysis**: JTAG/SWD/UART for firmware extraction, bootloader analysis, and development/recovery workflows
151
+ - **Binary Format Recovery**: 100+ magic bytes, structure alignment, auto-parser generation for right-to-repair and vulnerability research
152
+ - **Obsolete System Replication**: Logic family auto-detection (ECL/RTL/DTL/TTL, 1960s-present), IC timing validation, modern replacements for vintage hardware preservation
153
+ - **Evidence-Based Discovery**: Hypothesis tracking, statistical validation, confidence scoring, full audit trails for reproducible reverse engineering
154
+ - **Attack Surface Mapping**: State machine extraction, stimulus-response correlation, differential analysis for vulnerability discovery and exploitation
155
+ - **Intelligence Sharing**: Wireshark dissectors (validated Lua), DBC files, auto-generated parsers, multi-format reports (PDF/HTML/PPTX) for collaboration
156
+
157
+ ---
158
+
159
+ ## Installation
160
+
161
+ ```bash
162
+ # Production use
163
+ pip install oscura
164
+
165
+ # Development (recommended - includes quality tools)
166
+ git clone https://github.com/oscura-re/oscura.git
167
+ cd oscura
168
+ ./scripts/setup.sh
169
+ ```
170
+
171
+ **Requirements:** Python 3.12+ | [See pyproject.toml for dependencies](pyproject.toml)
172
+
173
+ ---
174
+
175
+ ## Quick Start
176
+
177
+ ### Decode Unknown Protocol in 5 Lines
178
+
179
+ ```python
180
+ import oscura as osc
181
+
182
+ # Load oscilloscope capture
183
+ trace = osc.load("mystery_device.wfm")
184
+
185
+ # Auto-detect and decode
186
+ decoder = osc.auto_detect_protocol(trace)
187
+ messages = decoder.decode(trace)
188
+ print(f"Decoded {len(messages)} {decoder.name} messages")
189
+ ```
190
+
191
+ ### Side-Channel Attack on AES
192
+
193
+ ```python
194
+ from oscura.loaders import load_chipwhisperer
195
+ from oscura.analyzers.side_channel import CPAAnalyzer
196
+
197
+ # Load power traces from ChipWhisperer capture
198
+ traces = load_chipwhisperer("aes_traces.npy")
199
+
200
+ # Correlation Power Analysis
201
+ cpa = CPAAnalyzer(leakage_model="hamming_weight", target_byte=0)
202
+ result = cpa.analyze(traces.traces, traces.plaintexts)
203
+
204
+ print(f"Key byte: 0x{result.key_guess:02X}")
205
+ print(f"Correlation: {result.max_correlation:.4f}")
206
+ print(f"Confidence: {'HIGH' if result.max_correlation > 0.8 else 'LOW'}")
207
+ ```
208
+
209
+ ### Black-Box Protocol Reverse Engineering
210
+
211
+ ```python
212
+ from oscura.sessions import BlackBoxSession
213
+
214
+ # Create analysis session
215
+ session = BlackBoxSession(name="IoT Device RE")
216
+
217
+ # Differential analysis: compare device states
218
+ session.add_recording("idle", "idle.bin")
219
+ session.add_recording("button_press", "button.bin")
220
+ diff = session.compare("idle", "button_press")
221
+
222
+ # Automatic field detection
223
+ spec = session.generate_protocol_spec()
224
+ print(f"Found {len(spec['fields'])} protocol fields")
225
+
226
+ # Export Wireshark dissector
227
+ session.export_results("dissector", "protocol.lua")
228
+ ```
229
+
230
+ ### Automotive CAN Bus Analysis
231
+
232
+ ```python
233
+ from oscura.automotive.can import CANSession
234
+
235
+ session = CANSession(name="Vehicle RE")
236
+ session.add_recording("idle", "idle.blf")
237
+ session.add_recording("accelerate", "accel.blf")
238
+
239
+ # Identify changed CAN IDs
240
+ diff = session.compare("idle", "accelerate")
241
+ print(f"Changed IDs: {diff.details['changed_ids']}")
242
+
243
+ # Export DBC file for further analysis
244
+ session.export_dbc("vehicle.dbc")
245
+ ```
246
+
247
+ **More examples:** [20 demo categories](demonstrations/) with 112 comprehensive demonstrations covering every capability
248
+
249
+ ---
250
+
251
+ ## Core Capabilities
252
+
253
+ ### Protocol Reverse Engineering & Development
254
+
255
+ | Capability | Use Cases (Development / Reverse Engineering) | Location |
256
+ | ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- |
257
+ | **CRC Recovery & Validation** | Checksum development validation / XOR differential technique recovers polynomial, init, xor_out, reflection flags from 4+ message-CRC pairs. Identifies 12+ standard algorithms or brute-forces custom CRCs for proprietary checksum breaking | [`inference/`](src/oscura/inference/) |
258
+ | **Message Format Inference** | Protocol documentation / IPART-style ensemble analysis (entropy, alignment, variance, distribution, n-grams) with confidence-scored field boundaries and automatic checksum/counter/timestamp detection | [`inference/`](src/oscura/inference/) |
259
+ | **State Machine Extraction** | Protocol testing with L\* active learning (systematic querying) and RPNI passive learning / Map authentication flows, command sequences, and hidden states for attack surface analysis with evidence-based hypothesis testing | [`inference/`](src/oscura/inference/) |
260
+ | **Binary Format Recovery** | Firmware documentation / Magic byte detection (100+ formats including executables, images, archives), structure alignment inference (1/2/4/8/16-byte), auto-generate Python parsers and YAML specs for proprietary file format analysis | [`inference/`](src/oscura/inference/) |
261
+ | **Signal Intelligence** | Automatic analysis guidance / Auto-classify digital vs analog signals, detect periodicity (autocorrelation + FFT), estimate SNR, recommend suitable measurement techniques for unknown signal sources | [`inference/`](src/oscura/inference/) |
262
+ | **Pattern Discovery** | Sync marker identification / Find repeating signatures, frame boundaries, magic bytes in raw captures (malware C2, IoT traffic, proprietary protocols) | [`analyzers/patterns/`](src/oscura/analyzers/patterns/) |
263
+ | **Physical Layer Detection** | PCB debugging / Auto-detect baud rates, clock frequencies, logic levels for unknown test points and debug interfaces on embedded devices | [`inference/`](src/oscura/inference/) |
264
+ | **Stream Reassembly** | Protocol validation / TCP/UDP stream reconstruction, framing detection, and packet boundary recovery from fragmented captures | [`inference/`](src/oscura/inference/) |
265
+ | **BlackBox Workflow** | End-to-end RE pipeline / Differential analysis → field hypothesis generation → state machine inference → multi-format export (Wireshark dissectors, DBC, parsers) with full evidence tracking and confidence scoring | [`sessions/`](src/oscura/sessions/) |
266
+
267
+ ### Cryptographic & Security Analysis
268
+
269
+ | Capability | Use Cases (Validation / Reverse Engineering) | Location |
270
+ | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- |
271
+ | **Power Analysis (DPA/CPA)** | Crypto implementation validation / Differential and Correlation Power Analysis for key extraction from smart cards, TPMs, secure enclaves with configurable leakage models (Hamming weight/distance) | [`analyzers/side_channel/`](src/oscura/analyzers/side_channel/) |
272
+ | **Timing Attack Analysis** | Constant-time validation / Statistical timing analysis with mutual information calculation (quantify leakage in bits), effect size measurement (Cohen's d), and outlier detection for vulnerability assessment | [`analyzers/side_channel/`](src/oscura/analyzers/side_channel/) |
273
+ | **ChipWhisperer Integration** | Educational side-channel labs / Direct integration for power/EM trace collection and analysis with standardized formats (.npy, .trs) | [`loaders/`](src/oscura/loaders/) |
274
+ | **Jitter Analysis (IEEE 2414)** | Clock quality validation / TIE, period jitter, RJ/DJ decomposition for detecting clock glitching, fault injection attacks, and timing manipulation | [`analyzers/jitter/`](src/oscura/analyzers/jitter/) |
275
+ | **Power Supply Analysis** | DC-DC converter design / Voltage rail characterization for identifying fault injection targets (brownout thresholds, transient response, ripple analysis) | [`analyzers/power/`](src/oscura/analyzers/power/) |
276
+
277
+ ### Protocol Decoding
278
+
279
+ | Category | Use Cases (Development / Reverse Engineering) | Protocols |
280
+ | -------------------- | ----------------------------------------------------------------------------- | --------------------------------------------- |
281
+ | **Serial** | Sensor development, device debugging / Debug console access, flash extraction | UART, SPI, I2C, 1-Wire, I2S, Manchester, HDLC |
282
+ | **Automotive** | Diagnostics, aftermarket dev / ECU security analysis, CAN injection testing | CAN, CAN-FD, LIN, FlexRay, J1939 |
283
+ | **Debug Interfaces** | Firmware development, recovery / Firmware extraction, bootloader analysis | JTAG (TAP state), SWD, USB |
284
+ | **Parallel Bus** | Vintage hardware restoration, instrument control / Industrial system security | IEEE-488 (GPIB), Centronics, ISA |
285
+
286
+ **Location:** [`analyzers/protocols/`](src/oscura/analyzers/protocols/) | [`automotive/`](src/oscura/automotive/)
287
+
288
+ **Auto-detection:** Baud rate recovery, clock extraction, logic level adaptation, confidence scoring
289
+
290
+ ### File Format Support
291
+
292
+ | Category | Formats | Location |
293
+ | ------------------- | --------------------------------------------- | ------------------------------------------------------- |
294
+ | **Oscilloscopes** | Tektronix (.wfm), Rigol (.wfm), LeCroy (.trc) | [`loaders/`](src/oscura/loaders/) |
295
+ | **Logic Analyzers** | Sigrok (.sr), VCD (Value Change Dump) | [`loaders/`](src/oscura/loaders/) |
296
+ | **Network** | PCAP, PCAPNG (Wireshark-compatible) | [`loaders/`](src/oscura/loaders/) |
297
+ | **Automotive** | Vector BLF/ASC, ASAM MDF/MF4, DBC, CSV | [`automotive/loaders/`](src/oscura/automotive/loaders/) |
298
+ | **Scientific** | TDMS (LabVIEW), HDF5, NumPy (.npz), WAV, CSV | [`loaders/`](src/oscura/loaders/) |
299
+ | **RF/Network** | Touchstone S-parameters (.s1p-.s8p) | [`loaders/`](src/oscura/loaders/) |
300
+ | **Side-Channel** | ChipWhisperer (.npy, .trs) | [`loaders/`](src/oscura/loaders/) |
301
+
302
+ **Memory-efficient:** Lazy loading, memory-mapped files, chunked processing for TB-scale datasets
303
+
304
+ ### Automotive Engineering & Security
305
+
306
+ | Capability | Use Cases (Development / Reverse Engineering) | Location |
307
+ | -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- |
308
+ | **Evidence-Based Discovery** | Protocol documentation / Hypothesis-driven CAN message field detection with statistical validation, confidence scoring, and evidence tracking for reproducible reverse engineering | [`automotive/can/`](src/oscura/automotive/can/) |
309
+ | **Stimulus-Response Mapping** | Input correlation analysis / Correlate user actions (button press, sensor input, vehicle events) to CAN message changes for attack surface identification and control message discovery | [`automotive/can/`](src/oscura/automotive/can/) |
310
+ | **CAN State Machine Extraction** | ECU behavior modeling / Extract protocol state machines from CAN traffic for security analysis and vulnerability discovery | [`automotive/can/`](src/oscura/automotive/can/) |
311
+ | **Pattern Recognition** | Signal validation / Auto-detect counters (rolling, wraparound), checksums (XOR, SUM, CRC), sensor encoding patterns in CAN messages | [`automotive/can/`](src/oscura/automotive/can/) |
312
+ | **Differential Analysis** | Signal validation / Compare CAN captures (idle vs accelerate, locked vs unlocked) to identify control messages and security-critical signals | [`automotive/can/`](src/oscura/automotive/can/) |
313
+ | **Discovery Persistence** | Collaboration / Save/load RE progress in .tkcan format with hypothesis tracking for team collaboration and long-term projects | [`automotive/can/`](src/oscura/automotive/can/) |
314
+ | **DBC Export** | Protocol documentation / Generate Vector DBC files from discoveries for integration with industry tools (CANalyzer, Wireshark, Vehicle Spy) | [`automotive/dbc/`](src/oscura/automotive/dbc/) |
315
+ | **J1939 Protocol** | Heavy vehicle diagnostics / Complete J1939 decoder for truck, construction, agricultural equipment security research (PGN, SPN, suspect/FMI decoding) | [`automotive/j1939/`](src/oscura/automotive/j1939/) |
316
+ | **OBD-II Diagnostics** | Diagnostics development / Complete OBD-II Mode 01-09 support for PIDs, freeze frames, DTCs, VIN extraction | [`automotive/obd/`](src/oscura/automotive/obd/) |
317
+ | **UDS Protocol** | Security testing / Complete Unified Diagnostic Services decoder for ECU programming, security access, routine control, and diagnostic command fuzzing | [`automotive/uds/`](src/oscura/automotive/uds/) |
318
+
319
+ ### IEEE-Compliant Measurements
320
+
321
+ | Standard | Measurements | Hardware Hacking Relevance |
322
+ | ---------------------- | -------------------------------------------------- | ---------------------------------------------------------- |
323
+ | **IEEE 181** (Pulse) | Rise/fall time, pulse width, overshoot, duty cycle | Signal integrity validation for protocol analysis |
324
+ | **IEEE 1241** (ADC) | SNR, SINAD, THD, SFDR, ENOB | ADC characterization for side-channel analysis |
325
+ | **IEEE 1459** (Power) | Active/reactive power, harmonics, power factor | Power supply analysis for fault injection targeting |
326
+ | **IEEE 2414** (Jitter) | TIE, period jitter, RJ/DJ decomposition, BER | Clock glitching attack detection, fault injection analysis |
327
+
328
+ **Location:** [`analyzers/waveform/`](src/oscura/analyzers/waveform/) | [`analyzers/spectral/`](src/oscura/analyzers/spectral/) | [`analyzers/power/`](src/oscura/analyzers/power/) | [`analyzers/jitter/`](src/oscura/analyzers/jitter/)
329
+
330
+ ### Hardware Acquisition
331
+
332
+ | Source | Description | Status | Location |
333
+ | ---------------- | ----------------------------------------------- | ----------- | ----------------------------------------- |
334
+ | **File-Based** | All supported file formats | ✅ Complete | [`loaders/`](src/oscura/loaders/) |
335
+ | **SocketCAN** | Linux CAN interfaces (vcan, physical CAN) | ✅ Complete | [`acquisition/`](src/oscura/acquisition/) |
336
+ | **Saleae Logic** | Direct Logic analyzer streaming | ✅ Complete | [`acquisition/`](src/oscura/acquisition/) |
337
+ | **PyVISA** | Oscilloscopes (Tektronix, Keysight, Rigol, R&S) | ✅ Complete | [`acquisition/`](src/oscura/acquisition/) |
338
+ | **Synthetic** | Programmable signal generation for testing | ✅ Complete | [`acquisition/`](src/oscura/acquisition/) |
339
+
340
+ ### Export & Intelligence Sharing
341
+
342
+ | Format | Hardware Hacking Use Case | Location |
343
+ | ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- |
344
+ | **Wireshark Dissectors** | Auto-generate validated Lua dissectors with ProtoField type mapping, variable-length field support, TCP/UDP port registration, and checksum validation for live traffic analysis and protocol documentation | [`export/wireshark/`](src/oscura/export/wireshark/) |
345
+ | **Binary Parsers** | Auto-generate Python parsers and YAML specifications from inferred binary formats for firmware analysis, file format documentation, and automated data extraction | [`inference/`](src/oscura/inference/) |
346
+ | **DBC Files** | Export CAN discoveries to Vector DBC format for integration with industry tools (CANalyzer, Vehicle Spy, Wireshark CAN plugins) | [`automotive/dbc/`](src/oscura/automotive/dbc/) |
347
+ | **Multi-Format Reports** | Generate comprehensive evidence reports in PDF, HTML, PPTX, and Markdown with charts, tables, hypothesis tracking, confidence scoring, and full audit trails for reproducible research | [`reporting/`](src/oscura/reporting/) |
348
+ | **Batch Processing** | Generate comparison reports for entire capture directories with statistical analysis, correlation matrices, and trend visualization | [`reporting/`](src/oscura/reporting/) |
349
+ | **Discovery Archives** | Save/load reverse engineering progress in structured .tkcan format (YAML-based) with hypothesis tracking, field candidates, and validation status for team collaboration | [`automotive/can/`](src/oscura/automotive/can/) |
350
+ | **WaveDrom Diagrams** | Generate publication-quality timing diagrams from protocol specifications for documentation, academic papers, and technical communication | [`export/`](src/oscura/export/) |
351
+ | **Vintage Logic Reports** | Specialized reports for retro computing with IC identification, timing validation, modern replacement recommendations, and restoration guidance | [`reporting/`](src/oscura/reporting/) |
352
+
353
+ ### Obsolete System Characterization & Replication
354
+
355
+ **For vintage computing restoration, industrial equipment repair, and hardware preservation (1960s-present)**
356
+
357
+ | Feature | Replication Use Case | Location |
358
+ | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- |
359
+ | **Logic Family Auto-Detection** | Identify unknown vintage chips by voltage levels: ECL (-1.75V), RTL (3.6V), DTL (5V), PMOS (-12V), NMOS (+12V), TTL variants, HC-CMOS, 4000-series for functional cloning without datasheets | [`analyzers/digital/`](src/oscura/analyzers/digital/) |
360
+ | **IC Timing Database** | Validate against 74xx series, 4000 series specifications (propagation delay, setup/hold times) for functional replication and modern FPGA/CPLD implementations | [`analyzers/digital/`](src/oscura/analyzers/digital/) |
361
+ | **IC Identification** | Match measured timing characteristics to specific ICs (7400, 74LS138, 74HC595, etc.) for part identification when markings are illegible or missing | [`analyzers/digital/`](src/oscura/analyzers/digital/) |
362
+ | **Modern Replacement Mapping** | Recommend current-production substitutes (74HC → 74LS, CD4000 → 74HC) for restoration projects when original parts are unavailable | [`analyzers/digital/`](src/oscura/analyzers/digital/) |
363
+ | **Open-Collector Detection** | Identify open-collector/open-drain outputs requiring pull-up resistors for accurate replication | [`analyzers/digital/`](src/oscura/analyzers/digital/) |
364
+ | **Protocol Preservation** | Extract and document undocumented legacy protocols (parallel buses, proprietary serial) for data recovery and system emulation | [`inference/`](src/oscura/inference/) |
365
+
366
+ ---
367
+
368
+ ## Learn By Example
369
+
370
+ **Demos are the documentation.** Each category includes working code with validation and comprehensive explanations.
371
+
372
+ ### Getting Started (Beginner)
373
+
374
+ | Demo | What You'll Learn |
375
+ | --------------------------------------------------- | ------------------------------------------------- |
376
+ | [01_waveform_analysis](demos/01_waveform_analysis/) | Load Tektronix/Rigol captures, basic measurements |
377
+ | [02_file_format_io](demos/02_file_format_io/) | CSV, HDF5, NumPy, custom binary formats |
378
+ | [04_serial_protocols](demos/04_serial_protocols/) | UART, SPI, I2C decoding with auto-detection |
379
+ | [05_protocol_decoding](demos/05_protocol_decoding/) | Protocol auto-detection pipeline |
380
+
381
+ ### Reverse Engineering (Intermediate)
382
+
383
+ | Demo | What You'll Learn |
384
+ | --------------------------------------------------------------------- | ----------------------------------------------------- |
385
+ | [07_protocol_inference](demos/07_protocol_inference/) | State machine learning, CRC recovery, field detection |
386
+ | [08_automotive_protocols](demos/08_automotive_protocols/) | CAN, CAN-FD, LIN, FlexRay analysis |
387
+ | [17_signal_reverse_engineering](demos/17_signal_reverse_engineering/) | Complete unknown signal analysis workflow |
388
+ | [18_advanced_inference](demos/18_advanced_inference/) | Bayesian inference, binary format DSL |
389
+
390
+ ### Security & Compliance (Advanced)
391
+
392
+ | Demo | What You'll Learn |
393
+ | ------------------------------------------------------- | -------------------------------------------------- |
394
+ | [12_spectral_compliance](demos/12_spectral_compliance/) | FFT, THD, SNR, SINAD (IEEE 1241) |
395
+ | [13_jitter_analysis](demos/13_jitter_analysis/) | TIE, RJ/DJ decomposition, eye diagrams (IEEE 2414) |
396
+ | [14_power_analysis](demos/14_power_analysis/) | DC-DC converter analysis, efficiency (IEEE 1459) |
397
+ | [15_signal_integrity](demos/15_signal_integrity/) | TDR, S-parameters, setup/hold timing |
398
+ | [16_emc_compliance](demos/16_emc_compliance/) | CISPR, FCC, MIL-STD electromagnetic compatibility |
399
+
400
+ ### Complete Workflows (Expert)
401
+
402
+ | Demo | What You'll Learn |
403
+ | ----------------------------------------------------- | ---------------------------------------- |
404
+ | [19_complete_workflows](demos/19_complete_workflows/) | End-to-end reverse engineering pipelines |
405
+
406
+ ### Run Your First Demo
407
+
408
+ ```bash
409
+ # Generate test data
410
+ python demos/generate_all_demo_data.py
411
+
412
+ # Run waveform analysis demo
413
+ python demos/01_waveform_analysis/comprehensive_wfm_analysis.py
414
+
415
+ # Run protocol inference demo
416
+ python demos/07_protocol_inference/01_state_machine_inference.py
417
+ ```
418
+
419
+ **Browse all demos:** [demos/](demos/) | [Demo index with descriptions](demos/README.md)
420
+
421
+ ---
422
+
423
+ ## Command Line Interface
424
+
425
+ ```bash
426
+ # Signal characterization
427
+ oscura characterize capture.wfm
428
+
429
+ # Protocol decoding
430
+ oscura decode uart_capture.wfm --protocol uart --baud 115200
431
+
432
+ # Batch processing
433
+ oscura batch '*.wfm' --analysis characterize
434
+
435
+ # Differential analysis
436
+ oscura compare baseline.wfm modified.wfm
437
+
438
+ # Interactive REPL
439
+ oscura shell
440
+
441
+ # Generate synthetic test signals
442
+ oscura generate --protocol spi --frequency 1MHz --output test.bin
443
+ ```
444
+
445
+ **Full reference:** [docs/cli.md](docs/cli.md)
446
+
447
+ ---
448
+
449
+ ## Quality & Testing
450
+
451
+ Comprehensive test suite with property-based testing, stress tests, and CI enforcement. Current metrics visible in [CI dashboard](https://github.com/oscura-re/oscura/actions) and [code coverage reports](https://codecov.io/gh/oscura-re/oscura).
452
+
453
+ ```bash
454
+ # Run test suite (uses pytest in parallel with coverage)
455
+ ./scripts/test.sh
456
+
457
+ # Quality checks (linting, type checking, formatting)
458
+ ./scripts/check.sh
459
+
460
+ # Auto-fix issues
461
+ ./scripts/fix.sh
462
+
463
+ # Full CI validation (pre-push)
464
+ ./scripts/pre-push.sh
465
+ ```
466
+
467
+ **Quality infrastructure:**
468
+
469
+ - Pre-commit hooks (format, lint, type check)
470
+ - Merge queue CI (prevents untested commits)
471
+ - Property-based testing (Hypothesis)
472
+ - Nightly stress tests
473
+ - Security scanning (Bandit, Safety)
474
+
475
+ **See:** [Testing architecture](docs/testing/) | [Quality gates](.github/workflows/)
476
+
477
+ ---
478
+
479
+ ## Contributing
480
+
481
+ **We need your expertise.** Whether you're adding a new protocol decoder, improving inference algorithms, or documenting use cases - every contribution illuminates more hardware.
482
+
483
+ ### Quick Start
484
+
485
+ ```bash
486
+ git clone https://github.com/oscura-re/oscura.git
487
+ cd oscura
488
+ ./scripts/setup.sh # Complete setup with hooks
489
+ ./scripts/test.sh # Verify environment
490
+ ```
491
+
492
+ ### What We Need
493
+
494
+ - **Protocol Decoders:** Proprietary protocols you've reverse engineered
495
+ - **File Format Loaders:** Oscilloscope/LA formats we don't support yet
496
+ - **Inference Algorithms:** Better state machine learning, field detection
497
+ - **Hardware Sources:** Integration with more DAQ systems
498
+ - **Documentation:** Real-world case studies and tutorials
499
+ - **Validation:** Test our tools on your captures
500
+
501
+ **Full guide:** [CONTRIBUTING.md](CONTRIBUTING.md) | [Architecture docs](docs/architecture/)
502
+
503
+ ---
504
+
505
+ ## Documentation
506
+
507
+ ### User Guides
508
+
509
+ - [Quick Start Guide](docs/guides/quick-start.md) - Installation and first steps
510
+ - [Black-Box Protocol Analysis](docs/guides/blackbox-analysis.md) - Unknown protocol RE
511
+ - [Side-Channel Analysis](docs/guides/side-channel-analysis.md) - DPA/CPA/timing attacks
512
+ - [Hardware Acquisition](docs/guides/hardware-acquisition.md) - Direct instrument control
513
+ - [Complete Workflows](docs/guides/workflows.md) - End-to-end analysis pipelines
514
+
515
+ ### API Reference
516
+
517
+ - [API Documentation](docs/api/) - Complete API reference
518
+ - [Session Management](docs/api/session-management.md) - Interactive analysis sessions
519
+ - [CLI Reference](docs/cli.md) - Command-line interface
520
+
521
+ ### Development
522
+
523
+ - [Architecture](docs/architecture/) - Design principles and patterns
524
+ - [Testing Guide](docs/testing/) - Test suite architecture
525
+ - [CHANGELOG](CHANGELOG.md) - Version history and migration guides
526
+
527
+ ---
528
+
529
+ ## Project Status
530
+
531
+ **Latest Release:** [See current version and release notes](https://github.com/oscura-re/oscura/releases/latest)
532
+
533
+ **Active Development Areas:**
534
+
535
+ - Side-channel analysis and cryptographic attack frameworks
536
+ - Vintage computing support (retro logic families, IC identification)
537
+ - Industrial and automotive protocol decoders
538
+ - Hardware acquisition from diverse sources
539
+ - Inference and machine learning for unknown protocols
540
+
541
+ **See:** [Full changelog](CHANGELOG.md) | [Roadmap discussions](https://github.com/oscura-re/oscura/discussions)
542
+
543
+ ---
544
+
545
+ ## Support
546
+
547
+ - **Issues:** [GitHub Issues](https://github.com/oscura-re/oscura/issues) - Bug reports and feature requests
548
+ - **Discussions:** [GitHub Discussions](https://github.com/oscura-re/oscura/discussions) - Questions and community
549
+ - **Security:** [SECURITY.md](SECURITY.md) - Responsible disclosure
550
+
551
+ ---
552
+
553
+ ## Citation
554
+
555
+ If Oscura helps your research, please cite:
556
+
557
+ ```bibtex
558
+ @software{oscura2026,
559
+ title = {Oscura: Hardware Reverse Engineering Framework},
560
+ author = {Oscura Contributors},
561
+ year = {2026},
562
+ url = {https://github.com/oscura-re/oscura},
563
+ version = {0.5.0}
564
+ }
565
+ ```
566
+
567
+ **Machine-readable:** [CITATION.cff](CITATION.cff)
568
+
569
+ ---
570
+
571
+ ## License
572
+
573
+ MIT License - [LICENSE](LICENSE)
574
+
575
+ **Built with:** Python, NumPy, SciPy, Hypothesis
576
+
577
+ **Standards:** IEEE 181/1241/1459/2414, ISO/IEC, CISPR
578
+
579
+ **Supported by:** Security researchers, right-to-repair advocates, open source community
580
+
581
+ ---
582
+
583
+ **Oscura** - _Illuminate what others obscure_