News for hackers. Stuff that matters.
Re:An iframe from googlesyndication.com tries to access the ... by tehlike on Sunday December 19, 2021 @12:08PM (#29615741)
This is not google, but a third party ad network serving ads through google.

Google tries to sandbox the creatives in an attempt to prevent issues exactly like this, and develops browser features to prevent issues exactly like this.

This is likely a script that somehow avoided google's malware scanning pipelines.

This is definitely not google's malintent.

Disclaimer: Ex googler, worked in ads, dealed with problems like this all the time.

Re:An iframe from googlesyndication.com tries to access the ... by eganist on Sunday December 19, 2021 @12:12PM (#29615786)
> This is likely a script that somehow avoided google's malware scanning pipelines.

I can't think of a good reason for scripts through google ad syndication to be asking for camera and microphone permissions. I'd assume Google runs these scripts in something like a lab environment to see what's ultimately invoked before deploying them to production? If so, would this be indicative of both a deliberate controls bypass and a ToS violation by the ad network?

Sounds like Google Syndication may have taken care of this by enabling Permissions Policies(1) across its domains? I can't tell because the article references Feature Policy (a predecessor to Permissions Policies(2)) "in Safari" even though Feature and Permissions Policies, as best as I understand them, are delivered from the origin for implementation by the browser. So I'm kinda confused.

And if they don't implement it, it tells me they're totally fine with this kind of fingerprinting.

(1)https://developer.mozilla.org/en-US/docs/Web/HTTP/Feature_Po... (2)https://www.w3.org/TR/permissions-policy-1/

---

A prior version of this comment suggested Google should add permissions policies. I since edited it to clarify that I'm quite confused over whether it's something Google already implemented or something Safari overlaid on top of Google syndication origins since I can't verify using the origins themselves. The article seems to suggest it's something Safari specific even though the spec for both FP and PP involves receiving a set of permissions from the origin as a header and implementing them in the browser.

Re:An iframe from googlesyndication.com tries to access the ... by soared on Sunday December 19, 2021 @12:48PM (#29616229)
Yes - banner ads are constantly targeted by malicious actors. My employer pays a vendor something like $200k/mo for creative scanning to avoid issues like this. Google certainly spends tens of millions a year trying to avoid issues like this.

See vendors like “the media trust”

Re:An iframe from googlesyndication.com tries to access the ... by VRay on Sunday December 19, 2021 @03:04PM (#29617773)
Hey, if you want, you can give me $200k/month and I'll scan your ads to make sure they're just flat fucking image files without any arbitrary bullshit code
Re:An iframe from googlesyndication.com tries to access the ... by teej on Sunday December 19, 2021 @06:10PM (#29619521)
It took 10 seconds of searching to find a flat fucking image file exploit. I even skipped the recent NSO group zero-click exploit. Enjoy - https://www.bleepingcomputer.com/news/security/new-stegano-e...
Re:An iframe from googlesyndication.com tries to access the ... by boomlinde on Sunday December 19, 2021 @08:46PM (#29620699)
Doesn't seem like a great example since the image itself is perfectly safe. The exploit still needs JavaScript to extract and execute the payload embedded in the image, and then relied on Flash to install malware. Without JavaScript it's just an image like any other.

The NSO group iMessage exploit is a more interesting example, essentially turning a poorly bounded JBIG2 decompressor into a virtual machine.

Re:An iframe from googlesyndication.com tries to access the ... by VRay on Monday December 20, 2021 @02:17AM (#29622242)
haha, if a country wants to spend a 9 figure sum or someone comes back in time from the future to hack me, I'll be happy to consider myself pwned

It's a huge bummer that I HAVE TO block all ads as a security measure, though, and that people accept "Download advertisement.exe and run it in a half-assed sandbox or you're stealing that clickbait article" as the way things should be

Re:An iframe from googlesyndication.com tries to access the ... by boomlinde on Monday December 20, 2021 @07:05PM (#29632144)
> if a country wants to spend a 9 figure sum

After the initial investment in developing the exploit and before the vulnerability was patched, there would have been a near zero cost to hack any one user in particular.

Re:An iframe from googlesyndication.com tries to access the ... by tgsovlerkhgsel on Sunday December 19, 2021 @06:37PM (#29619782)
This gets a lot harder to pull off when the images are transcoded by being decoded in one sandboxed process that outputs a bitmap, then encoded in another sandboxed process that outputs what ultimately reaches the user.
Re:An iframe from googlesyndication.com tries to access the ... by cpeterso on Sunday December 19, 2021 @10:53PM (#29621396)
Do ad syndication networks like Google transcode images provided by advertisers? When an advertiser uploads an image, Google could transcode it using a strict decoder and their own safe encoder to produce a clean image for syndication.
Re:An iframe from googlesyndication.com tries to access the ... by jimbojet on Sunday December 19, 2021 @02:23PM (#29617342)
Malicious script can (1) fingerprint and detect lab machines and therefore not do bad thing — this is arbitrarily easy if Google test lab is the first to ever execute their script, (2) over time build a graph of IPs, geos, test machine characteristics that essentially allow them to avoid the world’s entire test lab infrastructure (there’s only a fixed number of test lab providers in the world since it’s so expensive to set up this infrastructure), (3) yes, bypassing testing like this is a violation of ToS, but that is fairly meaningless as entities and IPs are cheap to incorporate, (4) not sure what you’re saying about permission policies across its domains? Google does have such policies unless I’m missing something.
Re:An iframe from googlesyndication.com tries to access the ... by tehlike on Sunday December 19, 2021 @01:52PM (#29616999)
"In a lab environment" -> Certainly happens, but what if the script targets "specific devices" like "samsung galaxy s10" which google won't be able list exhaustively?

What if bad actors figured out a way to identify google's emulators and avoid doing bad stuff in that situation?

The part i said "google develops browser solutions to prevent issues like this" is exactly what features policy will end up doing. But google's ad systems and chrome features don't always move at the same speed, but you can be sure that whatever ad malware team is finding will help chrome team to strengthen their defense.

Re:An iframe from googlesyndication.com tries to access the ... by d0gbread on Sunday December 19, 2021 @02:09PM (#29617190)
I thought they meant more like sandbox environment. Why would the API to access those things exist at all?
Re:An iframe from googlesyndication.com tries to access the ... by jimbojet on Sunday December 19, 2021 @02:17PM (#29617285)
The API exists because zoom.com request microphone and camera through an iframe is a legit use case. As OP said below CSPs exist so that enterprises can lock down those vulnerabilities. But wouldn’t make sense to lock it down for all consumers.
Re:An iframe from googlesyndication.com tries to access the ... by tehlike on Sunday December 19, 2021 @02:11PM (#29617221)
Sandbox is provided through things like ContentSecurityPolicy and Feature Policies. See my comment on this.
Re:An iframe from googlesyndication.com tries to access the ... by tinus_hn on Sunday December 19, 2021 @01:53PM (#29617019)
Javascript is Turing complete so it is impossible to determine what the script is going to do in all environments without running it in all environments.

The script could just detect the test environment and avoid triggering its malicious behavior.

Re:An iframe from googlesyndication.com tries to access the ... by charcircuit on Sunday December 19, 2021 @03:30PM (#29618029)
>Javascript is Turing complete so it is impossible to determine what the script is going to do in all environments without running it in all environments.

No, it just means that it is impossible to do for every program. Google could just make it reject scripts it is unable to handle.

Re:An iframe from googlesyndication.com tries to access the ... by tgsovlerkhgsel on Sunday December 19, 2021 @06:36PM (#29619765)
IMO, if you serve content to the user, you're responsible for making sure you're not serving malware, e.g. by not allowing parties you cannot trust to serve arbitrary code.

And this doesn't apply just to the ad network, it also applies to the publisher. I'd really like the publishers to be held liable for malvertising they serve.

There is nothing inherently hard about serving safe ads, we've gotten pretty good at separating code from content nowadays. There is no reason why a "classic adsense" three-blue-links ad should be able to inject malware. Even images can be served safely. The only reason why this happens is because in pursuit of a few percent more profit (and more tracking) everyone allows everyone to include arbitrary scripts.

Re:An iframe from googlesyndication.com tries to access the ... by thehappypm on Sunday December 19, 2021 @07:57PM (#29620404)
The browser is the main defense here. Google serves ads through iFrames. Browsers control resource access.
Re:An iframe from googlesyndication.com tries to access the ... by dubbelboer on Sunday December 19, 2021 @12:48PM (#29616216)
Not just ads, anyone can execute any code they like on tpc.googlesyndicatio.com. See: https://blog.dubbelboer.com/2016/06/10/embed-into-tpc-google...
Re:An iframe from googlesyndication.com tries to access the ... by _fat_santa on Sunday December 19, 2021 @12:40PM (#29616118)
> This is likely a script that somehow avoided google's malware scanning pipelines.

Why wouldn't google just block access to those API's? I mean I guess that's what this sandbox did.

Re:An iframe from googlesyndication.com tries to access the ... by tehlike on Sunday December 19, 2021 @01:49PM (#29616966)
Some of these APIs are not overridable inside javascript - overriding is pretty much the only way this can be prevented - short of browser features like CSP and FP. This needs to be the first thing that happens, but there's no standard api to run on your browser to do that, so things have flaws.

A static analysis is often relatively easy to circumvent, something like base64Decode(encodedMaliciousScript) can by-pass them.

Google does various runtime/dynamic analysis to figure out issues, but scripts can do interesting things to circumvent those too (like targeting specific devices through user agent and so on).

It's an arms race, often, where google catches up pretty fast, but bad actors move faster.

Feature Policy check addresses these but ad system and chrome features don't always move at the same speed, and often time there are trade offs that needs to be addressed first before it can be widely deployed.

Re:An iframe from googlesyndication.com tries to access the ... by musikele on Sunday December 19, 2021 @12:38PM (#29616099)
I think you're right, also in the script's URL it's clear the name of the company that owns this particular script. If you know adtech companies good enough, it should be easy to spot.

Note: I also work in adtech, and my daily job is to maintain a library that has to load inside google's safe frame...

Re:An iframe from googlesyndication.com tries to access the ... by matsemann on Sunday December 19, 2021 @01:57PM (#29617065)
Why allow anything in an ad besides text or images? Why allow others to run arbitrary code through your network. Inexcusable by Google imo.
Re:An iframe from googlesyndication.com tries to access the ... by ma2rten on Sunday December 19, 2021 @03:09PM (#29617813)
That would be anti-competitive by Google. These are different ad networks, not advertisers. Ad networks need to be able to do their own attribution and click spam detection.
Re:An iframe from googlesyndication.com tries to access the ... by tomrod on Sunday December 19, 2021 @03:19PM (#29617914)
You missed the question.

Why allow any thing on any advertisement, regardless of network, that is not image or text? Anything else opens up security issues.

Re:An iframe from googlesyndication.com tries to access the ... by charcircuit on Sunday December 19, 2021 @03:31PM (#29618041)
He just told you?

"Ad networks need to be able to do their own attribution and click spam detection."

Re:An iframe from googlesyndication.com tries to access the ... by tomrod on Sunday December 19, 2021 @05:58PM (#29619431)
This doesn't answer why the end product (the person receiving the ad) is exposed to anything but images and text, which was the question.

Step outside technical approach mode and look at it from the highest level possible -- why are end users ever given more than images and text, or, why are ads anything more than a very simple a href tag.

Spam detection and other protection of the ad platform should be done long before this information ever goes to the eyeball product owners.

Re:An iframe from googlesyndication.com tries to access the ... by tehlike on Sunday December 19, 2021 @11:52PM (#29621683)
No - spam protection needs as many signals as possible, sadly.

You will have headless browsers simulating clicks and so on. This gets extremely hard over time fake, and the more signals there are, the easier it's to spot anomalies.

In a way, the thinking is - a malicious actor will get at least a few of those signals inorganic and ML can detect them...

"Long before the information ever goes to the eyeball" => wish it was true.