# Funkyenv: mix your binaries up

**URL:** https://discourse.nixos.org/t/funkyenv-mix-your-binaries-up/80679
**Category:** Links
**Created:** [October 22, 2026, 7:14am UTC](https://discourse.nixos.org/t/funkyenv-mix-your-binaries-up/80679 "2026-10-22T07:14:09Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![numinit](https://discourse.nixos.org/user_avatar/discourse.nixos.org/numinit/32/2313_2.png) [@numinit](https://discourse.nixos.org/u/numinit)
#### Post date: [October 22, 2026, 7:14am UTC](https://discourse.nixos.org/t/funkyenv-mix-your-binaries-up/80679/1 "2026-10-22T07:14:09Z")

</div>

> _Four, four, the point’s marked four_
> 
> _Ace, Deuce, craps wants four_
> 
> - [Funky Dealer](https://www.youtube.com/watch?v=CwE2k0HMDfo) from Jet Set Radio Future

> **[GitHub - NixVegas/funkyenv: 🎲 Mix your binaries up so people can't exploit...](https://github.com/NixVegas/funkyenv)**
>
> 🎲 Mix your binaries up so people can't exploit your PHP install as easily

If you don’t want people guessing the function layout in your version of PHP or its extensions for some reason, mold has you covered 🤝. Just use funkyenv and set a seed for your binaries. A `ld.lld` version is also included for things like glibc.

funkyenv compiles 32 tiny stub functions (that all just `return $x`) into the final binary so it can verify they were shuffled afterwards. The overhead is only a couple hundred bytes and loss of spatial locality. A passthru is also included that exports the function layout so you can diff it against the original.

```nix
php =
  let
    callPackage = pkgs.newScope {
      # oh my god please do not use this seed
      stdenv = pkgs.funkyenv.seed 4;
      inherit callPackage;
    };
  in
  (callPackage (pkgs.path + "/pkgs/development/interpreters/php") { }).php85;

```

---

<div class="post-metadata">

### Author: ![numinit](https://discourse.nixos.org/user_avatar/discourse.nixos.org/numinit/32/2313_2.png) [@numinit](https://discourse.nixos.org/u/numinit)
#### Post date: [October 23, 2026, 6:36am UTC](https://discourse.nixos.org/t/funkyenv-mix-your-binaries-up/80679/2 "2026-10-23T06:36:14Z")

</div>

Update: Firefox works, and there’s an example (and test) for openssh too. Get funky and scramble all your binaries 😁
