-
Notifications
You must be signed in to change notification settings - Fork 992
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
[Feature] Websocket auto reconnect #117
Comments
I haven't tested the code I wrote in there, but what happens when you use it? Specifically what happens in the Network tab of your browser inspector? Do you seem connection attempts? In the browser inspector Console, are there errors/notices? |
I have tested the following scenarios:
In all cases I have tested with http://www.nfl.com for the initial attack and then http://www.nfl.com/PoisonTap for testing the backdoor. While the PT is plugged all the code is injected just fine, the main issue why I think reconnect could be handy is in the case of chrome, more so in windows due to the abort when unplugging the PT, so even if the cache is not working if the code is still loaded it will try again when internet is avaliable. I think I messed something while changing the file I will try from scratch and let you know the results of my tests, but I will appreciate if you let me know where exactly should I paste the code, so far what I did is that in backdoor.html out of the two I replaced the first one with that code and left the connect outside of the <script> tag. |
Hi Samy, I got some time today and did the changes with the code on the commnet I mentioned, the script ended up like this:
It works just fine, the only problem is that in every reconnect it spawns one more ws, meaning that after two reconnect you have three ws. I have tested and apart from that the backdoor works just as fine as the original one. |
After a few modifications I ended up with this code that works just fine, whenever the ws closes or shows and error its closed and a new one spawns.
Only problem here is that when the network changes due to the PT being removed the route changes doesn't seem to apply properly to the website till you refresh it causing the ws to not reach the backend even if internet is restored. So far I have tested this in linux with chromium and firefox and with chrome in windows with similar results. |
Hi,
I tried to add the code proposed by samyk in #29 (comment) without much luck. I tried changing the first script under backdoor.html with that code.
I think the websocket reconnect is important for cases like in (this is from my tests) windows 10 with chrome where the websocket aborts when you remove the PT and due to the caching issue in chrome you can't perform and f5, if the websocket tried to reconnect I think this should fix the issue.
That said, I must thanks Samyk and everybody posting here, for this incredible tool and with the issues marked help resolve any issues I could find :)
The text was updated successfully, but these errors were encountered: