New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection Error. Check Empire RESTful API #28

Closed
cgsupport opened this Issue Sep 18, 2017 · 15 comments

Comments

Projects
None yet
8 participants
@cgsupport
Copy link

cgsupport commented Sep 18, 2017

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

This comment has been minimized.

Copy link
Owner

byt3bl33d3r commented Sep 21, 2017

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

@byt3bl33d3r

This comment has been minimized.

Copy link
Owner

byt3bl33d3r commented Sep 21, 2017

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 EmpireProject/Empire#712, should be merged soon hopefully.

Thanks

@dinvisible1

This comment has been minimized.

Copy link

dinvisible1 commented Oct 1, 2017

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

This comment has been minimized.

Copy link

kofx2002 commented Oct 8, 2017

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

@DanMcInerney

This comment has been minimized.

Copy link

DanMcInerney commented Oct 11, 2017

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

@ohpe

This comment has been minimized.

Copy link

ohpe commented Oct 11, 2017

@DanMcInerney your solution doesn't work for me.

@nem0n

This comment has been minimized.

Copy link

nem0n commented Oct 18, 2017

Same problem in here too with Kali

@kofx2002

This comment has been minimized.

Copy link

kofx2002 commented Oct 24, 2017

still the same problem

@n8tr0n

This comment has been minimized.

Copy link

n8tr0n commented Oct 27, 2017

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

This comment has been minimized.

Copy link

n8tr0n commented Oct 27, 2017

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

@ohpe

This comment has been minimized.

Copy link

ohpe commented Oct 28, 2017

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

This comment has been minimized.

Copy link

ohpe commented Oct 28, 2017

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

@byt3bl33d3r byt3bl33d3r closed this Dec 8, 2017

@byt3bl33d3r

This comment has been minimized.

Copy link
Owner

byt3bl33d3r commented Dec 8, 2017

Closing since this was merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment