Googling Your Way Into Hacking 431
knifee writes "New scientist is running an article explaining how hackers can use Google's cache to quickly hunt down sensitive pages, for example, by searching the terms "bash history", "temporary" and "password".
Might be worth looking at this tutorial about robots.txt if you think you might be at risk." That's pretty amusing.
This happens because of dumb admins, not google (Score:5, Insightful)
This guy is a security consultant? Come on, what admin in their right mind would enter a password in cleartext on the command line and allow it to be stored in ~/.bash_history? The first thing I do when I log onto a box is link bash_history to
Re:This happens because of dumb admins, not google (Score:5, Funny)
Would make for interesting google logs.
Don't have to worry about that particular problem. Both FreeBSD and MacOS X use tcsh by default anyway, and all of my users are Unix stupid, so they never log into shell.
Re:This happens because of dumb admins, not google (Score:5, Funny)
Re:This happens because of dumb admins, not google (Score:5, Funny)
Except that it doesn't work, unless you intended to try to execute /dev/audio.
Re:This happens because of dumb admins, not google (Score:3, Informative)
But uhh...from the tcsh manpage (emphasis mine)
A login shell begins by executing commands from the system files
Re:This happens because of dumb admins, not google (Score:3, Informative)
Re:This happens because of dumb admins, not google (Score:4, Informative)
Whoops!
You meant: ln -s
Re:This happens because of dumb admins, not google (Score:2)
i understand your point, but to leave
.bash_history is NOT a security feature! (Score:3, Insightful)
Only if the compromisors are morons, and have done it "recently".
A non moron would type "HISTFILE=" before exiting a shell he'd been "playing" in.
Re:This happens because of dumb admins, not google (Score:2)
Re:This happens because of dumb admins, not google (Score:5, Insightful)
Re:This happens because of dumb admins, not google (Score:3, Interesting)
Re:This happens because of dumb admins, not google (Score:3, Informative)
Re:This happens because of dumb admins, not google (Score:3, Insightful)
Re:This happens because of dumb admins, not google (Score:5, Informative)
unset HISTFILE
Re:This happens because of dumb admins, not google (Score:3, Funny)
More than once, when looking for a specific dll, I've found a whole software install in a directory on somebodys network.
Re:This happens because of dumb admins, not google (Score:5, Interesting)
Re:This happens because of dumb admins, not google (Score:4, Funny)
We had another admin who tried to su to root and typed in su [root password]. We check the logs searching for someone typing in a non-user account that looks like garbage and we notify the admin to change their password.
Not always dumb... depends on what's there (Score:5, Interesting)
You can probably use this to set up "honeypots" which may be legal in States where traditional fake services would be considered illegal as entrapment.
Simply set up a virtual machine (user-mode linux is a good one for this). Have the root account publicly read/write and somehow "accidently" visible to httpd.
Have the login shell a program which acts as your honeypot, logging activity, tracing back to the user, etc. All the stuff honeypots do so well.
Next is to ensure that the root password is visible, plain-text, and in a file that is visible to search engines. Your average skript kiddie is not going to question the apparent generosity of the admin. To get the engine to find the account, you probably want to have your main web page link into your virtual machine's root account - say via an FTP.
Now, none of this is entrapment, in the sense that the person must pro-actively attempt to present a false identity before the service is accessed. There can be no question that the identity of any user logging in is fake, that the user logging in knows that it is fake, and that there has been a deliberate, pre-meditated attempt to compromise an account.
If you want to go one step further, have the login shell transfer some goodies, such as cpuburn. Now, these have to have a "legit" use by a "legit" user, as anyone who gets burned is likely to complain. You have to be able to stand your ground and say "hey, I use this service as a convenient way to do hardware tests on remote machines - I locked that account against intruders, so if an intruder gets in, it's not my fault if they get burned."
(If you leave something dangerous "just lying around", you could probably be held accountable if someone gets hurt, even if they were stupid or malicious. But if you make a "reasonable" attempt to deny access, then it's not your problem.)
In fact, if you do any freelance tech stuff, you might very well use the service for real as a way of fetching over stress-testing software. It would make it a lot harder for "victims" of your root snare to complain, as you could then prove a legitamate use by legitamate users - the victim not being one of them.
Re:Entrapment (Score:4, Informative)
Cops can tempt criminals to commit crimes, and even initiate or plan out the criminal act (ie, buying or selling drugs, offering or buying prostitution, planning a bank robbery heist). None of this is entrapment, unless their actions would have cause a normally law-abiding person to commit the crime.
If a cop tricks someone into unintenionally breaking the law, or harasses them so much that they eventually cave in and break the law, or threaten them, etc, it may be entrapment. It's actually pretty subjective and up to the jury, usually.
But a lot of misconceptions of entrapment abount -- ie the ever-popular, "if you ask them if they're a cop, and they say no, then it's entrapment." And also the misconception that entrapment is a crime and can apply to non-law-enforcement. It's not a crime, it's a defense against being charged with a crime. (Well, unless you perform a crime while trying to get someone to perform a crime -- that's still a crime)
For a somewhat inflammatory discussion, see this: http://www.libertyhaven.com/politicsandcurrenteve
I had a more objective look at it, written by a lawyer, but I can't find it.
sorry if this is off-topic.
Re:Entrapment (Score:5, Interesting)
I'd created a sub7 honeypot on my linux box with a little perl script; after that collected the IRC server ip and channel name, I connected with a random username (pretending to be a bot) and just logged the conversation.
The FBI agent interviewed me very carefully to make certain that my setting up monitoring, etc., was not in any way instigated by a law enforcement officer. (No, I'd just gotten annoyed at random SYN packets) Then, he had no trouble with it. I don't know if this makes the evidence I provided useable legally, but it never came to that. As he explained it, the question was whether I was acting as an agent of the state when setting up the honeypot. Committing entrapment is not anything that non-state actors ever need worry about.
Not that this lets you off the hook entirely - there may be charges of wiretapping involved; monitoring your own machine should be safe legal ground, but connecting to the IRC network (as I did) is a slight bit more dicey legally, and shouldn't be done if you have any reason to believe that the relevant prosecutor would like to hang something on you as well.
Re:This happens because of dumb admins, not google (Score:3, Informative)
Set up a virtual machine (user-mode linux might be a good choice) and make sure the root password is in a whole bunch of files that skript kiddies are likely to google for, and in which the root account might reasonably be found (if the admin is stupid, that is).
Set the login shell to an application which creates a fake shell, and which uses th
Re:This happens because of dumb admins, not google (Score:3, Informative)
I've been compromised once, and the attacker went through great length to install a rootkit in
Re:This happens because of dumb admins, not google (Score:3, Insightful)
Actually a lot of those are 403 -- permission denied.
Using alltheweb (which has a bigger index anyway) to search only URLs that contain the phrase
Re:This happens because of dumb admins, not google (Score:2)
Re:This happens because of dumb admins, not google (Score:3, Insightful)
It all comes down to knowing google (the inurl: tag, in this case)
Re:This happens because of dumb admins, not google (Score:5, Funny)
http://custom.lab.unb.br/pub/d
pwd
ls -l
ls -l
ls -la
whoami
http://www.mhhe.com/socscience/.bash_history
v
ls -l
who am i
touch test2
ls -l
pwd
cd
ls -l
vi randomfile
ls
ls -l
cd marketing
ls -l
pwd
Google Cache, in case of slashdotting (Score:5, Funny)
Re:Google Cache, in case of slashdotting (Score:4, Funny)
Re:Google Cache, in case of slashdotting (Score:4, Funny)
Re:Google Cache, in case of slashdotting (Score:3, Funny)
Re:Google Cache, in case of slashdotting (Score:4, Funny)
Re:Google Cache, in case of slashdotting (Score:5, Funny)
Now I'm really confused.
Re:Google Cache, in case of slashdotting (Score:2)
RIAA Logic: (Score:5, Funny)
aha! (Score:3, Interesting)
of course i have section on my site for bash scripts... and it has an index page. looks like someone got dissappointed.
SCO Logic: (Score:5, Funny)
It's a little harder... (Score:4, Insightful)
Re:It's a little harder... (Score:2)
Re:It's a little harder... (Score:4, Insightful)
http://216.239.57.104/search?q=cache:p5ouM
Which at the bottom of the document has-
Editors Note:
Product photography is available at http://www.liska.com/necmit.
Username: necmit
Password: monitors
Which seems to prove the point of the search...
Yea (Score:5, Funny)
Damn script kiddies.
Even better than Google (Score:3, Interesting)
This is particularly useful for this type of thing since it isn't always obvious what the criteria are for what you want to search for - with WhittleBit you don't need to know, it figures it out for itself.
problem with robots.txt tutorial (Score:5, Interesting)
Re:problem with robots.txt tutorial (Score:5, Insightful)
Of course on some of the cheaper web hosting companies out there you can just search the
The HTTPD user should be a member of each users group so you don't have to set world rights to your files. Assuming it's just hosting and no other rights are required.
Re:problem with robots.txt tutorial (Score:4, Interesting)
Password-protected directories wouldn't need to be in robots.txt. Using robots.txt + security by obscurity is for things like family photos, where I don't want to maintain usernames and passwords for my entire extended family, but it isn't absolutely critical that no unauthorized person ever see them. I doubt I could trust my entire extended family to keep passwords secure anyway.
Yeah, cheap shared hosting is largely insecure. I wonder how tough it would be to set up shared hosting using squid as an http accelerator, and let users run web servers under their own UID on different ports, while squid forwards from port 80.
Re:problem with robots.txt tutorial (Score:3, Funny)
For bonus points, you can have secret.cgi automatically add requesting IP's to an apache rewrite config file.
Cheers
-b
robots.txt? (Score:5, Interesting)
Don't be naive about robots.txt... expect to have to do some relatively fancy hacking to actually enforce it.
Re:robots.txt? (Score:2)
Re:robots.txt? (Score:2)
Re:robots.txt? (Score:3, Insightful)
Re:robots.txt? (Score:4, Insightful)
Re:robots.txt? (Score:3, Interesting)
Awesome! I'll post a link to that location on my web page. Everyone who clicks on it will be banned from your site, even though they aren't a spider!
Oh, the fun I'll have...
Re:robots.txt? (Score:4, Informative)
http://www.vamos-wentworth.org/robots.txt [vamos-wentworth.org]
http://www.vamos-wentworth.org/no_way [vamos-wentworth.org]
rainy day activity (Score:2)
Of course, it's not as fun as looking through the open "images" directories on angelfire pages. You always find stuff that's not linked from the main page.
Sesitive? (Score:3, Funny)
use Google's cache to quickly hunt down sesitive pages,
Try hacking a dictionary [reference.com].
robots.txt (Score:5, Interesting)
At least that's how it should work. Is anyone aware of Google requesting robots.txt more often than they spider pages? And then proactively removing pages from their cache based on new robots.txt entries?
While the article deals with Google specifically, lots of non-well-behaved spiders go through common locations looking for password files regardless of what you've blocked out with robots.txt. The only way to completely protect your data is to remove it from your site.
Re:robots.txt (Score:2, Interesting)
I once had family phone numbers on a web page. Upon reflection, I decided that was no good and deleted the web page.
It remained in the google cache until I replaced the file with a blank one with the same URL.
Re:robots.txt (Score:3, Informative)
If you can't wait until the next time Google crawls your site to have your information removed, you can always use Google's Automatic URL Removal System [google.com]. Details are available here [google.com].
A few months back I updated all of my web pages to include the NOARCHIVE META ta
robots.txt (Score:5, Interesting)
Re:robots.txt (Score:5, Funny)
Look at IBM:
http://www.ibm.com/robots.txt [ibm.com]
First comment:
Date: 19950130
By: epc
Reason: finally understood what the file was for!
At least the admin was honest, but a bit embarrasing for being on ibm.com.
Re:robots.txt (Score:5, Interesting)
Part i like best
# If you do actually go to the trouble of figuring out how to download # the files without registering, what you'll end up with is 1 or 2MB of # stuff that is meaningless to you unless you have purchased an # Ultra AX board from Sun. So, please do purchase an Ultra AX board, # but then you might as well use the URL you'll be given along with it.
use deflection in mod_rewrite to keep crawlers out (Score:4, Informative)
ICQ (Score:5, Interesting)
The ICQ password is stored in one of those two datafiles and there are dozend of free decrypt programms for that out there.
But if you think about it... how or why does someone put his ICQ directory on a webserver?!
On the other hand... some people are hosting pr0n sites and dont even know about it
Re:ICQ (Score:2)
(end sarcasm)
Re:ICQ (Score:3, Informative)
Hacker, not cracker? (Score:2, Offtopic)
In this case, you could argue that using Google's cache to track down information for the purposes of cracking is very clever and is therefore deserving of being called a "hack", making the cracker a hacker.
Forgotten (Score:4, Funny)
All present and accounted for... (Score:3, Funny)
Sure, John. I just checked. Your Visa number is 4803 1809 2273 4821, expiration 03/05.
Your Discover card bill is overdue, though. Don't forget, according to this record, you've got 18.5% on overdue, PLUS your $15/mo late fee.
Your 'condition' should have been cleared up by now, so why'd you refill that prescription on Tuesday? Oh, wait, I see here that you deposited three brand new $20's at the US Bank down near Santa Fe. Doing a little insurance fraud, there? :)
Oh,
Re:Oops (Score:4, Informative)
My favorite... (Score:5, Informative)
Re:My favorite... (Score:3, Funny)
Re:My favorite... Searchlores (Score:3, Informative)
Re:My favorite... (Score:4, Funny)
http://www.liada.net/~secret/
all in spanish, but the documents are all about toxic substances, i think... and there's one JPEG that appears to be a sketch of a missle! Now that's top secret!
Scary, very scary (Score:3, Interesting)
Well, duh! (Score:4, Insightful)
Of course, if there's a bug in your server software all bets are off. Which is why it's better not to put private stuff where it can be seen on a public network.
I would have thought that was pretty obvious.
BZZZZZZZT! Wrong! (Score:3, Interesting)
I went through all 6 pages of results and found nothing. Ditto for searches on any of the terms individually. I imagine that searches on individual sites might be what the author is actually talking about, but have no independant means of verifying this. This FUD detected by Entropy248. Wow. I just RTFA and tried it at home...
Interesting Website Ideas (Score:4, Funny)
* bash.history blog - Everything I ran today
*
*
COMING SOON: Welcome to My Bank Account Details, Favourite Passwords I Enjoy Using
This is news? (Score:2, Funny)
We have a situation here, folks. Something must be done!
Well, what do you expect from "new scientist"?
Re:This is news? (Score:3, Interesting)
This situation is a consequence of living an open society that information which "should not" be available is available.
This has nothing to do with google and cracking.
Exactly the same situation was demonstrated in the '70's by Princeton student "John Artistole Phillips", better known as "The A-Bomb Kid". For him, it was the telephone, university and public libraries, and fission weapons instead of google and cracking.
Again, news it ain't.
Scuse me? (Score:5, Insightful)
Was this written down by a non-techie from an audio interview?
Regards,
--
*Art
still... (Score:2)
either way, it's a sweet hack, considering that the admin won't have any logs to show how the information leaked
-t
robots.txt folly (Score:3, Insightful)
A robots.txt like this would be invaluable to a hacker, even though it would prevent Google from indexing:
User-agent: *
Disallow:
Regards,
--
*Art
Wrong use of robots.txt (Score:5, Insightful)
Common reasons would be that you host a site with a forum on a DSL line and don't want google to index all 5000 threads on it. It's also good for dynamic pages, for example it makes no sense to index a generated page that will be out of date tomorrow. It'll be much better to let it index the archive instead.
Using this for security is just stupid though, as it'd contain a list of vulnerable places. Maybe it will make harder for people to find your vulnerabilities from google, but it will help a lot whoever wants to attack you specifically.
Security problems have to be fixed by setting proper permissions and keeping your server up to date, and not by relying on that every spider that comes to your site will be polite enough to follow robots.txt
One word about the google cache... (Score:3, Interesting)
The result looks like this:
phpmyadmin same thing (Score:5, Interesting)
Also it seems people put mysql dumps on their webservers as well..
search for ' "SELECT * FROM credit" + "###" ' and you will see.
This has been going on since google introduced the site cache.
some guide! (Score:5, Funny)
Hmph. When I searched for those phrases at Google, all I got were a bunch of Linux technical how-tos and code samples. If this guy wants to teach us how to be hackers using Google, he's going to have to be more helpful than that!
My favorite: access_log (Score:3, Interesting)
For more h4x0r fun . . (Score:3, Interesting)
Google Warez Machine (Score:5, Interesting)
Google has a nice long list of directory lists containing warez (remember the days of l33t FTP searching for filenames? Google for something like, in my last article: "xwin32*.exe * * * * *" "listing of"), serial numbers (Oh, I've found XP's serial number several times in Google's cache) and other "sensitive" information. My question is if other commercial sites are being constantly shut down due to these links (intentional or not), why aren't people targeting Google as well?
In fact, if I'm *cough*too cheap to buy software*cough* or just want to evaluate some crippleware or such before I buy it, I often skip astalavista [astalavista.box.sk] and cracks.am [cracks.am] and just Google it up. Saves me the porn and pop ups, and I don't have to cripple my browser for this (yes I know it's possible to do in other ways, yes I enjoy javascript, no thanks, I don't want comments about how I'm retarded because I don't do it the right way).
This is similar for sites such as the Internet Archive's Wayback Machine [archive.org] that contains other sensitive information.
Because of the academic merit of both of these search mechanisms, I doubt either one will be shut down. Indeed, I highly doubt restrictions will be placed. They're valuable tools for finding more valuable tools. For more information about this sort of stuff, I suggest searching on Fravia+'s web-searching lore [searchlores.org]. Other information on there relates to "reality cracking", reverse engineering, and other taboo topics. Google's got it all cached. Interested? Just search for (insert topic here) site:searchlores.org.
Sometimes I don't think the comparison of Google to God is that far off. Pardon my heresy.
Re:Google Warez Machine (Score:3, Insightful)
Besides, that sword as 2 sides, if someone intending malace uses google then a law enforcement agency can also use it.
Google file searching.... (Score:5, Interesting)
At google, type "index of", followed by the precise name of the file you are looking for.
I'd say this gives me good results on a fast server 95% of the time.
damn it... (Score:3, Informative)
Doesn't work (Score:5, Funny)
I guess I don't have the patience to be a real hacker.
A little bit OT (Score:3, Informative)
Google Hacking Tutorial (Score:3, Informative)
http://www.smart-dev.com/texts/google.txt [smart-dev.com]
Re:/etc/passwd (Score:3, Funny)
Re:/etc/passwd (Score:3, Informative)
* is a character not allowed in the encrypted 13-character A-Za-z0-9./ password, and as such the account can not be logged in to.
x is used for shadow passwords.
Anyhow, I think the original poster aimed for a +1 Funny, and not +1 Insightful. If there's any justice on
Regards,
--
*Art
No News for h4x0r's (Score:2)
Re:Google is good for free money (Score:2, Interesting)
Better to search for the first 8 digits of a known credit card number. Last time slashdot hahd a story about a site which was publishing credit card numbers on the internet, I googled for the first 8 digits of my CCN and found the site.
publishing analogy (Score:3, Insightful)
by the publishing analogy, doesn't this mean that libraries don't have the right to lend books that are no longer in print? in that respect i see google's cache as a library's copy of a book; they let you look at it, and you can see when it was published. they don't claim it's the most up-to-date, and at any time you can go t