LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   Just out of curiousity... (https://www.linuxquestions.org/questions/linux-security-4/just-out-of-curiousity-675417/)

Quads 10-09-2008 09:48 PM

Just out of curiousity...
 
If someone were physically sitting at my machine and didn't know any passwords, couldn't they gain access to the entire file system simply by booting a live cd and mounting the drives? Maybe its a stupid question but I'm still pretty new to linux and it seems like a live cd is basically a loaded gun that will give anyone with it complete access to any linux box.

win32sux 10-09-2008 09:51 PM

Quote:

Originally Posted by Quads (Post 3305715)
If someone were physically sitting at my machine and didn't know any passwords, couldn't they gain access to the entire file system simply by booting a live cd and mounting the drives?

Yes. Unless your drive was encrypted.

rabbit2345 10-09-2008 09:52 PM

yeah, that's right

pretty dangerous, huh? :)

but if you encrypt your drive, then they can't without an actual password.

moxieman99 10-09-2008 10:00 PM

Quote:

Originally Posted by Quads (Post 3305715)
it seems like a live cd is basically a loaded gun that will give anyone with it complete access to any linux box.

-----------------------
Which is different from a person with physical access to your computer how? Or a live CD while you are running any other operating system -- how? Encryption MIGHT help, but if I have access to your computer, I copy it and crack the encryption as the worst case scenario, which is different on an encrypted disk from XP or Vista how?

r3sistance 10-09-2008 10:04 PM

Also let's not forget good old single user mode? why do you need a live CD when you can just change the root password using single user mode? It takes alot to secure a computer when you are looking at physical access, it's possible but really really hard.

abolishtheun 10-09-2008 10:18 PM

Quote:

Originally Posted by r3sistance (Post 3305729)
Also let's not forget good old single user mode? why do you need a live CD when you can just change the root password using single user mode? It takes alot to secure a computer when you are looking at physical access, it's possible but really really hard.

not terribly hard. just encrypt your drive (medium difficulty), put a password on your bios as well as your boot loader (easy), physically lock the machine down with a heavy duty combination lock and chain it to a hefty metal desk (and get a real lock&chain, not that garbage from kensington).

Quads 10-09-2008 10:24 PM

So the only way to keep anything important totally safe is store it on a flash drive.

r3sistance 10-09-2008 10:30 PM

Quote:

Originally Posted by abolishtheun (Post 3305739)
not terribly hard. just encrypt your drive (medium difficulty), put a password on your bios as well as your boot loader (easy), physically lock the machine down with a heavy duty combination lock and chain it to a hefty metal desk (and get a real lock&chain, not that garbage from kensington).

Encrypting a drive still isn't really a needed step, that's something you do if you aren't the admin/root and want to secure your data... however I think you hit on the key I was noting, to hide away the machine is what I was thinking, so that the machine itself can't be accessed, say looked in a locked big metal case or something... then just supply a power button (grab one from an old/disused computer or something) and an External CD/DVD drive that is configured in bios to not be a boot device, of course you password grub :).

Quote:

Originally Posted by Quads (Post 3305742)
So the only way to keep anything important totally safe is store it on a flash drive.

If you keep the flash drive on you and never forget it... ever then yes I suppose that would be the safest way.

johnson_steve 10-10-2008 12:58 AM

long story short it doesn't matter what kind of computer you have if someone has phisical access to it they can do anything they want to it. even if your drive is encrypted they can crack it. why do you think they have data centers with armed gaurds? why do you think you need a key to start my computer? (not that this would help if someone took it with them but it's a deterent.)

Edit:
no a flash drive isn't that safe. they get misplaced all the time; I'm alwways hearing about ones with clasified government stuff on them turning up. not to mention that it's almost impossible to totaly erase something from flash there are ways to resurect your data even if you thought it was gone.

sundialsvcs 10-10-2008 09:11 AM

"All I need to get everything is ... physical access to the hardware, and a gun." :eek:

GazL 10-10-2008 10:17 AM

Quote:

