Skip to content

Commit

Permalink
add overlay for wmiexec-Pro
Browse files Browse the repository at this point in the history
  • Loading branch information
Mag1cByt3s committed Jan 3, 2025
1 parent b0f27bb commit 6399d09
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
3 changes: 3 additions & 0 deletions nixos/modules/nixpkgs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@

# username-anarchy-overlay
(import ../overlays/username-anarchy-overlay)

# wmiexec-Pro-overlay
(import ../overlays/wmiexec-Pro-overlay)
];
# Configure your nixpkgs instance
config = {
Expand Down
1 change: 1 addition & 0 deletions nixos/modules/packages/windows.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@
python312Packages.xlsxwriter
pyGPOAbuse
python312Packages.pypykatz
wmiexec-Pro
];
}
41 changes: 41 additions & 0 deletions nixos/overlays/wmiexec-Pro-overlay/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
self: super:

{
wmiexec-Pro = super.stdenv.mkDerivation rec {
pname = "wmiexec-Pro";
version = "unstable-2025-01-03"; # Use today's date as version

src = super.fetchFromGitHub {
owner = "XiaoliChan";
repo = "wmiexec-Pro";
rev = "6a12e5ec057cf0fa949da92b056d0f60af3d72c9"; # Replace with the specific commit hash if needed
sha256 = "sha256-tcBv6JhfkAthVoQ4wE9xYU3TdejdJ53gjLywBP1RGc0="; # Replace with the actual hash
};

meta = with super.lib; {
description = "New generation of wmiexec.py with AV evasion features";
homepage = "https://github.com/XiaoliChan/wmiexec-Pro";
license = licenses.gpl3; # Replace with the correct license if available
maintainers = with maintainers; [ lib.maintainers.Mag1cByt3s ];
};

buildInputs = [
(super.python3.withPackages (ps: with ps; [
impacket
numpy
]))
];

installPhase = ''
mkdir -p $out/bin
cp -r $src/* $out/bin/
# Add shebang line to make the script executable
sed -i '1s;^;#!/usr/bin/env python3\n;' $out/bin/wmiexec-pro.py
ln -s $out/bin/wmiexec-pro.py $out/bin/wmiexec-pro
ln -s $out/bin/wmiexec-pro.py $out/bin/wmiexec-Pro
chmod +x $out/bin/wmiexec-pro.py
chmod +x $out/bin/wmiexec-pro
chmod +x $out/bin/wmiexec-Pro
'';
};
}

0 comments on commit 6399d09

Please sign in to comment.