cryptocode

joined 2 years ago
MODERATOR OF
 

From the README:

Z-labs blog post - Running BOFs with 'bof-launcher' library

Introduction

Cobalt Strike 4.1 released on 25 June 2020, introduced a novel (for that time) capability of running so called Beacon Object Files - small post-ex capabilities that execute in Beacon, parse arguments, call a few Win32 APIs, report output, and exit. Since that time BOFs became very popular and the demand to launch/execute them in other environments than Cobalt Strike's Beacon has emerged.

Purpose

We at Z-Labs saw a big potential in BOFs and decided to extend its capabilities, versatility and usefulness even further. That's how this project came to live.

bof-launcher is an open-source library for loading, relocating and launching BOFs on Windows and UNIX/Linux systems. It's an alternative to Trustedsec's COFFLoader and ELFLoader with some very interesting features:

  • Fully compatibile with Cobalt Strike's Beacon. Can compile and run every BOF available at Cobalt Strike Community Kit and every other open-source BOF that adheres to generic BOF template.
  • Distributed as a fully standalone library with zero dependency (it does not even use libc).
  • Fully integrable with programs written in C/C++ and/or Zig progamming languages.
  • Adds capability to write BOFs in Zig programming language - which is a low-level langauge with a goal of being a "better C". All the features of the language and rich standard library can be used in BOFs (hash maps and other data structures, cross-platform OS layer, http, networking, threading, crypto and more).
  • Asynchronous BOF execution - capability to launch more time-consuming BOFs in a separate thread.
  • BOF process injection - capability to launch more risky BOFs (i.e. privilege escalation exploits) by injecting it to a new process.
  • Seamless support for either Windows COFF and UNIX/Linux ELF formats.
  • ARM and AARCH64 support on Linux.
  • Used in our cli4bofs tool that allows for running BOF files directly from a filesystem.
  • Very flexible and efficient API allowing for so called BOF chaining.
 

From the README:

A simple pretty printer for arbitrary data structures in Zig⚡️

Designed to inspect deeply-nested and recursive tree structures.

 

From the README:

zbind generates TypeScript bindings for calling Zig code compiled to native code or Wasm, in Node.js or Bun or browsers.

Example Zig code lib/main.zig:

const std = @import("std");
const zbind = @import("zbind");

pub fn hello(name: []const u8) void {
    std.debug.print("Hello, {s}!\n", .{ name });
}

pub fn main() void {}

comptime {
    zbind.init(@This());
}
 

FROM THE README:

zcached is a nimble and efficient in-memory caching system resembling databases like Redis. This README acts as a comprehensive guide, aiding in comprehension, setup, and optimal utilization.

zcached aims to offer rapid, in-memory caching akin to widely-used databases such as Redis. Its focus lies in user-friendliness, efficiency, and agility, making it suitable for various applications requiring swift data retrieval and storage.

Crafted using Zig, a versatile, modern, compiled programming language, zcached prides itself on a zero-dependency architecture. This unique feature enables seamless compilation and execution across systems equipped with a Zig compiler, ensuring exceptional portability and deployment ease.

 

Supports:

  • OpenGL 1.0 through 3.1
  • OpenGL 3.2 through 4.6 (Compatibility/Core profile)
  • OpenGL ES 1.1 (Common/Common-Lite profile)
  • OpenGL ES 2.0 through 3.2
  • OpenGL SC 2.0
 

Minimal Terraform HTTP backend in Zig

 

Server-side framework for Zig, relying heavily on dependency injection.

The code has been extracted from Ava PLS which has been using it for a few months already, and I'm using it in one other project which is going to production soon, so it's not just a toy, it actually works.

 

Zine is a static site generator written in Zig. Check out the linked Github page for examples and docs.

 

From the README:

bork

A TUI chat client tailored for livecoding on Twitch, currently in alpha stage.

Main features

  • Displays Twitch emotes in the terminal, including your own custom emotes!
  • Understands Twitch-specific concepts (subcriptions, gifted subs, ...).
  • Displays badges for your subs, mods, etc.
  • Supports clearing chat and deletes messages from banned users.
  • Click on a message to highlight it and let your viewers know who you're relpying to.
 

From the README:

jdz_allocator: A Zig General Purpose Memory Allocator

jdz_allocator is an original general purpose allocator inspired by Mattias Jansson's rpmalloc.

In its default configuration, it uses no global or threadlocal vars, making it compatible with Zig allocator design. This allows it to function without the need for any deinitThread calls while still achieving reasonable multi-threaded performance.

If multithreaded performance is essential, and cannot be handled appropriately through the use of multiple allocator instances, this allocator can be configured to use threadlocal arenas by setting global_allocator=true in the JdzAllocatorConfig. In this mode, make sure to call deinitThread before thread termination to free thread memory for re-use.

The global allocator is currently accessed through a JdzAllocator instance rather than the JdzAllocator type, which makes global global use inconvenient and error-prone - this will be addressed shortly.

Please note that this allocator is a work in progress, and has not yet been thoroughly tested. Usage and bug reports are appreciated and will help contribute to this allocator's completion.

Performance is also still being worked on, with a few obvious targets for improvement.

This allocator currently does not support page sizes larger than 64KiB.

 

Alpha-version of a new web framework and templating language.

Documentation here: https://www.jetzig.dev/documentation.html

 

From the video description:

When developing command line tools, handling user input via command line arguments is a crucial step. Zig offers a couple of args iterators in the standard library, depending on whether you're targeting Windows or not. In this episode we see how to use both, and as a bonus, we see a demonstration of using an ecosystem args parser called zig-clap.

view more: ‹ prev next ›