Originally Posted by johnson_steve (Post 3305809)
... if someone has phisical access to it they can do anything they want to it. even if your drive is encrypted they can crack it.

My system runs with a LUKS encrypted lvm setup, with a good strong pass phrase. The reason for this is not that I'm some paranoid tin-foil hat wearing nutter that thinks the government is out to get him, but that I had a burglary a few years back and my PC was taken. Cracking encryption requires a non-trivial amount of computing time. Now I'm under no illusions that the authorities could muster the resources necessary if they really wanted to take an interest in me (though they'd probably just get out the rubber hose), but if encryption stops the average idiot burglar from rummaging around my harddisk after stealing my PC then: mission accomplished!

tkedwards 10-10-2008 03:26 PM

Quote:

So the only way to keep anything important totally safe is store it on a flash drive.
No that's no different from having it on your hard drive - you'd need to ensure that the flash drive is physically secure too. If by 'safe' you mean your data is not accessible to unauthorised people you need to encrypt it.

johnson_steve 10-10-2008 04:37 PM

Quote:

Originally Posted by GazL (Post 3306198)
My system runs with a LUKS encrypted lvm setup, with a good strong pass phrase. The reason for this is not that I'm some paranoid tin-foil hat wearing nutter that thinks the government is out to get him, but that I had a burglary a few years back and my PC was taken. Cracking encryption requires a non-trivial amount of computing time. Now I'm under no illusions that the authorities could muster the resources necessary if they really wanted to take an interest in me (though they'd probably just get out the rubber hose), but if encryption stops the average idiot burglar from rummaging around my harddisk after stealing my PC then: mission accomplished!

True if your only goal is to stop the casual burglar from going through your files then this will work, but just setting a login password would probably acomplish the same goal. the casual burglar just wants to resell your computer not get at your data. If someone wants to get at your data don't kid yourself it isn't safe. 'non-trivial amount of computing time' how many homemade supercomputing clusters are out there? (I've built 2 myself) how many of these do you think were built just to crack various types of encryption codes? there are crackers out there with as much or more computing power then the government. if they have a reason to be interested in your data and get your drive, you're screwed. if you just want to stop a casual thief: get better locks and a home security system. thieves go after what will give them the most benefit for the least amount of effort/risk. it's just like the old saying 'I don't have to outrun the bear, I just have to outrun you.'

win32sux 10-10-2008 04:58 PM

Quote:

Originally Posted by johnson_steve (Post 3306445)
there are crackers out there with as much or more computing power then the government.

And you know this how exactly?

johnson_steve 10-10-2008 05:58 PM

Quote:

Originally Posted by win32sux (Post 3306455)
And you know this how exactly?

If I've been able to build 2 clusters out of spare parts with $0 buget and use them for mathimaticly intensive aplications such as 3d rendering and re-encoding mpeg2 video ;) What do you think someone with better skills and a bigger buget could build? I know that clusters have been used to bruteforce crack WPA much faster then a single box. with todays cheap and powerful hardware, some Linux skills and the ability to code custom apps in c++ or something similar the only limit to how powerful a computer you can build is your buget. I know that their are criminals with a lot more money then me, and plenty with more computer skills then me. If I can do something I have no doubt they can do it better and faster then me. and as has been proven time and time again the us government is usualy the least efficent way to get anything done; most things they could do for millions of dollars could be done much, much cheaper if your properly motivated.

win32sux 10-10-2008 06:08 PM

Quote:

Originally Posted by johnson_steve (Post 3306488)
If I've been able to build 2 clusters out of spare parts with $0 buget and use them for mathimaticly intensive aplications such as 3d rendering and re-encoding mpeg2 video ;) What do you think someone with better skills and a bigger buget could build? I know that clusters have been used to bruteforce crack WPA much faster then a single box. with todays cheap and powerful hardware, some Linux skills and the ability to code custom apps in c++ or something similar the only limit to how powerful a computer you can build is your buget. I know that their are criminals with a lot more money then me, and plenty with more computer skills then me. If I can do something I have no doubt they can do it better and faster then me. and as has been proven time and time again the us government is usualy the least efficent way to get anything done; most things they could do for millions of dollars could be done much, much cheaper if your properly motivated.

The reason you've written so many lines to reply and still haven't managed to answer the question I asked is simple: Because you can't. You don't know how much computing power the government has, and therefore any claim you make regarding how that power compares to what some crackers have is completely fabricated.

tkedwards 10-10-2008 06:54 PM

I think you're seriously underestimating the effort needed to crack encryption keys. Your homemade 'supercomputing' cluster might be good for 3d rendering or encoding video but won't be any use trying to bruteforce AES or similar.
Some of the articles discussing the hardware DES cracker shed some light on the sheer quantity of computing power you'd need:
http://www.schneier.com/crypto-gram-9808.html
Quote:

DES has a fixed 56-bit key. Triple-DES has a 112-bit key; there isn't enough silicon in the galaxy or enough time before the sun burns out to brute-force triple-DES. AES requires 128-, 192-, and 256-bit keys.
http://www.nist.gov/public_affairs/releases/aesq&a.htm
Quote:

Assuming that one could build a machine that could recover a DES key in a second (i.e., try 2^55 keys per second), then it would take that machine approximately 149 thousand-billion (149 trillion) years to crack a 128-bit AES key.
There are no magic super encryption breaking computers/networks that can do all this in a few minutes - it's just not mathematically possible. The way that the govt./police will try to get into your data is simply trying all likely passwords - after all the search space of passwords that are rememberable by humans is relatively small. But even so the hardware and technical requirements to generate all the likely passwords, then churn through trying each one in the algorithm is not insignificant. And this can easily be defeated by using an implementation which has a key disk or USB stick, ie. the key (password) is not something human memorable but is kept on a disk or USB stick in a file.

Anyway the main point is that although it's possible that government organisations could get around the encryption one way or another, if they thought your data was really worth it, they're about the only ones who will, the costs of doing so for anyone else would far exceed the money they could extract from your bank account (unless you really are super-super rich!)

CaptainInsane 10-10-2008 07:16 PM

If I was inclined to crack a AES key, which I am not, I would attempt a
"lotto quick-pick" type algorithm. Good luck. (-;

Re: Physical machine security.

I keep my servers and desktops in the next room. I sleep light and have
a large loud mean dog and several guns.

So far so good.

GazL 10-10-2008 07:24 PM

Take a look at the wikipedia page on Brute force attack

Now, wikipedia isn't always the most reliable source of information but this seems to agree with other sources out there.
Quote:

The amount of time required to break a 128 bit key is also daunting. Each of the 2^128 possibilities must be checked. This is an enormous number, 340,282,366,920,938,463,463,374,607,431,768,211,456 in decimal. A device that could check a billion billion keys (10^18) per second would still require about 10^13 years to exhaust the key space. This is longer than the age of the universe...
I don't know exactly what size of cluster you've created out of your spare parts but even 'Deep Thought' would have to think about that one for a while, and I shudder to think about the size of the electricity bill!

CRC123 10-10-2008 07:36 PM

Princeton researchers can crack most disk encryption (including AES) within an hour.

If you don't believe me, read this article :)


There's a catch though ; ).

johnson_steve 10-10-2008 07:57 PM

OK so I admittedly underestimated what it would take to brute force crack the key, I never said that I could do it or that I had the equipment to do it. I was just saying I wouldn't be so sure your data would be safe and point out that some of the worlds most powerful computers can be built from commodity hardware and even more powerful dedicated crackers can be made with fpga's. not to mention that since computers get faster at an incredible rate what's not reasonable today could be quite feasible in a few years. and as you people have pointed out already it's not always needed to try every key to crack it in fact the chance of cracking it on the last try is just as unlikely as the first try, and there are ways to help with your guesses like dictionary files and the cold boot attack that crc123 pointed out. Incidently since it is imposable to prove a negative you can't disprove secret criminal supercomputers anymore then I could disprove little green men living somewhere in the universe. Just a thought.

win32sux 10-10-2008 08:31 PM

Quote:

Originally Posted by johnson_steve (Post 3306538)
since it is imposable to prove a negative you can't disprove secret criminal supercomputers anymore then I could disprove little green men living somewhere in the universe.

Agreed, but I (I'm assuming this was directed at me) wasn't trying to disprove that, so your negative proof fallacy argument is as valid as your "there are crackers out there with as much or more computing power then the government" claim. It's not about whether it's true or false - you simply don't have access to the information needed to know something like that in the first place. Debate isn't gonna change that.

tkedwards 10-11-2008 04:11 AM

Quote:

since it is imposable to prove a negative you can't disprove secret criminal supercomputers anymore then I could disprove little green men living somewhere in the universe.
That's a pretty weak argument, equally no one can disprove that these criminals have access to a flying spaghetti monster who can instantly tell them all the encryption keys using technology undiscovered by humankind so far, but the possibility is ridiculously unlikely. No matter how many computers you string together, or how far Moore's law goes in the next few decades, you aren't going to get a computer fast enough to brute-force AES in a reasonable amount of time - see the quote from the Schneier article in my previous reply.

The point is though that it's silly to tell people not to use encryption because there might be magic supercomputers out there. The real way that govt./police get around encryption is by relying on the simplicity of human memorable passwords (get around this by using a key file on a CD/USB stick), do a data recovery on your hard disk in the hope that the plaintext hit the platters at some point, catch the computer just after you've turned it off (or better yet with it still running) and do the cold-boot attack (or just look at the files as you have them opened). None of these methods is perfect and if you're careful you can probably reduce the likeliness of their being effective to almost zero. Plus it's very unlikely that your average criminal would have the ability or resources to successfully attempt any of these. EDIT: Something to backup this last sentence:
http://www.axantum.com/AxCrypt/etc/About-AES.pdf
Quote:

Correctly implemented AES-128 is likely to protect against a million dollar budget for at least 50 – 60
years and against individual budgets for at least another 10 years.

johnson_steve 10-11-2008 10:05 AM

Quote:

Originally Posted by tkedwards (Post 3306782)
The point is though that it's silly to tell people not to use encryption because there might be magic supercomputers out there.

Geez, I'm not trying to tell anyone not to use encryption all I said is I wouldn't trust that it would keep your data safe. most people don't use strong passwords they simply can't remember them. most peoples passwords could be cracked with a good dictionary file. as I stated before the statistical probability of guessing the right pasphrase on the last guess is just as unlikely as guessing it on the first. since all those estimates on how long is would take to crack are worst case scenarios it would most likely take about 1/2 that amount of time. using a cd/usb thumbdrive with a key introduces the new problem: now you can loose your key, misplace it somewhere where anyone could find it. now I admit I can be paranoid. I wrap everything with rfid tags in tinfoil and I used to encrypt all my network traffic with 4096bit aes key. I don't have anything interesting enough on my computer to justify encrypting it. if someone steals my computer the worst thing they are going to find is naked pictures and my biggest worry will be that I don't have a f'ing computer anymore. I don't use encryption on my disk you can if you'd like and it will probably work for you. good luck.

tkedwards 10-11-2008 10:25 AM

Quote:

Geez, I'm not trying to tell anyone not to use encryption all I said is I wouldn't trust that it would keep your data safe
I think you're taking a very literal definition of 'safe' here. Of course no encryption scheme + the way you implement it can ever be completely safe. But I've pointed out, assuming you don't do anything too stupid, the possibilities of anyone getting at your data is pretty remote, even more remote as far as the common criminal or identity theft types that are likely to break into your house and take your computer stuff.

Your previous posts in this thread seemed to be saying that there's no point in using encryption as anyone who can connect a few computers together and program well in C++ can crack it. I wasn't trying to start a flame-thread but this is just not true and to me seems to be very bad advice.

johnson_steve 10-11-2008 11:10 AM

Quote:

Originally Posted by tkedwards (Post 3306969)
Your previous posts in this thread seemed to be saying that there's no point in using encryption as anyone who can connect a few computers together and program well in C++ can crack it. I wasn't trying to start a flame-thread but this is just not true and to me seems to be very bad advice.

That's not what I meant to say at all. I never advised not to use encryption. and I merely sugested that it could be cracked and it can. not by any jackass with a few computers, but don't kid yourself it can be cracked. in the entire history of codes and encryption there is only 1 cipher that is impossible to break without the key (and then only if the key was longer then the message.) no matter what encryption scheme you use the weakest link will always be the human. No matter how much you spent on your locks or how much you trust them; if I really wanted to get into your house I could, and so could plenty of other people. would you really just rely on locks to protect your family? How can being extra cautious ever be considered bad advice? what do you really have on your computer that you are so worried about in the first place? go ahead and use disk encryption if you want to, but it isn't a 'magic blanket' I keep my laptop with me or under lock and key at all times. If someone want's my data: come get it; I'm the big scarry guy with the gun.

tkedwards 10-11-2008 12:15 PM

This is getting tiresome - are you actually bothering to read my posts? I never said it couldn't be cracked, in fact I described at length how it could be. The point I was making was the difficulty, and therefore expense, of making a worthwhile attempt at cracking it was great enough that it does actually protect your data, at least as far as individuals and probably most small to medium businesses.
As to the rest of your post
* Analogies to physical locks are meaningless - just because you can break down most doors with a strong kick doesn't make encryption anywhere near as easy to break
* The only thing I have on my computer that I 'worry' about are my banking details, and that is the only file I bother encrypting. I never said anything about full disk encryption :confused:

abolishtheun 10-11-2008 04:58 PM

comment: it really doesn't matter how much computing resources the government has. if you're suspected of a crime, and you refuse to give the password for your encrypted drive, you're withholding evidence, which is a pretty serious crime itself.

anomie 10-12-2008 06:30 PM

Quote:

Originally Posted by Quads
If someone were physically sitting at my machine and didn't know any passwords, couldn't they gain access to the entire file system simply by booting a live cd and mounting the drives?

I more or less agree with the information in post #6 of this thread.

To make a potential intruder's life more difficult:
  1. Modify your BIOS settings such that you're booting from hard drive first.
  2. Password protect your BIOS. (No more booting from CD.)
  3. Put a physical lock on your case. (Much harder to reset the CMOS.)
  4. Password protect your boot loader, e.g. grub. (No more easy booting to single-user mode.)
  5. Update /etc/securetty so that the only entry there is 'console'. (Then direct root logins can only happen in single-user mode.)
  6. Use strong passwords for user accounts, and for all of the above.

Ta-da: you're a much more hardened target now. If this level of security is not sufficient for the type of data you keep, you're going to need real physical security (like a data center).

Quads 10-13-2008 12:54 AM

I don't know how my question evolved into this ;) But I can tell you one thing for sure...all your clusters and high-tech mission impossible stuff won't do you in any good if my files are on a usb flash drive in my pocket. :) Although I just read the above post and these are things that I already do...after installing I always change the boot from cd option, as that option seems to slow down my usual boot if there is a cd in the drive. I think if you change that and password protect the BIOS you've stopped 95% of people. If you physically protect the case so that they can't reset the CMOS you've probably stopped all but the most determined person, and I don't have anything quite that important.

deathalele 03-01-2009 10:56 AM

What i did to stop the most basic acces was to turn my pendrive into a 'key'

i copied /boot/* onto my pendrive

opened up th terminal

did the following

$su -c 'grub'

grub>find /boot/grub/stage1
(hd0,2)#hard dissk partition
(hd1,0)#pendrive partition

grub>root (hd1,0)

grub>setup (hd0)

grub>quit

from now on your pendrive must be plugged into the computer when you turn it on. If not you get a 'grub not found' error.

Granted this won't stop anyone with a live cd but it should stump average joe.

For more security you could delete /boot/grub/*, hide the (hd1,0) partition. etc


All times are GMT -5. The time now is 12:55 PM.