profile Hi! I'm 0x2a(wcampbell0x2a); Rust and C Software Engineer / Reverse Engineer. /> I'm a computer enthusiast who enjoys writing, reversing, and designing low-level systems software and infrastructure. You can find me in the following places: + github + mastodon + twitter + crates.io

Projects: deku

I co-maintain the deku project, which provides Rust Programming Lanuage declarative binary reading and writing: bit-level, symmetric, serialization/deserialization. This has nerd-sniped me into writing a bunch of libraries at work and in the public-domain using this library.

$ cargo add deku
use deku::prelude::*;

#[derive(Debug, PartialEq, DekuRead, DekuWrite)]
#[deku(endian = "big")]
struct DekuTest {
    #[deku(bits = 4)]
    field_a: u8,
    #[deku(bits = 4)]
    field_b: u8,
    field_c: u16,
}

let data: Vec<u8> = vec![0b0110_1001, 0xBE, 0xEF];
let (_rest, val) = DekuTest::from_bytes((data.as_ref(), 0))?;

backhand

Library and binaries for the reading, creating, and modification of SquashFS file systems

$ cargo add backhand
$ cargo install backhand-cli
use std::io::{Cursor, BufReader};
use backhand::{FilesystemReader, FilesystemWriter, NodeHeader};

let file = BufReader::new(File::open("file.squashfs")?);
let filesystem = FilesystemReader::from_reader(file)?;
let mut writer = FilesystemWriter::from_fs_reader(&filesystem)?;
writer.push_file(Cursor::new(b"data"), "path/file", NodeHeader::default());

income

Library and binaries for the reading of UBI images

$ cargo add income
$ income [IMAGE_PATH]

librarium

Library and binaries for the reading, creating, and modification of cpio archives

$ cargo add librarium
$ cargo install librarium-cli
use librarium::{ArchiveReader, NewcHeader};

let mut file = File::open("archive.cpio")?;
let mut archive = ArchiveReader::<NewcHeader>::from_reader_with_offset(&mut file, 0)?;
for object in &archive.objects.inner {
    archive.reader.extract_data(object, &mut out)?;
}

asterix-rs

Library for the parsing and generating of ASTERIX packets

$ cargo add asterix
use asterix::AsterixPacket;

let bytes = &[0x22, 0x00, 0x0b, 0xf0, 0x19, 0x0d, 0x02, 0x35, 0x6d, 0xfa, 0x60];
let (_, packet) = AsterixPacket::from_bytes((bytes, 0))?;

KubOS-Preservation-Group/ccsds-spacepacket

Implementation of the CCSDS Space Packet Primary Header in Rust

$ cargo add ccsds-spacepacket
use ccsds_spacepacket::PrimaryHeader;

let raw = b"\x00\x00\xc0\x00\x00\x40\xff\xff";
let (rest, parsed) = PrimaryHeader::from_bytes((raw, 0))?;

adsb_deku

See below

$ cargo add adsb_deku
use adsb_deku::Frame;

let bytes = hex!("8da2c1bd587ba2adb31799cb802b");
let frame = Frame::from_bytes(&bytes)?;

bintex

Create bytefield latex digrams with the use of rust proc-macros and deku

$ cargo add bintex
use bintex::BinTex;

#[derive(BinTex)]
#[bintex(bit_width = 32)]
struct Ipv6 {
    #[deku(bits = "4")]
    version: u8,
    length: u16,
}

unpublished/research only

! xz-deku - Library for reading XZ compression headers ! f12022-deku - Library for the parsing of PC f1 2022 UDP telemetry packets + tui ! rusty-chips - CHIP-8 emulator

Projects: rsadsb

Rust software suite for ADS-B demodulation, decoding, and processing.

+ homepage - Announcements, Overview, Blog, and Quick Start guide. See quickstart for more details and installation steps.

adsb_deku

Library and binaries for the parsing and generation of ADS-B packets and display of information

# Use as a library
$ cargo add adsb_deku

# Install TUI
$ cargo install --git https://github.com/rsadsb/adsb_deku rsadsb_apps --bin radar --locked

spotter

