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

infinite random sessions opening #18395

Closed
Rakselz34 opened this issue Sep 21, 2023 · 3 comments
Closed

infinite random sessions opening #18395

Rakselz34 opened this issue Sep 21, 2023 · 3 comments
Labels
question Questions about Metasploit Usage

Comments

@Rakselz34
Copy link

basically every time I open the exploit, it starts connecting to these sessions infinitely, I already have more than 500 sessions open, they open and close at the same time, I've tried restarting the console, I've tried restarting kali linux but every time When I open it, it keeps opening these sessions, and there is no device with the payload installed.
How do I stop this?
Sem título

@Rakselz34 Rakselz34 added the question Questions about Metasploit Usage label Sep 21, 2023
@bwatters-r7
Copy link
Contributor

Disclaimer: I'm making some guesses here, so I could be wrong.

My guess is that you're opening a staged handler on a port that's getting information sent to it by something else. When a stager calls back to a staged handler, the handler assumes that it is the remote payload asking for the second stage of the payload, so it marks the session as started and sends the second stage.

If ANYTHING connects to the reverse staged handler, the handler assumes the session has started and yeets the second stage.

If you're using an exploit module that's not shown here, it is possible something is happening for it to call back and spawn multiple sessions like this, but from just what you've posted, my money is on something else hitting the listening port of the reverse staged handler you've started by invoking multi/handler.

One way to see is to open up wireshark and see what's hitting the listening port on your loopback; another is to use netstat with -p (requires elevation) to see what process is connecting (established) to the listening port.

@Rakselz34
Copy link
Author

Rakselz34 commented Sep 21, 2023

They are all the same, just changing the Foreign Address port

Sem título

@Rakselz34
Copy link
Author

I found the problem, I use ngrok and it is opening these sessions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Questions about Metasploit Usage
Projects
None yet
Development

No branches or pull requests

2 participants