Cyber security

Lucid – Revolutionizing Fuzzing Through Bochs Emulation Technology

Lucid is an educational fuzzing project which aims to create a Bochs emulator based snapshot fuzzer capable of fuzzing traditionally hard to fuzz targets such as kernels and browsers.

Lucid is based on a fuzzer originally conceived of and developed by Brandon Falk.

Lucid utilizes changes to Musl in order to affect Bochs’ behavior and achieve a functional sandbox that will allow Lucid to run Bochs within its virtual address space without being able to interact directly with the operating system.

The goal of the sandbox is to achieve determinism.

Under Development

Lucid is currently in the early stages of development and can load and run a -static-pie test program as well as Bochs itself.

Lucid is also capable of sandboxing the test program from syscalls and access to thread-local-storage. More sandboxing work is required.

You can catch up on development efforts on the blog detailing each development step: The current codebase is more current than the latest blogpost.

Build

Rust

Building the Rust portions of the project is very straightfoward, you should just be able to:

git clone https://github.com/h0mbre/Lucid

cd Lucid

cargo build --release

Musl

Lucid requires Musl libc 1.2.4, modified with Lucid-specific patches. Download and extract Musl:

tar -xzf musl-1.2.4.tar.gz

Apply Lucid patches to Musl:

cd path/to/musl-1.2.4

patch -p1 < path/to/musl_patches/musl.patch

Build and install the customized Musl:

./configure

make

sudo make install

Test Application

Confirm that Musl is now installed at /usr/local/musl, then you can:

gcc --specs=/path/to/musl_specs/musl-gcc.specs test.c -o test -g --static-pie

Usage

./lucid --bochs-image /path/to/test (--bochs-args)

Expected Output

lucid· Bochs image path: 'test'
lucid· Loading Bochs...
lucid· Bochs mapping: 0x10000 - 0x18000
lucid· Bochs mapping size: 0x8000
lucid· Bochs stack: 0x7F906B7FD000
lucid· Bochs entry: 0x11058
lucid· Creating Bochs execution context...
lucid· Starting Bochs...
       Argument count: 1
       Args:
          -./bochs
       Test alive!
       Test alive!
       Test alive!
       Test alive!
       Test alive!
       g_lucid_ctx: 0x55a26ef9fce0
fatal: Bochs exited early

Tamil S

Tamil has a great interest in the fields of Cyber Security, OSINT, and CTF projects. Currently, he is deeply involved in researching and publishing various security tools with Kali Linux Tutorials, which is quite fascinating.

Recent Posts

Shadow-rs : Harnessing Rust’s Power For Kernel-Level Security Research

shadow-rs is a Windows kernel rootkit written in Rust, demonstrating advanced techniques for kernel manipulation…

1 week ago

ExecutePeFromPngViaLNK – Advanced Execution Of Embedded PE Files via PNG And LNK

Extract and execute a PE embedded within a PNG file using an LNK file. The…

2 weeks ago

Red Team Certification – A Comprehensive Guide To Advancing In Cybersecurity Operations

Embark on the journey of becoming a certified Red Team professional with our definitive guide.…

3 weeks ago

CVE-2024-5836 / CVE-2024-6778 : Chromium Sandbox Escape via Extension Exploits

This repository contains proof of concept exploits for CVE-2024-5836 and CVE-2024-6778, which are vulnerabilities within…

3 weeks ago

Rust BOFs – Unlocking New Potentials In Cobalt Strike

This took me like 4 days (+2 days for an update), but I got it…

3 weeks ago

MaLDAPtive – Pioneering LDAP SearchFilter Parsing And Security Framework

MaLDAPtive is a framework for LDAP SearchFilter parsing, obfuscation, deobfuscation and detection. Its foundation is…

3 weeks ago