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

ReverseListenerBindAddress bug with jobs -K #6936

Closed
vysecurity opened this issue Jun 2, 2016 · 1 comment
Closed

ReverseListenerBindAddress bug with jobs -K #6936

vysecurity opened this issue Jun 2, 2016 · 1 comment

Comments

@vysecurity
Copy link

Reproduce

It was found that when issuing the following commands:

msf > use multi/handler
set paylmsf exploit(handler) > set payload windows/meterpreter/reverse_https
payload => windows/meterpreter/reverse_https
msf exploit(handler) > set LHOST 52.50.62.3
LHOST => 52.50.62.3
msf exploit(handler) > set LPORT 443
LPORT => 443
msf exploit(handler) > set ReverseLIstenerBindAddress 127.0.0.1
ReverseLIstenerBindAddress => 127.0.0.1
msf exploit(handler) > set EXITONSESSION false
EXITONSESSION => false
msf exploit(handler) > run -j
[*] Exploit running as background job.

[*] [2016.06.02-11:09:40] Started HTTPS reverse handler on https://127.0.0.1:443/
[*] [2016.06.02-11:09:40] Starting the payload handler...
msf exploit(handler) > [*] [2016.06.02-11:09:43] https://52.50.62.3:443/ handling request from 127.0.0.1; (UUID: bg9z6xgg) Staging Native payload...
[*] Meterpreter session 1 opened (127.0.0.1:443 -> 127.0.0.1:44219) at 2016-06-02 11:09:43 +0100

A shell is obtained. After obtaining a shell, you need to do jobs -K. This no longer kills the port. You can check this with a netstat -ntlp.

However, before obtaining a shell, jobs -K will kill the port. After obtaining a shell, the jobs -K no longer kills the port.

Msf version

Just git cloned it today, and also running on Kali.

@egypt
Copy link
Contributor

egypt commented Apr 24, 2017

Working as expected. The HTTPS handler has to continue listening to be able to talk to the session. When the session exits, the listener will shut down.

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

No branches or pull requests

4 participants