{"id":25925306,"url":"https://github.com/kickeddroid/bof_oxide","last_synced_at":"2026-06-22T19:31:49.398Z","repository":{"id":279318373,"uuid":"938424395","full_name":"KickedDroid/bof_oxide","owner":"KickedDroid","description":"A POC for developing BOFs for Sliver, Havoc, Cobalt Strike or most COFFLoaders in Rust.","archived":false,"fork":false,"pushed_at":"2025-08-24T18:34:34.000Z","size":105,"stargazers_count":33,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-28T18:20:20.874Z","etag":null,"topics":["bof","cobaltstrike","coff","coffloader","havoc2","rust","sliver"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KickedDroid.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-02-24T23:51:10.000Z","updated_at":"2025-08-27T17:26:02.000Z","dependencies_parsed_at":"2025-02-25T00:30:02.628Z","dependency_job_id":"05682edb-e1b2-4d99-b72a-2fa989877fe0","html_url":"https://github.com/KickedDroid/bof_oxide","commit_stats":null,"previous_names":["kickeddroid/bof_oxide"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/KickedDroid/bof_oxide","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KickedDroid%2Fbof_oxide","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KickedDroid%2Fbof_oxide/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KickedDroid%2Fbof_oxide/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KickedDroid%2Fbof_oxide/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KickedDroid","download_url":"https://codeload.github.com/KickedDroid/bof_oxide/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KickedDroid%2Fbof_oxide/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34663524,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-22T02:00:06.391Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bof","cobaltstrike","coff","coffloader","havoc2","rust","sliver"],"created_at":"2025-03-03T18:47:54.024Z","updated_at":"2026-06-22T19:31:49.392Z","avatar_url":"https://github.com/KickedDroid.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bof_oxide\n\nA POC or Template whatever for developing BOFs for Sliver, Havoc, Cobalt Strike or most COFFLoaders.\n\nGoals:\n- Less Volitile BOFs\n- Make Debugging BOFs less of a pain.\n- Better Error Handling\n\nThis project was fun but ran into limitations with what I wanted. I learned a lot of lessons of which I will write a post about soon. [Here](https://kickeddroid.github.io/2025/08/22/What-I-Learned-writing-a-bof-in-rust.html) Until then check out my repository [loadstar](https://github.com/KickedDroid/loadstar).\n\n### Build\n\nCreate objects directory \n```\nmkdir objects\n```\nRun justfile\n```\njust bof\n```\n\n# Usage Example\n\n```rust\npub fn rust_bof(mut beacon: Beacon) {\n    let str_arg = beacon.get_arg();\n    if str_arg.is_null() {\n        beacon.output(\"Please provide a str:\\\"arg\\\"\");\n    } else {\n        beacon.printf(\"Hello %s from rust bof\\0\", str_arg as *mut c_char);\n    }\n}\n```\nRunning the bof above with https://github.com/hakaioffsec/coffee\n\n```\n.\\coffee-gnu.exe --bof-path .\\test.o -- str:\"World\"\nHello World from rust-bof\n\n\n[+] Rust BOF Completed successfully\n```\n\n```\n# Terminate Gracefully\n.\\coffee-gnu.exe --bof-path .\\test.o --\n[!] Str_arg argument is required\n```\n\n\nRunning in Sliver\n\n![image](https://github.com/user-attachments/assets/b993d6e7-1914-40f8-9d1b-a8ec7f8bc6b9)\n\n\n### How it works\nThis is just a wrapper around the existing Beacon Fns provided. The difference is we pass the function pointers to a Rust wrapper.\n\n```\nC -\u003e Rust -\u003e BeaconApi\n```\nThe bof entry point is still `go` and it's still handled in C.\n\n```c\n// Extern Rust initialize fn\nextern void initialize(\n    void (*beacon_output)(int, const char*, int),\n    void (*beacon_format_alloc)(formatp*, int),\n    void (*beacon_format_free)(formatp*),\n    void (*beacon_printf)(int, const char * fmt, ...)\n);\n\nvoid go(char* args, int alen) {\n    // Pass the fn pointers to the rust wrapper\n    initialize(BeaconOutput, BeaconFormatAlloc, BeaconFormatFree, BeaconPrintf);\n}\n```\n\nThe rust intialize fn\n\n```rust\n// This is the Entrypoint for the Rust portion\n// Initialize and call rust_bof\n#[no_mangle]\npub extern \"C\" fn initialize(\n    beacon_output: BeaconOutputFn,\n    beacon_format_alloc: BeaconFormatAllocFn,\n    beacon_format_free: BeaconFormatFreeFn,\n    beacon_printf: BeaconPrintfFn,\n) {\n    // Pass the fn pointers to the Beacon wrapper\n    let mut beacon = Beacon::new(\n        beacon_output,\n        beacon_format_alloc,\n        beacon_format_free,\n        beacon_printf,\n    );\n\n    // Call rust_bof\n    rust_bof(\u0026mut beacon);\n}\n```\n\nStructure of BOF\n\n```\n➜  rust_bof git:(main) ✗ objdump -t bof_oxide.o\n\nbof_oxide.o:     file format pe-x86-64\n\nSYMBOL TABLE:\n[  0](sec  1)(fl 0x00)(ty    0)(scl   3) (nx 1) 0x0000000000000000 .text\nAUX scnlen 0x9b nreloc 3 nlnno 0 checksum 0x8f8752ca assoc 1 comdat 0\n[  2](sec  5)(fl 0x00)(ty    0)(scl   3) (nx 1) 0x0000000000000000 .xdata\nAUX scnlen 0xc nreloc 0 nlnno 0 checksum 0x7f2842f8 assoc 4 comdat 0\n[  4](sec  2)(fl 0x00)(ty    0)(scl   3) (nx 1) 0x0000000000000000 .rdata\nAUX scnlen 0x7d nreloc 0 nlnno 0 checksum 0x7fd708e1 assoc 5 comdat 0\n[  6](sec  4)(fl 0x00)(ty    0)(scl   3) (nx 1) 0x0000000000000000 .pdata\nAUX scnlen 0xc nreloc 3 nlnno 0 checksum 0x30cfafda assoc 7 comdat 0\n[  8](sec  1)(fl 0x00)(ty   20)(scl   2) (nx 0) 0x0000000000000000 initialize\n[  9](sec  1)(fl 0x00)(ty   20)(scl   2) (nx 1) 0x00000000000000a0 go\nAUX tagndx 0 ttlsiz 0x0 lnnos 0 next 0\n[ 11](sec  1)(fl 0x00)(ty    0)(scl   3) (nx 1) 0x00000000000000a0 .text\nAUX scnlen 0x40 nreloc 5 nlnno 0\n[ 13](sec  5)(fl 0x00)(ty    0)(scl   3) (nx 1) 0x000000000000000c .xdata\nAUX scnlen 0xc nreloc 0 nlnno 0\n[ 15](sec  4)(fl 0x00)(ty    0)(scl   3) (nx 1) 0x000000000000000c .pdata\nAUX scnlen 0xc nreloc 3 nlnno 0\n[ 17](sec  3)(fl 0x00)(ty    0)(scl   3) (nx 1) 0x0000000000000000 .rdata$zzz\nAUX scnlen 0x1d nreloc 0 nlnno 0\n[ 19](sec  0)(fl 0x00)(ty    0)(scl   2) (nx 0) 0x0000000000000000 __imp_BeaconOutput\n[ 20](sec  0)(fl 0x00)(ty    0)(scl   2) (nx 0) 0x0000000000000000 __imp_BeaconFormatFree\n[ 21](sec  0)(fl 0x00)(ty    0)(scl   2) (nx 0) 0x0000000000000000 __imp_BeaconPrintf\n[ 22](sec  0)(fl 0x00)(ty    0)(scl   2) (nx 0) 0x0000000000000000 __imp_BeaconFormatAlloc\n```\n---\n### References\n\nHeader file `beacon.h` from https://github.com/Cobalt-Strike/bof_template/blob/main/beacon.h\n\n\n### FAFO License\nThis is striclty for educational and research purposes. I'm not responsible for any use of this, by any means. Use at you're own risk and find out. NOTE: This probs will get you picked up immediately so good luck.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkickeddroid%2Fbof_oxide","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkickeddroid%2Fbof_oxide","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkickeddroid%2Fbof_oxide/lists"}