byt3bl33d3r / CrackMapExec

A swiss army knife for pentesting networks
BSD 2-Clause "Simplified" License
8.38k stars 1.64k forks source link

Unable to open database file #183

Closed aarislarsen closed 7 years ago

aarislarsen commented 7 years ago

Steps to reproduce

  1. cme smb targetfilewith400lines -u biglistusernames -p Password123 --fail-limit 2

CME verbose output (using the --verbose flag)

Not possible, this was experienced in a customer environment

OS

cme being run from Ubuntu 14.04 LTS

Target OS

Primarily Windows 2012 and 2008, but a few UNIX-boxes in the mix as well

Detailed issue explanation

When running cme against a large scope, after a few hundred hosts it intermittently reports "unable to open database file". It seems to start in smb/database.py cur.execute.

Sorry I can't post more details, but this was during an active pentest, just wondering if the issue was known or experienced by others.

byt3bl33d3r commented 7 years ago

@aarislarsen I haven't run into this. Can you give me the specs of the Ubuntu box you were running it on?

aarislarsen commented 7 years ago

Turns out it was a permissions issue, sorry about that. Not sure if it's related, but when running Mimikatz, the actual credentials are never added to the database, but simply printed on screen. If subsequently used, the credentials are then added to the database, but only if they're found to be valid. Is that as intended?

2017-06-23 19:59 GMT+02:00 byt3bl33d3r notifications@github.com:

@aarislarsen https://github.com/aarislarsen I haven't run into this. Can you give me the specs of the Ubuntu box you were running on?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/byt3bl33d3r/CrackMapExec/issues/183#issuecomment-310733015, or mute the thread https://github.com/notifications/unsubscribe-auth/AM7YwHp8pZE2qPn3a1zlFIPoESPahUDoks5sG_zwgaJpZM4OAinW .

byt3bl33d3r commented 7 years ago

@aarislarsen sorry for the late response, this does sound very much like a permission issue. I'd recommend chown'ing everything under the ~/.cme directory to your user. Alternatively running CME as root should take care of everything i think (It needs it anyway to start up the servers). Cheers