Ne0nd0g / merlin

Merlin is a cross-platform post-exploitation HTTP/2 Command & Control server and agent written in golang.
GNU General Public License v3.0
5.03k stars 798 forks source link

Feature Request: View Completed Agent Job Results On-Demand #153

Open timukas opened 6 months ago

timukas commented 6 months ago

Prerequisite

Expected Behavior

Get output of completed tasks.

Actual Behavior

Running core or linux specific commands will show output to Merlin-CLI once it's being executed. But i'm not able to view output of already completed task. Is there a way to see task's output in Merlin-CLI?

I can see all output in 'merlinClientLog.txt' file, but did not find where to see it in Merlin-CLI interface.

Steps to Reproduce Behavior

Misc Information

Ne0nd0g commented 6 months ago

Merlin CLI does not store or show historical command entry or results. As you identified, the CLI log file has that information as well as the agent's log file on the server.

Is your use case that you executed command 1 on Monday, disconnect, reconnect with the CLI on Tuesday and can't see the output from command 1?

timukas commented 6 months ago

It's more like doing stuff during 1 day. I have several sessions with different callback settings (some agents respond fast, some with 5+ minute delays) . After running many various commands on different targets, output is somewhere far away in terminal window. Scrolling up/down and/or searching for some strings may be not the best solution. Also terminal buffer can be limited to 1-2K lines and then output from terminal is not visible.

Ideally would be awesome to show completed task's output at any time.

Ne0nd0g commented 6 months ago

I'm trying to think through the best way to implement this feature request. I could load x number of line of previous job request/response when you switch into a specific agent's menu. Alternatively, I could load the command and results for specific job number but I'm worried it will get impractical to remember the job IDs. What workflow would you use to see a completed task's output at any time?