target needs to be first but program output says last
muelli opened this issue · 0 comments
muelli commented
Describe the bug
The program's usage says usage: crackmapexec smb [-h] [-id CRED_ID [CRED_ID ...]] ... target
, i.e. with the targets mentioned last, but it seems that it is not accepting the target at last positional argument.
To Reproduce
└─$ poetry run crackmapexec smb -u Administrator -H b2c03054c306ac8fc5f9d188710b0168 192.168.225.121
usage: crackmapexec smb [-h] [-id CRED_ID [CRED_ID ...]]
[-u USERNAME [USERNAME ...]] [-p PASSWORD [PASSWORD ...]]
[-k] [--no-bruteforce] [--continue-on-success]
[--use-kcache] [--log LOG] [--aesKey AESKEY [AESKEY ...]]
[--kdcHost KDCHOST]
[--gfail-limit LIMIT | --ufail-limit LIMIT | --fail-limit LIMIT]
[-M MODULE] [-o MODULE_OPTION [MODULE_OPTION ...]] [-L]
[--options] [--server {https,http}] [--server-host HOST]
[--server-port PORT] [--connectback-host CHOST]
[-H HASH [HASH ...]] [-d DOMAIN | --local-auth]
[--port {139,445}] [--share SHARE]
[--smb-server-port SMB_SERVER_PORT]
[--gen-relay-list OUTPUT_FILE]
[--smb-timeout SMB_TIMEOUT] [--laps [LAPS]] [--sam]
[--lsa] [--ntds [{vss,drsuapi}]]
[--dpapi [{nosystem,cookies} ...]] [--mkfile MKFILE]
[--pvk PVK] [--enabled] [--user USERNTDS] [--shares]
[--no-write-check]
[--filter-shares FILTER_SHARES [FILTER_SHARES ...]]
[--sessions] [--disks]
[--loggedon-users-filter LOGGEDON_USERS_FILTER]
[--loggedon-users] [--users [USER]] [--groups [GROUP]]
[--computers [COMPUTER]] [--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]
[--put-file FILE FILE] [--get-file FILE FILE]
[--append-host]
[--exec-method {mmcexec,smbexec,wmiexec,atexec}]
[--dcom-timeout DCOM_TIMEOUT]
[--get-output-tries GET_OUTPUT_TRIES] [--codec CODEC]
[--force-ps32] [--no-output] [-x COMMAND | -X PS_COMMAND]
[--obfs] [--amsi-bypass FILE] [--clear-obfscripts]
target [target ...]
crackmapexec smb: error: the following arguments are required: target
But running crackmapexec smb 192.168.225.121 -u Administrator -H b2c03054c306ac8fc5f9d188710b0168
works better.
Clearly, the program's usage is misleading.