'Bashware' Attacks Exploit Windows 10's Subsystem for Linux (betanews.com)
Mark Wilson quote BetaNews: While many people welcomed the arrival of Windows Subsystem for Linux (WSL) in Windows 10, it has been found to be a potential security issue. A new technique known as a Bashware has been discovered by security researchers that makes it possible for malware to use the Linux shell to bypass security software.
While administrator access is needed to execute a Bashware attack, this is fairly easily obtained, and the technique can be used to disguise malicious operations from antivirus software and other security tools. Researchers from Check Point Research point out that the danger stems from the fact that "existing security solutions are still not adapted to monitor processes of Linux executables running on Windows."
While administrator access is needed to execute a Bashware attack, this is fairly easily obtained, and the technique can be used to disguise malicious operations from antivirus software and other security tools. Researchers from Check Point Research point out that the danger stems from the fact that "existing security solutions are still not adapted to monitor processes of Linux executables running on Windows."
While administrator access is needed to execute a Bashware attack, this is fairly easily obtained
Really? that sounds like more of a problem than some particular tool....
So Windows has a Linux subsystem.
Does that mean all copies of the Windows 10 operating system are vulnerable? Meaning grandma or bubba and their propensity to give everything and its kid brother root access?
Or are we just talking about systems being administered by Linux admins, where root access by an untrusted application carries this risk implicitly.
Windows 10 itself is malware, isn't it?
Why is bashware not a problem on a Linux system ? After all: if all that Windows Subsystem for Linux does is to provide Linux functionality then you would expect the same malware to also have been a problem on native Linux systems.
Holy crap! If someone gets administrator access on my system, they can do bad things? With the SUBSYSTEM FOR LINUX, SPECIFICALLY??? /., what is this shit?
Seriously,
Violence is the last refuge of the incompetent. Polar Scope Align for iOS
Under Windows 10 install Linux, load Linux and install Wine = Exploit. Video is now private, I can see why.
If you have administrator (root) access, you own the machine. No need to use another attack: you already have succeed. In other words, if you already are inside the house, it's not a problem that you can get the spare key.
Also, is it "easy" to get administrator access in Windows? Really? Looks like whoever wrote this don't know Window's security model, or runs it with UAC disabled (which also proves the former).
"I'm gonna tell you how to make a MILLION dollars tax free. First, get a million dollars."
"I'm gonna tell you how to get root access on a Linux machine. First, get admin access."
Eh, needs work before it's ready for Steve if he ever does a Linux show.
And to think there was just a headline here on /. that asked 'Will Linux Innovation Be Driven By Microsoft?'
Well here's hoping not.
The thing is, on the platform usually targetted by malware written in Bash script - like GNU/Linux systems - "Administrative access" isn't something trivial.
It's rare that regular users run everyday tasks as "root".
You needed Microsoft to bring the GNU userspace and "linux ABI" to their NT kernel for suddenly things to run sour.
----
And joke aside about NT user running as "administrators" 24/24 hours and 7/7 days, this was bound to happen :
In order to not have ridiculous performance (as opposed to solution like Cygwin which is a user-land translation layer that must leverage whatever meagre functions the Win32 API offers to provide its POSIX compatibility) "WSL" takes a lot of shortcuts when providing "linux API" ("picothreads" was a widely advertised capability introduced inside the NT kernel and leveraged by WSL so it could provide posix-threads to linux ELFs that doesn't suck as much at multi-threading/multi-processing as the rest of Windows).
Some of these "not that much secure" performance shortcuts was bound to blow back on WSL users' face.
Again, remember : WSL is only exclusively to be used in testing/development environment (so that devs can directly test linux binary ELFs without needing, e.g., a full blown Ubuntu VirtaulBOX VM image).
WSL is currently NOT to be used in production (keep it away from production servers - obviously those will be running some GNU/Linux flavor), otherwise such blow-in-your-face accident could happen on critical machines with critical data.
"Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
It is that no existing anti-malware utilities will automatically catch and remove the malware. This is a serious risk.
Well to be more precise :
- currently the WSL subsystem that provides "linux ABI" to original linux ELFs
- and the Win32 system usually offered to normal windows userland
are too different environment which are kept (on purpose) isolated from each other.
(Just think about it: even if theoretically NTFS can store case-sensitive filenames, absolutely no Win32 userland does handle it.
That's just one of the several reasons why both environment should touch eachother's stuff.
Another reason is that for performance reason WSL uses an entirely different threading system than Win32 apps - "picothreads", there was a lot of online articles about the benefits of their introduction to NT kernels)
Only some specific forms of message passing are possible. /bin/bash, hence the name)
(- Windows' bash.exe can start ELFs in WSL (usual
Latest version of WSL can pass a little bit more data around.
WSL has a special filesystem driver to be able to safely mount windows' user data in the filesystem tree.
And that's about it.).
That mean that you copy of Kaspersky Lab for Microsoft Windows can't directly see anything happening in WSL.
...BUT!...
Absolutely nothing prevents you (or security software suites from official providers) to run the "KAV" elf inside WSL to handle the WSL side of security, in collaboration with the Win32 software.
"Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
AKA: Code execution results in code execution.
Raymond has a whole series of these things:
https://blogs.msdn.microsoft.com/oldnewthing/20070807-00/?p=25683
Once you're able to run arbitrary programs as admin on a Windows box, the box is lost. Which particular set of arbitrary weirdness you choose to do to crash, compromise, or exfiltrate the data is pretty much irrelevant.
A thousand pounds of wood moving at 300 feet per minute. Don't get in the way.
The user doesn't know the Linux subsystem is installed.
WSL isn't installed by default on Windows 10.
It's an optional component that you need to explicitly select in the corresponding control-pannel-thingy.
(like IIS).
If the user is clueless, chances are high that they don't have WSL installed.
The user doesn't know anything about Linux, and expects their Windows anti-virus to protect them.
(well, if they are running McAffee, they are toasted anyway :-P )
More seriously, it's the "security suite"'s developpers' job to develop a solution.
Again there is no technical reason preventing it (even if the current suite happens not to be able to see what happens on the WSL side).
Most of the big pro developers (e.g.: Kaspersky) already have Linux ELFs that are currently used on Linux servers, and on recovery bootdisk CD/USBs, they already have the necessary tools to be able to scan on the other side of the WSL fence.
All that is needed is some efforts to add the necessary glue code in the current suites to have them launch these processes inside WSL.
No technical limitations.
"Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
isn't just having a computer a "potential" computer security issue?
Well, I installed it on my 1703 build and there I was at the prompt:
Username? Mac
Password? This_day_we_are_gathered_together
Repeat Password: This_day_we_are_gathered_together
(rumble-rumble-rumble)
Login: q!z (or something) - [I'd typed Mac]
Evidently at login time bash decided that I was from Outer Mongolia or somewhere and gave me the appropriate keyboard. with totally strange key-mappings.
Needless to say I couldn't log in at all, either as Administrator or Mac . . .
Now that's what I call security!
Hats off to Microsoft as I return gratefully to Linux
Mac
Microsoft is doing a public service by adding Linux to Windows so people can see for themselves how insecure Linux really is. And just wait until they get systemd ported.
>> While many people welcomed the arrival of Windows Subsystem for Linux (WSL)
Really? No one I know cares or takes it seriously. Hardcore windows users won't go near it because like evyerhting Microsoft does, its a crap implementation and is buggy as fuck, and hardcore Linux users (like me) don't want windows anywhere near anything we do, especially not the parent layer.
Ah, shiny happy Windows users have another problem with their OS, too bad.
Just use something else, you dolts.
I see that Microsoft is quickly incorporating it's patented security model into Linux!
"I believe in Karma. That means I can do bad things to people all day long and I assume they deserve it." : Dogbert
Incorrect. Windows has a VMS security system with tokens since NT evolved from VMS. Unlike Unix a user is not really admin under Windows but rather requests a token to perform and admin task from ACL access control lists
These are implementation details.
My main point is that most of the time, Windows users are used to run as adminsitrator.
It doesn't matter if that is done by "holding admin level VMS tokens" or "being Unix UID=0, GID=0" is an implementation.
In practice :
- Windows user has account flagged as "admin"
- Windows user does something and UAC shows up asking authorisation for admin action
- Windows user clicks yes by habbit, because that's an entirely normal flow of actions.
My point : Windows users are completely used of running as admin.
On linux :
- Linux user clicks some begnin-looking attachment
- KDESU or any other pops up asking for root password
- Linux user : "Why the fuck do I need root to open a picture ? Kill this shit with fire !"
My point : Linux users don't normally need to run things as root.
WSL doesn't do shortcuts.
It. Fucking. Does.
Read the dozens of article and blog post, some by the Microsoft engineers behind WSL themselves.
The NT kernel was designed by David Cutler...
and was designed in a way that totally sucks at multi-threading and multi-processing.
(see any benchmark that compares code running on Linux and code running on Windows while using windows API for multi-threading).
if you take the time to read all the literature that was written around the introduction of WSL, you'll notice that a new functionality called "pico-threads" was introduced to the NT kernel. .EXE has a subpar performance.
that is the NT functionality that is used to provide "posix threads" to WSL layer ELFs.
because the traditionnal NT functionnality that is usually used to provide threads to
if you read the details, you'll notice that isolation and security is done a little bit lightly - both compared to classic NT threading and to how threads and processes work in Linux.
"Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
Just because the standard method of installing an optional service is through a control panel, doesn't mean that is the only way. .NET 2, & 3 are optional on Windows 10.
The difference is that .NET is a platform that is extensively used by Windows software.
It was designed with this purpose by Microsoft and is distributed widely.
It's completely expected that a lot of users will install it, because there are tons of legit use cases for that.
By the time a use clicks on a virus running on .NET, it is pretty expected that .NET will be installed.
WSL is a platform developed by Microsoft that currently only targets developers (so they can test linux code without a VM).
There might be a few rare other cases (I mainly think of running some scientific data pre-processing before submitting to the Linux nodes on the HPC for further processing).
But there are no practical reason for a clueless user to run WSL.
It's not something that is expected to be used by regular everyday software.
(At least that's not how Microsoft sees it, and not how it's marketed)
If a clueless click on a bash malware, chances are that he won't have it installed already.
And it would sound really weird if, when clicking to view an attachment in an e-mail, suddenly 2 installers pop-up (one for WSL itself, one to install the GNU userland from Ubuntu).
So we are back to Antivirus vendors providing ELFs, and providing a means of automatically installing and registering them, after installation. A means of automatically detecting the install of the WSL, and installing the appropriate ELF.
My entire point :
- antivirus need to pack the ELFs (that they already have for servers and for recovery bootdisks) together in their suits.
- if WSL happens to be deployed on that machine, they need to start the ELFs.
And all these "WSL hidden from windows app such as antivirus" problems go "poof!".
The hardest part (having antivirus software as linux ELFs) is already done. What is left is merely integration (which is already provided to some point in BASH.exe)
"Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
My point is that the bashware is a Trojan Horse which installs the WSL, as you described. The average Joe ain't gonna know they don't need WSL, they have to trust the program they are installing, the Trojan Horse.
Which sound a little bit stretching the average Joe's trust, just to click on some attachement.
(But on the other hand if the torjan begin its life as a "bloatware" that is co-installed with a big software suite, that sounds more realistic :
the joe wants to install a copy of Adobe premiere that he managed to download for free from some website. he IS going to expect a tons of aditionnal platform and libraries to get installed with it. An installation of WSL to get an invisible zombie node of a botnet can very easily smuggle in that case).
If the WSL happens to be deployed after the antivirus was installed, will the ELFs be available to the WSL so they can be started? The Lxss folder is not safely writeable by Windows native applications, file corruption usually occurs. So writing it to the filesystem beforehand is not an option.
If I was a Security Suite developer, the most likely route I would go for :
- software reside in a directory accessible to *windows* - typically a subfolder in the antivirus suite's installation folder
- main reason: so it is trivial to update through the main update system, and can potentially share the same data files (signatures, etc.) as the main windows anti-virus.
- this includes a Linux ELF executable (lifted from the recovery bootdisk)
- this includes a small bash script that can :
+- mount the Windows data with the proper VFS driver, e.g.: under "/opt/SecuritySuite"
+- start the Linux ELF with apropriate options.
- the above is launched by *PIPING* it to the stdin of BASH.exe
- the stdout of BASH.exe is picked up by the software to display result in the Windows GUI.
- this solves the chicken and egg problems of how to handle concurrent WSL installation
Possible improvement :
- the API and message passing used by BASH.exe to talk with Linux process under WSL has recently been improved.
(e.g.: it's possible since recently to invoke "start" from within WSL to launch windows process outside of WSL)
Also, Linux ELFs sounds like a business or Enterprise feature, not a home use feature.
Currently, it is *ALSO* marketed as a home (power) user feature, mainly as free "Recovery Bootdisk".
(In addition to the classical expensive Linux server feature).
So how they will market it depends on what they want to achieve :
- do they want to cover extensively end users ? (it might also come as a premieum feature)
- do they want only to offer it as an extra protection for Business users ?
"Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]