From a7a4f992ae95417eb3ed8b3c37e79586648fc405 Mon Sep 17 00:00:00 2001 From: mpgn Date: Sat, 16 Oct 2021 16:22:37 -0400 Subject: [PATCH] Fix #475 #456 thanks @Qazeer --- cme/.hooks/hook-lsassy.py | 4 ++ crackmapexec.spec | 4 +- poetry.lock | 2 +- pyproject.toml | 2 +- requirements-dev.txt | 78 ----------------------------- requirements.txt | 100 +++++++++++++++++++++----------------- 6 files changed, 63 insertions(+), 127 deletions(-) create mode 100644 cme/.hooks/hook-lsassy.py delete mode 100644 requirements-dev.txt diff --git a/cme/.hooks/hook-lsassy.py b/cme/.hooks/hook-lsassy.py new file mode 100644 index 00000000..e141f060 --- /dev/null +++ b/cme/.hooks/hook-lsassy.py @@ -0,0 +1,4 @@ +# -*- coding:utf-8 -*- + +from PyInstaller.utils.hooks import collect_all +datas, binaries, hiddenimports = collect_all("lsassy") diff --git a/crackmapexec.spec b/crackmapexec.spec index f71d33e6..55b437ef 100644 --- a/crackmapexec.spec +++ b/crackmapexec.spec @@ -7,8 +7,8 @@ a = Analysis(['./cme/crackmapexec.py'], pathex=['./cme'], binaries=[], datas=[('./cme/protocols', 'cme/protocols'),('./cme/data', 'cme/data'),('./cme/modules', 'cme/modules')], - hiddenimports=['cme.protocols.mssql.mssqlexec', 'cme.connection', 'impacket.examples.secretsdump', 'impacket.dcerpc.v5.lsat', 'impacket.dcerpc.v5.transport', 'impacket.dcerpc.v5.lsad', 'cme.servers.smb', 'cme.protocols.smb.wmiexec', 'cme.protocols.smb.atexec', 'cme.protocols.smb.smbexec', 'cme.protocols.smb.mmcexec', 'cme.protocols.smb.smbspider', 'cme.protocols.smb.passpol', 'paramiko', 'pypsrp.client', 'pywerview.cli.helpers', 'impacket.tds', 'impacket.version', 'cme.helpers.bash', 'pylnk3', 'lsassy','win32timezone'], - hookspath=[], + hiddenimports=['cme.protocols.mssql.mssqlexec', 'cme.connection', 'impacket.examples.secretsdump', 'impacket.dcerpc.v5.lsat', 'impacket.dcerpc.v5.transport', 'impacket.dcerpc.v5.lsad', 'cme.servers.smb', 'cme.protocols.smb.wmiexec', 'cme.protocols.smb.atexec', 'cme.protocols.smb.smbexec', 'cme.protocols.smb.mmcexec', 'cme.protocols.smb.smbspider', 'cme.protocols.smb.passpol', 'paramiko', 'pypsrp.client', 'pywerview.cli.helpers', 'impacket.tds', 'impacket.version', 'cme.helpers.bash', 'pylnk3', 'lsassy','win32timezone', 'impacket.tds', 'impacket.ldap.ldap', 'impacket.tds'], + hookspath=['./cme/.hooks'], runtime_hooks=[], excludes=[], win_no_prefer_redirects=False, diff --git a/poetry.lock b/poetry.lock index 82e35a81..823a66bd 100644 --- a/poetry.lock +++ b/poetry.lock @@ -979,7 +979,7 @@ testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytes [metadata] lock-version = "1.1" python-versions = "^3.7.0" -content-hash = "490809cfa7b9f44e5f957219568ac53edec5472484fc739839e06b730046734a" +content-hash = "404d63b91ca84775f4bee52fc2827ea5d9db3b6ac698f790da824f29873acc31" [metadata.files] aioconsole = [ diff --git a/pyproject.toml b/pyproject.toml index e5f8c5c3..7f5f5530 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -65,7 +65,7 @@ impacket = "^0.9.23" xmltodict = "^0.12.0" terminaltables = "^3.1.0" aioconsole = "^0.3.1" -pywerview = "^0.3.1" +pywerview = "^0.3.2" [tool.poetry.dev-dependencies] diff --git a/requirements-dev.txt b/requirements-dev.txt deleted file mode 100644 index 669ca15f..00000000 --- a/requirements-dev.txt +++ /dev/null @@ -1,78 +0,0 @@ -aioconsole==0.3.1; python_version >= "3.6" -aiowinreg==0.0.4; python_version >= "3.6" -appdirs==1.4.4; python_version >= "3.6" -asn1crypto==1.4.0; python_version >= "3.7" -astroid==2.5.1; python_version >= "3.6" and python_version < "4.0" -asysocks==0.1.1; python_version >= "3.7" -bcrypt==3.2.0; python_version >= "3.6" -beautifulsoup4==4.9.3 -black==20.8b1; python_version >= "3.6" -bs4==0.0.1 -certifi==2020.12.5; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" -cffi==1.14.5; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6" -chardet==4.0.0; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" -click==7.1.2; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6" -colorama==0.4.4; python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4.0" and sys_platform == "win32" or python_version >= "3.6" and python_version < "4.0" and sys_platform == "win32" and python_full_version >= "3.5.0" -cryptography==3.4.6; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6" -dnspython==2.1.0; python_version >= "3.6" -flake8==3.8.4; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.4.0") -flask==1.1.2; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6" -future==0.18.2; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.3.0" and python_version >= "3.6" -idna==2.10; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" -impacket==0.9.22 -importlib-metadata==3.7.2; python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "3.8" or python_full_version >= "3.4.0" and python_version < "3.8" and python_version >= "3.6" -isort==5.7.0; python_version >= "3.6" and python_version < "4.0" -itsdangerous==1.1.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6" -jinja2==2.11.3; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6" -lazy-object-proxy==1.5.2; python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4.0" or python_version >= "3.6" and python_version < "4.0" and python_full_version >= "3.5.0" -ldap3==2.9; python_version >= "3.6" -ldapdomaindump==0.9.3; python_version >= "3.6" -lsassy==3.0.0; python_version >= "3.6" -markupsafe==1.1.1; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6" -mccabe==0.6.1; python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4.0" or python_version >= "3.6" and python_version < "4.0" and python_full_version >= "3.4.0" -minidump==0.0.13; python_version >= "3.6" -minikerberos==0.2.9; platform_system == "Windows" and python_version >= "3.7" -msgpack==1.0.2 -msldap==0.3.27; python_version >= "3.7" -mypy-extensions==0.4.3; python_version >= "3.6" -neo4j==4.2.1 -netaddr==0.8.0; python_version >= "3.6" -ntlm-auth==1.5.0; python_version >= "2.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" -paramiko==2.7.2 -pathspec==0.8.1; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6" -prompt-toolkit==3.0.16; python_full_version >= "3.6.1" and python_version >= "3.7" -pyasn1==0.4.8; python_version >= "3.6" -pycodestyle==2.6.0; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" -pycparser==2.20; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6" -pycrypto==2.6.1 -pycryptodomex==3.10.1; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6" -pyflakes==2.2.0; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" -pylint==2.7.2; python_version >= "3.6" and python_version < "4.0" -pylnk3==0.3.0; python_version >= "3" -pynacl==1.4.0; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" -pyopenssl==20.0.1; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6" -pypsrp==0.5.0; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.5.0") -pypykatz==0.4.3; python_version >= "3.6" -pyspnego==0.1.5; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" -pytz==2021.1 -pywerview==0.3.0 -regex==2020.11.13; python_version >= "3.6" -requests-ntlm==1.1.0 -requests==2.25.1; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.5.0") -shiv==0.4.0; python_version >= "3.6" -six==1.15.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6" -soupsieve==2.2; python_version >= "3.6" -termcolor==1.1.0 -terminaltables==3.1.0 -toml==0.10.2; python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4.0" or python_version >= "3.6" and python_version < "4.0" and python_full_version >= "3.3.0" -tqdm==4.59.0; python_version >= "3.7" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.7" -typed-ast==1.4.2; implementation_name == "cpython" and python_version < "3.8" and python_version >= "3.6" -typing-extensions==3.7.4.3; python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "3.8" or python_full_version >= "3.4.0" and python_version < "3.8" and python_version >= "3.6" -urllib3==1.26.3; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version < "4" -wcwidth==0.2.5; python_full_version >= "3.6.1" and python_version >= "3.7" -werkzeug==1.0.1; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6" -winacl==0.1.1; python_version >= "3.7" -winsspi==0.0.9; platform_system == "Windows" and python_version >= "3.7" -wrapt==1.12.1; python_version >= "3.6" and python_version < "4.0" -xmltodict==0.12.0; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.4.0") -zipp==3.4.1; python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "3.8" or python_full_version >= "3.4.0" and python_version < "3.8" and python_version >= "3.6" diff --git a/requirements.txt b/requirements.txt index 0a53ba8d..75f1b808 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,57 +1,67 @@ -aioconsole==0.3.1; python_version >= "3.6" -aiowinreg==0.0.4; python_version >= "3.6" -asn1crypto==1.4.0; python_version >= "3.7" -asysocks==0.1.1; python_version >= "3.7" +aioconsole==0.3.2; python_version >= "3.6" +aiosmb==0.2.50; python_version >= "3.7" and python_version < "4.0" +aiowinreg==0.0.7; python_version >= "3.7" and python_version < "4.0" +asn1crypto==1.4.0; python_version >= "3.7" and python_version < "4.0" +asysocks==0.1.2; python_version >= "3.7" and python_version < "4.0" bcrypt==3.2.0; python_version >= "3.6" -beautifulsoup4==4.9.3 +beautifulsoup4==4.10.0; python_full_version > "3.0.0" bs4==0.0.1 -certifi==2020.12.5; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" -cffi==1.14.5; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6" -chardet==4.0.0; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" -click==7.1.2; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6" -cryptography==3.4.6; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6" -dnspython==2.1.0; python_version >= "3.6" -flask==1.1.2; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6" -future==0.18.2; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.3.0" and python_version >= "3.6" -idna==2.10; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" -impacket==0.9.22 -itsdangerous==1.1.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6" -jinja2==2.11.3; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6" -ldap3==2.9; python_version >= "3.6" -ldapdomaindump==0.9.3; python_version >= "3.6" -lsassy==3.0.0; python_version >= "3.6" -markupsafe==1.1.1; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6" -minidump==0.0.13; python_version >= "3.6" -minikerberos==0.2.9; platform_system == "Windows" and python_version >= "3.7" +certifi==2021.10.8; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.6.0" +cffi==1.15.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6" +chardet==4.0.0; python_version >= "3.7" and python_full_version < "3.0.0" and python_version < "4.0" or python_version >= "3.7" and python_version < "4.0" and python_full_version >= "3.5.0" +charset-normalizer==2.0.7; python_full_version >= "3.6.0" and python_version >= "3" +click==8.0.3; python_version >= "3.7" and python_version < "4.0" +colorama==0.4.4; python_full_version >= "3.6.2" and python_full_version < "4.0.0" and python_version >= "3.7" and python_version < "4.0" and (python_version >= "3.7" and python_full_version < "3.0.0" and python_version < "4.0" or python_version >= "3.7" and python_version < "4.0" and python_full_version >= "3.5.0") and (python_version >= "3.7" and python_full_version < "3.0.0" and python_version < "4.0" and platform_system == "Windows" or python_version >= "3.7" and python_version < "4.0" and platform_system == "Windows" and python_full_version >= "3.5.0") +commonmark==0.9.1; python_full_version >= "3.6.2" and python_full_version < "4.0.0" and python_version >= "3.7" and python_version < "4.0" +cryptography==35.0.0; python_version >= "3.7" and python_full_version < "3.0.0" and python_version < "4.0" or python_full_version >= "3.6.0" and python_version >= "3.7" and python_version < "4.0" +dnspython==2.1.0; python_version >= "3.7" and python_version < "4.0" +flask==2.0.2; python_version >= "3.7" and python_version < "4.0" +future==0.18.2; python_version >= "3.7" and python_full_version < "3.0.0" and python_version < "4.0" or python_version >= "3.7" and python_version < "4.0" and python_full_version >= "3.3.0" +idna==3.3; python_version >= "3.5" and python_full_version < "3.0.0" or python_full_version >= "3.6.0" and python_version >= "3.5" +impacket==0.9.23 +importlib-metadata==4.2.0; python_version >= "3.7" and python_version < "3.8" +itsdangerous==2.0.1; python_version >= "3.7" and python_version < "4.0" +jinja2==3.0.2; python_version >= "3.7" and python_version < "4.0" +ldap3==2.9.1; python_version >= "3.7" and python_version < "4.0" +ldapdomaindump==0.9.3; python_version >= "3.7" and python_version < "4.0" +lsassy==3.0.1; python_version >= "3.7" and python_version < "4.0" +lxml==4.6.3; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" +markupsafe==2.0.1; python_version >= "3.7" and python_version < "4.0" +minidump==0.0.20; python_version >= "3.7" and python_version < "4.0" +minikerberos==0.2.14; python_version >= "3.7" and python_version < "4.0" msgpack==1.0.2 -msldap==0.3.27; python_version >= "3.7" -neo4j==4.2.1 -netaddr==0.8.0; python_version >= "3.6" +msldap==0.3.30; python_version >= "3.7" and python_version < "4.0" +neo4j==4.3.6; python_version >= "3.5" +netaddr==0.8.0; python_version >= "3.7" and python_version < "4.0" ntlm-auth==1.5.0; python_version >= "2.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" -paramiko==2.7.2 -prompt-toolkit==3.0.16; python_full_version >= "3.6.1" and python_version >= "3.7" -pyasn1==0.4.8; python_version >= "3.6" +oscrypto==1.2.1; python_version >= "3.7" and python_version < "4.0" +paramiko==2.8.0 +prompt-toolkit==3.0.20; python_version >= "3.7" and python_version < "4.0" and python_full_version >= "3.6.2" +pyasn1==0.4.8; python_version >= "3.7" and python_version < "4.0" pycparser==2.20; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6" -pycrypto==2.6.1 -pycryptodomex==3.10.1; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6" +pycryptodomex==3.11.0; python_version >= "3.7" and python_full_version < "3.0.0" and python_version < "4.0" or python_version >= "3.7" and python_version < "4.0" and python_full_version >= "3.5.0" +pygments==2.10.0; python_full_version >= "3.6.2" and python_full_version < "4.0.0" and python_version >= "3.7" and python_version < "4.0" pylnk3==0.3.0; python_version >= "3" pynacl==1.4.0; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" -pyopenssl==20.0.1; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6" +pyopenssl==21.0.0; python_version >= "3.7" and python_full_version < "3.0.0" and python_version < "4.0" or python_version >= "3.7" and python_version < "4.0" and python_full_version >= "3.6.0" pypsrp==0.5.0; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.5.0") -pypykatz==0.4.3; python_version >= "3.6" -pyspnego==0.1.5; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" -pytz==2021.1 -pywerview==0.3.0 +pypykatz==0.4.9; python_version >= "3.7" and python_version < "4.0" +pyspnego==0.2.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6" +pytz==2021.3; python_version >= "3.5" +pywerview==0.3.2 requests-ntlm==1.1.0 -requests==2.25.1; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.5.0") -six==1.15.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6" -soupsieve==2.2; python_version >= "3.6" +requests==2.26.0; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.6.0") +rich==10.12.0; python_full_version >= "3.6.2" and python_full_version < "4.0.0" and python_version >= "3.7" and python_version < "4.0" +six==1.16.0; python_version >= "3.7" and python_full_version < "3.0.0" and python_version < "4.0" or python_version >= "3.7" and python_version < "4.0" and python_full_version >= "3.6.0" +soupsieve==2.2.1; python_version >= "3.6" and python_full_version > "3.0.0" termcolor==1.1.0 terminaltables==3.1.0 -tqdm==4.59.0; python_version >= "3.7" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.7" -urllib3==1.26.3; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version < "4" -wcwidth==0.2.5; python_full_version >= "3.6.1" and python_version >= "3.7" -werkzeug==1.0.1; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6" -winacl==0.1.1; python_version >= "3.7" -winsspi==0.0.9; platform_system == "Windows" and python_version >= "3.7" +tqdm==4.62.3; python_version >= "3.7" and python_full_version < "3.0.0" and python_version < "4.0" or python_version >= "3.7" and python_version < "4.0" and python_full_version >= "3.4.0" +typing-extensions==3.10.0.2; python_full_version >= "3.6.2" and python_full_version < "4.0.0" and python_version >= "3.7" and python_version < "3.8" +urllib3==1.26.7; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.6.0" and python_version < "4" +wcwidth==0.2.5; python_version >= "3.7" and python_version < "4.0" and python_full_version >= "3.6.2" +werkzeug==2.0.2; python_version >= "3.7" and python_version < "4.0" +winacl==0.1.1; python_version >= "3.7" and python_version < "4.0" +winsspi==0.0.9; python_version >= "3.7" and python_version < "4.0" and platform_system == "Windows" xmltodict==0.12.0; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.4.0") +zipp==3.6.0; python_version >= "3.7" and python_version < "3.8"