Live data from Hacker News

My MetaMask Private Keys Stolen from GitHub Private Repo in 1 Hour

news.ycombinator.com

41–47 of 47 posts

Re: My MetaMask Private Keys Stolen from GitHub Private Repo in 1 Hour

#41
Assuming that the person you were working with didn't drain your wallet, there are many tools which can be used to actively monitor for commits being done on GitHub with secrets of sort.

The first one that comes to my mind is shhgit (https://github.com/eth0izzle/shhgit)

Anyone can self host it and then add multiple GitHub Dev keys to it. Then this can be used to monitor GitHub commits being done, majority of which can be categorized as "secrets".

Re: My MetaMask Private Keys Stolen from GitHub Private Repo in 1 Hour

#42
post #2

There are bots that scan GitHub for credentials and private keys. Sorry that happened to you, I hope it wasn't a lot of money. Considered adding files like that to .gitignore in the future.

Actually already added to .gitignore file but then realized that .js files are not being discarded by .gitignore

They are if the gitignore matches the file, just like any other filetype.

Re: My MetaMask Private Keys Stolen from GitHub Private Repo in 1 Hour

#43

I think your colleague cloned the repo, and he had wallet stealing malware in his PC, which probably automatically stole it within milliseconds of the clone happening.

This is a horrifying scenario.

Not really. Why would you wver share non multisig keys with anyone outside of a test scenario. Tbh anyone who cant understand why this is a bad idea should not be holding crypto anyway as they are going to get separated from it one way or another

Re: My MetaMask Private Keys Stolen from GitHub Private Repo in 1 Hour

#44

I think your colleague cloned the repo, and he had wallet stealing malware in his PC, which probably automatically stole it within milliseconds of the clone happening.

This is a horrifying scenario.

Not really. Why would you ever share non multisig keys with anyone outside of a test scenario. Tbh anyone who cant understand why this is a bad idea should not be holding crypto anyway as they are going to get separated from it one way or another

Re: My MetaMask Private Keys Stolen from GitHub Private Repo in 1 Hour

#45
post #2

There are bots that scan GitHub for credentials and private keys. Sorry that happened to you, I hope it wasn't a lot of money. Considered adding files like that to .gitignore in the future.

When I used to work in Crypto we had git hooks set up to prevent this from happening. It takes a bit more time to set up than just adding something to .gitignore but is a more robust solution of you design your hook well.

Re: My MetaMask Private Keys Stolen from GitHub Private Repo in 1 Hour

#46
post #31
post #28

Earlier quoted context omitted.

What he is doing should have been secure. The question is valid. How were the keys exposed from a private repo?

"Secure" is kind of a relative term, it only exists with regard to a threat model and a likely spectrum of attacks. Simply having the key in plaintext on a developer PC connected to the regular internet is fairly low-security to start with; there are all sorts of opportunities for coincidental compromise that may have exposed it directly from his PC or his collaborator's PC.

Agreed, all I'm saying is that he did not give any specific detail which demonstrated a specific vulnerability. so just feel like more info is needed.

Re: My MetaMask Private Keys Stolen from GitHub Private Repo in 1 Hour

#47
post #28
post #8

I hope you're enjoying being your own bank and in full control of your resources. Maybe you need to ask your bank (yourself) about your security policies. /s (Information security is hard and you only have to make a mistake once.)

What he is doing should have been secure. The question is valid. How were the keys exposed from a private repo?

> What he is doing should have been secure.

Sure, but using any third party is inviting a layer of risk. Banks get hacked too. No system is without vulnerabilities. You decide which to trust, including your potentially error-prone self.

Post reply on HN