Closed init5-SF closed 3 years ago
Hello,
Can you try with wmiexec method ?
crackmapexec ip -u user -p 'pass' -x whoami --exec-method wmiexec
Hi, sure! This test gave a slightly different error:
Traceback (most recent call last):
File "/usr/bin/crackmapexec", line 33, in <module>
sys.exit(load_entry_point('crackmapexec==5.1.3.dev0', 'console_scripts', 'crackmapexec')())
File "/usr/lib/python3/dist-packages/cme/crackmapexec.py", line 272, in main
asyncio.run(
File "/usr/lib/python3.8/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "/usr/lib/python3/dist-packages/cme/crackmapexec.py", line 102, in start_threadpool
await asyncio.gather(*jobs)
File "/usr/lib/python3/dist-packages/cme/crackmapexec.py", line 68, in run_protocol
await asyncio.wait_for(
File "/usr/lib/python3.8/asyncio/tasks.py", line 455, in wait_for
return await fut
File "/usr/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/lib/python3/dist-packages/cme/protocols/smb.py", line 121, in __init__
connection.__init__(self, args, db, host)
File "/usr/lib/python3/dist-packages/cme/connection.py", line 47, in __init__
self.proto_flow()
File "/usr/lib/python3/dist-packages/cme/connection.py", line 86, in proto_flow
self.call_cmd_args()
File "/usr/lib/python3/dist-packages/cme/connection.py", line 93, in call_cmd_args
getattr(self, k)()
File "/usr/lib/python3/dist-packages/cme/connection.py", line 18, in _decorator
return func(self, *args, **kwargs)
File "/usr/lib/python3/dist-packages/cme/protocols/smb.py", line 95, in _decorator
output = func(self, *args, **kwargs)
File "/usr/lib/python3/dist-packages/cme/protocols/smb.py", line 503, in execute
output = u'{}'.format(exec_method.execute(payload, get_output).strip())
UnboundLocalError: local variable 'exec_method' referenced before assignment
Try with impacket wmiexec
Done. It gave me this error:
Impacket v0.9.21-dev - Copyright 2019 SecureAuth Corporation
[*] SMBv3.0 dialect used
[-] DCOM SessionError: code: 0x80010111 - RPC_E_INVALID_HEADER - OLE received a packet with an invalid header.
This is a Windows 10 64-bit (2004) I tried both tools CME & wmiexec against a Windows 7 and they both worked fine, including the -x parameter! Seems to be OS dependent. :(
Any thoughts around this?
The issue seems to be on Impacket side https://github.com/SecureAuthCorp/impacket/issues/896
You can install the version 0.22 of impacket to fix this problem.
Me just I need code for python Sent from my Huawei Mobile-------- Original Message --------Subject: Re: [byt3bl33d3r/CrackMapExec] The tool breaks when using -x or -X with correct credentials (#434)From: mpgn To: byt3bl33d3r/CrackMapExec CC: Subscribed The issue seems to be on Impacket side SecureAuthCorp/impacket#896 You can install the version 0.22 of impacket to fix this problem.
—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or unsubscribe.
no update, closing
no update, closing
Sorry for the huge delay, I am already using Impacket v0.9.22
Describe the bug After updating the tool using apt install, CME breaks when using the -x or -X To Reproduce
Expected behavior Should return the result of the whoami command
Crackmapexec info