Rust ADS-B web server providing current information in JSON

dump1090_rs

Multi-SDR supported Rust translation of the popular dump1090 project for ADS-B demodulation

rsadsb-embedded

Experimental applications using the no_std feature of rsadsb/adsb_deku

FutureSDR

An Async SDR Runtime for Heterogeneous Architectures using my library

In The News

unpublished/research only

! elons-jets-rs - Notify when one of Elon Musk's jets flyover your own ADS-B receiver

Projects: other

heretek

GDB TUI Dashboard for the understanding of vast knowledge

  • No gdbserver requirements: Many vendors ship invalid `gdbserver` binaries, this works on remote targets with just `gdb`, `nc`, `cat`, and `mkfifo`.
  • No python requirements: Many vendors ship `gdb` without python support.
  • Architecture agnostic: `heretek` only uses information given by `gdb`, no extra code required!
$ cargo install heretek --locked

zerus

Lightweight binary to download only project required crates for offline crates.io mirror

$ cargo install zerus --locked

outsider

Test artifact changes locally from multiple projects that already use gitlab-art

$ cargo install outsider --locked

test-assets-ureq

Download test assets with ureq, managing them outside of git

$ cargo add test-assets-ureq
use test_assets_ureq::dl_test_files_backoff;

let parsed: TestAsset = toml::de::from_str(&file_content)?;
let assets = parsed.values();
dl_test_files_backoff(&assets, "test-assets", true, Duration::from_secs(1))?;

kokiri

Test revisions of crates again other revisions of crates

$ cargo install kokiri --locked

aftermath

Find-and-replace, commit, check, and push new changes to CI files for multiple projects

$ cargo install aftermath-bin --locked

statusbar

dwm statusbar, now in Rust!

$ cargo install statusbar --locked

assert_hex

Rust library to display assert panics in hexadecimal format

$ cargo add assert_hex
use assert_hex::assert_eq_hex;

let expected = vec![0x01, 0x02, 0x03];
let actual = vec![0x01, 0x02, 0x04];
assert_eq_hex!(expected, actual);

dbg_hex

Display dbg result in hexadecimal {:#x?} format

$ cargo add dbg_hex
use dbg_hex::dbg_hex;

dbg_hex!(0x16 + 0x16);
// Output: [src/lib.rs:38] 0x16 + 0x16 = 0x2c

privacy-log

rust-lang/log, but without file and line information

$ cargo add privacy-log
use privacy_log::{info, debug, error};

info!("Application started");
debug!("Debug message");
error!("Error message");

no-std-io2

std::io for no_std, used in deku

$ cargo add no-std-io2
use no_std_io2::io::Write;

// Works with any type implementing Write trait
serial.write_all(b"hello")?;

Projects: unpublished/research

! dotfiles - My linux dotfiles ! sorensen - Cursed Compression Algorithm ! cargo-decompile - [!] A cargo subcommand that displays ghidra function output through the use of the {rizin, radare2}-ghidra ! freestanding - Small freestanding ARM binary calling function already in memory ! karkinOS - Hobby OS and bootloader ! saleae-rs - rust library for interacting with saleae devices ! usb-notify - (C) USB device insert notifications using the linux udev,uevent and libnotify ! mint-cli - (Python) Display account net worth and current monthly budget in your terminal. Uses the python-mintapi

Projects: contributed

+ rust-lang/rust - A language empowering everyone to build reliable and efficient software + panamax-rs/pamanax - Mirror rustup and crates.io repositories, for offline Rust and cargo usage + Rust-For-Linux/linux - Adding support for the Rust language to the Linux kernel / linux kernel mailing list + genonullfree/teleporter - Simple application for sending files from Point A to Point B + ferrilab/bitvec - Crate for managing memory bit by bit + kevinmehall/rust-soapysdr - Rust bindings for SoapySDR, vendor-neutral software defined radio hardware abstraction layer and many others...

Ctfs

+ hackasat - solution for i_see_stars hackasat DEF CON 2020 CTF + dc30-badge-keygen - DEF CON 30 badge keygen

Github Member organizations

a proud member of the blue team of 512KB club