BC-SECURITY / Empire

Empire is a post-exploitation and adversary emulation framework that is used to aid Red Teams and Penetration Testers.
https://bc-security.gitbook.io/empire-wiki/
BSD 3-Clause "New" or "Revised" License
4.21k stars 575 forks source link

[BUG] Starkiller won't load 404 #751

Open robertoll opened 1 week ago

robertoll commented 1 week ago

Is there an existing issue for this?

Empire Version

5.11.4

Python Version

3.12.6

Operating System

Kali

Database

MySQL

Current Behavior

After starting the server and trying to open Starkiller in the browser I get {"detail":"Not Found"}:

content-length: 22 content-type: application/json date: Wed, 25 Sep 2024 21:45:06 GMT server: uvicorn

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,/;q=0.8 Accept-Encoding: gzip, deflate, br Accept-Language: en-US,en;q=0.5 Connection: keep-alive Host: localhost:1337 Sec-Fetch-Dest: document Sec-Fetch-Mode: navigate Sec-Fetch-Site: none Sec-Fetch-User: ?1 Upgrade-Insecure-Requests: 1 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:109.0) Gecko/20100101 Firefox/115.0

Expected Behavior

Starkiller login page loads.

Steps To Reproduce

  1. I installed Starkiller from scratch with "sudo apt install powershell-empire"
  2. Started it with "sudo powershell-empire server"

Anything else?

sudo powershell-empire server [INFO]: Submodules auto update disabled. Not fetching. [INFO]: Checking submodules... [INFO]: No .git directory found. Skipping submodule check. [INFO]: Using mysql database. [INFO]: v2: Loading listener templates from: /usr/share/powershell-empire/empire/server/listeners/ [INFO]: v2: Loading stager templates from: /usr/share/powershell-empire/empire/server/stagers/ [INFO]: v2: Loading bypasses from: /usr/share/powershell-empire/empire/server/bypasses/ [INFO]: v2: Loading malleable profiles from: /usr/share/powershell-empire/empire/server/data/profiles/ [INFO]: v2: Loading modules from: /usr/share/powershell-empire/empire/server/modules/ [INFO]: Searching for plugins at /usr/share/powershell-empire/empire/server/plugins/ [INFO]: Initializing plugin: chiselserver [INFO]: Initializing plugin: socksproxyserver [INFO]: Initializing plugin: advanced_reporting [WARNING]: Plugin ChiselServer-Plugin does not have a plugin.yaml [INFO]: Initializing plugin: websockify_server [WARNING]: Plugin SocksProxyServer-Plugin does not have a plugin.yaml [WARNING]: Plugin Report-Generation-Plugin does not have a plugin.yaml [INFO]: Initializing plugin: reverseshell_stager_server [INFO]: Initializing plugin: basic_reporting [INFO]: Initializing plugin: csharpserver [ERROR]: Plugin csharpserver failed to run: [Errno 2] No such file or directory: 'dotnet' Traceback (most recent call last): File "/usr/share/powershell-empire/empire/server/core/plugin_service.py", line 175, in execute_plugin res = plugin.execute(cleaned_options, db=db, user=user) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/powershell-empire/empire/server/plugins/csharpserver/csharpserver.py", line 67, in execute output = self.toggle_csharpserver(command) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/powershell-empire/empire/server/plugins/csharpserver/csharpserver.py", line 100, in toggle_csharpserver self.csharpserverbuild_proc = subprocess.call(csharp_cmd) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/subprocess.py", line 389, in call with Popen(*popenargs, **kwargs) as p: ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/subprocess.py", line 1026, in init self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/lib/python3.12/subprocess.py", line 1955, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'dotnet' [ERROR]: Plugin failed to run: csharpserver [INFO]: Empire starting up... [INFO]: Starkiller enabled. Loading. [INFO]: Started server process [41438] [INFO]: Waiting for application startup. [INFO]: Application startup complete. [INFO]: Uvicorn running on http://0.0.0.0:1337 (Press CTRL+C to quit) [INFO]: 127.0.0.1:45356 - "GET /index.html HTTP/1.1" 404

image

robertoll commented 1 week ago

Tried Docker version, same issue

robertoll commented 1 week ago

Got it to work with the Github version