“To recover your lost code and avoid leaking it: Send us 0.1 Bitcoin (BTC) to our Bitcoin address ES14c7qLb5CYhLMUekctxLgc1FV2Ti9DA and contact us by Email at [email protected] with your Git login and a Proof of Payment. If you are unsure if we have your data, contact us and we will send you a proof. Your code is downloaded and backed up on our servers. If we don’t receive your payment in the next 10 Days, we will make your code public or use them otherwise.”
Key Learnings
In the hijack's immediate wake, it wasn't clear how the hackers conducted the attacks but the the platforms' security teams now are "confident that we understand how the account compromises and subsequent ransom events were conducted," the blog said. The hacker appears to have scanned the web for Git config files and used stolen credentials to carry out the heist at Git hosting services. Some users suspect that it wasn’t a targeted attack but a random, bulk attack carried out by a script. Apparently, some of the victims used weak passwords for their GitHub, GitLab and Bitbucket accounts. They also didn’t remove access tokens for apps left unused for months. Both mistakes left accounts vulnerable to hacking. “My password was a weak one that could've been relatively easily cracked via brute-force (it's not a common one but starts with "a" and has only a-z characters in it) and it could be that they just automatically checked if they can access the account and then ran some git commands,” wrote one user on the StackExchange forum. “It is also possible that my email address and that particular password are on a list of leaked accounts.”Recommendations
Here's how users can protect their repositories from such attacks:- Enable multi-factor authentication on your software development platform of choice -- Bitbucket, GitHub or GitLab.
- Use strong and unique passwords for every service to prevent credential reuse if a third-party experiences a breach and leaks credentials.
- Understand the risks associated with the use of personal access tokens, which, used via Git or the API, circumvent multi-factor authentication. Tokens may have read/write access to repositories depending on scope and should be treated like passwords. If you enter your token into the clone URL when cloning or adding a remote, Git writes it to your .git/config file in plain text, which may carry a security risk if the .git/config file is publicly exposed.
- When working with the API, use tokens as environment variables instead of hard coding them into your programs.
- Do not expose .git directories and .git/config files containing credentials or tokens in public repositories or on web servers.