Merge pull request #177007 from fabaff/crackmapexec

crackmapexec: init at 5.2.2
This commit is contained in:
Fabian Affolter 2022-06-11 10:33:25 +02:00 committed by GitHub
commit 5615834be4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 319 additions and 4 deletions

View file

@ -6,7 +6,7 @@
}:
buildPythonPackage rec {
pname = "neo4j-driver";
pname = "neo4j";
version = "4.4.4";
format = "setuptools";
@ -16,7 +16,7 @@ buildPythonPackage rec {
owner = "neo4j";
repo = "neo4j-python-driver";
rev = version;
sha256 = "sha256-Sd+ZeyJCzqGsBl3rdxfKPD0gYZ49qAfiRbuXaNGpj8M=";
hash = "sha256-Sd+ZeyJCzqGsBl3rdxfKPD0gYZ49qAfiRbuXaNGpj8M=";
};
propagatedBuildInputs = [

View file

@ -0,0 +1,44 @@
{ lib
, buildPythonPackage
, cryptography
, fetchFromGitHub
, pytestCheckHook
, pythonOlder
, xmldiff
}:
buildPythonPackage rec {
pname = "psrpcore";
version = "0.1.2";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "jborean93";
repo = pname;
rev = "v${version}";
hash = "sha256-f1NGE+wSgi8yqBicZZRfUqzinsqazuIaoAje2y+dK1w=";
};
propagatedBuildInputs = [
cryptography
];
checkInputs = [
pytestCheckHook
xmldiff
];
pythonImportsCheck = [
"psrpcore"
];
meta = with lib; {
description = "Library for the PowerShell Remoting Protocol (PSRP)";
homepage = "https://github.com/jborean93/psrpcore";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}

View file

@ -0,0 +1,79 @@
{ lib
, asyncssh
, buildPythonPackage
, cryptography
, fetchFromGitHub
, gssapi
, httpcore
, httpx
, krb5
, psrpcore
, psutil
, pyspnego
, pytest-mock
, pytestCheckHook
, pythonOlder
, pyyaml
, requests
, requests-credssp
, xmldiff
}:
buildPythonPackage rec {
pname = "pypsrp";
version = "0.8.1";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "jborean93";
repo = pname;
rev = "v${version}";
hash = "sha256-Pwfc9e39sYPdcHN1cZtxxGEglEYzPp4yOYLD5/4SSiU=";
};
propagatedBuildInputs = [
cryptography
httpcore
httpx
psrpcore
pyspnego
requests
];
checkInputs = [
pytest-mock
pytestCheckHook
pyyaml
xmldiff
];
passthru.optional-dependencies = {
credssp = [
requests-credssp
];
kerberos = [
# pyspnego[kerberos] will have those two dependencies
gssapi
krb5
];
named_pipe = [
psutil
];
ssh = [
asyncssh
];
};
pythonImportsCheck = [
"pypsrp"
];
meta = with lib; {
description = "PowerShell Remoting Protocol Client library";
homepage = "https://github.com/jborean93/pypsrp";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}

View file

@ -0,0 +1,55 @@
{ lib
, beautifulsoup4
, buildPythonPackage
, fetchFromGitHub
, gssapi
, impacket
, ldap3
, lxml
, pyasn1
, pythonOlder
}:
buildPythonPackage rec {
pname = "pywerview";
version = "0.4.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "the-useless-one";
repo = pname;
rev = "v${version}";
hash = "sha256-nrPhyBHW13dkXFC5YJfrkiztAxMw4KuEif0zCdjQEq0=";
};
propagatedBuildInputs = [
beautifulsoup4
gssapi
impacket
ldap3
lxml
pyasn1
];
# Module has no tests
doCheck = false;
postPatch = ''
# https://github.com/the-useless-one/pywerview/pull/51
substituteInPlace setup.py \
--replace "bs4" "beautifulsoup4"
'';
pythonImportsCheck = [
"pywerview"
];
meta = with lib; {
description = "Module for PowerSploit's PowerView support";
homepage = "https://github.com/the-useless-one/pywerview";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ fab ];
};
}

View file

