Skip to content
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.

handlekatz and procdump modules fail if directory /tmp/shared does not exist #671

Closed
juliourena opened this issue Nov 8, 2022 · 0 comments

Comments

@juliourena
Copy link
Contributor

Hi,

When I try to use the modules handlekatz or procdump, I got an error with a file not found.

The issue is because the directory /tmp/shared does not exist, if I create the directory it works.

crackmapexec smb 10.129.204.133 -u robert -p 'XXXXXX' -M procdump
SMB         10.129.204.133  445    MS01             [*] Windows 10.0 Build 17763 x64 (name:MS01) (domain:inlanefreight.htb) (signing:False) (SMBv1:False)
SMB         10.129.204.133  445    MS01             [+] inlanefreight.htb\robert:XXXXXX (Pwn3d!)
Traceback (most recent call last):                                                                                                                                                            
  File "/home/plaintext/htb/academy-testing/crackmapexec/CrackMapExec/.venv/bin/crackmapexec", line 6, in <module>
    sys.exit(main())                                                                           
  File "/home/plaintext/htb/academy-testing/crackmapexec/CrackMapExec/cme/crackmapexec.py", line 257, in main
    asyncio.run(                                                                                                                                                                              
  File "/usr/lib/python3.9/asyncio/runners.py", line 44, in run                                                                                                                               
    return loop.run_until_complete(main)                                                                                                                                                      
  File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete                                                                                                           
    return future.result()                                                                     
  File "/home/plaintext/htb/academy-testing/crackmapexec/CrackMapExec/cme/crackmapexec.py", line 105, in start_threadpool
    await asyncio.gather(*jobs)
  File "/home/plaintext/htb/academy-testing/crackmapexec/CrackMapExec/cme/crackmapexec.py", line 69, in run_protocol
    await asyncio.wait_for(
  File "/usr/lib/python3.9/asyncio/tasks.py", line 442, in wait_for
    return await fut
  File "/usr/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs) 
  File "/home/plaintext/htb/academy-testing/crackmapexec/CrackMapExec/cme/protocols/smb.py", line 142, in __init__
    connection.__init__(self, args, db, host)
  File "/home/plaintext/htb/academy-testing/crackmapexec/CrackMapExec/cme/connection.py", line 65, in __init__
    self.proto_flow()
  File "/home/plaintext/htb/academy-testing/crackmapexec/CrackMapExec/cme/connection.py", line 103, in proto_flow
    self.call_modules()
  File "/home/plaintext/htb/academy-testing/crackmapexec/CrackMapExec/cme/connection.py", line 135, in call_modules
    self.module.on_admin_login(context, self)
  File "/home/plaintext/htb/academy-testing/crackmapexec/CrackMapExec/cme/modules/procdump.py", line 54, in on_admin_login
    with open(self.procdump_path + self.procdump, 'wb') as procdump:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/shared/procdump.exe'

I'll submit a PR modifying the path to be /tmp instead.

juliourena added a commit to juliourena/CrackMapExec that referenced this issue Nov 8, 2022
handlekatz modules fail if directory /tmp/shared does not exist. I changed the directory from /tmp/shared to /tmp and the option description.
@mpgn mpgn closed this as completed in 61757a2 Nov 8, 2022
mpgn added a commit that referenced this issue Nov 8, 2022
Fix #671 - handlekatz and procdump modules fail
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant