Show more

“Surprise” of the day: if you add a security.txt file to your website, the only “people” to notice will be spam bots. 😢

TIL that some developers will implement their own heavily -inspired framework on top of , with all the security benefits conveniently removed. Oh my eyes…

“Edit (2020-10-28): As @hfiguiere@twitter.com pointed out, extensions acquire this Verified badge by paying for the review. All the more interesting to learn what kind of review has been paid here.”

Show thread

“So it’s very surprising that the browser extension in its current form is not merely allowed on Add-ons but also marked as Verified. I wonder what kind of review process this extension got that none of the remote code execution mechanisms have been detected.”

Show thread

“In the end, I found that the Honey browser extension gives its server very far reaching privileges, but I did not find any evidence of these privileges being misused. So is it all fine and nothing to worry about? Unfortunately, it’s not that easy.”

Show thread

“On a side note, I couldn’t fail to notice one more interesting feature not mentioned in the privacy policy. Honey tracks ad blocker usage, and it will even re-run certain tracking requests from the extension if blocked by an ad blocker. So much for your privacy choices.”

Show thread

“… this allows it to load any script from PayPal at will. These scripts will be able to do anything that the extension can do: read or change website cookies, track the user’s browsing in arbitrary ways, inject code into websites or even modify server responses.”

Show thread

“And so the Honey extension also has [obfuscated JavaScript] VIM code that will run in the context of the extension’s background page. It seems that the purpose of this code is extracting user identifiers from various advertising cookies.”

Show thread

“So here is a mechanism, providing the server with a simple way to run arbitrary JavaScript code on any website it likes, immediately after the page loads and with sufficient obfuscation that nobody will notice anything odd. Mission accomplished?”

Show thread

“This time, there is no point decoding the base64-encoded data: the result will be binary garbage. As it turns out, the data here has been encrypted using AES, with the start of the string serving as the key.”

Show thread

“Are you saying document.querySelector()? No, guess again. Is anybody saying jQuery? Yes, of course it is using jQuery for extension code as well! And that means that every selector could be potentially booby-trapped.”

Show thread

“Why did they even bother with this complicated approach? Beats me. I can only imagine that they had trouble with shops using CSP in a way that prohibited execution of arbitrary scripts. So they decided to run the scripts outside the browser where CSP couldn’t stop them.”

Show thread

“So is this some outdated functionality that is no longer in use and that nobody bothered removing yet? Very likely. Yet it could jump to life any time to collect more detailed information about your browsing habits.”

Show thread

“So that’s where this Honey privacy statement is clearly wrong: while the data collected doesn’t contain your email address, Honey makes sure to associate it with your account among other things. And the account is tied to your email address.”

Show thread

I did not expect the browser extension to provide great privacy. Still, finding four (!) different mechanisms allowing the Honey server to run arbitrary code on any website exceeded my expectations by far. It even uses AES for obfuscation.

palant.info/2020/10/28/what-wo

I have a new theory: the whole elaborate thing with a custom JavaScript interpreter is meant to circumvent Content Security Policy, because the site wouldn’t allow the extension to inject arbitrary JavaScript code.

Show thread

Except: that extension has no scruples running remote JavaScript elsewhere. Could it be that Mozilla reviewers only noticed this one instance, so it’s the only one which has been “fixed”?

Show thread

My only theory so far: this whole thing is a pretense to satisfy Mozilla’s requirements. Because Mozilla (unlike Google) doesn’t allow extensions to run remote code, as compromising the server responsible for this code would compromise the extension as well.

Show thread

So this browser extension goes through lots of trouble to sandbox remote JavaScript: it receives the code as a parsed syntax tree, executes it via a JS-based JavaScript interpreter. And then the document’s jQuery instance is exposed to the sandboxed script. I have questions…

Why? I mean: seriously, why?

Turns out, the Unwebpack script in my JS Analysis repo was only accepting and no bundles. No idea how I got these mixed up, but now both are supported, to some degree. Webpack output can vary a lot, I have only some scenarios covered.

github.com/palant/js-analysis/

Show more
Infosec Exchange

A Mastodon instance for info/cyber security-minded people.