You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The python agent does not change its delay/jitter settings upon receiving a new configuration.
As you see in the screenshots, the delay has been set to 2 sec in the first example and 30 sec in the last example. In both cases the agent checks still checks in every 5 sec.
Expected Behavior
The agent should check in corresponding to the delay/jitter set.
The task to change the delay/jitter is a ID=100 task that is handled by dynamic_code_execute_wait_nosave().
This method compiles python code received from the server and executes it:
f"global delay; global jitter; delay={delay}; jitter={jitter}; print('delay/jitter set to {delay}/{jitter}')",
This string gets compiled and executed by the method above. This may set a global variable delay and jitter to the new value. But these not used anywhere. The delay and jitter is stored in the delay and jitter attributes of the MainAgent object. These never get adjusted, because they are not accessible within the executed statement.
The problem can be illustrated with this little script:
Is there an existing issue for this?
Empire Version
5.12.0
Python Version
3.12.7
Operating System
Kali Linux
Database
MariaDB
Current Behavior
The python agent does not change its delay/jitter settings upon receiving a new configuration.
As you see in the screenshots, the delay has been set to 2 sec in the first example and 30 sec in the last example. In both cases the agent checks still checks in every 5 sec.
Expected Behavior
The agent should check in corresponding to the delay/jitter set.
Steps To Reproduce
sleep 30 0.0
Agent will still check in every 5 sec.
Anything else?
There is a python scope bug located in empire/server/data/agent/agent.py.
The task to change the delay/jitter is a ID=100 task that is handled by
dynamic_code_execute_wait_nosave()
.This method compiles python code received from the server and executes it:
In case of delay/jitter setting the python code send by the server is defined in empire/server/core/agent_task_service.py:
This string gets compiled and executed by the method above. This may set a global variable delay and jitter to the new value. But these not used anywhere. The delay and jitter is stored in the delay and jitter attributes of the MainAgent object. These never get adjusted, because they are not accessible within the executed statement.
The problem can be illustrated with this little script:
The text was updated successfully, but these errors were encountered: