Skip to content

Commit d079ac6

Browse files
author
RTOSploit
committed
chore: remove Rust dependency — tool is pure Python
- Remove Rust lint and test jobs from CI (were failing) - Remove maturin from dev dependencies - Remove Rust fuzzer section from installation docs - Simplify Dockerfile to single-stage Python install - Update architecture docs to reflect QEMU + Unicorn (no Rust) - Fix license classifier in pyproject.toml (Apache-2.0) - Add pytest-timeout to dev dependencies The Rust crates (rtosploit-fuzzer, rtosploit-svd, rtosploit-payloads) remain in the repo but are not built, tested, or required. The Python Unicorn fuzzer at 700+ exec/sec replaced the Rust fuzzer.
1 parent 6c48112 commit d079ac6

7 files changed

Lines changed: 13 additions & 116 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,30 +7,6 @@ on:
77
branches: [main]
88

99
jobs:
10-
lint-rust:
11-
name: Rust Lint
12-
runs-on: ubuntu-latest
13-
steps:
14-
- uses: actions/checkout@v4
15-
- uses: dtolnay/rust-toolchain@stable
16-
with:
17-
components: rustfmt, clippy
18-
- name: Check formatting
19-
run: cargo fmt --all -- --check
20-
- name: Clippy
21-
run: cargo clippy --workspace -- -D warnings
22-
23-
test-rust:
24-
name: Rust Tests
25-
runs-on: ubuntu-latest
26-
steps:
27-
- uses: actions/checkout@v4
28-
- uses: dtolnay/rust-toolchain@stable
29-
- name: Build workspace
30-
run: cargo build --workspace
31-
- name: Test workspace
32-
run: cargo test --workspace
33-
3410
lint-python:
3511
name: Python Lint
3612
runs-on: ubuntu-latest

CONTRIBUTING.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,11 @@ pytest tests/unit/test_cve.py -v # CVE correlation
2929
pytest tests/unit/test_coverage_viz.py -v # Coverage viz
3030
pytest tests/unit/test_ci_pipeline.py -v # CI pipeline
3131

