Microsoft is busy rewriting core Windows library code in memory-safe Rust
theregister.com
theregister.com
Edit: This appears to be confusing to people, so here are some examples you'll recall from the past few years: SolarWinds, the Colonial Pipeline hack, the Okta breach, the Uber breach. Most attacks don't rely on memory exploits.
Microsoft says 70% https://www.zdnet.com/article/microsoft-70-percent-of-all-se...
Google says 70% https://www.chromium.org/Home/chromium-security/memory-safet...
> Just over half (54%) of cyber incidents involved malicious actors gaining access to accounts using compromised or stolen credentials.
My experience has been that most attacks are not that sophisticated and tend to target poor practices within organisations.
I would say that breaches often are related to RCE that ultimately derives from buffer exploitation. They are notoriously difficult to detect with forensics techniques, so they might not be discovered and tracked.
With more than 500 forensics cases with my name on it, and a substantial amount of them being RCE based, I'd say it is more than just guessing.
There is no need to spend time on developing a exploit when you can find hundreds new ones every month on GitHub. DEP and ASLR are also not used in embedded devices where memory management in the firmware is atrocious.
The comment you were replying to is talking about the majority if compromises. Citing your case stats to argue against that is a bit weird.
As a point of comparison, 10-15 years ago exploits in general were much more prevalent. Flash was still around, people read PDFs in Acrobat instead of PDF.js, Internet Explorer hadn't been displaced by Chrome, macros were just starting to make a comeback after signing restrictions from the early 2000s were lifted, crown jewels hadn't yet moved to the cloud via SaaS, and things just weren't commoditized like they are now with pentest frameworks, LOLBins, etc. In fact the most commoditized element in those days was exploit kits targeting IE memory vulnerabilities. The landscape has changed a lot since then.
I'm vendor-side research, which gives me pretty broad visibility here.
Depends what your definition of "attacks" is, to be precise: is an event where an adversary places a malicious ad with code exploiting a browser 0day counted as one attack or as X attacks with X being the number of infected machines?
Additionally, the same segmentation (with the same split) applies if you only count large-scale hacks against organizations as attacks, or if you're counting infected machines of everyday common people as attacks as well. Basically, if you're counting attacks on organizations, you're correct as the majority entrypoint there is social engineering and outdated exploitable software/appliances reachable from the public internet or a compromised partner connected to the victim's network.
This is why you see so many whitepapers trying to quantify things like consumer trust, reputational damage, regulatory, impact, etc. If there is a true cost to the damage, the investment in prevention can be made and compared with other requests, like new features, scope, etc.
I do feel they should have persevered. Although, yeah, writing a new rendering engine from scratch is a big job.
Also since Dec 2022, you can run GUI apps on WSL, so you can install Firefox, VS Code etc on Linux and have them show up on the Start Menu.
I can’t say why exactly but that was... weird.
They even have a decent graph linked to off[1]: https://4e6.github.io/firefox-lang-stats/
I am not saying the security improvements are not real, just not orders of magnitude. For example some post exploitation stuff like BYOVD I am sure would be much harder.
A lot of vulns are just mistakes people made. Perhaps LLMs can help with that in the neat future but right now you hardly even need a CVE to compromise even well protected networks. A little phish here, a little abuse of legit software there, patiently look for services and credentials that aren't well protected and voila. Few actors use 0days and auto-updates have made 1-days hard to rely on
NSO group. Stuxnet.
I also said the following because of in part the point you are trying to make:
> I am not saying the security improvements are not real
Or like UWP was dropped for WinUI 3.0/WinAppSDK and there is no designer, or Native AOT doesn't do WinUI (.NET Native and C++/CX were under WinDev umbrella).
I don’t doubt that Visual Studio will continue to be developed, but it would surprise me to see MS direct Rust resources specifically to it when they’ve already dedicated a lot of work towards Rust in VS Code.
(This is coming from someone who feels mild resentment at how much better the Rust editing experience is in VS Code than his preferred editors.)
However, if I was MS, I would look at the prevailing winds: it’s good to have one flagship, and even better to have another that doesn’t have the historical (technical, sentimental) baggage of your older one.
Sorry, I got the impression that you felt it was being slowly deprecated in favor of VS Code.
I don't think that's the case, is all.
Embrace, or are we up to Extend?
But seriously, don't MS already have form on the .Net LSP? I can remember the furore but not the details, something about pulling back some VSCode functionality for Visual Studio.
> The following companies contributed significantly towards rust-analyzer development: Ferrous Systems Mozilla Embark Studios freiheit.com
VSCode is the future and Microsoft's future. The current limited .Net support on VSCode feels like it is intentional to give Visual Studio another few years.
PS - Obviously Visual Studio will never ACTUALLY go away. I am talking about as its flagship product for current/future development, it will remain for things like Windows Forms and other dead-end tech.
Visual Studio is very much the same for me, it also tries too hard to make nice what basically boils down to "run shell tasks". I've seen people get accustomed with those fancy features way too often, only to then lose view on how the stuff underlying works and relying on others for support.
The biggest issues I noticed are:
- Lack of error indication e.g. used an indeclared variable
- Intellisense meh
Even for .NET, what VS4Mac and VSCode can do is a tiny subset of VS capabilities for .NET development.
Naturally you can argue that anything MS, or game consoles are dead-end tech.
1. Back in .net 6, mere *days* before the final release they yanked a hot reloading feature from the dotnet CLI that is typically used by the massively more popular, but free, VS Code, and making the feature exclusive to flagship VS. To me this spoke of a leadership who didn't care about growing .NET with new developers but only to prop up their old creaky VS $50/mo from their established customer base that is locked in to C# from legacy code. They rolled that mistake back but it was a big warning sign / wake up call for me.
2. Speaking of hot reloading, their much touted hot reloading feature SUCKS. It has nothing on the JS guys. Hot reload is a massive deal. How is Blazor ever going to compete with the JS frameworks with a horrible hot reload story. Not to mention Blazor is way heavier in terms of KB and also is way slower rendering performance to boot. Can you even use tailwindcss with Blazor since the compiler relies on your framework being able to hot reload the css changes?
3. .NET MAUI by all accounts is just a massive disaster at this point.
4. Their latest Teams 2.0 UI rewrite is in *drum roll* react.
I dunno it all just speaks of an underfunded / understaffed group at this point whose top brass doesn't care about them beyond the meager, dwindling, VS pro subscriptions they get from them.
React is also used for PowerApps UI and even when you can write your own components with PowerApps Component Framework, you can actually leverage platform libraries tor performance if you do it in React: https://powerapps.microsoft.com/en-us/blog/virtual-code-comp...
Overall I don't like your comment but I won't downvote because you bring up concerns that matter to YOU :)
But for things like Azure, I’m hopeful to see more node and rust support built in. The interesting part is figuring out which direction Microsoft goes for desktop software. I’m seeing more Electron based applications coming out now.
Luckily Rider exists
As for performance, I recently upgraded from an old Yoga 2 (VS became unusable) to the new Surface Laptop 5 and Visual Studio is smoking fast now.
I’ve heard great things about Rider but haven’t tried it.
I don’t see MS dropping Visual Studio any time soon. There are still a lot of us older coders that’d raise hell if they tried.
I also use the free Community version and it has everything I need.
I normally use Notepad++’s Find in Files feature, which covers most cases, and also supports replacing.
This is the announcement video. its about an hour long but much of it is very interesting.
"Adminless windows" sounds very interesting.
I'd be interested to know as to why a simple rewrite (from C++, no less) would give you this kind of upgrade.
- Cannot have garbage collection
- Need the raw speed of C
- Need to provide a C interface
- Already have a lot of Rust code in the project
Having said that, I very much prefer statically typed languages, and ones with a focus on correctness and safety. Rust and Haskell both fit that bill very well.I'm just ranting. I know in reality not every abstraction is correct and often they introduce more problems than they actually solve, but every once in a while the hackers get it right and that's when progress is made. In the meanwhile us normies have to deal with the experiments of complex bs to solve simple problems
They shall be busy fixing the bugs in Windows 10.
Wouldn't use raw GDI+ for any UI of moderate complexity, but it was perfect for the ghetto app I made myself.
There are legal resellers, that sell them for about 200-300 USD per license.
There are shady resellers, that sell them very cheaply, but I always suspect they are pirated.
You can't buy something for $100 and sell it for $20. Well, you can, but this is not a sound business model.
It's always amusing for me when people assume they can buy a 'legal' copy/key for $5-10 'somewhere on the net'.
The only way to resell something from a bankrupt company is to buy a retail box versions of software in the first place and LTSC is not available in retail.
> If you acquired the software from a retailer as stand-alone software, you may transfer the software to another device that belongs to you, but not more than one time every 90 days (except due to hardware failure, in which case you may transfer sooner).
It is highly probable that, if anybody cared, you could win such a case in a European court but I'm not aware if anyone bothered to try.
I thought this had recently been ruled in favour of re-sale - but the newest i could find was on Vernor v. Autodesk, which goes the other way...
https://dunnerlaw.com/buyer-beware-the-threat-to-the-first-s...
However, it is far from a good option.
Rust is overly complex and this is going to bring its own issues to Windows.
Also, rust forces you to actually model the complexity of the real world. I think the best example for this are the various string types. There is one for Interop with C, one for Paths, one that is utf-8 etc. Your code explicitly states what to do with edge cases. Edge cases that existed anyway but are now visible.
Don't get me wrong, I don't dislike Rust. It's an awesome language.
Tokio provides a bit more features, but is a damn huge runtime to depend on, and is creating fragmentation.
I feel rust needs to be taken out of the hands of former c++ devs / language theorists and put straight under responsibility of library design experts (rip off go’s stdlib for gods sake!)
Crypto isn’t a core competency for the standard library authors and this it’s better to offload that responsibility. Maybe once a library becomes de facto in the community (ring?) then it might make more sense.
The other reason to prefer a smaller standard library is that it can often be difficult to strip away the unused bits from the resultant binary. Rust statically links which hopefully fixes most of this, but I suspect possibly not all.
I agree they need to standardize an effect system and unify async so that there’s a way to plug in arbitrary runtimes.
Ring is mostly C/Assembly. Good bye safety ! Offloading core security routines is such a bad design.
> The other reason to prefer a smaller standard library is that it can often be difficult to strip away the unused bits from the resultant binary.
It’s actually already handled quite well, and could also be behind feature flags.
Really, a standard library with feature flags and editions would make rust ridiculously much more productive… such a waste.
Crypto needs to be written in Assembly to ensure that operations take a constant time, regardless of input. Writing it in a high level language like C or Rust opens you up to the compiler "optimising" routines and making them no longer constant time.
But you already knew this. And you also knew that the security audit (https://github.com/rustls/rustls/blob/master/audit/TLS-01-re...) of ring was favourable
> No issues were found with regards to the cryptographic engineering of rustls or its underlying ring library. A recommendation is provided in TLS-01-001 to optionally supplement the already solid cryptographic library with another cryptographic provider (EverCrypt) with an added benefit of formally verified cryptographic primitives. Overall, it is very clear that the developers of rustls have an extensive knowledge on how to correctly implement the TLS stack whilst avoiding the common pitfalls that surround the TLS ecosystem. This knowledge has translated reliably into an implementation of exceptional quality.
As a bonus, rustls is under active development with sponsorship from Google, AWS and fly.io, with the aim of making a high quality, memory-safe TLS stack - https://www.memorysafety.org/initiative/rustls/
You said
> a standard library with feature flags and editions would make rust ridiculously much more productive
What's the difference between opting into a library with a feature flag and opting in with a line in Cargo.toml? Let's say you want to use the de-facto regex library. Would it really be ridiculously productive if you said you wanted the "regex" feature flag instead of the "regex" crate?
I do agree that the standard library does need a versioning story so they can remove long deprecated functions. Where it gets complicated is if a new method is reintroduced using the same name in a later edition.
If you are all alone developing and can audit the crate properly, sure.
However when there’s a team, whose favorite lib should we pick ? How many of them shall we audit ? What’s their license ? How’s code attribution managed ? Etc etc
Your concerns are valid, but Rust has chosen a different set of trade offs. The link outlines the pros and cons.
I'd like to see an "extension" library managed like the standard library (and shipped with Rust, included in the prelude, etc) but with SemVer, so that breaking changes could be made more easily.
You aren't forced to use the more obscure methods in std. You can almost always recreate them with simple code and suffer no real performance or readability hits.
Former c++ devs are smart people. I work with some, and value their input specifically when designing libraries...
To quote Steve Jobs: "They just have no taste."
Microsoft doesn't "get a hold of" Rust by using Rust, any more than you get a hold of it by writing Rust programs.
With C++ they had their own compiler implementation, which obviously diverged. This is common for independent code bases. Whereas with Rust they're contributing positively to the main compiler implementation. Just one example - see all of Ryan Levick's (@rylev) contributions to Rust. Not just with code, or with tutorials, but in regular unglamorous work like running weekly compiler performance meetings.
Microsoft is also a platinum sponsor to the Rust foundation. The foundation uses this money to directly sponsor folks working on the language and library authors.