News for hackers. Stuff that matters.
Re:“Magic links” can end up in Bing search results, renderin... by bigtones on Monday June 27, 2022 @07:26AM (#31893057)
Microsoft does this because they're security scanning / checking all links in every Outlook email for known phishing and malware attacks. If Bing has not seen the web page before and it's not in the Bing dangerous web page index it first needs to check it to make a determination of if it's a phishing/malware page by scanning/indexing it before returning that outcome back to Outlook to flag the email as dangerous.
Re:“Magic links” can end up in Bing search results, renderin... by sofixa on Monday June 27, 2022 @10:37AM (#31895169)
> Microsoft does this because they're security scanning / checking all links in every Outlook email for known phishing and malware attacks

The problem with that is that the logic is broken. Microsoft cannot possibly know all phishing sites, especially for smaller things. By obfuscating the link the user can no longer verify it by themselves without clicking, but Microsoft will say it's safe. So the user is left with a false sense of security and are worse off.

It only works for huge sites ( e.g. mytwitter.lol phishing for twitter and similar), but drastically lowers the chance of less high profile phishing being caught.

Re:“Magic links” can end up in Bing search results, renderin... by phendrenad2 on Monday June 27, 2022 @01:27PM (#31897785)
The problem with that is that the logic is broken. If 99.99% of phishing can be prevented this way, what problem do you have with it? Would you really catch that 0.01% that an automated system wouldn't?
Re:“Magic links” can end up in Bing search results, renderin... by hansvm on Wednesday June 29, 2022 @09:02AM (#31919533)
You mean you don't verify calls to action via other information channels? Fairly regularly I get phishing emails that correctly spoof the crypto headers of major sites (e.g., because of a misconfigured mail service). If an email asks me to do something, it either doesn't get done or I cover my ass in as many ways as possible, no exceptions.

That isn't by itself an argument against a good automated system -- I definitely like not having to sift through most of that garbage, but catching the 0.01% should be a routine practice, not something that seems like an insurmountable burden.

Re:“Magic links” can end up in Bing search results, renderin... by tomp on Monday June 27, 2022 @11:16AM (#31895747)
Maybe you should implement a "feature" that serves a simple static HTML page <p>This webpage is safe.</p> to "bingbot" and serve the real page to everyone else.
Re:“Magic links” can end up in Bing search results, renderin... by ggurface on Monday June 27, 2022 @02:27PM (#31898616)
I believe the recommended practice is to hover over the URL before clicking the link.

If you do so, in Outlook, there will be a pop that shows "Original URL: XXX". This allows users to make a determination for themselves whether the link is safe or not.

Re:“Magic links” can end up in Bing search results, renderin... by hyperman1 on Monday June 27, 2022 @02:57PM (#31899084)
We got some security courses about that too. Unfortunately, outlook replaces all of them with some safelink url rewriting, so the only way left to find out if a link is scammy is clicking it.
Re:“Magic links” can end up in Bing search results, renderin... by excalibur on Monday June 27, 2022 @07:23PM (#31902234)
It is in fact possible to extract a destination URL from a Safelink one without clicking it. For the full link this can be tedious, but identifying the domain can still be done quickly.
Re:“Magic links” can end up in Bing search results, renderin... by hyperman1 on Tuesday June 28, 2022 @10:56AM (#31908529)
For normal URLs, I agree. But in this case you have adversarial urls. Suppose the scammer puts some http and www.google.com in the url parameters, after some randomly generated 8 characters dot someobscuretld site.

I don't trust myself enough to be 100% sure I can decode an URLencoded misleading mess perfectly all the time.

They already hid urls in the username of the url, like www.google.com.unholymessherethatscrollsoutoftheurlbar @ malignantdomainnotgoogle.blah

Re:“Magic links” can end up in Bing search results, renderin... by egberts1 on Monday June 27, 2022 @03:55PM (#31899910)
Scammy Microsoft.
Re:“Magic links” can end up in Bing search results, renderin... by jabart on Monday June 27, 2022 @01:47PM (#31898059)
Microsoft offers this as a security product. It's impossible to know all links but known ones can be blocked to limit future issues. Other enterprise email security products scan the links and follow all the redirects as well. After delivery a incredibly small amount of time and every link is "clicked" in an email with those products.
Re:“Magic links” can end up in Bing search results, renderin... by Mo3 on Monday June 27, 2022 @02:10PM (#31898372)
Cool, so we should just stop building and running almost anything in existence because it's not all-encompassing? That sounds like a suboptimal path forward.
Re:“Magic links” can end up in Bing search results, renderin... by rsbadger on Monday June 27, 2022 @07:28AM (#31893069)
Scanning something for malware and publishing it in search results seem like 2 completely different things to me...?
Re:“Magic links” can end up in Bing search results, renderin... by Xylakant on Monday June 27, 2022 @08:17AM (#31893473)
But there is nothing to indicate either in the post or in the referenced SO thread that the URLs are published to the search results. They are visited by bingbot, that much seems confirmed, but there’s no example where one of these results shows up in the public search results.
Re:“Magic links” can end up in Bing search results, renderin... by rsbadger on Monday June 27, 2022 @08:33AM (#31893656)
They were indexed in Bing results, I’ve shared the URL of that in this thread
Re:“Magic links” can end up in Bing search results, renderin... by cma on Monday June 27, 2022 @11:25AM (#31895889)
Holy shit thats bad. Do unlisted youtube and gdrive share links get indexed through this?
Re:“Magic links” can end up in Bing search results, renderin... by 9dev on Monday June 27, 2022 @01:52PM (#31898125)
You’d assume those have proper robots.txt configuration?
Re:“Magic links” can end up in Bing search results, renderin... by boxed on Monday June 27, 2022 @04:57PM (#31900695)
I have a disallow all robots.txt for a production system. Have had from the beginning.

Bing indexes it. This is my first major security incident and I have no idea how to fix this without making everything totally shitty for the users.

Re:“Magic links” can end up in Bing search results, renderin... by efreak on Thursday June 30, 2022 @09:25AM (#31932069)
Some services ignore global disallow, but will respect rules explicitly targeted at them.
Re:“Magic links” can end up in Bing search results, renderin... by boxed on Thursday June 30, 2022 @03:07PM (#31937074)
I've put in a hard block for all crawlers on all pages. Works for my scenario I think. Hopefully they don't lie in their user agent. Then it's going to be really bad.
Re:“Magic links” can end up in Bing search results, renderin... by ratg13 on Monday June 27, 2022 @08:20AM (#31893500)
Yes, but there is no indication they are publishing it in the search results.

The original post is just complaining that the malware scanning is visiting the links.

They come to the following conclusion

>This effectively makes all one-time use links like login/pass-reset/etc useless.

Which we all know is not true because sites like onetimesecret.com allow for entering a separate password to prevent this sort of thing when it does happen.

It would be an interesting discussion to talk about what Microsoft's whitelisting process looks like, but the original article doesn't seem to understand what is going on well enough to drive the conversation in that direction.

Re:“Magic links” can end up in Bing search results, renderin... by nopassrecover on Monday June 27, 2022 @08:30AM (#31893610)
They are publishing them - it has bitten us (e.g. expired one click links for customers ending up on Bing from their emails)
Re:“Magic links” can end up in Bing search results, renderin... by pooper on Monday June 27, 2022 @09:20AM (#31894222)
I think this is where we use meta tags.

All pages with one click links should have no index follow or no index no follow. Your seo consultant (if you have one) should have advised you on this.

I am not saying this excuses the privacy violation but just suggesting there are things we can do...

Re:“Magic links” can end up in Bing search results, renderin... by nopassrecover on Monday July 04, 2022 @10:32AM (#31977453)
Bing appears to be ignoring those headers for links crawled from emails
Re:“Magic links” can end up in Bing search results, renderin... by _tom_ on Monday June 27, 2022 @01:28PM (#31897794)
Worse would be links that are private to the people who posses the url. Like a private video on YouTube or a private document in google docs. The security depends on the URL being secret. This would silently publish secret information.
Re:“Magic links” can end up in Bing search results, renderin... by 9dev on Monday June 27, 2022 @01:55PM (#31898162)
If those pages have no proper meta tags or robots.txt, there’s absolutely nothing wrong with this. Security by obscurity was never a good approach; from Proxies to security scanners, there has always been software that crawls unassuming URLs and published the results somewhere, if only a report to the admin.
Re:“Magic links” can end up in Bing search results, renderin... by boxed on Monday June 27, 2022 @04:58PM (#31900706)
robots.txt disallow is ignored for my production site at least. This is super bad.
Re:“Magic links” can end up in Bing search results, renderin... by nopassrecover on Monday July 04, 2022 @10:32AM (#31977451)
Same for us - we have robots.txt disallow etc. and the relevant headers for personal customer links and Bing is ignoring and publishing all the same
Re:“Magic links” can end up in Bing search results, renderin... by ratg13 on Monday June 27, 2022 @08:50AM (#31893853)
If you can say for certain that the links being published are coming from the malware scanning, and not being taken from users' browser sessions that are using Microsoft Edge you should elaborate on this.
Re:“Magic links” can end up in Bing search results, renderin... by rsbadger on Monday June 27, 2022 @09:30AM (#31894344)
I would be pretty mortified if browsers were using user browser sessions to scan content and pass it to bingbot…? What about if you’re browsing something local? Or your bank account?
Re:“Magic links” can end up in Bing search results, renderin... by ratg13 on Monday June 27, 2022 @10:13AM (#31894855)
I would be too.

The point I was making is that someone should research this instead of relying on wild speculation as the basis for the conversation.

Re:“Magic links” can end up in Bing search results, renderin... by boesboes on Monday June 27, 2022 @09:18AM (#31894196)
That would be even worse.
Re:“Magic links” can end up in Bing search results, renderin... by ratg13 on Monday June 27, 2022 @09:23AM (#31894255)
Nobody is saying it isn't.

It's about trying to get to the core of the issue, not just the random speculation going on in the article and in this comment thread.

Re:“Magic links” can end up in Bing search results, renderin... by badrabbit on Monday June 27, 2022 @09:40AM (#31894465)
It is common for corporate email security appliances as well. URLs should not be used for authentication neither should email. I really want to pick brains of people that work on these types of systems to see why they don't think so.
Re:“Magic links” can end up in Bing search results, renderin... by rsbadger on Monday June 27, 2022 @09:44AM (#31894512)
Many people (most?) prefer to signup to services by email address. To do so, those email addresses must be verified. How would you verify it without sending them an email link?
Re:“Magic links” can end up in Bing search results, renderin... by badrabbit on Monday June 27, 2022 @11:42AM (#31896139)
You can verify validity of an email like that, no issue there. Just don't use that as a factor authentication. Control over an email account should not trump passwords (what you know) or proper 2fa (what you have, typically, email can be 2fa like sms and like sms it is not a good choice). If a person proves they control an email account then you ask them for additional info like secret questions or other information configured during registration.

I should not be able to take over your life because I compromised your phone which has sms, TOTP app and email.

Re:“Magic links” can end up in Bing search results, renderin... by throwaway14356 on Monday June 27, 2022 @10:23AM (#31894984)
a confirmation code?

Also, mail might not live on the same computer.

Re:“Magic links” can end up in Bing search results, renderin... by xboxnolifes on Tuesday June 28, 2022 @05:14AM (#31905719)
It doesn't matter if it's on the same computer. Sometimes all you need to do is click the link, not do anything on the page.
Re:“Magic links” can end up in Bing search results, renderin... by inopinatus on Monday June 27, 2022 @02:42PM (#31898834)
options include:

* use an interstitial page so that the actual activation is a POST request;

* send a confirmation code instead of a link

Re:“Magic links” can end up in Bing search results, renderin... by postalrat on Monday June 27, 2022 @06:59PM (#31902031)
Is it ok to do a password reset through email? Because once you can do that you basically have email based authentication.

The password only makes this autentication less secure and it's not needed.

Re:“Magic links” can end up in Bing search results, renderin... by badrabbit on Tuesday June 28, 2022 @12:59AM (#31904258)
It is not. You can initiate password reser via email but additional recovery controls like security questions should still be required. In an ideal world you have 2fa as well, if you reset that via email as well the it isn't actually 2fa, it is email based 1fa with extra steps. If your 2fa has a separate mechanism for recovery as well,that would be ideal. If it was my webapp, I would use hashes of 3 answers to user chosen questions, hashes in the browser/client. It could be an object pairing as well, every user gets a list of 30 objects or so and they pick 3 pairs as a recovery combination.
Re:“Magic links” can end up in Bing search results, renderin... by postalrat on Tuesday June 28, 2022 @12:38PM (#31909955)
Hashing an answer to many questions isn't prevent someone from guessing the input until the hashes match. So why bother hashing?

Recovery codes exist and are created at the time before recovery is necessary. But most people are going to lose their codes.

Who is going to remember what 3 things they picked out of 30 years ago?

Re:“Magic links” can end up in Bing search results, renderin... by 1024core on Monday June 27, 2022 @02:30PM (#31898653)
If this were security scanning, why does it identify itself as BingBot? Doesn't that just allow cloaking and offer an easy workaround for any adversary with a modicum of intelligence?
Re:“Magic links” can end up in Bing search results, renderin... by usrn on Monday June 27, 2022 @08:32AM (#31893640)
I just love it when they "scan" password reset links.
Re:“Magic links” can end up in Bing search results, renderin... by noisem4ker on Monday June 27, 2022 @09:33AM (#31894384)
The HTTP GET method is idempotent by specification. Visiting a webpage should not trigger password resets or any other actions by itself. If that's a problem then it's the site's fault for being defective.
Re:“Magic links” can end up in Bing search results, renderin... by rsbadger on Monday June 27, 2022 @09:42AM (#31894483)
You’re right that it was a bit of an oversight on my behalf, as the links were only generated after a verified human user action (signup) I had assumed the 1 time links to their email would be safe. But regardless of the link action, it shouldn’t be passing that data to Bingbot to crawl and (possibly) index in search engine results. Private email data should not be shared with search engine crawlers IMO.
Re:“Magic links” can end up in Bing search results, renderin... by petercooper on Tuesday June 28, 2022 @06:15PM (#31913780)
So how do you implement a "one click unsubscribe" link in an email? They're on GET requests. You could use JavaScript on the resulting page to then trigger the unsubscribe but bots are now running JavaScript as well.
Re:“Magic links” can end up in Bing search results, renderin... by noisem4ker on Thursday June 30, 2022 @07:11AM (#31930964)
You show a webpage with an "Unsubscribe" button in it. The button triggers a POST request.

There's also RFC 8058: https://datatracker.ietf.org/doc/html/rfc8058

Re:“Magic links” can end up in Bing search results, renderin... by AtNightWeCode on Monday June 27, 2022 @10:00AM (#31894699)
That should send one to a page with a confirmation button...
Re:“Magic links” can end up in Bing search results, renderin... by ShowalkKama on Monday June 27, 2022 @09:31AM (#31894356)
scanning with bing useragent? That's not a good idea.
Re:“Magic links” can end up in Bing search results, renderin... by tinus_hn on Monday June 27, 2022 @04:18PM (#31900216)
Do they guarantee anywhere they’re not collecting this data to build profiles or do other analysis?
Re:“Magic links” can end up in Bing search results, renderin... by causi on Monday June 27, 2022 @08:51AM (#31893866)
Wouldn't it be trivial to keep the list of malicious pages locally and not send any data?
Re:“Magic links” can end up in Bing search results, renderin... by Linosaurus on Monday June 27, 2022 @11:26AM (#31895920)
You mean, push bing's entire list of malicious websites to every client? I doubt they want to or can do that.

And also use the local client to scan unknown links? They probably dont want outsiders to have access to this code.

Re:“Magic links” can end up in Bing search results, renderin... by mbesto on Monday June 27, 2022 @12:09PM (#31896592)
Plus, how do you keep it from going stale?
Re:“Magic links” can end up in Bing search results, renderin... by morley on Monday June 27, 2022 @08:53AM (#31893893)
If I were designing a system like this, I would not trust clients to perform legitimate analysis nor report legitimate results.
Re:“Magic links” can end up in Bing search results, renderin... by gnubison on Monday June 27, 2022 @06:14PM (#31901563)
… but it doesn’t matter if the client is compromised, because all it would hurt is the user, right? If the client was compromised, it could just not send anything to your servers, or ignore the results, or …
Re:“Magic links” can end up in Bing search results, renderin... by causi on Monday June 27, 2022 @10:25AM (#31895004)
What? But you're the one writing the client.
Re:“Magic links” can end up in Bing search results, renderin... by sofixa on Monday June 27, 2022 @10:39AM (#31895196)
Doesn't matter. Never trust the client - it's outside of your control, it can be patched, it can be hacked, it can be spoofed, etc.
Re:“Magic links” can end up in Bing search results, renderin... by BoorishBears on Monday June 27, 2022 @11:27AM (#31895923)
Little understanding: Undying trust of the client

Dunning-Kruger level of understanding: Never trust the client for anything ever, it's unreliable, everything must be off client.

Never mind the client is literally the interface into your system, so it being compromised is already game over for an application where the user is most vulnerable party you wanted to protect...

Deep understanding: Trusting the client requires a well thought out security model.

If the client is hacked in this case, they already have full control over what the user sees, they can cut out your remote check.

Maybe a good balance would be to hash the root of the URLs and compare those, or use fuzzy hashing on page contents, just so that the backend isn't getting a bunch of private urls that might accidentally get logged somewhere.

Trades detecting stuff hidden behind redirects for less liability on your backend, something to possibly consider depending on functional requirements.

Re:“Magic links” can end up in Bing search results, renderin... by shepherdjerred on Monday June 27, 2022 @11:44AM (#31896180)
It sounds like you’re advocating for no client at all
Re:“Magic links” can end up in Bing search results, renderin... by Spivak on Monday June 27, 2022 @12:18PM (#31896743)
Just as a trivial example, how confident would you be in this auth scheme?

1. User opens Outlook and types in their email and password.

2. The app requests the user's password hash from the server and checks it.

3. Outlook tells the server auth was successful and gets a session token.

Re:“Magic links” can end up in Bing search results, renderin... by shepherdjerred on Monday June 27, 2022 @04:05PM (#31900055)
In this example you're right. For something like scanning a site for malicious content, on-device is not a bad approach. It decreases the amount of data sent to the server.

The client has a much bigger issue to worry about if the client-side malware scanning has been compromised. Malware could modify the UI/network calls such that your server-side scanning displays a positive result anyway.

You have to trust the client to display information to the user at some point. Link malware scanning that job can safely be delegated to the client. Authentication cannot.

Re:“Magic links” can end up in Bing search results, renderin... by jcranberry on Monday June 27, 2022 @03:00PM (#31899136)
My first guess is that giving phishers/scammers the list of all malicious domains/pages might allow them to circumvent it.
Re:“Magic links” can end up in Bing search results, renderin... by Rastonbury on Monday June 27, 2022 @01:10PM (#31897527)
Does Gmail do this?
Re:“Magic links” can end up in Bing search results, renderin... by jgalt212 on Monday June 27, 2022 @02:52PM (#31898994)
They definitely do link re-writing. As to what use they make of the original href attributes, I don't know.