Bash on Windows: a hidden Bitcoin goldmine?
ma.ttias.be
ma.ttias.be
Edit: A comment how easy it would be to theoretically have this functionality accidentally enabled --
Note that the odds of Grandma 'accidentally' enabling Bash on Windows is more or less none. You have to 1: Associate your Win10 account with a MSDN account. 2: Enable Developer Mode from the Update Settings. 3: Sign into MSDN and click through a few pages to enable Insider features. 4: Finally, Go back to the Update settings and enable Insider updates along with the "Fast" feature-set. 5: Reboot. 6: Enable the "Server" Service (most users are just running "Workstation" on 10; 'Server' isn't even offered on non-Pro,Enterprise. (At least, I think)).
Only then will you be able to even have the option of installing the Bash feature (which isn't an "oops" situation - you have to be a power user to even get access to it with an Admin user [See: (1,2) for what's visible on a stock install of Windows, even to administrators - none of which offer the Feature selection.]
It's intentionally obscured for power users, just like the Group Policy, MMC, etc functionality. You can even tell by [3] ("Features") and the other Features in there (Active Directory, Hyper V, etc) that this functionality is clearly targeted to power-users (in fact, there's a large overlap between WinServer 2012's Feature screen & this).
TL;DR - This isn't something which will accidentally get turned on, and if Grandma is rooted, you can hide the process from Process Manager easily anyways. Even from Sysinternals' Procexp, with some ease.
[1] https://i.imgur.com/EPgcrrR.png Standard settings page [2] https://i.imgur.com/Lim8eFv.png Standard Control Panel [3] https://i.imgur.com/xDyQzHd.png Features
Right now, it's hopefully just an implementation detail that will get resolved soon.
One of the dark bits with people calling for a more democratic Proof of Work based cryptocurrency is that it will dramatically increase monetary flows to organized cyber criminals.
Several cryptocurrencies use alternative Proof-of-Work that is more CPU friendly, e.g. by requiring several MB of memory and exploiting Intel CPU's AES-NI support for cryptographic operations.
The portion of Windows that handles processes is in the kernel mode part of Windows, and is part of its executive subsystem - I believe Microsift call it the process manager.
Windows just ran POSIX compliant programs in a POSIX environment, so the process manager shouldn't have had any problems.
Edit: I researched this years ago whilst studying for the MCP, and documented it on Wikipedia [1] - I even drew a diagram in Word which has since been converted to SVG :-) Since then someone else has written an article about the POSIX subsystem of Windows and it notes:
"The runtime environment of the subsystem is provided by two files: psxss.exe and psxdll.dll. A POSIX application uses psxdll.dll to communicate with the subsystem while communicating with posix.exe to provide display capabilities on the Windows desktop." [2]
1. https://en.m.wikipedia.org/wiki/Architecture_of_Windows_NT
I would say that OS X is just simpler, in that it doesn't use multiple subsystems which can each have totally separate process namespaces. What the Windows Task Manager should at least do is have a catch-all entry for a non-Win32 subsystem, so you can see that the Linux Subsystem is taking 100% CPU.
There's no BTC goldmine here.
You don't think that's a problem or could be used to hide processes from the average sysadmin? I do!
Generally speaking, when virus writers write viruses, they don't like spinning up the CPU fans and literally allowing the user to hear the virus working. Pegging the CPU at 100% is the easiest damn way of getting caught.
Instead, Botnets seem to be more intent in stealing keyboard presses (credit card information, personal information), and launching DDOS attacks.
It's a ubuntu based subsystem. Apt-get probably uses their official repo and you would have to get your malware into that first and then make some windows beta-user install your new and unknown package.
Resource Monitor
Sysinternals Process Explorer
Run as administrator
The processes in the Linux subsystem does not interact with the usual usermode parts of Windows at all, so they don't need a PEB. Actually their PEB is mapped to address 0 which is reserved.
A lot of APIs for getting information about processes will try to read the PEB, and fail if they can't read that. So if you want useful information about those processes you can only use those APIs that queries the kernel about its information about the process.
The Task Manager probably just assumes that it can get all the information normally, and ignores the process if something fails. Maybe it's even the API it uses that's the issue, someone could check whether the ToolHelp32 API even returns those processes (I don't know whether the Task Manager uses the ToolHelp32 API or the lower level PSAPI).
I've updated it, because that's a good remark: the list doesn't show the process's name either.
There are a lot of things that only show up in the "Details" tab. Any user who needs to kill a process in Windows (which is 70% of Windows users) will quickly learnt that the "Details" tab is the only one that matters.