byt3bl33d3r / DeathStar

Uses Empire's (https://github.com/BC-SECURITY/Empire) RESTful API to automate gaining Domain and/or Enterprise Admin rights in Active Directory environments using some of the most common offensive TTPs.
GNU General Public License v3.0
1.57k stars 331 forks source link

Connection Error. Check Empire RESTful API #28

Closed cgsupport closed 6 years ago

cgsupport commented 6 years ago

Sorry if this is obvious, but I'm having trouble figuring it out, and can't see anyone that has had this issue (since not having to fork your copy of Empire).

I have a fresh install of Kali (updated). Installed Empire and DeathStar (installed python3 too).

./empire --rest --debug --username empireadmin --password Password123

curl --insecure -i -H "Content-Type: application/json" https://localhost:1337/api/admin/login -X POST -d '{"username":"empireadmin", "password":"Password123"}'

HTTP/1.0 200 OK Content-Type: application/json Content-Length: 58 Server: Werkzeug/0.12.2-dev Python/2.7.13 Date: Mon, 18 Sep 2017 15:03:00 GMT

{ "token": "u6gw3hgu8lrf71xs40re0sm7vhoovo3g5b4v0aps" }

The above appears to work. But when trying DeathStar (with and without python3):

./DeathStar.py --url "https://localhost:1337" -u "empireadmin" -p "Password123"

[*] Powering up the Death Star [-] Connection Error. Check Empire RESTful API

I never get any connection attempts in the empire terminal. So I'm not even sure its trying to make a connection; any idea what I'm missing?

byt3bl33d3r commented 6 years ago

I'll spin up a kali instance and check this out now. Hang tight

byt3bl33d3r commented 6 years ago

There seems to be an issue with the Python requests library on Kali not wanting to negotiate TLSv < 1.2. I submitted a PR here https://github.com/EmpireProject/Empire/pull/712, should be merged soon hopefully.

Thanks

dinvisible1 commented 6 years ago

any update on this? i think i have the same issue, by the way great work with Deathstar as well as you're other stuff im a follower of your blog!

kofx2002 commented 6 years ago

i have the same issue [*] Powering up the Death Star [-] Connection Error. Check Empire RESTful API

DanMcInerney commented 6 years ago

Solution: cd Empire/ git reset --hard 2677363e508c81834b27c31ae534a5474d37eda5 pip3 install pyopenssl

ohpe commented 6 years ago

@DanMcInerney your solution doesn't work for me.

nem0n commented 6 years ago

Same problem in here too with Kali

kofx2002 commented 6 years ago

still the same problem

n8tr0n commented 6 years ago

ok. I installed python 3.5.3 in a virtual environment using pipenv. Ran Deathstar in that context. The error didn't occur. listeners were being created in empire. So, I think the issue is with the python 3 version installed in Kali.

n8tr0n commented 6 years ago

I was able to get this working in Debian "stretch" so I compared the python 3 versions and noticed the discrepancy.

ohpe commented 6 years ago

That's true, there's something wrong in the python3 in Kali. However, using the virtualenv trick it fixes the problem:

cd ~/Tools/DeathStar
virtualenv -p python3 deathstar_env
source deathstar_env/bin/activate
pip3 install -r requirements.txt
ohpe commented 6 years ago

@OneDollarr that's because the empire password is different from Password123. Reset the db and set that password or use -p "yourempirepwd"

byt3bl33d3r commented 6 years ago

Closing since this was merged.