Mythic icon indicating copy to clipboard operation
Mythic copied to clipboard

Failed to connect to rabbitmq: Server connection reset:

Open Kadoronel opened this issue 11 months ago • 51 comments

Je rencontre ce problème Failed to connect to rabbitmq: Server connection reset: quand je consulte les logs après absence du callaback! j'ai besoin de vos orientations

Kadoronel avatar Mar 18 '24 15:03 Kadoronel

Can you provide a little more information about what you're seeing?

  • if you look at sudo ./mythic-cli status does it show everything as up and healthy? A good sign that something's wrong would be a container that is up for less than 30s while the other containers have been up for a while (reboot loop essentially)
  • was this server running fine for a while, but now you're seeing an error?
  • You said you failed to get a callback and now see these errors - can you explain what happened a little more?

its-a-feature avatar Mar 18 '24 15:03 its-a-feature

Capture d’écran 2024-03-18 132601 Capture d’écran 2024-03-18 132641 Capture d’écran 2024-03-18 132724

Kadoronel avatar Mar 18 '24 17:03 Kadoronel

after implementing the payload I do not have the return to the active callback level

Kadoronel avatar Mar 18 '24 17:03 Kadoronel

What operating system are you using? Kali? Can you do a sudo docker ps and see if there are any other containers running? It kind of seems like the mythic_rabbitmq container and something else might be fighting over a port? Can you do sudo ./mythic-cli logs mythic_rabbitmq and see the logs for that container?

its-a-feature avatar Mar 18 '24 17:03 its-a-feature

Capture d’écran 2024-03-18 134419

Kadoronel avatar Mar 18 '24 17:03 Kadoronel

Linux kali 6.6.9-amd64 #1 SMP PREEMPT_DYNAMIC Kali 6.6.9-1kali1 (2024-01-08) x86_64 GNU/Linux

Kadoronel avatar Mar 18 '24 17:03 Kadoronel

Capture d’écran 2024-03-18 135059

Kadoronel avatar Mar 18 '24 17:03 Kadoronel

logs mythic_rabbittmq

Kadoronel avatar Mar 18 '24 17:03 Kadoronel

Somebody else had a similar issue and it was due to a failed agent install. Are you able to re-install the agents and c2 you currently have installed? You can do this with sudo ./mythic-cli install github [url] -f (the -f will force it so you don't have to hit yes a few times

its-a-feature avatar Mar 18 '24 19:03 its-a-feature

I did this but the problem still persists and I can't get callback active

Kadoronel avatar Mar 18 '24 19:03 Kadoronel

image

Kadoronel avatar Mar 18 '24 19:03 Kadoronel

oh ok, so it's showing apollo synced successfully which means it was able to connect to rabbitmq. Are you able to generate apollo payloads successfully?

its-a-feature avatar Mar 18 '24 19:03 its-a-feature

image

Kadoronel avatar Mar 18 '24 20:03 Kadoronel

image

Kadoronel avatar Mar 18 '24 20:03 Kadoronel

image

Kadoronel avatar Mar 18 '24 20:03 Kadoronel

I can't get the machine's interact callback

Kadoronel avatar Mar 18 '24 20:03 Kadoronel

Ok, that's great! So maybe the issue is in the configuration of the agent or something else that might be preventing you from getting a callback. What can you share about your setup? Is the agent still running on your windows box? Are you trying to connect back directly to Mythic or are you going through a redirector?

its-a-feature avatar Mar 18 '24 20:03 its-a-feature

image

Kadoronel avatar Mar 18 '24 20:03 Kadoronel

image

Kadoronel avatar Mar 18 '24 20:03 Kadoronel

image

Kadoronel avatar Mar 18 '24 20:03 Kadoronel

image

Kadoronel avatar Mar 18 '24 20:03 Kadoronel

Ah, i see you're connecting to a callback host via https and a callback port of 80. Is that what you expect? By default, the http profile is listening via http on port 80. Try going to the c2 profile page, clicking the dropdown for the http profile and clicking to edit the config. In there, there's an entry for use_ssl - set that to true then click stop and start in the UI for that profile. That should restart it to use https on port 80 like your config specifies. At that point you should get your callback

its-a-feature avatar Mar 18 '24 20:03 its-a-feature

image

Kadoronel avatar Mar 18 '24 20:03 Kadoronel

Thanks a lot

Kadoronel avatar Mar 18 '24 20:03 Kadoronel

awesome!! I wish we knew what was causing that weird server connection issue, but it seems like everything is working for you now?

its-a-feature avatar Mar 18 '24 20:03 its-a-feature

yes, I will continue and write to you about this

Kadoronel avatar Mar 18 '24 20:03 Kadoronel

image

Kadoronel avatar Mar 19 '24 03:03 Kadoronel

for downloading a file to the desktop of the machine with the path c:\users\bob\desktop I got this error back

Kadoronel avatar Mar 19 '24 03:03 Kadoronel

seems like it doesn't like something about the path. If you click to expand the task like you did in the screenshot, then the gray cog and select the keyboard icon ("View All Parameters"), what does that show?

its-a-feature avatar Mar 19 '24 03:03 its-a-feature

image

Kadoronel avatar Mar 19 '24 03:03 Kadoronel