CrackMapExec:一款针对大型Windows活动目录(AD)的后渗透工具
作者:CQITer小编 时间:2018-10-01 16:26
CrackMapExec(CME)是一款后渗透利用工具,可帮助自动化大型活动目录(AD)网络安全评估任务。其缔造者@byt3bl33d3r称,该工具的生存概念是,“利用AD内置功能/协议达成其功能,并规避大多数终端防护/IDS/IPS解决方案。”


尽管该项目主要用于攻击性目的(例如红队),但蓝队同样可以使用该工具来评估账户权限,模拟攻击,查找配置错误。CME还使用PowerSploit工具包和Impacket库。
安装重要:在以下所有Bleeding-Edge安装说明中,请注意传递给git clone命令的–recursive标志。该标志会让git自动下载CME所依赖的所有子模块。如果没有的话,安装将会失败。
Kali最新稳定版
#~ apt-get install crackmapexecBleeging-Edge
强烈建议使用pipenv来安装CME,以避免依赖项与你的系统包产生冲突。
#~ apt-get install -y libssl-dev libffi-dev python-dev build-essential #~ pip install --user pipenv #~ git clone --recursive https://github.com/byt3bl33d3r/CrackMapExec #~ cd CrackMapExec && pipenv install #~ pipenv shell #~ python setup.py install Debian/Ubuntu强烈建议使用pipenv来安装CME,以避免依赖项与你的系统包产生冲突。
最新稳定版
#~ apt-get install -y libssl-dev libffi-dev python-dev build-essential #~ pip install crackmapexecBleeging-Edge
#~ apt-get install -y libssl-dev libffi-dev python-dev build-essential #~ pip install --user pipenv #~ git clone --recursive https://github.com/byt3bl33d3r/CrackMapExec #~ cd CrackMapExec && pipenv install #~ pipenv shell #~ python setup.py install Arch Linux强烈建议使用pipenv来安装CME,以避免依赖项与你的系统包产生冲突。
最新稳定版
pip install crackmapexecBleeging-Edge
#~ pip install --user pipenv #~ git clone --recursive https://github.com/byt3bl33d3r/CrackMapExec #~ cd CrackMapExec && pipenv install #~ pipenv shell #~ python setup.py install Mac OSX强烈建议使用pipenv来安装CME,以避免依赖项与你的系统包产生冲突。
最新稳定版
pip install --user crackmapexecBleeging-Edge
#~ pip install --user pipenv #~ git clone --recursive https://github.com/byt3bl33d3r/CrackMapExec #~ cd CrackMapExec && pipenv install #~ pipenv shell #~ python setup.py install LogsCME输出的任何日志文件都将存储在~/.cme/logs中。
使用协议从v4开始,CME将其功能划分为简化/组合/模块化(simplify/orginize/modularize)参数解析和功能,并允许将CME的功能扩展至Active Directory之外。
要使用特定协议,请运行:cme <协议> <协议选项>
查看可用协议运行cme –help将列出可用的常规选项和协议:
#~ cme --help usage: cme [-h] [-v] [-t THREADS] [--timeout TIMEOUT] [--jitter INTERVAL] [--darrell] [--verbose] {http,smb,mssql} ... ______ .______ ___ ______ __ ___ .___ ___. ___ .______ _______ ___ ___ _______ ______ / || _ \ / \ / || |/ / | \/ | / \ | _ \ | ____|\ \ / / | ____| / | | ,----'| |_) | / ^ \ | ,----'| ' / | \ / | / ^ \ | |_) | | |__ \ V / | |__ | ,----' | | | / / /_\ \ | | | < | |\/| | / /_\ \ | ___/ | __| > < | __| | | | `----.| |\ \----. / _____ \ | `----.| . \ | | | | / _____ \ | | | |____ / . \ | |____ | `----. \______|| _| `._____|/__/ \__\ \______||__|\__\ |__| |__| /__/ \__\ | _| |_______|/__/ \__\ |_______| \______| A swiss army knife for pentesting networks Forged by @byt3bl33d3r using the powah of dank memes Version: 4.0.0dev Codename: 'Sercurty' optional arguments: -h, --help show this help message and exit -v, --version show program's version number and exit -t THREADS set how many concurrent threads to use (default: 100) --timeout TIMEOUT max timeout in seconds of each thread (default: None) --jitter INTERVAL sets a random delay between each connection (default: None) --darrell give Darrell a hand --verbose enable verbose output protocols: available protocols {http,smb,mssql} http own stuff using HTTP(S) smb own stuff using SMB and/or Active Directory mssql own stuff using MSSQL and/or Active Directory Serrrrrrcuuurrrty? 查看协议选项运行cme <protocol> –help 查看指定协议所支持的选项。例如,查看所有SMB协议选项:
#~ cme smb --help usage: cme smb [-h] [-id CRED_ID [CRED_ID ...]] [-u USERNAME [USERNAME ...]] [-p PASSWORD [PASSWORD ...]] [--gfail-limit LIMIT | --ufail-limit LIMIT | --fail-limit LIMIT] [-M MODULE] [-o MODULE_OPTION [MODULE_OPTION ...]] [-L] [--options] [--server {http,https}] [--server-host HOST] [--server-port PORT] [-H HASH [HASH ...]] [-d DOMAIN | --local-auth] [--smb-port {139,445}] [--share SHARE] [--gen-relay-list OUTPUT_FILE] [--sam | --lsa | --ntds {vss,drsuapi}] [--shares] [--sessions] [--disks] [--loggedon-users] [--users [USER]] [--groups [GROUP]] [--local-groups [GROUP]] [--pass-pol] [--rid-brute [MAX_RID]] [--wmi QUERY] [--wmi-namespace NAMESPACE] [--spider SHARE] [--spider-folder FOLDER] [--content] [--exclude-dirs DIR_LIST] [--pattern PATTERN [PATTERN ...] | --regex REGEX [REGEX ...]] [--depth DEPTH] [--only-files] [--exec-method {mmcexec,smbexec,wmiexec,atexec}] [--force-ps32] [--no-output] [-x COMMAND | -X PS_COMMAND] [target [target ...]] positional arguments: target the target IP(s), range(s), CIDR(s), hostname(s), FQDN(s) or file(s) containg a list of targets optional arguments: -h, --help show this help message and exit -id CRED_ID [CRED_ID ...] database credential ID(s) to use for authentication -u USERNAME [USERNAME ...] username(s) or file(s) containing usernames -p PASSWORD [PASSWORD ...] password(s) or file(s) containing passwords --gfail-limit LIMIT max number of global failed login attempts --ufail-limit LIMIT max number of failed login attempts per username --fail-limit LIMIT max number of failed login attempts per host -M MODULE, --module MODULE payload module to use -o MODULE_OPTION [MODULE_OPTION ...] payload module options -L, --list-modules list available modules --options display module options --server {http,https} use the selected server (default: https) --server-host HOST IP to bind the server to (default: 0.0.0.0) --server-port PORT start the server on the specified port -H HASH [HASH ...], --hash HASH [HASH ...] -- SNIP -- 目标格式



