Commit Graph

61 Commits (a6463c60ff513b09734569ec834a9f63e4c9cd91)

Author SHA1 Message Date
Marshall Hallenbeck a6463c60ff feat(modules): allow multiple modules to be ran 2023-03-24 15:21:10 -04:00
mpgn 528b2c7db8 Update message and module for ntdsutil module 2023-03-24 15:19:18 -04:00
mpgn ea0b542c94 Update message and module for ntdsutil module 2023-03-24 15:19:18 -04:00
Marshall Hallenbeck 5ffedc821d fix: check if ntds attribute exists properly 2023-03-24 15:19:18 -04:00
mpgn b994efc418 add warning when dumping ntds 2023-03-24 15:19:03 -04:00
Marshall Hallenbeck 38e91b9124 update how workspaces are created so tests can utilize functionality 2023-03-24 15:18:37 -04:00
mpgn e83abe71be Update message and module for ntdsutil module 2023-03-23 23:59:17 -04:00
mpgn 4e6697b844 Update message and module for ntdsutil module 2023-03-23 23:59:14 -04:00
mpgn ac057065fb Update message and module for ntdsutil module 2023-03-23 23:51:49 -04:00
mpgn 61c4738e00 Update message and module for ntdsutil module 2023-03-23 23:51:49 -04:00
Marshall Hallenbeck 84e239c139 fix(modules): return and compare lowercase modules names, since case should not matter 2023-03-23 13:52:36 -04:00
Marshall Hallenbeck e7fcea0851 feat(modules): allow multiple modules to be ran 2023-03-22 16:51:08 -04:00
Marshall Hallenbeck 2c762989eb fix: check if ntds attribute exists properly 2023-03-22 12:10:00 -04:00
mpgn e4cc4974a2
Merge branch 'master' into cmedb_marshall 2023-03-21 23:09:18 +01:00
mpgn 7af90207a8 add warning when dumping ntds 2023-03-21 17:07:18 -04:00
Marshall Hallenbeck ca0ab3b98c fix some major bugs and add in proper admin relations to the database functionality 2023-03-13 16:12:20 -04:00
Marshall Hallenbeck b25b74d473 chore: set asyncio logging level to CRITICAL to prevent unnecessary logging messages in debug mode 2023-03-13 16:06:18 -04:00
Marshall Hallenbeck 2348fc7e13 fix(SAwarnings): add warning ignore for SAWarnings 2023-03-13 16:05:59 -04:00
Marshall Hallenbeck 8463829b5b feat(database): working on making database operations more async, reducing write concurrency issues, and fixing sqlalchemy query formats 2023-03-13 16:05:57 -04:00
Marshall Hallenbeck 1aec4ea798 refactor(cmedb): pass dbengine object instead of session object 2023-03-13 16:05:05 -04:00
Marshall Hallenbeck 13a554ea20 chore: remove debug print statements 2023-03-13 16:05:05 -04:00
Marshall Hallenbeck 5c6fb5799c chore: remove commented code 2023-03-13 16:05:05 -04:00
Marshall Hallenbeck 388f520103 WIP - cmedb update 2023-03-13 15:58:38 -04:00
Marshall Hallenbeck 218c9b745e feat(sqlalchemy): WIP - working sqlalchemy session object being passed 2023-03-13 15:58:38 -04:00
Marshall Hallenbeck 2aa198b601 feat(sqlalchemy): change DB connection to sqlalchemy and add it as a dependency 2023-03-13 15:58:36 -04:00
Marshall Hallenbeck 50a74951c8 refactor: centralize shared path variables and improve cmedb intialization 2023-03-13 15:58:04 -04:00
zblurx 29ae75e6bf init log_mode 2023-02-17 14:20:16 +01:00
mpgn 83f8ffd006 Handle stacktrace with binary launch with wrong python version 2023-01-04 11:48:52 -05:00
Wlayzz b57ba767f8 Adding shebang and encoding utf-8 for all python files 2022-07-19 01:59:14 +02:00
Gianfranco Alongi 355b75e21f Stop crackmapexec from crashing completely when concurrency issues cause lock-contention on the database - in SMB-mode. 2022-04-03 13:38:48 +02:00
mpgn 46a00c3fef
Merge pull request #409 from RagingCactus/file-handling-concurrency-fixes
Fix file reading concurrency issues
2021-09-17 20:33:33 +02:00
byt3bl33d3r cb5c8855ed Version 5.1.3 🔥
- Replaced Gevent with AsyncIO
- Shares are now logged in the database and can be queried
- You can now press enter while a scan is being performed and CME will
  give you a completion percentage and the number of hosts remaining to
  scan
2020-11-15 16:42:28 -07:00
Marius Renner cc1af64448 Fix file reading concurrency issues
Before this commit, file objects for the username, password or NTLM hash
files were all shared between target jobs for different hosts. This
could cause numerous different errors in password or hash spraying jobs
with multiple targets. Sometimes some lines in input files were skipped
for some targets, and sometimes CME even ended up in an infinite loop
due to seeking in a file that is currently also being iterated on.

There have been attempts to fix some of these errors with file.seek(0)
in some places, such as with d13042f637.
This almost works because of the BoundedSemaphore sem that effectively
keeps CME attacks single-threaded. However, there were still corner
cases with shared file object accesses not protected by the semaphore.

To fix this in a reliable way, this commit shifts the responsibility of
open()ing a file object to every job instead of globally at the start.
While this does mean that the application will open the same files a
bunch of times, it also ensures correctness in regard to concurrency.
This should also allow to relax the semaphore in the future in case no
global or username limit across all targets is required.
2020-08-16 14:01:49 +02:00
mpgn 8931ec2300 Add Windows spec file to compile CME for Windows 2020-05-10 20:06:08 +02:00
mpgn af68773b6c Fix #352 target using file 2020-04-28 08:42:25 -04:00
mpgn 83c8e5b5a3 Add module compatibility for Python3
Mimikatz, Bloodhound etc
2020-01-18 07:20:10 -05:00
mpgn 73ab379acc Migrate function to python3
* --shares -> OK
* --sessions -> OK
* --disks -> OK
* --loggedon-users -> OK
* --users -> Not tested
* --rid-brute -> OK
* --groups -> Not tested
* --local-groups -> OK
* --pass-pol -> OK
2019-11-11 05:06:39 -05:00
mpgn c3c4b3192d start python3 migration 2019-11-10 22:42:04 +01:00
byt3bl33d3r f3465ef008 Fixed up @aj-cgtech changes 2018-03-01 12:36:17 -07:00
aj-cgtech fffc24ae46 Having worked out how the protocol object is created. Created config
object once, and set as an attr on each protocol.
More elegant, and allows for further config options in the future.
2018-02-23 10:13:46 +00:00
byt3bl33d3r 1603ac4819 Added WINRM support, NMap XML and .Nessus parsing
- Added the WINRM protocol, CME now supports executing commands through WinRM (Powershell Remoting)
- Added support for NMap XML and .Nessus files if given as targets
- Fixed a bug in the MSSQL protocol which caused it to not retrieve host info
- Version Bump
2017-10-24 20:08:19 -06:00
byt3bl33d3r 6cce1483a4 Updated Submodules 2017-10-21 17:24:09 -06:00
byt3bl33d3r 7149b24524 Plugged in the Powershell obfuscation functionality
- Two new flags can be added to protocols that use powershell that can
clear cached obfuscated powershell scripts and obfuscate them if
powershell is installed
2017-06-26 03:49:04 -06:00
byt3bl33d3r 2d22cca3ab Added SessionGopher module 2017-05-07 23:19:04 -06:00
byt3bl33d3r 4ff034f366 Added enum_avproducts module, fixed module logging
- Modules now do not print output of commands called from their protocol
- Added the enum_avproducts module
- Fixed the mimikatz_enum_vault_creds to not display creds with invalid
passwords
- Added an export command to the SMB protocols DB navigator (as
suggested by @hatredshapedlikeaman)
- Misc output fixes
2017-05-07 21:16:18 -06:00
byt3bl33d3r f0752f61b7 Re-wrote the HTTP protocol to use splinter and phantomjs
- All http connections are now concurrent
- Added a flag to take screenshots of webpages
- Minor Code cleanup
2017-04-30 12:54:35 -06:00
byt3bl33d3r 57d5d7ca13 Y'all better be ready for this, initial 4.0 release
- Fixed an edge case in gpp_decrypt.py also renamed to gpp_password
- Added the gpp_autologin module
- Added a workaround for the current impacket smb server bug in
get_keystrokes
- fixed formatting in the SMB database navigator
- fixed an error where DC would have there dc attribute overwritten
- Other stuff that i don't remember
2017-04-06 22:34:30 -06:00
byt3bl33d3r 602b7e13f0 Re-added most of the SMB protocol functionality
- Added new module gpp_decrypt
- Cleaned up the SMB spider as much as possible
- --wmi now uses pywerview
- Re-added the http protocol
2017-04-05 09:07:00 -06:00
byt3bl33d3r 751f209cd7 Initial 4.0 pre-release 2017-03-27 15:09:36 -06:00
byt3bl33d3r 8e6cc4e899 DB schema for the smb protocol is now final!
- added two more attributes to use in modules:opsec_safe and multiple_hosts

- renamed db function names

- Added the python_injector module and it's necessary files as a reminder
2016-12-20 00:23:40 -07:00