Top Related Projects
PowerSploit - A PowerShell Post-Exploitation Framework
Six Degrees of Domain Admin
Impacket is a collection of Python classes for working with network protocols.
The Penetration Testers Framework (PTF) is a way for modular support for up-to-date tools.
Metasploit Framework
Quick Overview
CrackMapExec (CME) is a post-exploitation tool that helps automate assessing the security of large Active Directory networks. It is designed to be a swiss army knife for pentesting networks, allowing for rapid enumeration, exploitation, and privilege escalation in Windows environments.
Pros
- Versatile and powerful, combining multiple attack techniques in one tool
- Supports various protocols including SMB, WMI, MSSQL, and LDAP
- Highly modular architecture allowing for easy extension and customization
- Active development and community support
Cons
- Can be complex for beginners due to its extensive feature set
- Potential for misuse if not handled responsibly
- May trigger antivirus or intrusion detection systems if not used carefully
- Requires careful configuration to avoid unintended consequences in production environments
Getting Started
To get started with CrackMapExec:
-
Install CME using pip:
pip3 install crackmapexec
-
Basic usage example:
crackmapexec smb 192.168.1.0/24
-
For more advanced usage, refer to the official documentation and wiki on the GitHub repository.
Note: Always ensure you have proper authorization before using CrackMapExec on any network or system.
Competitor Comparisons
PowerSploit - A PowerShell Post-Exploitation Framework
Pros of PowerSploit
- Extensive collection of PowerShell modules for various post-exploitation tasks
- Well-documented and actively maintained by the community
- Seamless integration with other PowerShell-based tools and scripts
Cons of PowerSploit
- Limited cross-platform support (primarily Windows-focused)
- Requires PowerShell execution, which may be restricted in some environments
- Less stealthy compared to more modern tools like CrackMapExec
Code Comparison
PowerSploit (PowerView module):
Get-NetDomain
Get-NetUser
Invoke-UserHunter
CrackMapExec:
crackmapexec smb 192.168.1.0/24
crackmapexec winrm 192.168.1.100 -u user -p pass -x "whoami"
PowerSploit focuses on PowerShell-based commands for Windows environments, while CrackMapExec offers a more versatile, multi-protocol approach with support for various operating systems. PowerSploit's code is typically more verbose and Windows-specific, whereas CrackMapExec provides a more concise syntax for network-wide operations and supports multiple protocols like SMB, WinRM, and SSH.
Six Degrees of Domain Admin
Pros of BloodHound
- Provides a visual representation of Active Directory relationships and attack paths
- Offers powerful query capabilities for complex AD environments
- Integrates with other security tools and frameworks
Cons of BloodHound
- Requires more setup and configuration compared to CrackMapExec
- May generate more noise on the network, potentially triggering alerts
- Limited to Active Directory environments, while CrackMapExec has broader functionality
Code Comparison
BloodHound (Cypher query example):
MATCH (u:User {name: 'John Doe'})-[r:MemberOf*1..]->(g:Group)
RETURN u.name, g.name
CrackMapExec (Python script example):
from cme.helpers.logger import highlight
from cme.helpers.misc import validate_ntlm
def plugin(cme):
cme.logger.info('Executing custom plugin')
validate_ntlm(cme.args.hash)
Both tools serve different purposes in the realm of network security and penetration testing. BloodHound excels at visualizing and analyzing Active Directory environments, while CrackMapExec offers a more versatile toolkit for various network protocols and attack vectors. The choice between them depends on the specific requirements of the security assessment or penetration test being conducted.
Impacket is a collection of Python classes for working with network protocols.
Pros of Impacket
- More comprehensive library with a wider range of protocols and functionalities
- Better suited for developing custom tools and scripts
- Actively maintained with regular updates and contributions
Cons of Impacket
- Steeper learning curve due to its extensive API
- Requires more coding knowledge to utilize effectively
- Less user-friendly for quick, out-of-the-box penetration testing tasks
Code Comparison
Impacket example (SMB connection):
from impacket.smbconnection import SMBConnection
conn = SMBConnection(target, target)
conn.login(username, password)
CrackMapExec example (SMB connection):
from cme.connection import Connection
conn = Connection(target, username, password, domain)
conn.login()
Both libraries provide methods for establishing SMB connections, but Impacket offers more granular control over the connection process, while CrackMapExec simplifies the process with a more streamlined API.
Impacket is better suited for developers creating custom tools or scripts, offering a wide range of low-level networking functionalities. CrackMapExec, on the other hand, is designed for quick and efficient penetration testing, providing a more user-friendly interface for common tasks.
The Penetration Testers Framework (PTF) is a way for modular support for up-to-date tools.
Pros of PTF
- Broader scope: PTF is a comprehensive penetration testing framework with a wide range of tools
- Modular design: Allows for easy addition and customization of tools
- Automated installation and updates: Simplifies tool management and maintenance
Cons of PTF
- Less specialized: Not as focused on specific tasks like Windows/Active Directory exploitation
- Steeper learning curve: Requires more time to understand and utilize the full framework
- Potentially resource-intensive: Installing and maintaining numerous tools can be demanding
Code Comparison
CrackMapExec:
def proto_flow(host, port, proto):
proto_flow.host = host
proto_flow.port = port
proto_flow.proto = proto
PTF:
def update_installed_tools():
for tool in installed_tools:
tool.update()
return True
The code snippets highlight the different focus areas of each project. CrackMapExec's code relates to network protocol handling, while PTF's code demonstrates its tool management capabilities.
Metasploit Framework
Pros of Metasploit-framework
- Extensive library of exploits and modules for various platforms and services
- Active community and regular updates, ensuring up-to-date vulnerability coverage
- Integrated payload generation and post-exploitation capabilities
Cons of Metasploit-framework
- Larger footprint and more complex setup compared to CrackMapExec
- Steeper learning curve for beginners due to its extensive feature set
- May trigger more antivirus alerts due to its widespread recognition
Code Comparison
Metasploit-framework (Ruby):
use exploit/windows/smb/ms17_010_eternalblue
set RHOSTS 192.168.1.100
set PAYLOAD windows/x64/meterpreter/reverse_tcp
exploit
CrackMapExec (Python):
crackmapexec smb 192.168.1.0/24 -u username -p password -M mimikatz
Both tools offer powerful penetration testing capabilities, but CrackMapExec focuses on Active Directory environments and provides a more streamlined approach for specific tasks. Metasploit-framework offers a broader range of exploits and modules, making it suitable for diverse penetration testing scenarios. The code examples demonstrate the difference in syntax and approach, with Metasploit using a modular structure and CrackMapExec employing a more direct command-line interface.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
No Longer Maintained
This project is no longer mantained due to the existence of a hostile fork.
CrackMapExec
You are on the latest up-to-date repository of the project CrackMapExec ! ð
- ð§ If you want to report a problem, open un Issue
- ð If you want to contribute, open a Pull Request
- ð¬ If you want to discuss, open a Discussion
Acknowledgments
(These are the people who did the hard stuff)
This project was originally inspired by:
Unintentional contributors:
- The Empire project
- @T-S-A's smbspider script
- @ConsciousHacker's partial Python port of Invoke-obfuscation from the GreatSCT project
Documentation, Tutorials, Examples
See the project's wiki for documentation and usage examples
Installation
Please see the installation instructions on the official wiki
Code Contributors
Awesome code contributors of CME:
To do
0wn everything
Top Related Projects
PowerSploit - A PowerShell Post-Exploitation Framework
Six Degrees of Domain Admin
Impacket is a collection of Python classes for working with network protocols.
The Penetration Testers Framework (PTF) is a way for modular support for up-to-date tools.
Metasploit Framework
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot