jm33-m0 / emp3r0r

Linux/Windows post-exploitation framework made by linux user
https://infosec.exchange/@jm33
MIT License
1.24k stars 235 forks source link

`elvsh` unable to start, agent binary deleted #246

Closed winezer0 closed 11 months ago

winezer0 commented 11 months ago

Describe the bug

ssh is unavailable when you select a client

image

The server environment is kali image

jm33-m0 commented 11 months ago

It looks like the agent binary got deleted. Since elvsh shell requires agent binary to be present, it won't be able to start, thus no ssh shell available. Please check if this happens on other machines as well, if yes, there will be a bug to fix.

You can always use interactive_shell and set shell bash to open a system shell.

winezer0 commented 11 months ago

On version 1.31.4, I tried to run the agent on liunx. After running, the agent will be automatically deleted, including kali 2022 and centos 7.6。

I mistakenly thought it was your latest feature

My run command like " nohup./agent &" or "./agent"

jm33-m0 commented 11 months ago

After running, the agent will be automatically deleted,

This is expected and intentional. If you don't want it to self-delete, you can set PERSISTENCE=true when running the agent binary.

winezer0 commented 11 months ago

看起来代理二进制文件已被删除。由于 shell 需要存在代理二进制文件,因此它将无法启动,因此没有可用的 ssh shell。请检查这是否也发生在其他机器上,如果是,将有一个错误需要修复。elvsh

您可以随时打开系统外壳。use interactive_shell``set shell bash

这是意料之中的,也是有意为之的。如果不希望它自行删除,可以在运行代理二进制文件时进行设置。PERSISTENCE=true

Now I don't understand what kind of mistake this is, need your judgment

jm33-m0 commented 11 months ago

In fact, elvsh mode copies agent binary to a random location, as shown in your screenshot.

I think this is a bug of daemonize feature, which in fact doesn't work at all.