aspnetcore icon indicating copy to clipboard operation
aspnetcore copied to clipboard

Consider changing URLs of .NET assemblies not to end with .dll

Open Rast1234 opened this issue 8 years ago • 104 comments

I wanted to see the demo at https://blazor-demo.github.io/ and my corporate firewall blocked MicroApp.dll, while other dlls downloaded successfully. Since a lot of software is paranoid about downloading/transferring windows binaries, maybe it's worth obfuscating them a bit? Or, at least, renaming?

Rast1234 avatar Feb 27 '18 09:02 Rast1234

That's interesting - thanks for letting us know. We'll look at changing the URLs to YourAssembly_dll or something like that, though whether we do it by default may depend on whether we get more reports about this, and whether we can establish it's due to the name or deeper inspection of the payload contents.

SteveSandersonMS avatar Feb 27 '18 10:02 SteveSandersonMS

@SteveSandersonMS just to drop my 2c here. It is not just corporate firewalls that suffer of the .dll-fobia. Some local anti-virus have this same problem too.

galvesribeiro avatar Mar 07 '18 17:03 galvesribeiro

@galvesribeiro is right not to mention that if I wasn’t familiar with what’s going on and I saw a website trying to download a DLL I’d be out of there! Consider the perception when addressing this :)

joeizy avatar Mar 08 '18 12:03 joeizy

@joeizy yeah, I totally agree with you that for the majority of cases block dlls is the right thing todo. That is Why we are talking about renaming it as we are sure what we are doing...

galvesribeiro avatar Mar 08 '18 13:03 galvesribeiro

How about YourAssembly.blazor? It might be a nice way to promote the project (very very slightly) if any web devs folks look in the dev tools to see how the site was built? Or maybe it's just just me that sometimes spots that a site was a built with Vue.js or whatever and thinks "oh, nice" :)

wilka avatar Mar 08 '18 17:03 wilka

How about simply .bin?

Manuel-S avatar Mar 14 '18 00:03 Manuel-S

I like .bin or .blazor as well.

galvesribeiro avatar Mar 14 '18 00:03 galvesribeiro

+1 “.bin”

joeizy avatar Mar 14 '18 01:03 joeizy

.lib or .bin or .ilasm ?

grahamehorner avatar Mar 14 '18 01:03 grahamehorner

So we can make an informed decision about this, it would really help if we had approximate repro steps (or at least some hint in that direction). We need to understand specifically whether it's a naming issue or a content issue, for example.

What specific firewall product is known to block .dll, either by default or in a common configuration? Can you point me to something I can install and try out? Or if not, do you have the name of it at least, and perhaps links to any of its configuration docs?

SteveSandersonMS avatar Mar 14 '18 01:03 SteveSandersonMS

@SteveSandersonMS I think it is not a particular product. Multiple products, specially the ones heavily used by enterprises have tide config settings on file types specially the common ones like .exe, .dll, .so, etc.

The name itself is the first blocker but, one way to reduce this issue, is the same way we've dealing with ClickOnce since .Net 2.0. Signing assemblies.

The problem is that (1) it is not cheap, (2) the process to earn those certificates even if you can afford them is VERY complex and even not available in some countries and even if you get it, (3) the certificate for the company/developer usually takes a while to be trusted by the antivirus software database.

For MSFT released assemblies, it is not a big news as we know that every shipped assembly, even OSSed ones, are code signed by corpnet policy. But think about other developers, startups, and OSS projects. They will all suffer with that.

galvesribeiro avatar Mar 14 '18 03:03 galvesribeiro

I remember that in the good old days when Silverlight was a thing, if we wanted to download assemblies on demand, we put them in a xap file (which in practice is a zip file) and then extracted them with https://msdn.microsoft.com/en-us/library/cc190632(v=vs.95).aspx

Not sure if there was a reason for that (other than combining multiple dlls in a single file). I guess the Silverlight team should be familiar with the firewall issues if there are any.

miroslavp avatar Mar 14 '18 11:03 miroslavp

The problem with bundling together is that if you need to update 1 of those dlls the whole package must be updated... Not cache or bandwidth friendly the Silverlight model...

galvesribeiro avatar Mar 14 '18 11:03 galvesribeiro

I'm not suggesting to use bundling for Blazor. I'm just saying that apart from the bundling feature, maybe the Silverlight team was using xap files to avoid firewall issues. That's just a guess, of course.

miroslavp avatar Mar 14 '18 12:03 miroslavp

Keep ".net" as extension

vibeeshan025 avatar Mar 15 '18 15:03 vibeeshan025

We're well into the realms of bikeshedding on this now. Hence I'm specifically asking for concrete examples of actual firewall products that have trouble with this.

I think it is not a particular product

Nonetheless, examples of particular products, and under what configurations this happens, would help.

SteveSandersonMS avatar Mar 15 '18 16:03 SteveSandersonMS

@SteveSandersonMS I understood that part. The point is that fix the issue for 1 particular antivirus/firewall will not cover all the others as we all know that each one has its own heuristic, database, settings for that. The only case that could cover both the naming and signature rules for everything, is:

  1. Sign the assemblies as usual and;
  2. Make sure the naming is not in the default blacklist

galvesribeiro avatar Mar 15 '18 16:03 galvesribeiro

@SteveSandersonMS I've seen a few issues when using NOD32 from ESET and have seen the active scanner block downloading some binary files silently, these seem on the face of it to be Dynamic Link Libraries that do not have a digital signature.

grahamehorner avatar Mar 15 '18 19:03 grahamehorner

Thanks for the info @grahamehorner. Do you know roughly what the repro steps would be? If I just installed NOD32 onto a (throwaway) Windows machine, is that enough to make it unable to open https://blazor-demo.github.io/? Or is any additional config needed?

SteveSandersonMS avatar Mar 15 '18 23:03 SteveSandersonMS

From https://www.paloaltonetworks.com/documentation/80/pan-os/pan-os/threat-prevention/set-up-file-blocking:

File Blocking Profiles allow you to identify specific file types that you want to want to block or monitor. For most traffic (including traffic on your internal network) you will want to block files that are known to carry threats or that have no real use case for upload/download. Currently, these include batch files, DLLs, Java class files, help files, Windows shortcuts (.lnk), and BitTorrent files.

danroth27 avatar Mar 15 '18 23:03 danroth27