Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wit ll not run on AJAX Linux #108

Closed
3 tasks done
prizzy123 opened this issue Jun 8, 2021 · 9 comments
Closed
3 tasks done

Wit ll not run on AJAX Linux #108

prizzy123 opened this issue Jun 8, 2021 · 9 comments

Comments

@prizzy123
Copy link

prizzy123 commented Jun 8, 2021

Hey guys,

This is a fantastic tool! I am trying to run Merlin through AJAX linux web console but am unable to do so. I have researched this for literally days on end to no avail. I have attempted to install go on AJAX but there are no env tables that I can find in the code, I have attempted to create a bash file of the server from Kali and tried uploading to AJAX and that did not even seem to recognize the bash file as a .sh file at all. Can someone help?

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:
  • Merlin Build:
  • Go Version:
  • GOPATH Environment Variable:
  • GOROOT Environment Variable:
  • Operating System:

Expected Behavior

Run merlin server within Ajax

Actual Behavior

Steps to Reproduce Behavior

Misc Information

@Ne0nd0g
Copy link
Owner

Ne0nd0g commented Jun 9, 2021

@prizzy123 I'm not familiar with AJAX Linux, can you share a link to it? If you are using a pre-compiled version of Merlin, you do not need to install Go. The compiled binaries contain everything you need. What happens when you execute Merlin on AJAX Linux?

@patrickruda
Copy link

AJAX is a set of web development techniques using many web technologies on the client-side to create asynchronous web applications. The application I am using is http://web-console.org/. This utilizes PHP which I am attempting to use to connect to a remote Linux machine via SSH.. So, in essence, I am trying to access Merlin via a web browser terminal. Obviously the AJAX terminal has limited functionality which is why I am struggling with connecting. I have tried cloud-cloud via AWS with AJAX, I have tried numerous PHP Shell apps, and have been working endlessly for weeks locating a way to use a browser to connect to Merlin to no avail. Please help me!!

@Ne0nd0g
Copy link
Owner

Ne0nd0g commented Jun 22, 2021

@prizzy123 I wanted to follow up with you before I close this issue due to lack of response.

@patrickruda I'm familiar with AJAX as a set of web development techniques, the original post language led me to believe it was a specific Linux distribution and less of a set of technologies. My initial guess is that the web consoles are not streaming STDOUT/STDERR back. Starting the Merlin server will prevent the process from ending because it never returns unless you issued the exit command. Because the Merlin server process is not returning, you're likely not seeing any output. Can you post example screenshots of what you're attempting to do and the result of doing so?

If you want to run Merlin through a web console, I recommend using https://github.com/its-a-feature/Mythic as a controller for the Merlin agent. To get started, check out this repository https://github.com/MythicAgents/merlin

@prizzy123
Copy link
Author

prizzy123 commented Jun 30, 2021 via email

@Ne0nd0g
Copy link
Owner

Ne0nd0g commented Jun 30, 2021

Do have an example of what you're having a hard time with? I would be happy to provide additional information.

@patrickruda
Copy link

patrickruda commented Jul 1, 2021 via email

@Ne0nd0g
Copy link
Owner

Ne0nd0g commented Apr 21, 2022

@patrickruda I wanted to follow up one last time before I close this issue. I see your last post, but I'm able to duplicate. Can you provide duplication steps?

@patrickruda
Copy link

patrickruda commented Apr 21, 2022 via email

@Ne0nd0g
Copy link
Owner

Ne0nd0g commented Apr 22, 2022

Can you please elaborate more on what you mean by portmap? My initial thought is that this isn't a problem with Merlin, but a problem with how networking is setup.

It is important to note that the agent in this repository WILL NOT connect to a Mythic. You must build the Merlin agent from within Mythic. This repository and the agent that is used to connect to Mythic use two different clients.

I'm unable to fully understand your setup. Once you've setup and installed Mythic, you can access the Mythic web interface on port 7443. Port 7443 is not used for agent command and control.

The Merlin agent must be configured for the callback port documented in your C2 profile. To check, log into Mythic and click on the headphones icon in the upper right hand corner. Next click on the down arrow for the Stop Profile button on the http C2 profile. Then click on View/Edit Config and check to see what the port value is.

image

When you build the Merlin agent, enable the Verbose and Debug options so you can see the agent connecting or you can see the reason why it is not connecting.

image

When you get to the C2 profile, make sure the protocol used with the Callback Host matches your C2 profile from earlier (e.g., HTTP for port 80 without TLS and HTTPS for port 443 with TLS). Lastly, make sure the Callback Port matches your C2 profile from the first screenshot.

image

After you've built a Merlin agent from within Mythic, download it and execute it. After executing the payload, you will see the agent's connection attempts and can use that information to troubleshoot.

I'm going to close this issue because I'm unable to identify or duplicate a problem with the agent. This is more configuration and setup. I'm happy to chat with you about it until we get it going, but we will do so in Slack. Join the BloodHoundGang Slack and send me a DM or join the #merlin channel. Additionally, join the #mythic channel if you have questions about Mythic that don't relate to the Merlin agent.

@Ne0nd0g Ne0nd0g closed this as completed Apr 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants