Ne0nd0g / merlin

Merlin is a cross-platform post-exploitation HTTP/2 Command & Control server and agent written in golang.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature Request: View Completed Agent Job Results On-Demand

timukas opened this issue · comments

Prerequisite

  • I have read the README
  • I have search the opened & closed issues
  • I have search the WIKI and its FAQ page

Environment Data

  • Merlin Version: 2.1.0 (Latest for Linux x64)
  • Merlin Build: 2.1.0 (Latest for Linux x64)
  • Go Version: go1.21
  • GOPATH Environment Variable: /usr/local/go
  • GOROOT Environment Variable: /root/go
  • Operating System: Kali 2023.4

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

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?

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.

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?