32-
# Rust tests
33-
cargo test --workspace
3432
```
3533

3634
## Code Style
3735

38-
- Python: follow PEP 8, use type hints, `from __future__ import annotations`
39-
- Rust: use `cargo fmt` and `cargo clippy`
36+
- Follow PEP 8, use type hints, `from __future__ import annotations`
4037
- Keep imports sorted (stdlib, third-party, local)
4138

4239
## Adding Vulnerability Scanner Modules

Dockerfile

Lines changed: 3 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,7 @@
1-
# ── Stage 1: Builder ─────────────────────────────────────────────
2-
FROM ubuntu:24.04 AS builder
3-
4-
ENV DEBIAN_FRONTEND=noninteractive
5-
ENV PATH="/root/.cargo/bin:$PATH"
6-
7-
RUN apt-get update && apt-get install -y --no-install-recommends \
8-
python3.12 \
9-
python3.12-dev \
10-
python3-pip \
11-
build-essential \
12-
curl \
13-
pkg-config \
14-
&& rm -rf /var/lib/apt/lists/*
15-
16-
# Install Rust toolchain
17-
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
18-
19-
WORKDIR /rtosploit
20-
COPY . .
21-
22-
# Build Python package
23-
RUN pip3 install --break-system-packages -e .
24-
25-
# Build Rust crates (release)
26-
RUN cargo build --release
27-
28-
# ── Stage 2: Runtime ────────────────────────────────────────────
291
FROM ubuntu:24.04
302

313
LABEL description="RTOSploit — RTOS Exploitation & Bare-Metal Fuzzing Framework"
32-
LABEL version="2.5.1"
4+
LABEL version="2.6.0"
335

346
ENV DEBIAN_FRONTEND=noninteractive
357

@@ -42,22 +14,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
4214
&& rm -rf /var/lib/apt/lists/*
4315

4416
WORKDIR /rtosploit
17+
COPY . .
4518

46-
# Copy Python site-packages (installed dependencies + rtosploit egg-link)
47-
COPY --from=builder /usr/lib/python3/dist-packages /usr/lib/python3/dist-packages
48-
COPY --from=builder /usr/local/lib/python3.12/dist-packages /usr/local/lib/python3.12/dist-packages
49-
COPY --from=builder /usr/local/bin/rtosploit /usr/local/bin/rtosploit
50-
51-
# Copy Rust release binaries
52-
COPY --from=builder /rtosploit/target/release/svd-gen /usr/local/bin/svd-gen
53-
54-
# Copy project source, configs, and bundled firmware
55-
COPY rtosploit/ ./rtosploit/
56-
COPY configs/ ./configs/
57-
COPY vulnrange/ ./vulnrange/
58-
COPY pyproject.toml ./
19+
RUN pip3 install --break-system-packages -e . unicorn
5920

60-
# Expose GDB stub and serial/UART ports
6121
EXPOSE 1234 4444
6222

6323
ENTRYPOINT ["rtosploit"]

docs/architecture.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Architecture
22

3-
RTOSploit is organized as a layered Python package with an optional native Rust component for performance-critical fuzzing. The system is designed around three entry points — interactive mode, CLI subcommands, and a programmatic Python API — all sharing the same core analysis and emulation engine.
3+
RTOSploit is a Python package with two emulation engines (QEMU for interactive debugging, Unicorn for high-speed fuzzing). The system is designed around three entry points — interactive mode, CLI subcommands, and a programmatic Python API — all sharing the same core analysis and emulation engine.
44

55
---
66

@@ -182,7 +182,7 @@ sequenceDiagram
182182
ci->>qemu: QEMUInstance.start(firmware, machine)
183183
qemu-->>ci: QEMU process running
184184
185-
ci->>fuzzer: launch rtosploit-fuzzer (or simulation)
185+
ci->>fuzzer: launch FuzzEngine (QEMU or Unicorn)
186186
fuzzer-->>ci: crash JSON files + coverage bitmap
187187
188188
ci->>qemu: QEMUInstance.stop()
@@ -298,7 +298,7 @@ flowchart TB
298298
subgraph Fuzzer["Fuzzing Layer"]
299299
harness["QEMU Harness\nqemu-system-arm -M mps2-an385"]
300300
bitmap["AFL Coverage Bitmap\n64KB shared memory"]
301-
mutation["Mutation Engine\nrtosploit-fuzzer (Rust)\nor simulation mode"]
301+
mutation["Mutation Engine\nUnicorn PIP or QEMU snapshot"]
302302
corpus["Corpus Manager\nseeds → interesting inputs"]
303303
crashes["Crash Collector\nJSON: registers, PC, fault addr"]
304304
end

docs/installation.md

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -95,31 +95,15 @@ If you see a version below 9.0, RTOSploit will print an error and refuse to star
9595

9696
---
9797

98-
## Native Rust Fuzzer (Optional)
98+
## Optional: Unicorn Engine
9999

100-
Without the native fuzzer, RTOSploit runs in **simulation mode** — the dashboard and full pipeline work, but coverage is not driven by real mutation. Simulation mode is useful for:
101-
- Testing the pipeline and report generation
102-
- Demonstrating the interactive dashboard
103-
- CI dry-runs without fuzzing infrastructure
104-
105-
To build the real fuzzer:
106-
107-
### Prerequisites
108-
109-
```bash
110-
# Install Rust toolchain
111-
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
112-
source ~/.cargo/env
113-
```
114-
115-
### Build
100+
For high-speed fuzzing of real hardware firmware (no QEMU machine required):
116101

117102
```bash
118-
cd rtosploit # project root (contains Cargo.toml)
119-
cargo build --release -p rtosploit-fuzzer
103+
pip install unicorn
120104
```
121105

122-
The built binary is automatically detected when it is in `PATH` or in the Cargo output directory. RTOSploit checks for `rtosploit-fuzzer` at fuzz startup and falls back to simulation if not found.
106+
This enables the `--engine unicorn` option on `fuzz` and `rehost` commands, providing ~700 exec/sec with Peripheral Input Playback (PIP).
123107

124108
---
125109

pyproject.toml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ keywords = ["security", "fuzzing", "embedded", "rtos"]
1616
classifiers = [
1717
"Development Status :: 3 - Alpha",
1818
"Intended Audience :: Information Technology",
19-
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
19+
"License :: OSI Approved :: Apache Software License",
2020
"Programming Language :: Python :: 3",
2121
"Programming Language :: Python :: 3.10",
2222
"Programming Language :: Python :: 3.11",
@@ -39,10 +39,9 @@ dependencies = [
3939
dev = [
4040
"pytest>=7.0",
4141
"pytest-cov",
42+
"pytest-timeout",
4243
"mypy",
4344
"ruff",
44-
"black",
45-
"maturin>=1.0",
4645
]
4746

4847
[project.scripts]
@@ -56,16 +55,6 @@ Repository = "https://github.com/Indspl0it/RTOSploit"
5655
path = "VERSION"
5756
pattern = "(?P<version>.+)"
5857

59-
# Maturin configuration for building optional Rust/PyO3 extensions.
60-
# The default build backend remains Hatchling (pure-Python). Use Maturin
61-
# when you need to compile the Rust native module (rtosploit._native):
62-
# maturin develop --release
63-
[tool.maturin]
64-
features = ["pyo3/extension-module"]
65-
python-source = "."
66-
module-name = "rtosploit._native"
67-
manifest-path = "Cargo.toml"
68-
6958
[tool.ruff]
7059
line-length = 100
7160
target-version = "py310"

tests/unit/test_docs.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,6 @@ def test_package_version_importable(self):
6464
def test_package_exports_key_modules(self):
6565
pass
6666

67-
def test_cargo_toml_exists(self):
68-
assert Path("Cargo.toml").exists()
69-
70-
def test_cargo_workspace_members(self):
71-
content = Path("Cargo.toml").read_text()
72-
assert "rtosploit-fuzzer" in content
73-
assert "rtosploit-svd" in content
74-
assert "rtosploit-payloads" in content
75-
7667
def test_license_file_exists(self):
7768
assert Path("LICENSE").exists()
7869

0 commit comments

Comments
 (0)