News for hackers. Stuff that matters.
Re:GitHub investigating crypto-mining campaign abusing its s... by ilkkao on Saturday April 03, 2021 @04:35AM (#26679290)
Detecting mining jobs sounds like an interesting engineering challenge. Kernel has an OOM-killer, could it have a mining algorithm detector and killer too? Something that is hard to bypass.

Detecting them while they are running would be the best approach I guess. Not after the time limit when the damage is already done.

Re:GitHub investigating crypto-mining campaign abusing its s... by luto on Saturday April 03, 2021 @05:01AM (#26679410)
We, a medium-sized hosting provider, just do it using the process name. Works much better than you'd expect, since most miners are using very similar software. No interesting engineering challenge here, sadly.
Re:GitHub investigating crypto-mining campaign abusing its s... by londons_explore on Saturday April 03, 2021 @05:35AM (#26679563)
Ssssh.... If you tell everyone that's what you do, people will just rename the binary...

The trick to protections like this is to not tell anyone how they work, and to run them only occasionally. Ie. once a week, ban half of users who are running xmrig.exe. Also include users who signed up with the same email address, phone number or IP address as the detected users and who have a consistently high CPU use - these are probably successful bypasses of your simple process name based filter.

That way bad actors have a very hard time figuring out exactly what your protections are or how they work. If they were to get an immediate ban as soon as they fired up xmrig.exe, then they'd quickly think to rename it or recompile it or run it under wine or a host of other ideas. Yet having a random selection of their accounts banned seemingly at random means they learn nothing.

Obviously you need a process for users accidentally caught in the net to get their accounts reactivated, and if you're a service like githuib you should probably let the user have a grace period to do that before killing their entire business...

Re:GitHub investigating crypto-mining campaign abusing its s... by vntok on Saturday April 03, 2021 @05:54AM (#26679659)
So if you only ban half of illegitimate accounts once a week, does this mean I just need to launch my mining code registration scripts also once a week, ideally just after I see some of my accounts have been banned?

And doing this will get me a full week's of free mining on half my miners (if I'm the only one in the world pursuing this strategy) or most of my miners if the banning campaign is capped and also hits other abusers? It sounds like a great deal, honestly.

Re:GitHub investigating crypto-mining campaign abusing its s... by londons_explore on Saturday April 03, 2021 @08:59AM (#26680705)
For most places you can get free compute power, a week's mining revenue might only be a few cents.

As long as the account sign-up process requires a captcha or phone number for the most spam-like signups, you'll keep their profits low enough to deter most people.

Re:GitHub investigating crypto-mining campaign abusing its s... by luto on Saturday April 03, 2021 @05:43AM (#26679607)
Good luck finding that post and linking it to the provider. That set aside, except for DDoS defense, we've run into no problems at all when talking very openly about how we operate. Seems naive at first glance, but we've had a good 10+ year run (so far!). Works for us, might not for others.
Re:GitHub investigating crypto-mining campaign abusing its s... by faeyanpiraat on Saturday April 03, 2021 @06:35AM (#26679855)
Delayed banning seems to work well for multiplayer game anti cheat systems (like VAC).

These problems are essentially the same, some of the know-how can be easily adapted between them.

Re:GitHub investigating crypto-mining campaign abusing its s... by thaumasiotes on Saturday April 03, 2021 @06:39AM (#26679876)
> Good luck finding that post and linking it to the provider.

No need to link it to the provider. If one provider does things that way, you want to block their method. (And, of course, the odds are overwhelming that the other providers are doing the same thing.)

Re:GitHub investigating crypto-mining campaign abusing its s... by frenchman99 on Saturday April 03, 2021 @07:21AM (#26680085)
It seems like a Whois search about the domain that's in your Hacker News profile yields lots of interesting information. Your previous comments seem to indicate that's a provider you work for. Maybe it's not related though. Or maybe it's just a way of doing PR. I know nothing.
Re:GitHub investigating crypto-mining campaign abusing its s... by plasma on Saturday April 03, 2021 @06:35AM (#26679858)
Wonder if you could check the repeated use of cryptographic functions in a process as a sign.
Re:GitHub investigating crypto-mining campaign abusing its s... by nostoc on Saturday April 03, 2021 @09:01AM (#26680718)
As a bonus, you'll also see ransomwares, disk encryption software, http servers, browsers...

And what if the miner uses it's own crypto lib, and doesn't rely on the OS crypto API?

Re:GitHub investigating crypto-mining campaign abusing its s... by ant6n on Saturday April 03, 2021 @08:15AM (#26680437)
Do miners heavily rely on crush instructions? Then it could perhaps be possible to reduce the performance of these instructions 100-fold, making mining useless but other code still run.
Re:GitHub investigating crypto-mining campaign abusing its s... by jfoster on Saturday April 03, 2021 @06:28AM (#26679816)
You could also just address it through your rate table by appropriately pricing for intense workloads, couldn't you?
Re:GitHub investigating crypto-mining campaign abusing its s... by luto on Saturday April 03, 2021 @06:37AM (#26679864)
We're offering shared hosting for web apps and other hacker/toy projects. Intense compute workloads are just not what our product is built for, so we let other providers handle that part of the market.
Re:GitHub investigating crypto-mining campaign abusing its s... by jfoster on Saturday April 03, 2021 @11:57PM (#26686780)
That's what I mean. So make it very expensive to run them on your service and the coin miners will go elsewhere.
Re:GitHub investigating crypto-mining campaign abusing its s... by luto on Sunday April 04, 2021 @05:08AM (#26687966)
We're aiming to make our service accessible to everyone, which involves customers choosing their own price. So there isn't a fixed price we could raise. Additionally, there is a free trial month, which adversaries typically make use of, instead of paying for the service. Hiking he price without deep additional changes is not in our interest and wouldn't change anything in our case.
Re:GitHub investigating crypto-mining campaign abusing its s... by Tenoke on Saturday April 03, 2021 @07:37AM (#26680174)
Google Colab supposedly has great miner detection for example. I Googled out of curiosity recently and couldn't find any clearnet mentions of anyone bypassing it in the recent past and the old ways don't work. Though it must be possible it at minimum doesn't seem to be easy.
Re:GitHub investigating crypto-mining campaign abusing its s... by williamstein on Saturday April 03, 2021 @10:20AM (#26681280)
Google Cloud is similar (perhaps the same). I run sites there that involve arbitrary code execution by our users, and periodically Google support contacts us to report cryptomining violations. I don't know exactly what Google's heuristics are for triggering this, but their reports to us typically include the ip address of a mining pool that was contacted by one of our virtual machines. My impression is that mining typically involves a network connection.
Re:GitHub investigating crypto-mining campaign abusing its s... by slig on Saturday April 03, 2021 @10:53AM (#26681513)
Aren't you afraid of running such service on Google infrastructure and getting the ban hammer from Google?
Re:GitHub investigating crypto-mining campaign abusing its s... by williamstein on Saturday April 03, 2021 @12:48PM (#26682514)
No I am definitely not afraid of that, based on several factors: knowing what really happens in practice having used GCP since 2014; my company being in the highest tier of Google’s startup program; I know many people who work at Google (eg numerous of my past PhD students). Of course my risk analysis parameters may be completely different than yours. On a purely technical level, GCP is a good quality product.
Re:GitHub investigating crypto-mining campaign abusing its s... by Tenoke on Saturday April 03, 2021 @11:07AM (#26681627)
Does it even matter to GCloud (a paid service) if I use 100% of the GPU for Deep Learning or for mining? They operate on profit either way.
Re:GitHub investigating crypto-mining campaign abusing its s... by williamstein on Saturday April 03, 2021 @12:51PM (#26682552)
They also care because in practice such use is often done by attackers unbeknownst to the person paying for the resources. That would much rather make the person paying aware ASAP of such usage, rather than have them be on the hook for a large bill at the end of the month. Google does have a complicated process to allow cryptomining on their infrastructure. They also flag all kinds of other suspicious activity, eg once somebody was launching DOS attack from cocalc on “the country of Turkey” and that got some of cocalc shutoff immediately.
Re:GitHub investigating crypto-mining campaign abusing its s... by slig on Saturday April 03, 2021 @11:39AM (#26681888)
It does, I think, for the same reason GPU manufactories segment GPUs for gaming and for Deep Learning.
Re:GitHub investigating crypto-mining campaign abusing its s... by xnbya on Saturday April 03, 2021 @06:34AM (#26679853)
RandomX is quite easily detectable due to the unusual use of floating point operations. Proof of concept detectors have already been created, for example https://github.com/tevador/randomx-sniffer
Re:GitHub investigating crypto-mining campaign abusing its s... by raverbashing on Saturday April 03, 2021 @06:33AM (#26679847)
CPU throttling is probably your best bet I'd say. Watch for things pegging the CPU

Most of build actions is not 100% CPU bound

But yeah, abusers are going to abuse

Re:GitHub investigating crypto-mining campaign abusing its s... by NullPrefix on Saturday April 03, 2021 @07:27AM (#26680115)
> Most of build actions is not 100% CPU bound

Unless you compile large C/C++ projects on a low core count VM.

Re:GitHub investigating crypto-mining campaign abusing its s... by sahkopoyta on Saturday April 03, 2021 @04:54AM (#26679386)
AFAIK, I don't think OOM-killer would help too much. Calculating hashes is not very memory intensive job