diff --git a/README.md b/README.md index 8735866..298b558 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ This repo holds a nix-channel with some packages I need but don't want to maintain. -Packages: +Notable packages: +- [memprocfs](./pkgs/memprocfs/README.md) +- [pcileech](./pkgs/pcileech/README.md) - [tweego](./pkgs/tweego/README.md) - [sugarcube](./pkgs/sugarcube/README.md) diff --git a/default.nix b/default.nix index 9de08e4..cfabc62 100644 --- a/default.nix +++ b/default.nix @@ -6,6 +6,9 @@ let callPackage = pkgs.lib.callPackageWith (pkgs // self); self = { + leechcore = callPackage ./pkgs/leechcore/package.nix {}; + memprocfs = callPackage ./pkgs/memprocfs/package.nix {}; + pcileech = callPackage ./pkgs/pcileech/package.nix {}; sugarcube = callPackage ./pkgs/sugarcube/package.nix {}; tweego = callPackage ./pkgs/tweego/package.nix {}; }; diff --git a/pkgs/leechcore/README.md b/pkgs/leechcore/README.md new file mode 100644 index 0000000..e834c69 --- /dev/null +++ b/pkgs/leechcore/README.md @@ -0,0 +1,6 @@ +# LeechCore + +- Source repository: [ufrisk/LeechCore](https://github.com/ufrisk/LeechCore) + +## Outputs +- `lib/leechcore.so` diff --git a/pkgs/leechcore/package.nix b/pkgs/leechcore/package.nix new file mode 100644 index 0000000..bfc8a69 --- /dev/null +++ b/pkgs/leechcore/package.nix @@ -0,0 +1,35 @@ +{ pkgs ? import {} }: + +with pkgs; + +stdenv.mkDerivation rec { + pname = "leechcore"; + version = "2.18.7"; + + src = fetchFromGitHub { + owner = "ufrisk"; + repo = "leechcore"; + rev = "3eff4c5b079e8aaff9d5392bc698de7cb4a05b5d"; # v2.18.7 + hash = "sha256-60yQmx3ZcjaWgUzA1l+F3frPAyrJcr2ihf/zKXWz+t0="; + }; + # sourceRoot = "${src.name}/leechcore"; + + nativeBuildInputs = [ + pkg-config + libusb1 + ]; + + installPhase = '' + cd leechcore + make + mkdir -p $out/lib/ + cp ../files/leechcore.so $out/lib/ + ''; + + meta = with lib; { + description = "LeechCore - Physical Memory Acquisition Library & The LeechAgent Remote Memory Acquisition Agent"; + homepage = "https://github.com/ufrisk/leechcore"; + license = licenses.gpl3; + maintainers = []; + }; +} diff --git a/pkgs/memprocfs/README.md b/pkgs/memprocfs/README.md new file mode 100644 index 0000000..3909810 --- /dev/null +++ b/pkgs/memprocfs/README.md @@ -0,0 +1,9 @@ +# MemProcFS + +- Source repository: [ufrisk/MemProcFS](https://github.com/ufrisk/MemProcFS) + +## Outputs +- `bin/memprocfs` +- `lib/leechcore.so` (from `leechcore`) +- `lib/vmm.so` +- `lib/vmmpyc.so` diff --git a/pkgs/memprocfs/package.nix b/pkgs/memprocfs/package.nix new file mode 100644 index 0000000..4c8e4db --- /dev/null +++ b/pkgs/memprocfs/package.nix @@ -0,0 +1,49 @@ +{ pkgs ? import {} +, leechcore +}: + +with pkgs; + +stdenv.mkDerivation rec { + pname = "memprocfs"; + version = "5.11.4"; + + src = fetchFromGitHub { + owner = "ufrisk"; + repo = "memprocfs"; + rev = "5a50667933c87f542e9bd34f7d438b8603e29bc0"; # v5.11.4 + hash = "sha256-1Pwql4yzV+hLPy1/tc2vhj/GE/LS0Lda/1Eq9eJslHI="; + }; + # sourceRoot = "${src.name}/memprocfs"; + + nativeBuildInputs = [ + pkg-config + lz4 + fuse + python3 + ]; + + installPhase = '' + cp ${leechcore}/lib/leechcore.so ./files/ + cd vmm + make + cd ../memprocfs + make + cd ../vmmpyc + make + + mkdir -p $out/lib/ + cp ../files/leechcore.so $out/lib/ + cp ../files/vmm.so $out/lib/ + cp ../files/vmmpyc.so $out/lib/ + mkdir -p $out/bin + cp ../files/memprocfs $out/bin + ''; + + meta = with lib; { + description = "MemProcFS"; + homepage = "https://github.com/ufrisk/memprocfs"; + license = licenses.agpl3Only; + maintainers = []; + }; +} diff --git a/pkgs/pcileech/README.md b/pkgs/pcileech/README.md new file mode 100644 index 0000000..408bccd --- /dev/null +++ b/pkgs/pcileech/README.md @@ -0,0 +1,8 @@ +# PCILeech + +- Source repository: [ufrisk/pcileech](https://github.com/ufrisk/pcileech) + +## Outputs +- `bin/pcileech` +- `lib/leechcore.so` (from `leechcore`) +- `lib/vmm.so` (from `memprocfs`) diff --git a/pkgs/pcileech/package.nix b/pkgs/pcileech/package.nix new file mode 100644 index 0000000..eefdc31 --- /dev/null +++ b/pkgs/pcileech/package.nix @@ -0,0 +1,42 @@ +{ pkgs ? import {} +, memprocfs +}: + +with pkgs; + +stdenv.mkDerivation rec { + pname = "pcileech"; + version = "4.18"; + + src = fetchFromGitHub { + owner = "ufrisk"; + repo = "pcileech"; + rev = "v4.18"; + hash = "sha256-CE3bxMsnKi+ckoih7NxKO/gykhX9QAjB18yVhkfi0cU="; + }; + + nativeBuildInputs = [ + fuse + ]; + + installPhase = '' + cp ${memprocfs}/lib/leechcore.so ./files/ + cp ${memprocfs}/lib/vmm.so ./files/ + + cd pcileech + make + + mkdir -p $out/lib/ + cp ../files/leechcore.so $out/lib/ + cp ../files/vmm.so $out/lib/ + mkdir -p $out/bin/ + cp ../files/pcileech $out/bin/ + ''; + + meta = with lib; { + description = "Direct Memory Access (DMA) Attack Software"; + homepage = "https://github.com/ufrisk/pcileech"; + license = licenses.agpl3Only; + maintainers = []; + }; +}