@ -0,0 +1,55 @@
{ lib
, buildPythonPackage
, cryptography
, fetchFromGitHub
, gssapi
, krb5
, pyspnego
, pytestCheckHook
, pythonOlder
, requests
}:
buildPythonPackage rec {
pname = "requests-credssp";
version = "2.0.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "jborean93";
repo = pname;
rev = "v${version}";
hash = "sha256-HHLEmQ+mNjMjpR6J+emrKFM+2PiYq32o7Gnoo0gUrNA=";
};
propagatedBuildInputs = [
cryptography
pyspnego
requests
];
checkInputs = [
pytestCheckHook
];
passthru.optional-dependencies = {
kerberos = [
# pyspnego[kerberos] will have those two dependencies
gssapi
krb5
];
};
pythonImportsCheck = [
"requests_credssp"
];
meta = with lib; {
description = "HTTPS CredSSP authentication with the requests library";
homepage = "https://github.com/jborean93/requests-credssp";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}

View file

@ -0,0 +1,72 @@
{ lib
, fetchFromGitHub
, fetchpatch
, python3
}:
python3.pkgs.buildPythonApplication rec {
pname = "crackmapexec";
version = "5.2.2";
format = "pyproject";
src = fetchFromGitHub {
owner = "byt3bl33d3r";
repo = "CrackMapExec";
rev = "v${version}";
hash = "sha256-IgD8RjwVEoEXmnHU3DR3wzUdJDWIbFw9sES5qYg30a8=";
};
nativeBuildInputs = with python3.pkgs; [
poetry-core
pythonRelaxDepsHook
];
propagatedBuildInputs = with python3.pkgs; [
aioconsole
beautifulsoup4
dsinternals
impacket
lsassy
msgpack
neo4j
paramiko
pylnk3
pypsrp
pywerview
requests
requests_ntlm
termcolor
terminaltables
xmltodict
];
patches = [
# Switch to poetry-core, https://github.com/byt3bl33d3r/CrackMapExec/pull/580
(fetchpatch {
name = "switch-to-poetry-core.patch";
url = "https://github.com/byt3bl33d3r/CrackMapExec/commit/e5c6c2b5c7110035b34ea7a080defa6d42d21dd4.patch";
hash = "sha256-5SpoQD+uSYLM6Rdq0/NTbyEv4RsBUuawNNsknS71I9M=";
})
];
pythonRelaxDeps = true;
pythonRemoveDeps = [
"bs4"
];
# Project has no tests
doCheck = false;
pythonImportsCheck = [
"cme"
];
meta = with lib; {
description = "Tool for pentesting networks";
homepage = "https://github.com/byt3bl33d3r/CrackMapExec";
license = with licenses; [ bsd2 ];
maintainers = with maintainers; [ fab ];
mainProgram = "cme";
};
}

View file

@ -4989,6 +4989,8 @@ with pkgs;
cpufetch = callPackage ../tools/misc/cpufetch { };
crackmapexec = callPackage ../tools/security/crackmapexec { };
crackxls = callPackage ../tools/security/crackxls { };
crd2pulumi = callPackage ../development/tools/crd2pulumi { };

View file

@ -5731,7 +5731,7 @@ in {
neo = callPackage ../development/python-modules/neo { };
neo4j-driver = callPackage ../development/python-modules/neo4j-driver { };
neo4j = callPackage ../development/python-modules/neo4j { };
nessclient = callPackage ../development/python-modules/nessclient { };
@ -6447,11 +6447,15 @@ in {
pencompy = callPackage ../development/python-modules/pencompy { };
phonopy = callPackage ../development/python-modules/phonopy { };
pixcat = callPackage ../development/python-modules/pixcat { };
psrpcore = callPackage ../development/python-modules/psrpcore { };
pyprecice = callPackage ../development/python-modules/pyprecice { };
phonopy = callPackage ../development/python-modules/phonopy { };
pypsrp = callPackage ../development/python-modules/pypsrp { };
phpserialize = callPackage ../development/python-modules/phpserialize { };
@ -8883,6 +8887,8 @@ in {
pywemo = callPackage ../development/python-modules/pywemo { };
pywerview = callPackage ../development/python-modules/pywerview { };
pywick = callPackage ../development/python-modules/pywick { };
pywilight = callPackage ../development/python-modules/pywilight { };
@ -9142,6 +9148,8 @@ in {
requests-cache = callPackage ../development/python-modules/requests-cache { };
requests-credssp = callPackage ../development/python-modules/requests-credssp { };
requests-hawk = callPackage ../development/python-modules/requests-hawk { };
requests = callPackage ../development/python-modules/requests { };