Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Running OWA under Safari results in spam injected into HTML-based outgoing emails

Running OWA under Safari results in spam injected into HTML-based outgoing emails


Laptop=MBPro circa 2010, Yosemite 10.10.1; Safari 8.0.2 (+ Ghostery 5.4.1, AdBlock 2.15). Little Snitch 3.5.1 (turned on, always) and Apple firewall turned off.


When running my laptop, sending an email (in HTML format) using Outlook Web Application (OWA) running in Safari, the outgoing email "hello world" runs about 256KBytes and contains an HTML spam-blob. Sample of the spam-blob below.


I did not figure this out until a couple clients rejected my email (many did not) as spam. I thought it was their problem, but I am, it turns out, the spammer, unknowingly. If I send from my personal account at Earthlink WebMail, both rich-text or plain text emails go out without problems. Then I sent OWA email to myself in Hello World messages, which showed up in Earthlink in the spam bucket, containing 256KBytes.


What stops the spam:

1) In OWA, if I change options from HTML to PLAIN TEXT, the problem stops. I can turn this puppy on and off like a light switch.

Gear_icon -> Options -> Mail -> Layout -> Message format

2) If I run OWA under Firefox (35.0.1, with adblock and ghostery), the problem DOES NOT OCCUR. Rich text messages appear to be going out without spam injection.


What does not stop the spam:

3) I was working without a signature-appended, then added three lines of text I typed in. Turning signature on or off seems to have no effect on whether spam goes out or doesn't. I do not have a GIF or image in my sig.

4) Twiddling with Ghostery (whitelist site, or not, or off altogether) seems to have no effect.

5) Twiddling with AdBlock (suspend, or turn off altogetehr) seems to have no effect.

6) Problem occurs when I use a different mac mini running same revisions as the laptop.

7) Also, I recently installed a Java update (jre-8u31...) just a few days ago, but the spam injection has gone on before and after the change.


I do not have other browsers, nor do I have time to install and use yet another browser: I have to conduct business on these machines. I suspect Chrome would not have the problem.


I have tried sending email in the Apple mail client without seeing any problems, but I am NOT planning to hook up Apple mail to synch with the Outlook mailbox. That would be another data point. I just am running short of patience to configure one more email thing. And, I do not want to install Outlook Exchange on my mac.


And, I've tried looking for suspicious site-access in the Little Snitch monitor log (i.e. while running OWA) but don't see anything striking.


Do I have a virus? I don't know, but don't think so (stop laughing). I've run MacScan in authenticated mode a few times this month, doesn't find anything, and I've had a clean system with no problems really for years. Opened a support question for this issue with MacScan today.


I don't know what web-based Outlook is doing or scripting, but I highly suspect some virus is in the scripts that is injecting a spam payload into the web mail. ?? The only other Msft products installed are Office for Business, part of a package that I got with GoDaddy. I did NOT want the Outlook Exchange client, so I deleted it after the download and never installed Outlook as a client (poutlook ?).


I upgraded from OS 10.something (pre-Mavericks) to Yosemite maybe a month ago. I set up this Outlook web mail account around the same time for business email, from Godaddy (and they hire Microsoft to host the Exchange server). GoDaddy is the front-line support, I am not able to get support from Microsoft for this service.


I have been on the support line with GoDaddy and Earthlink a lot: Earthlink to help unblock the incoming stuff marked as spam so I could figure out why stuff went "missing." After 8 hours on the phone, GoDaddy has taken a few sample files (with and without spam) and seemed very interested to "escalate" it . Support seems to be leaning towards: sounds like a bug in Safari, try Chrome or Firefox ! But GoDaddy you do not get issue-tickets, there is not a web forum to watch the investigation: it went down a dark hole AFAIK. And I truely believe there is some type of security breech and a hole in safari that needs to be plugged.

Since I can't find a "security" heading in Apple user forums (nor at GoDaddy - what forums?), I am hoping to redirect Apple security team to look at his. Seriously: whatever this payload is, it could be nastier. Right now it just seems to take up space.


And, I could try the upgrade to Yosemite 10.10.2 (that came out, like, yesterday). I will wait for the gnashing of teeth to subside on the forums, to see if 10.10.2 upgrade will disrupt my work! (And, it will wait until I drive 1.5 hours to where there is a connection faster than rural DSL to download an OS upgrade. Hello Apple, you left behind us folks who live rural.)


Here is a sample blob of the spam that is being injected. I have a few text files of it (full headers etc). I am replacing the HTML chars left-arrow and right-arrow with left-paren and right-paren, so this blob won't get interpreted...


(html)

(head)

(meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-=

1")

(style type=3D"text/css" style=3D"display:none")(!-- p { margin-top: 0px; m=

argin-bottom: 0px; } .widget_sej_sidebar_ad, .widget_sidebaradwidget, .widg=

et_sponsored_content, .widget_uds-ads, .widget_vb_sidebar_ad, .widget_wnd_a=

.... and so on for a long long while

[onclick^=3D"window.open('http:JUNK/search/"]=

, a[data-redirect^=3D"this.href=3D'http://JUNK/redir?"=

], a[href$=3D"/JUNK.shtml"], a[href^=3D" http://ads.JUNK/"], a[hre=

f^=3D"http://JUNK/"], a[href^=3D"http://JUNK/"], =

... and more and more.

Macbook Pro 7.1 2010, 13" 4GB RAM 2.4GHz CPU, Mac OS X (10.6.6), 256 GB RAM Disk - so speedy!

Posted on Jan 28, 2015 1:31 PM

Reply
10 replies

Jan 29, 2015 3:27 AM in response to rj_oregon

I think that AdBlock may actually be your problem. See:


http://support.getadblock.com/discussions/problems/10649-apple-osx-safari-and-of fice-365-outlook-web-app-html-injection-issue-when-sending-emails


If this is actually the case, that's important to know. Many people use AdBlock, and many people on these forums recommend it. If it is injecting ads into OWA e-mails, that's something those folks will need to know about! (Unfortunately, I have no way of testing this personally, not having an OWA account.)

Jan 29, 2015 5:36 AM in response to thomas_r.

I found a colleague who has access to OWA, and he tested while using AdBlock Plus, and sees the same thing.


However, on closer inspection of the test e-mail posted in the link I provided in my last reply, it looks like this is not actually malicious injection. It looks like a very lengthy set of CSS modifications designed to make many different ad-related HTML elements invisible. I'm guessing this is due to a bug in AdBlock and AdBlock Plus that has yet to be addressed, and not due to any kind of sneaky or malicious injection.

Jan 29, 2015 11:00 AM in response to thomas_r.

Please don't use the test sample I put in the bug report as a sample of what's going on. It is 256K of crap. I don't have the expertise to extract the "interesting" part. Some of my recipient's systems (Barracuda for one) are marking this as spam and rejecting it, including earthlink and Smarsh. I have used this OWA only briefly but used Adblock and Safari and Earthlink web mail for years: why no spam injection on that platform?


If you like email me out-of-band and I can send you a full sample .txt file of "hello world" that takes 3K in plain text, 256KByte in rich-text, most of it injected.


Is there something you see in your friend's adblock-injected email that says "This block inserted by AdBlock to prevent XYZ?"

Jan 29, 2015 11:04 AM in response to thomas_r.

That link to Adblock is interesting. When I find time I will try again disabling, or uninstalling ad block. I did try "suspending" adblock during an email session and the glop got injected anyways, I will try again with uninstalling it.

This is not a feature in adblock, I view it as a bug. I do not appreciate anything that makes a 3K message into 256KB. Fills up my earthlink webmail real fast!!!

Jan 29, 2015 12:09 PM in response to rj_oregon

rj_oregon wrote:


If you like email me out-of-band and I can send you a full sample .txt file of "hello world" that takes 3K in plain text, 256KByte in rich-text, most of it injected.


If it looks anything like the sample here, that's unnecessary:


Test_Email_Adblock_enabled.txt


If what you see is substantially different, though, I'd be interested in seeing it. (I can't e-mail you, though, as I don't know your e-mail address. You can find mine, though, by looking at the contact link at the bottom of any page on my site, listed in my profile here.)


This is not a feature in adblock, I view it as a bug.


I agree, it should not be doing that.


My suspicion is that AdBlock works by adding this code to every page you view, thus rendering the advertising elements invisible. However, in the case of OWA, it must be inserting that code in a bad place, where it shows up in the message. Mail servers will be prone to rejecting such a message, probably because some of the strings that code uses to identify these ads might look malicious. There's nothing that I can see in that code that's actually malicious, though... just a bunch of CSS conditions that make matching elements invisible.

Jan 29, 2015 3:37 PM in response to thomas_r.

thomas_r, you are great!


On yet another machine (also Yosemite 10.10.1, also Safari 8.0.2), I set out to do your experiment, and first try it works as you suggest, adblock seems to be the culprit.

1) Safari, with adblock on, sending OWA messages as text-only: no spam injected. (3KB hello world)

2) Safari, with adblock on, HTML enabled in OWA, and got the spam injection. (254 KB)

3) remove adblock, restart Safari. Message sent still with HTML enabled from OWA: no spam injection.


Also, I looked at your sample text. Mine looks a lot like the one you posted.


Well there it is, we can tell adblock it has something to fix.

Why would it not happen in Firefox: why does AdBlock choose to behave this way under safari only?


If it is adding that much code to every page I view, to make it block ads, I guess that's what they've got to do.

But they need to figure out why their OWA injection is doing this. So for now: I'm gonna see ads !!


Great work Thomas, and I will continue to test to see if this is a one-off result or the real problem. Looks like you nailed it.

You have people at AdBlock already aware of this, right?

Jan 29, 2015 3:58 PM in response to rj_oregon

I ran another test. Installed adblock 2.17 (I reported the version with the problem was 2.15 adblock).

Still happens in 2.17 adblock.

Also for those who didn't catch on to this (I had not) adblock and "adblock plus" are two entirely different products from different folks. And I think I have a mixture on my systems of one or the other. But I can confirm it is adblock v2.15 and 2.17 where I see the problem.

Feb 16, 2015 9:01 PM in response to rj_oregon

In addition to this being an adblock problem, adblock's proposed workaround:

pausing or whitelisting the OWA site in adblock will work around this problem.

Once I get logged in at outlook.office365.com I "disable adblock on this page," I tried a few test emails and so far, no more junk-injection.


Just think, when adblock does finally fix this for all the users

who don't know they are "pseudo-spamming" with every message,

the world volume of internet byte traffic

will be systematically

decreased by....

well,

250KBytes per email, times X Outlook users, times Y emails...

One. Small. Step.

Running OWA under Safari results in spam injected into HTML-based outgoing emails

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.