byt3bl33d3r / CrackMapExec

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

bh_owned module not marking as owned. #676

Closed juliourena closed 1 year ago

juliourena commented 1 year ago

When I try to mark a device as owned using the module bh_owned it fails with an error message, but in bloodhound database the device is actually marked as owned.

crackmapexec smb 10.129.203.121 -u julio -p XXXXX -M bh_owned -o PASS=CustomPassword!                                                                                                      
SMB         10.129.203.121  445    DC01             [*] Windows 10.0 Build 17763 x64 (name:DC01) (domain:inlanefreight.htb) (signing:True) (SMBv1:False)
SMB         10.129.203.121  445    DC01             [+] inlanefreight.htb\julio:XXXXX  (Pwn3d!)                         
BH_OWNED    10.129.203.121  445    DC01             [-] Node DC01.INLANEFREIGHT.HTB does not appear to be in Neo4J database. Have you imported correct data?

I reviewed the documentation, and we need to add some modification to the code and how we manage the variables to make it work.

https://neo4j.com/docs/api/python-driver/current/api.html#neo4j.Result

I'll submit a PR.

mpgn commented 1 year ago

no need I will remove this module since bloodhound is integrated by default on cme, it is useless now :)

juliourena commented 1 year ago

Actually, the integration doesn't include computers, just users. This module allows to mark Computers as owned.

mpgn commented 1 year ago

better add this directly to the integrated bh than the module :)

juliourena commented 1 year ago

Agree, I'll need more time to take a look at it.