As most of you know a few months back my site was hacked. What many people dont know is that was actually the first of 2 times the box was hacked. The first time the box was hacked I had made the mistake of making the web files on the server writeable by the web server. Again being this server (that my blog sits on) is not used for hardly any commercial activity I was a lot less security focus then something I would call “production” ready. I implemented mod_security and some other logging tools aswell as offloaded the server logs to a different server (yea the logs were owned by the apache user also).
So basically when I got owned the person found a file on my server that was web accessible which then he could execute commands on behalf of the web user. Now because the files and log files were owned by this user he could write to them and even delete them. Lucky for me this guy just wanted to put up his Turkish political statement and try to infect his virus to people. So all he did was do a search on the box for any index.* files and copied his index file to over write them. Then he also deleted all files matching *log. So it was pretty obvious how the person did it but I was not sure what file was the hole in my system. This is the point where you have to weigh catching the hacker vs running a box that has been compromised. Since I really only have blogs and a few low traffic forums running on this box I thought it would be a good chance to see what was vulnerable.
So I installed mod_security and ran it pretty hardcore. Over the next couple weeks I learned more about adjusting its rulesets to allow possibly exploitable code but log it. Nothing happened for many weeks then one morning I got a page that my box was not responding. I quickly attached to my remote server via its DRAC card (Dell Remote Access). The DRAC card lets me take control of the server as if I was sitting right infront of it. I could see the box was sitting in a “kernel panic” mode and that it had crashed. I rebooted the box remotely but kept most services down so I could investigate what had happened.
Sure enough I figured out that the hacker had been back and downloaded some files to the /tmp directory (which was world writeable). Only this time I had changed ownership of all index.* files so they could not write to them. I guess they realized that in order to take over my web server he was going to need to be a bit more aggressive so he downloaded a rootkit to my tmp directory then tried to run it but fortunately for me that made the kernel panic and the server was in a frozen crashed state.
I was able to figure this out and also exactly what file they used to execute commands on my box very quickly because it was pretty much the last thing in the weblogs before the box crashed. (yay!)
So now here is where it gets interesting…. Now that I had figured out how the person was hacking into my box I was curious how in the hell the person found the file. It was in a subdirectory that I had not used in YEARS. There was no link to it from anywhere on my site. The directory structure it was in was like … html/oldforums/oldstuff/badfile.php . How in the hell did this person find this file? Well after going through the logs greping for the ip range that hacked my box I found that the person found my site from Google! Specifically using Google code search. Now while this was interesting it still did not explain how the page was even indexed…. ohh wait I use Google Sitemaps and I had it on to index everything (the default setting) OUPS!!
Now to be honest… this is my fault. I in no way blame Google what so ever. I had old exploitable code on my server and I told sitemaps to index it so… my fault.
I have since been working with the sitemaps team and I had some suggestions to leave some files off by default (like .inc .func) or only allow common web files with extensions like .php .html .asp etc… I hope they do this cause as sitemaps gets more popular its only going to expose more idiot webmasters like me that run with the default settings.
Ok so just for shits I thought I would do some querys on Google Code Search to see what kind of exploits I could find. Now keep in mind this probably will not show your site but it will show code and versions that you might be running… so once someone locates a exploitable version of code they then could just search for “Powered By X” or whatever fingerprint you could put on the exploitable program/version.
Hmm I wonder If we could find some xss exploits…
lang:php (ECHO|PRINT) .*\$_(GET|POST|COOKIE|REQUEST|FILES)
100,000+ results
How About some SQL Injection exploits?
lang:php query\(.*\$_(GET|POST|COOKIE|REQUEST|FILES).*\)
3000 results
hrmm I wonder how easy it is to find host,user,pass for mysql databases…. Lets try:
100 results found.
This query might be a little puzzling for those that are not Google ninjas like me so.. I will explain. Basically we are checking for anything that ends in .php extension. Then we search the file for mysql_connect. If it contains Mysql we look for the pattern of a connection string. lastly we use the minus sign to get rid of all localhost databases (cause we cant access them).
So did we find anything interesting? Well…
Lets just look at the first 10 results:
www.ubio.org/downloads/XID.TAR.gz – Unknown License – PHP
connect.php$connection = mysql_connect(“RANSOM”,”GlobalWebUser”,”goober8″) or die(“Couldn’t connect.”);
$db_name = “dwf”;
Now in this case RANSOM is probably a local box…
ohh whats this:
$f = mysql_connect(“zeus.mbl.edu”,”tns”,”");
if (empty($limit)) $limit=50;
hrmm intersting….
more?
$db=mysql_connect(“62.149.150.11″,”Sql43254″,”M9dKTz3M”);
$selezione=mysql_select_db(“Sql43254_4″, $db);
I can post tons of other examples but I think I have made my point. Watch your logs for people coming from google code search and always make sure your running the latest version of your software.
Also keep in mind my searchers were only looking for .php files. This is a small percentage of all the different languages and filetypes out there.
Be scared. Be very scared.












- Comment Likes
- Comment Dislikes




February 8, 2010 at 2:36 pm
very nice post, informative, but sorry to hear this news, thanks
January 25, 2010 at 8:14 am
Great post, I hope we be safe from hackers work, thanks
January 22, 2010 at 6:48 am
Let this be a lesson to all of you Windows cult members. Linux – The one word you can’t find beside the word hacked in google results. Go Linux!
January 13, 2010 at 3:22 pm
Its funny what you can actually find with Google.
There are Googledorks for almost everything!
Even eBay, Amazon, Paypal account and such.
January 9, 2010 at 10:05 pm
This is really interesting. Did not know anything like this was possible
January 7, 2010 at 6:14 am
Great post to read, I have bookmarked your blog for future read.
December 18, 2009 at 2:44 pm
Nice post, Linux servers are more secure than windows servers
December 16, 2009 at 2:33 pm
i thght u were just internet marketer..but u are good technically too
December 2, 2009 at 10:20 pm
holy crap!! that is scary! i have not been hacked as of yet and would totally freak out if i did. this is a wake up call for me. thanks for posting
November 28, 2009 at 1:33 am
Prevention is better than cure.It is always good way to spread the bad ideas that is being followed.People will become alert and chance of notification of this problem will be more.Hats off to this post my friend
November 17, 2009 at 11:39 am
thank you..thank you…technical but useful
October 21, 2009 at 3:42 pm
Great post. Thanks!
October 13, 2009 at 12:26 am
OMG that’s scary stuff, I wouldn’t be able to track all of that!
September 26, 2009 at 8:52 am
thanks for the infoemation
September 24, 2009 at 4:46 pm
Thanks for the information …
September 21, 2009 at 12:03 pm
I’ve never heard of this before, and didn’t think of people that have nothing better to do than hacking a website, anyways it is good to know; I’ll be more careful for the future.
September 21, 2009 at 1:40 am
I’m a big fan of Linux and I’m impressed by it’s inherently more secure nature than Windows.
September 19, 2009 at 4:48 pm
These hackers are getting more and more cunning everyday,sorry to hear of your problems we really need an internet police body that has global abilities to level the playing field.As it is no one is really secure ,daily we hear of banks ,even twitter was attacked.Make sure all your software is up to date and stay under the radar…Good Lick
September 15, 2009 at 8:06 pm
Are you using the base build of php? Go to fcgi or suphp. 777 is not allowed under those builds period.
September 8, 2009 at 7:52 am
It is very scary to read it. A careful person like you falling easy prey to hackers. Well what this folk was trying to do by hacking your site any way?
The way he used enter your site is amazing. A small mistake is responsible all this problem..
September 7, 2009 at 2:03 am
Thank YOU SHOE! Now I am scared…..but motivated. I was just talking to a buddy about such hacks the other day…I need to do a little house cleaning…
September 5, 2009 at 2:47 pm
Hey Jeremy, I read your whole post and it was an interesting read even if it sounded like chineese to me! One question though: am I safe if I use a blogger hosted blog? thanks!
August 29, 2009 at 2:54 am
Very valuable. So to hear about what happened
August 26, 2009 at 5:04 am
(cleaned a little urlcr@p out of your mysql login codesearch.) i didn’t know any google search used regex. is there much use excluding local hosts? (i think there are a few other common local ip ranges,btw.)
i recall doing a few goo code searches out of curiosity (open source stuff).
anyway, goo’s results now “obscure” some of usernames and (appears) all pass. or is that somehow inserted by google sitemap indexing?
August 25, 2009 at 8:28 pm
Man that really sucks that people try and hack sites. I hope you the best and also are there other ways to stop this from happening?
August 18, 2009 at 8:41 pm
if you are not really careful with the scripts that you put on your servers, then most likely, hackers can easily exploit your hardware. We cannot prevent google from showing exploitable search results but we can do something to prevent our servers from being exploited.
August 17, 2009 at 7:50 pm
Did Google are so easy to cheat???
August 14, 2009 at 9:42 pm
OMG… I hope the hacker was died!
July 24, 2009 at 7:41 am
We’ve seen an increasing amount of hacker activity lately, especially from Korea.
If you’re running a dedicated server or VPS with WHM then you should try CSF firewall (free from configserver.com) apart from the firewall functions it also provides login failure detection, and works in conjunction with mod_security to automatically ban anyone attempting XSS and SQL injection exploits.
July 23, 2009 at 3:21 am
That’s pretty scary thing. I guess these hackers are trying to target those top websites as recently davidairey’s site was hacked through gmail.
July 21, 2009 at 3:54 pm
I know nothing about hacking but what was seen from the cover it’s totally for dummies. The question is why should we buy that kind of book. I don’t think hacking is a “user friendly” activities
July 18, 2009 at 2:53 pm
Automating backups doesn’t hurt either. (Daily, Weekly, Monthly.) Very simple to setup in WHM even for newbies.
July 15, 2009 at 1:44 pm
I never like people who like to abuse other properties. Seems like they don’t have any other jobs to do.
About sql password shoe, I used login lock down plugin to secure my wordpress admin page, do you think it is worthed?
July 14, 2009 at 8:16 am
Very nice posting about hacking. From this post, I learn it’s so important the security of the website and the hacker have used google.
July 6, 2009 at 7:06 pm
I Recently had some of my sites hacked, it wasn’t fun getting them all fixed
July 21, 2009 at 3:56 pm
Yup, kinds of boring job.
My site was also defaced once
June 29, 2009 at 5:52 pm
Being hacked sucks so bad. Was hacked once and the guy deleted my site ;S Wasnt a profit site but one of my first ones and it really sucked. Security is one of the most important things for websites.
June 26, 2009 at 12:22 am
i also think hackers use google code search…now here webmaster’s must be very careful !
June 12, 2009 at 1:51 pm
Valuable info…what is really going on
June 9, 2009 at 4:17 am
It’s a great article. Hacking is being increased these days, can anyone suggest a good WP plugin to keep your WP Blog safe???
March 19, 2009 at 10:09 pm
give me the tutorial all about web wurnelrable search tips please.!! thanks..!! Gracias.!
July 21, 2009 at 3:59 pm
are you asking for something like :
inurl:site.com +”keyword”
paste it in google, and let the magic flow ha…ha.
March 16, 2009 at 6:23 pm
Nice Google querys shoe , hackers are such a pain these days
February 13, 2009 at 7:01 am
This is very serious article. Hacking is increased these days, can anyone suggest a good plugin to keep your wordpress safe???
January 17, 2009 at 2:31 am
Sorry to hear, i currently got someone messing with my things and in my opinion these people need a hobby! Be warned, we will find you like Shoe did! Turn the Comp off and go outside once in awhile
January 16, 2009 at 3:18 pm
[...]Thanks for sharing your work with us! Your theme is just awesome![...]
January 9, 2009 at 12:02 pm
Cheap celphones in our store, cool price etc., many articles – best price, Samsung, Nokia and Motorola
November 28, 2008 at 3:00 pm
Can you please post some links or websites that talk about more google searching techinques.
November 11, 2008 at 11:22 am
Wow, it was somebody who was jealous… Maybe another blogger.
Shannon
November 7, 2008 at 11:17 am
At what point did you realize you were a genius? lol
November 5, 2008 at 8:10 pm
SQl injection is a cool hack you can shutdown the server just by entering ’shutdown–
I found this problem at my last job
hope I don’t shutdown you sql server
October 15, 2008 at 5:47 am
australia right this busy
October 15, 2008 at 2:36 am
Air travel has become a major part of our society, with industries and individuals depending on air transport for their livelihood. But have you ever wondered what happens to the artifacts of our airborne culture when they’re no longer needed? More..
xrtst303a
October 14, 2008 at 11:17 am
Hmm!! Google Ninja!! Never heard this term before. anyway, those are really great queries. Thanks for posting them.
July 21, 2009 at 4:02 pm
IMHO google ninja is related with something unique, undisplayable and maybe not a free one when you find the search results
October 14, 2008 at 2:53 am
Hm…I love Google so much and dont love hackers.
October 4, 2008 at 6:36 pm
Nice tricks
October 4, 2008 at 6:36 pm
That nice tricks
October 4, 2008 at 2:48 pm
Increasingly worrisome problem this hacking thing
Seems that there is a wordpress plugin that akes those blogs vulnerable but thee truth is any site is vulnerable
Vigilance may be recommended if you have one or two sites but what happens when you have a hundred sites?!*
September 24, 2008 at 11:14 am
Some people are using the wickness of search engine to exploit people,Thanks for the insight,sorry for the hacking of your blog.
September 20, 2008 at 2:19 am
that was shocking dude…
September 20, 2008 at 2:18 am
that was shocking man… i never knew this
September 14, 2008 at 5:05 am
I just don’t understand this coding stuff. Can you please explain it in human jargon? No offense meant. I wondered whether you can tell me a simple solution in plain words?
September 13, 2008 at 8:22 pm
i swear google is doing a bit to much with makin stuff so easily accessible.
September 12, 2008 at 10:02 am
Very interesting post. Hackers are everywhere seem like. Glad you could catch on to him. This is scary though. Makes me wonder….
September 3, 2008 at 2:54 pm
day key global land stay university
September 2, 2008 at 6:33 am
thnx god ur site is up or i wont hav found a good blogger lyk u
August 30, 2008 at 7:32 am
Thanks for sharing those tips..
I tried everything to secure my website
April 14, 2008 at 3:03 pm
I just tried the last search that you posted and spotted a couple of interesting things.
Firstly, all the results show some kind of downloadable file such as a zip or rar, so unless the website owner had zipped a backup copy of the site and then uploaded it, there’s not much of a problem. Most of the results seem to be software projects e.g. results from sourceforge.
Secondly, in the web results, the passwords are obscured.
Maybe I’m missing something, but it seems to me that the only way a hacking attack could occur would be if someone zipped and uploaded a copy of their live site.
April 14, 2008 at 1:07 am
Thanks for the heads up, it is quite scary how many ways there are to get into our precious boxes! It is gratifying to have observant people like yourself who’ve actually actually traced the loophole and alerted the rest of us! It makes good sense to be acutely aware where and what the googlebots are indexing, and to make sure they only go where needed!
September 2, 2008 at 6:34 am
ya its really scary
April 13, 2008 at 8:50 pm
Sorry to hear about what happened to your site but you have warned a lot of people. Well done!
March 18, 2008 at 8:28 am
You really made me shiver! I always thought my website is so well protected…
March 13, 2008 at 12:54 pm
FRIGHTENING!
The scary thing is… most sites have some vulnerabilit.
March 10, 2008 at 1:57 pm
This is making me worried.
How can we know if our site is being hacked? any idea?
Haji
March 10, 2008 at 9:11 am
Sorry to hear that, but truth is google starting to get dangerous
March 7, 2008 at 11:59 am
How can you telll if your site is being hacked? I bet for you it is especially risky since it could kill your business.
March 6, 2008 at 9:51 pm
These articles spread all over the internet make me think “Am I safe. ” I bet I would use blogger.com instead of self hosted wordpress because that way whole security tension rests on shoulders of google.
February 23, 2008 at 8:50 pm
Good article!
That is definately a scary thought knowing that could happen to your site and even scarier for sites that bring in a nice income. You are quite knowledgable and were able to ferret out what was happening. Others may not be able to find out that their sites have been compromised. It’s articles like these that help people keep an eye out though. Thanks and keep up the great work!
~Terry
February 18, 2008 at 8:06 pm
it is because it have so many diggs… and i just added one more by digging it.
February 15, 2008 at 5:42 pm
ARGH!!!!!!!!!!!! Scared now.
Thanks for the warning.
February 12, 2008 at 11:24 pm
Wow very crazy. At least you were not effected too horribly.
February 12, 2008 at 10:11 am
It’s because the post is still on favorites
February 5, 2008 at 8:24 am
Wow Shoe! This post is more than 2 years old but still heavily visited and commented on, probably because it is in the favs list above.
January 31, 2008 at 1:10 pm
What an incredible post! Thank you for going indepth cause I am not a Google Nija. WOW that is really all I can say.
January 29, 2008 at 11:45 am
Google didn’t fix this, you still can search for databases, USER/PASS combination and emails (are the easiest to find – lists of emails)
January 21, 2008 at 1:19 am
serious? no I think he was joking. isnt today april fools?
January 10, 2008 at 1:39 am
hackers suck
January 4, 2008 at 8:15 am
Trivia – Does anyone have the correct pronunciation of the word pwn?
January 3, 2008 at 1:00 pm
google fixed this – you can’t see passwords anymore
January 3, 2008 at 12:59 pm
Google fixed this long time ago.
December 22, 2007 at 12:59 am
Steve said:
“I’m shitting bricks right now. Big bricks.”
Yeah I shat myself to. Damn Mess.
December 22, 2007 at 12:57 am
“I’m shitting bricks right now. Big bricks.”
Yeah I shat myself to. Damn mess.
December 20, 2007 at 5:23 am
I’m shitting bricks right now. Big bricks.
December 18, 2007 at 10:28 pm
I had the same problem as yours, the hacker keep using my email to collect my member password, and access to my principle web page to withdraw my money. Of course this idiot hacker failed to withdraw. I had question, im not expert in computer program or any code your wrote above, what should I do now? my URL(actually is blogger from google) is http://www.metaforexcapital.com . Please help me.
Thanks.
james
December 14, 2007 at 3:14 am
Great post
.
December 13, 2007 at 10:20 am
These hackers also use google dorks
Dorks means , some kind of commands which can give u results in any way u want
like intitle , inurl, allinurl, and then they search for the cms systems,or softwares which are vulnerable
so u must also watch out for these dorks, and see that none of the dorks lead to your sites getting hacked
December 7, 2007 at 12:22 pm
As an aside, many people that frequent this blog sell information products on their website. If you don’t do this correctly, it is amazingly easy for people to steal your information product using Google.
Try this search in google:
site:yoursitename.com
And make sure that your “Thank you” page isn’t showing up. Or try this search:
inurl:cbreceipt
To see all of the people who have their thank you page indexed by google for easy theft.
December 5, 2007 at 11:36 pm
Aaaaah. Scary the things you can do with google. Thankfully it won’t work on my blogspot blog, but when I transfer to my own server I’ll definitely keep this in mind!
Hafiz
http://how-to-earn-cash-make-money-online.blogspot.com
December 2, 2007 at 5:49 am
definitely a good read. i also had a blog sitting on my server and since i’m not that techie enough, I opted for blogspot. silly and lazy me!
November 28, 2007 at 7:17 pm
hmmm… google’s nightmare
November 28, 2007 at 12:17 pm
Great information, hopefully google can make a way that this isnt allowed
November 27, 2007 at 8:50 pm
Wow very intresting stuff, I guess we have to watch how we save our files.
November 25, 2007 at 5:55 am
Dang, that’s a very scary situation. It seems like it’d be fairly easy for Google to filter out a lot of exposed SQL connections. I wonder if they’re being proactive about this at all. Probably not
November 20, 2007 at 12:54 pm
scary stuff, sometimes you just have to make sure it doesn’t happen to you!
November 15, 2007 at 6:05 am
Its not an art 99% of the population is capable of… but that last 1% can be quite ingenius. It always strikes me that hackers can put in such huge amounts of energy into hacking but many are too lazy to take a shower daily. They always look horrible when they videotape themselves in the act.
November 14, 2007 at 6:08 am
Hacking….. not an art everyone is capable of, but still better to be careful.
October 26, 2007 at 9:07 pm
Great, like I wasn’t paranoid enough about hacking!
October 25, 2007 at 10:36 am
CodeSearch reveals your config.php file HA HA
October 23, 2007 at 7:33 am
Old news and old story. A lot of this has like already been done and over with. Nowadays Google can also be used to find out who has been pawned not just who to pawn. Have a browse here http://www.google.com
October 15, 2007 at 6:35 am
this kind of problem always make me rethinking how to be really secured from those hackers. They sometime doing it just for unknown purpose, trying some new techniques etc. Also, this kind of problem is common on any opensource script
October 13, 2007 at 11:26 am
Is is actually possible to prevent these google hack. My site was once hack and my adwords cost was just wasted.
October 9, 2007 at 10:28 am
mmm… I will check my scripts
October 8, 2007 at 2:41 am
you freaked the hell out of me i heard that many blogs got hacked
October 5, 2007 at 4:49 pm
You have made a clear point.
I would recoment to block googs code crowler from indexing the site, if possible or acceptable !
October 5, 2007 at 4:24 am
I think duplicate content is getting clamped on quite seriously – and with a timestamp Google will be able to tell which content came first . . .
October 4, 2007 at 9:42 pm
It is pretty scary how people are able to use search technology to bust into somebody’s box, but it just highlights the need to be more careful when coding. Sometimes it’s easy to get a little bit lazy with a piece of code… that’s how you end up getting run. The good news is that most sites aren’t worth hacking. The bad news is you often don’t learn you have a security flaw until your site has hit big and you really can’t afford to be exposed.
September 28, 2007 at 3:15 am
This is scary. I got hacked a couple of years ago, and I am quite technically challenged so even though not a lot of damage was done – it still took me a good while to sort it out.
September 26, 2007 at 5:54 am
I ike this topic. thanks for the informative post shoe.
September 24, 2007 at 2:31 pm
Great post! Very interesting!
September 24, 2007 at 11:43 am
Johhny i hackstuff has tons of information about google hacking. I use to refer to his site before, to see what are the latest exploits running around.
September 23, 2007 at 3:32 pm
Would the ‘box’ also be known as the “shoebox”?
Seriously though, that sucks. Anything you learn about security that you think we’d benefit, keep passing it along. Much appreciated.
September 23, 2007 at 11:45 am
I am just glad that your site was able to pull through. Just goes to show what jealous people will do. I agree that hackers are very dangerous nowadays on the internet. Everyone needs to keep a close eye and protect their online real estate.
September 13, 2007 at 3:53 am
I see this is the same way people are spamming .Edu and Gov sites with sql injections thats what i read on Daven’s blog
September 12, 2007 at 11:12 am
Never been hacked before but certainly will remember the advice.
September 10, 2007 at 1:18 pm
This post just make me scared.
September 10, 2007 at 9:19 am
Hackers suck.
September 9, 2007 at 10:08 pm
Tamar,
I agree with you. These haters showing up can blow it out their asses with their negativity. I appreciate Shoe highlighting areas of potential security breeches for non-technical folks like myself. Great post, Shoe.
Anthony
September 9, 2007 at 7:38 am
“I had some suggestions to leave some files off by default (like .inc .func)”
I disagree with this – some people might want the files indexing. The fact is, you should NEVER EVER have code in extensions that aren’t parsed by the scripting engine – call them .inc.php or .inc.asp. Just because Google doesn’t index them won’t stop people finding them, and since most people have their connection strings (containing usernames and passwords) in /inc/common.inc it’s not hard to see why this is a bad idea
Even Microsoft distributed adovbs.inc named that way a few years back. It’s bad, don’t do it. Don’t expect Google to mop up after you – if it’s on your server it’ll be found. Fix it.
September 7, 2007 at 5:42 am
Very good post, as above i heard they are many such hacks thru google search , i think configuring apache server and using updated scripts will keep us safe
September 4, 2007 at 9:09 pm
Class post. This has definitely woke me up on being more secure.
April 11, 2007 at 12:19 am
theres a whole site out there called johnny i hack stuff which has some pretty cool stuff using google
January 20, 2007 at 9:18 pm
WoW nice post. hope this make people more aware and secure!
I am running checks on my sites right away!
January 12, 2007 at 2:54 am
You lost me right after: “I had made the mistake of making the web files on the server writeable by the web server” If you are going to write for dummies, you must get down, down, down to our level.
January 8, 2007 at 10:52 pm
So if I have my current XML file only showing blog entries and none of the includes, etc I am fine?
January 8, 2007 at 1:38 pm
I was just doing the usual searching myself not to check on my sites, but to check on people talking about me. Somewhere down page 18 I think, I found this page since I had a comment in it. But interesting is, the URL is not on the shoemoney.com Domain. It is:
http://securebar.secure-tunnel.com/cgi-bin/nph-freebar.cgi/110110A/http/www.shoemoney.com/2006/12/26/how-hackers-are-using-google-to-pwn-your-site/
Now looks like one of the free web proxies for anonymous browsing. But having it in the SERPs? Hmmm someone is linking to the proxy address and not to the main URL. I wonder why.
December 30, 2006 at 10:12 am
Interesting post…more interesting is the Diggs you got lol and you KNEW it was going to cause problems didn’t ya
December 30, 2006 at 10:11 am
That’s DIGGers for ya
December 30, 2006 at 10:10 am
But it’s always great to see stupid replies that make no sense.
December 29, 2006 at 1:30 pm
Thank goodness I have none of the popularity that seems to get you hacked!
December 28, 2006 at 9:56 am
Right. I meant if you have your own Apache server, make sure you configure it to execute .pl, .inc, .php etc files otherwise by default it will serve them back as text files exposing the vulenerability
December 28, 2006 at 8:07 am
Why is everyone shocked, this is really old news, and has been going on for ages
December 28, 2006 at 6:14 am
I tried, dude. I think good ol’ Shü-$ is moderating away my comment somehow. For whatever reason, I can’t post a reply containing links here, and I need to get in the shower for my day jaerb.
I compiled a list of URLs for you. I guess you’ll just have to find ‘em on my blog. Click my nickname if you want to see a list of sites offering Google Hacks.
December 28, 2006 at 6:11 am
OKAY…
I only tried about 1700 times to get my comment posted on here so I could reply to Hedge’s question. Since that DOESN’T seem to be working, and I’m going to be late for work if I keep trying, I’m going to give it one last go without attempting to employ the HTML “a” tag or BBCode “url” tag- I’m assuming Shü-$ is moderating those kinds of comments because of extensive blog spamming.
THANKS, blog spammers. You ruined it for the rest of us.
So, without further ado (assuming that this freakin comment actually POSTS)…
Sites that have information on messing around with Google:
http://johnny.ihackstuff.com/index.php?module=prodreviews
He’s Johnny. He hacks stuff.
http://douweosinga.com/projects/googlehacks
DOUWEOSINGA!!! FIVE!
http://www.oreilly.com/catalog/googlehks/
RTFM
http://www.oreilly.com/pub/ht/2
RTFM for free online
http://www.googleearthhacks.com/
Hack the Planet
http://en.wikipedia.org/wiki/Google_Hacks
Wikka-what?
http://www.google.com/help/features.html
Google Chimes In
Or, you could…
http://justfuckinggoogleit.com/
Seriously.
http://google.com/search?hl=en&q=google+hacks&btnG=Google+Search
December 28, 2006 at 5:56 am
Reading through these comments reminds me just how many people in the world are bitter and vindictive about other people succeeding more than themselves.
I’m sorry you suck so bad, mean little people out on the Intarweb.
Great article, Shü-$.
December 27, 2006 at 10:39 pm
Interesting. I guess searching for known exploits available can be pretty entertaining and efficient, thanks to Google (who continuse to deliver quality to their users). However, does not stopping this is good? I always thought that not doing anything to prevent a crime is a crime.
But anyway, I don’t think the code search is that popular with the web development community, because few know it exists. And then, what would they search for? Why not just find a piece of code, copy and use it in your own app? Copyrights? Forget it.
So hoping that code search would be used for ‘educational purposes only’ is a naive idea at best.
December 27, 2006 at 9:33 pm
I’m glad that you can solve the problem. My two boxes were hacked by someone and I found that issue by watching my AdSense earnings. It seems the hacker can modify my file on-the-fly and insert his adsense publisher code when I was sleeping and changed it back when I get up. I can still couldn’t find how can he know my password because the logs are gone.
December 27, 2006 at 5:05 pm
hmm..thanks for the info! glad u got back up and running.
December 27, 2006 at 4:45 pm
at least you didn’t get your pants taken by the hax0r
December 27, 2006 at 12:55 pm
Hmmm, just want to add my thoughts on this… a lot of people used to use included files in PHP have the .inc extension, but when this is found and displayed and no mime type is associated with it, it will display like a text file and actual PHP code can be seen as the PHP source. So if you have mysql_connect details for instance, it can be seen.
So many people have been using .inc.php as an extension.
What I have been doing was all my include files are outside the public_html (or www) folder so my include files are not public. I am not sure if this is the best way to do it, but so far everything works for me.
December 27, 2006 at 11:47 am
Damn Shoe, another front page Digg! Nice work.
December 27, 2006 at 10:53 am
Great post! Very interesting!
December 27, 2006 at 8:46 am
Shoe – great post. It’s no surprise that Google Code Search continues to show vulnerabilities. A lot of people responding here with the negative comments come from Digg and think that they aren’t susceptible. I’d laugh in their faces when they, too, are pwn3d. Thanks for the wake-up call.
December 27, 2006 at 7:35 am
I’m not impressed. Code search is irrelevant. If you do find some passwords that way, you may be sure the box is attacked before…
December 27, 2006 at 5:54 am
the hacker managed to find an exploit in an old version of some open source software that you were using? Like wordpress’s pre v2 xmlrpc exploit? ok.
December 27, 2006 at 5:29 am
I reccomend you read over this post and correct the areas you repeat yourself. It will make you seem more professional.
December 27, 2006 at 1:41 am
thats what happens when you host your sites on a windows server..
December 27, 2006 at 12:59 am
Shoe, when you get a minute of freetime, check out all of the Digg comments on this post. They are absolutely hilarious (and completely focused on the word pwn for the most part)!
December 26, 2006 at 11:44 pm
Can you please post some links or websites that talk about more google searching techinques.
Danke
December 26, 2006 at 11:10 pm
The “hacker search” is nothing new just more advanced with the google code search. People have been doing the “Powered By X” query to many diff. search engines locating old/bad/unsafe versions of files for MANY years.
This is why people suggest changing .php to .html and to use robots.txt to disallow and why removing the Powered By is a very safe thing to do. These things don’t guarantee an attack they just make it a hell of a lot harder for automated hacker script0rs to take your site down.
December 26, 2006 at 10:56 pm
so basically the point of this post is “i’m stupid, and so are lots of other people.” thanks for that, really.
December 26, 2006 at 10:47 pm
Holy cow. Not that I think anything is vulnerable, but this post makes me think I’m going to spend the first part of my day when I get back to work verifying our public machines security.
December 26, 2006 at 10:34 pm
Well, at least, the damage was not great in your case. May this serves as a reminder to all of us to always backup our files.
December 26, 2006 at 10:24 pm
personally, i dont even understand the point of this post at all, what is the golden rule of security?
security through obsecurity is no security at all.
regardless of who linked to your .php file or how they found it, if you have vulnerable code living on a public website accessible to the entire internet, what difference does it make where the vulnerable file is in the tree?
sooner or later is it going to get found and if you stick vulnerable code on a public website that is by your own admission “YEARS” old, then you deserve to get hacked and you deserve to waste umpteen weeks trying to figure out how they hacked your box.
here’s an idea, clean up after yourself, dont leave root exploitable code that is “YEARS” old just laying around your website and maybe things like this wouldnt happen?
December 26, 2006 at 10:18 pm
Cool stuff! Don’t feel bad, at least it was old code that got hacked and not new code!
But anyways, for people wondering how google gets it’s source code, it can unzip ZIP, RAR, and other files that could be packaged on your webserver, and those aren’t parsed by your server because they’re just contents of another file.
usually you can see were it got the data from, and it will list all the files in the data source.
December 26, 2006 at 10:12 pm
be not scared. if you are dumb enough and have an unsecured open db port, I am sorry, thats all your fault. If I have to open a port from a db server for a web server, then only this web server can access this box.
furthermore any configuration data should be stored at a place or in a way that, through apache settings, only the box itself can read the file and it gets denied by any outside.
basic easy rules.
December 26, 2006 at 9:58 pm
Uh. Thats not a fix. As stated above, these are all open code repositories, not private site’s code being extracted or spidered.
December 26, 2006 at 9:57 pm
Most of these are open source projects, or open code repositories. Its rarely if ever going to be private site code, unless you have it publicly accessible and non-executable somewhere.
December 26, 2006 at 9:49 pm
Great post!
Does Google code have a separate bot that collects this information and if so, how can we block it with the robots.txt file?
December 26, 2006 at 8:17 pm
Possible fix:
Google cannot “see” your source code unless your web server spits it back as plain-text instead of executing the code.
Make sure your Apache file has handlers for all common extensions you use (.php, .inc, .pl, .cgi etc)
AddHandler cgi-script .cgi
SetHandler perl-script
etc.
December 26, 2006 at 8:09 pm
I’m now so very scared…..
Actually though, how does Google get it’s code in the “code search”? I know it can’t spider running PHP pages (obviously they’ll get parsed by the server before being outputted) so where does the info come from?
December 26, 2006 at 7:57 pm
Great post man – there’s a group that’s been doin’ somethin’ similar to those queries for quite a while:
Googledorks
I often use it as an example of how to craft queries for link development – it’s amazing how creative you can get when you find a specific type of information you are looking for. I am surprised that G doesn’t proactively try to block some of this type of stuff though.
December 26, 2006 at 7:37 pm
Great information. Sorry to hear about what happened
December 26, 2006 at 7:26 pm
Wow shoe those are some serious google querys. Great post!
November 17, 2008 at 4:53 pm
Thats amazing! Two years later and google search still returns exploits!