Live data from Hacker News

Google Search: Inurl:server Filetype:key “-----BEGIN RSA PRIVATE KEY-----”

google.co.uk

31–40 of 60 posts

Re: Google Search: Inurl:server Filetype:key “-----BEGIN RSA PRIVATE KEY-----”

#31
post #24

You should check out how many services have their entire git repo of their service openly accessible (this allows getting the data out of the git objects, as well as the history). Quite often you can go to domain.tld/.git/ and find the files if you know their names. Even major sites - The Hill only fixed it in the past few days.

I've also fallen into this trap, thinking that Apache wouldn't serve up any dotfiles. Wouldn't that be a saner default?

Re: Google Search: Inurl:server Filetype:key “-----BEGIN RSA PRIVATE KEY-----”

#32

that yields just 7 pages (10 items each) so it's probably pretty irrelevant. but of course you are welcome to share your run of the mill anecdotes about some intern once accidentally publishing passwords - etc. :)

For me the top of the first page said about 1160 results. Still a surprisingly small number of hits.

Re: Google Search: Inurl:server Filetype:key “-----BEGIN RSA PRIVATE KEY-----”

#33

Can someone explain why the inurl:server is used? Wouldn't this also work without that (and reveal more results where the keyfile has been renamed)

I used inurl:server to restrict the results to mainly just server.key files so revealing the private keys of HTTPS websites.

Of course you can remove it. Just means more results to wade through.

Re: Google Search: Inurl:server Filetype:key “-----BEGIN RSA PRIVATE KEY-----”

#34
post #30

One of the more amusing patterns I spotted in the URLs is where an alarming amount of the filesystem appears to be exposed, e.g.: www.dulceswilly.com/mysql/BHP_sym/root/usr/local/etc/apache22/server.key If I was on a non-company IP, I'd be tempted to poke around and see what else is visible...

mysql root password: http://www.dulceswilly.com/mysql/BHP_sym/root/root/.my.cnf

Too late, "professional" hackers from indonesia already done the job.

Front page reads:

PELITABANGSA .CA [ INDONESIA CYBER ATTACK AND MALWARE ANALYST ]

Re: Google Search: Inurl:server Filetype:key “-----BEGIN RSA PRIVATE KEY-----”

#35
post #2

Hmmm my idea would be "Hello from github, We detected that you uploaded credentials to NAME_OF_REPO. We strongly advise against this as it allows attackers to easily gain unauthorized access to your software and infrastructure. Have a look at this blog where we discuss alternatives" EDIT: Just to be clear, I'm not suggesting a ban at all, just a friendly email in response to commits that introduce credentials to publ…

I know you mean well but no charge should be introduced to mitigate against this stupidity. You are (probably correctly) assuming that the data in question is genuine. Nonetheless it is none of our business. rm -rf /* does not contain a warning message and that is the way it should be.

Re: Google Search: Inurl:server Filetype:key “-----BEGIN RSA PRIVATE KEY-----”

#36
post #24

You should check out how many services have their entire git repo of their service openly accessible (this allows getting the data out of the git objects, as well as the history). Quite often you can go to domain.tld/.git/ and find the files if you know their names. Even major sites - The Hill only fixed it in the past few days.

intext:"index of /.git" reveals a ton of those.

Re: Google Search: Inurl:server Filetype:key “-----BEGIN RSA PRIVATE KEY-----”

#37
post #2

Hmmm my idea would be "Hello from github, We detected that you uploaded credentials to NAME_OF_REPO. We strongly advise against this as it allows attackers to easily gain unauthorized access to your software and infrastructure. Have a look at this blog where we discuss alternatives" EDIT: Just to be clear, I'm not suggesting a ban at all, just a friendly email in response to commits that introduce credentials to publ…

Is there a disadvantage to banning private keys in public repos?

People already mentioned the major use case of testing, but building a blacklist of keys (e.g., the Debian OpenSSL there-are-only-64K-keys fiasco) is a plausible option as well.

Re: Google Search: Inurl:server Filetype:key “-----BEGIN RSA PRIVATE KEY-----”

#38

First link goes to someone's github named Jimbo, a portly PHP guy from Austin, TX. I apologize for saying this, but... so far, this is violating no stereotypes

One link is to https://github.com/SUSE/Portus/blob/master/vagrant/conf/ca_b...

the key is still in google cacke...

Re: Google Search: Inurl:server Filetype:key “-----BEGIN RSA PRIVATE KEY-----”

#39
post #15

I was a little surprised to see an Apple domain in there, but I can't really tell what the private key was for (could have been a test or an example). It looks like it's either an outdated result or an Apple engineer quickly saw this and fixed it because the page 404s now.

Assuming we're talking about the same link here, I can still access it:

https://opensource.apple.com/source/tcl/tcl-87/tcl_ext/tclli...

Re: Google Search: Inurl:server Filetype:key “-----BEGIN RSA PRIVATE KEY-----”

#40
post #24

You should check out how many services have their entire git repo of their service openly accessible (this allows getting the data out of the git objects, as well as the history). Quite often you can go to domain.tld/.git/ and find the files if you know their names. Even major sites - The Hill only fixed it in the past few days.

I've also fallen into this trap, thinking that Apache wouldn't serve up any dotfiles. Wouldn't that be a saner default?

For nginx:

  # block .files
  location ~ /\. {
    deny  all;
  }
  # allow Lets encrypt
  location ~ /.well-known {
    root YOUR LE DIRECTORY
    allow all;
  }
Post reply on HN