Skip to content
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

[BUG] git cloning starkiller - Permission Denied despite sudo #756

Open
1 task done
D3vil0p3r opened this issue Oct 21, 2024 · 0 comments
Open
1 task done

[BUG] git cloning starkiller - Permission Denied despite sudo #756

D3vil0p3r opened this issue Oct 21, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@D3vil0p3r
Copy link

D3vil0p3r commented Oct 21, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Empire Version

5.11.5

Python Version

3.12

Operating System

Arch Linux

Database

SQLite

Current Behavior

When running sudo empire server with starkiller enabled, the process returns:

[INFO]: Starkiller enabled. Loading. 
[INFO]: Starkiller: directory not found. Cloning Starkiller 
fatal: could not create work tree dir '/usr/share/empire/empire/server/api/v2/starkiller': Permission denied
[ERROR]: Failed to execute command: Command '['sudo', '-u', 'athena', 'git', 'clone', 'https://github.com/BC-SECURITY/Starkiller.git', PosixPath('/usr/share/empire/empire/server/api/v2/starkiller')]' returned non-zero exit status 128. 

I installed Empire in the standard system-level installation dir (to make it accessible for all users) in /usr/share/empire. So, the issue occurs because git is trying to clone starkiller repository as my user despite I run sudo. It must be managed in a different way at code level.

In summary, the command sudo -u athena git clone https://github.com/BC-SECURITY/Starkiller.git /usr/share/empire/empire/server/api/v2/starkiller is useless because it could not have sudo permissions if run as user.

Expected Behavior

No permission denied when I run empire server by sudo while I want to clone StarKiller in a system-level directory.

Steps To Reproduce

Enable StarKiller in config.yaml, install Empire in /usr/share/empire and run sudo empire server.

Anything else?

No response

@D3vil0p3r D3vil0p3r added the bug Something isn't working label Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant