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

Merlin server returns "Invalid job Type 0" when running modules #107

Closed 16032144 closed 3 years ago

16032144 commented 3 years ago

Prerequisite

Expected Behavior

When selecting a module and setting an Agent, the module should send a job to the Merlin-agent.

Actual Behavior

Currently when trying to run a module, the server responds with "Invalid job type 0"

Steps to Reproduce Behavior

Info about the agent that is connected to the merlin server: info

Selecting the minikatz module and try to run it. It returns the "invalid job type 0" message. Minikatz

Minidump does show a similar problem, but a don't know if this is caused by the same bug. Although it prints out: "Lsass dump succesful", the dump isn't found in the "/data/agents/"Agent ID"/" Minidump

Misc Information

Ne0nd0g commented 3 years ago

Looks like the problem is due to this hard coded cmd value. I removed functionality for that and replaced it with run. I'll get a patch pushed out soon and likely implement constants so that way this particular issues is less likely to come up.

https://github.com/Ne0nd0g/merlin/blob/master/pkg/api/modules/modules.go#L108