News for hackers. Stuff that matters.
Re:Weak passwords brute forced by forrestthewoods on Tuesday November 19, 2013 @10:26PM (#6766105)
How is this possible? I would expect repeated failed login attempts would force a timer making a brute force attack impossible? Or at least more difficult. Is that not the case or am I missing a key piece of info? (Serious question, not trying to troll or be smug.)
Re:Weak passwords brute forced by pavs on Tuesday November 19, 2013 @10:32PM (#6766118)
From the blog post:

"While we aggressively rate-limit login attempts and passwords are stored properly, this incident has involved the use of nearly 40K unique IP addresses. These addresses were used to slowly brute force weak passwords or passwords used on multiple sites. We are working on additional rate-limiting measures to address this. "

Re:Weak passwords brute forced by ChuckMcM on Tuesday November 19, 2013 @10:49PM (#6766178)
This is one of the more insidious scraping techniques. At Blekko if we see the same exact same query coming in from a bunch of different addresses, differing only by which page of the results they want we temporarily ban the entire lot of them.

I'm sure a similar situation would work here, especially with a decent geoip database. If you get 3 - 5 failed attempts on an account separated by more than a few miles (and not along an interstate :-)) you can probably assume someone is using a botnet to try to break in.

Re:Weak passwords brute forced by oelmekki on Wednesday November 20, 2013 @03:23AM (#6766915)
Bruteforce techniques are indeed evolving.

Before I switched my sshd ports a few weeks ago, I often saw break in attempts on my servers that would imply checking only a single username and a single password.

My guess on that is that bruteforcers, rather than testing thousands of usernames with thousand of passwords on a single host will try a single username and single password on thousands of hosts.

Re:Weak passwords brute forced by werid on Wednesday November 20, 2013 @03:35AM (#6766956)
Re:Weak passwords brute forced by oelmekki on Wednesday November 20, 2013 @05:44AM (#6767292)
Very interesting article, thanks.

I double checked my log archives, it seems not to be exactly the same, though. In what is reported here, a same username will be tried with several password, allowing something like a minute to pass to make a new attempt.

In my logs, this is really just a single attempt. Other break in attempt may happen something like two days after, but with an other IP and username.

It may just be yet an other evolution of the same botnet knowing its previous pattern has been spotted, though.

(and in case you wonder, yes, I always have the nose in my logs, having a dedicated monitor for that :) )

Re:Weak passwords brute forced by recuter on Wednesday November 20, 2013 @01:36AM (#6766653)
How does IPV6 affect things?
Re:Weak passwords brute forced by dredmorbius on Wednesday November 20, 2013 @04:09AM (#6767043)
As with IPv4, DoS attacks which tend to be clustered from specific locations (I've seen them originating from multiple hosts within a hosting center's range, or from a particularly poorly managed ISP's allocation), using broader allocations (CIDR blocks and ASNs) to identify responsible networks can be useful. The challenge in general is translating from IP addresses to the administrative block responsible (there are IP reverse lookups which do this, in some cases the zonefiles are downloadable allowing lookups at local network speeds), and in translating the information to some sort of policy (few network management devices offer AS blocking rules, though CIDR is pretty much native).
Re:Weak passwords brute forced by gnur on Wednesday November 20, 2013 @03:28AM (#6766934)
It is probable that a single machine gets a /64 ipv6 range, but the first 64 bits are consistent. When ipv6 gets more common it will probably be more acceptable to block an entire /64 if you suspect a brute force attack.
Re:Weak passwords brute forced by Pxtl on Tuesday November 19, 2013 @10:49PM (#6766177)
I've seen this mentioned before - using a tremendous number of IP addresses across a tremendous number of sites and over a massive length of time to perform a very low-grade incessant brute-force attack. It means that any weak password anywhere is always vulnerable because everybody is always under low-grade brute force attack.
Re:Weak passwords brute forced by ye on Wednesday November 20, 2013 @09:54AM (#6768308)
Looks like they didn't rate-limit per-user, but only per-IP.

Now that is dumb. I expected more from GitHub.

Re:Weak passwords brute forced by gfxmonk on Wednesday November 20, 2013 @10:14PM (#6772840)
If they rate limited per user, you could trivially prevent someone from logging in by pummeling the server with login attempts for their username.
Re:Weak passwords brute forced by ye on Thursday November 21, 2013 @07:52AM (#6774420)
If there are limits per-user and per-IP, they would need a shit ton of IPs to do that to any reasonable number of users.
Re:Weak passwords brute forced by berlinbrown on Tuesday November 19, 2013 @11:33PM (#6766310)
Seems a bit excessive for a open source repo site.
Re:Weak passwords brute forced by jakobe on Wednesday November 20, 2013 @12:46AM (#6766524)
Actually not. I'm the maintainer of a popular Open Source project that is hosted on Github. If someone stole my credentials, they could replace the current release with a binary containing a Trojan.

Looking at the security history page I see a lot of failed login attempts. Makes me glad I enabled 2-factor-authentication!

Re:Weak passwords brute forced by enscr on Wednesday November 20, 2013 @01:45AM (#6766675)
Your post should be at the top for other Github maintainers to see.
Re:Weak passwords brute forced by yukkurishite on Wednesday November 20, 2013 @03:12AM (#6766889)
You put compiled files on github?
Re:Weak passwords brute forced by jakobe on Wednesday November 20, 2013 @04:48AM (#6767140)
Github recently introduced a "Releases" section where you can tag releases and provide binaries: https://github.com/PostgresApp/PostgresApp/releases

It's a great way to distribute Open Source software. (Previously Mattt hosted it on a personal Amazon S3 account which he paid out of his own pocket; now bandwidth is generously paid for by Github)

Re:Weak passwords brute forced by ersii on Wednesday November 20, 2013 @04:29AM (#6767095)
I don't know about you, but I seldom read through all the source code of the open source/free software I use. Yeah, even when I actually compile it myself.

If someone would slip in rogue code - it's quite likely some to many would actually run it and deploy it. Especially if it's a fast moving piece of software - like being so rapidly developed that distribution packages can't keep up for either time or stability reasons, leading people to compiling/deploying from source themselves.

Re:Weak passwords brute forced by est on Wednesday November 20, 2013 @01:03AM (#6766556)
lol the real motivation is Ripple offers giveaways. github account == $$$$
Re:Weak passwords brute forced by kazagistar on Tuesday November 19, 2013 @11:40PM (#6766337)
Many large companies use them as a SaaS dvcs provider for private, closed source repositories. They provide a great tool for an agile workflow at a good price, what more is there to say?
Re:Weak passwords brute forced by jader201 on Wednesday November 20, 2013 @12:12AM (#6766427)
Obviously I have nothing to go on for this, but just guessing, it would seem to make sense that:

- Of all users, only a small subset would have private repos

- Of those users, only a small subset would have private repos that would be of interest to third parties

- Of those users, only a small subset would have a weak enough password to allow brute force

To reverse it, of these accounts that were hacked, I can't see many of them having private repos that would be of interest.

And if so, then this would seem a bit excessive.

I know that's a lot of ifs, but it seems reasonable. I would be interested to see the number of total accounts vs. the number of accounts w/ private repos.

Re:Weak passwords brute forced by icambron on Wednesday November 20, 2013 @02:17AM (#6766769)
A couple of odd assumptions there:

- That private repos are the only thing worth targeting. What if you could inject a trojan into a popular open source project? You could do a lot of damage that way, probably way more than on private repo, because so many people incorporate them in their products. Imagine they hacked the Rails repo, for example. Worse, some repos host binaries, for which a meddling would be harder to detect (a bad idea, but doesn't mean it doesn't happen).

- That the users being attacked are random and not specifically targeted based on who the user is and what the work on. Not sure if that's the case or not, but I see no reason to assume it.

Re:Weak passwords brute forced by ersii on Wednesday November 20, 2013 @04:32AM (#6767103)
Well, if you're brute forcing user passwords - you've probably done a cursory crawl of all or some users first.

A good bet to find people with private repositories, would be to aim for all or a subset of those who belong to an Github "organisation".

Likelihood of valuable user greatly increased.

Re:Weak passwords brute forced by atgm on Wednesday November 20, 2013 @12:14AM (#6766435)
People often reuse user/password combinations. So if attackers can find working combinations here, those are combinations that they can try elsewhere as well.
Re:Weak passwords brute forced by akent on Tuesday November 19, 2013 @11:40PM (#6766333)
People have private repos too you know.
Re:Weak passwords brute forced by rurounijones on Tuesday November 19, 2013 @10:35PM (#6766134)
Rate-limiting based purely on username/password is a great way for me to lock other people out of their accounts (Or force them to do a password reset, or wait for a timeout) by just failing to login to theirs a few times.

The way around this problem is to add source IP into the rate-limiting algorithm so that I cannot mess someone else up.

Unfortunately that can be worked-around somewhat by using 40k different source IP addresses.

No perfect answer. Personally I think GH did ok here.

Re:Weak passwords brute forced by evanspa on Tuesday November 19, 2013 @11:16PM (#6766259)
See "Part VII" of this SO answer from Jeff Atwood describing mitigation techniques for "distributed brute force attacks"

http://stackoverflow.com/questions/549/the-definitive-guide-...

TL;DR - compute the average number of system-wide failed password attempts, and if it's over the norm, impose small delay on all users (except those that login via a persistent login cookie).

Re:Weak passwords brute forced by jakobe on Wednesday November 20, 2013 @01:19AM (#6766603)
Actually, this answer isn't by Jeff Atwood. See http://meta.stackoverflow.com/questions/95172/old-problemati...
Re:Weak passwords brute forced by evanspa on Wednesday November 20, 2013 @09:56AM (#6768320)
Ah - my mistake. Thank you for clarifying.
Re:Weak passwords brute forced by ohwp on Wednesday November 20, 2013 @03:47AM (#6766989)
Note that this can be very tricky. You don't want to keep connections open or waiting.
Re:Weak passwords brute forced by rurounijones on Tuesday November 19, 2013 @11:48PM (#6766359)
Very useful, thanks!
Re:Weak passwords brute forced by annnnd on Wednesday November 20, 2013 @01:23AM (#6766623)
Rate limiting is not the only thing they could have done. They could also notify users of failed attempts and ask them to confirm it was their attempt (once they were logged in of course) - the offending IPs could then be blacklisted.

Of course, this works only if the number of attacks is small enough.

Re:Weak passwords brute forced by tmallen on Wednesday November 20, 2013 @01:50AM (#6766691)
I think the point is that with so many source IPs, blacklisting techniques are pointless, and given the duration of the attack, timeouts are useless too. What is better is a IP whitelist coupled with a notification if a certain number of logins fail from IPs outside of that whitelist, regardless of the time inbetween. Users with strong passwords could disable this notification but it makes others aware that they are under this attack (possibly).

An even more secure approach is what Linode does. If you log in from a non-whitelisted IP, they require you to whitelist the IP via an emailed link, then you can login.

But that's overkill and the first one is a lot better for casual websites. You store the user's last login IP and you wait for maybe 1024 failed attempts not from that IP, which ought to be enough to suggest a bruteforce attack. You're protecting "bluedog4", not "password" or "1234" which are going to get cracked anyway.

Re:Weak passwords brute forced by ajcarpy2005 on Wednesday November 20, 2013 @01:00AM (#6766552)
Couldn't the server check for a "trusted IP(s)"?

Two-Factor Authentication is great but even without, it would seem that they could more aggressively lock out any new IP address which is failing password retries several times. (but continue allowing log-in from trusted IP's.)

Re:Weak passwords brute forced by superuser2 on Wednesday November 20, 2013 @01:21AM (#6766613)
IPs aren't stable. For instance, the legacy SSID broadcast all across my university assigns you a new (usually different) fully routable public IP every time you authenticate through the captive portal. Some random person enjoys the "trustedness" of your IP at the time of login; you never see it again.

There is a new SSID with WPA2-EAP replacing the captive portal and the usual DHCP/NAT business replacing our massive waste of IPv4 space, but that was implemented last year. This introduces the opposite problem: one person out of thousands can't remember their GitHub password so GitHub mysteriously drops all traffic from everyone on campus.

IP addresses don't identify people, computers, or usefully discrete units of any kind.

Re:Weak passwords brute forced by lelandbatey on Wednesday November 20, 2013 @01:28AM (#6766640)
While that seems like a logical solution arrived at through a pragmatic approach, it's toeing the line of a really bad practice. IP addresses are not, and should not be, identifiers like this, especially when you're talking about a whitelist. What happens if the ip address changes (happens all the time for the majority of US internet users who have dynamic IP's)? What about if they want to work at a coffee shop?

While it might be possible to do all this correctly, it's just so easy to do wrong that it's hardly worth it. Given that there are existing better ways to do it, it's the kind of thing you probably don't even want to mess with.

Re:Weak passwords brute forced by ams6110 on Tuesday November 19, 2013 @10:48PM (#6766172)
I suppose if you see repeated failures across a range of IP addresses you could temporarily block the entire account and send a reactivation email to the registered email address.

That would prevent a practical joker at work from locking you out unless he went to a lot of extra trouble.

Re:Weak passwords brute forced by Pxtl on Tuesday November 19, 2013 @10:51PM (#6766186)
At some point I'm starting to see the appeal of completely abandoning passwords in favour of email or SMS-based token creation.

You attempt a login, they send an out-of-band request for confirmation. You do the confirm, and they let you in. Like a superfast streamlined version of the "reset password" email.

Re:Weak passwords brute forced by oomkiller on Tuesday November 19, 2013 @10:58PM (#6766202)
The existing 2 factor auth basically does this, without the requirement of SMS, internet, or any connectivity really in general. The OTP tokens are based on time or a counter, and a secret key.
Re:Weak passwords brute forced by eli on Tuesday November 19, 2013 @10:51PM (#6766183)
Considering Github is frequently the target of DDoS attacks, I would assume there are people willing to go to a fair bit of trouble to lock you out of your account.
Re:Weak passwords brute forced by ajtaylor on Tuesday November 19, 2013 @10:29PM (#6766111)
The article did mention the use of 40k unique IP addresses, so I'm guessing their rate limiting is based on IP address and not the username or IP+username combination.
Re:Weak passwords brute forced by X-Istence on Tuesday November 19, 2013 @10:58PM (#6766203)
Why not both?
Re:Weak passwords brute forced by fragsworth on Wednesday November 20, 2013 @01:12AM (#6766581)
Maybe they're doing this now that it's a real problem?

At any rate, don't store really sensitive stuff on Github. It's a bad idea for many reasons, security flaws being one. In particular, keep in mind things like AWS server credentials which might go in your repository.

Re:Weak passwords brute forced by rythie on Wednesday November 20, 2013 @03:06AM (#6766878)
Doing it by username means the real user can lose access to their account, whilst it is being attacked, even though they might have strong password.
Re:Weak passwords brute forced by stokedmartin on Tuesday November 19, 2013 @11:27PM (#6766289)
One could attempt to log in from multiple IPs over a long span of time, let's say weeks. This scenario is difficult to trace using timers. Alternatively, sending email alerts on each failed log in attempt may not very optimal and generate a lot of false positives - person A (not an intruder) randomly tries logging in by impersonating multiple github users.

IMO something similar to SSH security policies like allowing logging in from a set of IPs and/or without password i.e. using public key, may be a good idea.

Re:Weak passwords brute forced by scovetta on Wednesday November 20, 2013 @12:14PM (#6769309)
What if the attackers were brute-forcing the username given a common password? Instead of:

  foobarjones:123456

  foobarjones:passwd

  foobarjones:test
Do:

  foobarjones:123456

  drsmith:123456

  ilikeorangejuice:123456

  ...
(some time later)

  foobarjones:passwd

  drsmith:passwd

  ...
Re:Weak passwords brute forced by shill on Tuesday November 19, 2013 @10:49PM (#6766174)
I have a single failed login from an IP address in Brazil 16 hours ago. And another single failed attempt from an address in Thailand three days ago. No suspicious activity had been logged before that.

The attacker probably tried a password like 'github' on the first pass and 'password' on the second pass.

Re:Weak passwords brute forced by beering on Tuesday November 19, 2013 @10:32PM (#6766120)
You may not be trying to troll, but either you didn't bother reading the article or they added details since you read it (doesn't seem likely). They answer this near the end of the not-very-long article.
Re:Weak passwords brute forced by forrestthewoods on Tuesday November 19, 2013 @11:00PM (#6766208)
Hrm, so they do! I swear I read the article a second time and even re-skimmed looking for that detail before making my post. My brain really, really wanted to not read that next to last paragraph. Stupid brain.
Re:Weak passwords brute forced by jcampbell1 on Tuesday November 19, 2013 @10:35PM (#6766132)
The attack was done using 40,000 IP addresses. You can only force a timer per IP address.
Re:Weak passwords brute forced by muglug on Tuesday November 19, 2013 @11:02PM (#6766218)
You can also force a timer on a per-account basis - e.g. twenty failed logins for one account from five different IP addresses -> set a timer on those IP addresses and a timer on that account. It's not simple, but it would help mitigate a mass-brute-force effort.
Re:Weak passwords brute forced by schrodinger on Tuesday November 19, 2013 @11:38PM (#6766325)
But then it's trivial to lock someone out of their account by trying to login as them a bunch of times. That's why they'd key it based on ip and username, not ip alone.