PDA

View Full Version : How can i decryp[t Linux source code?


az
February 15th, 2008, 06:17 AM
The source code isn't encrypted.

But, I gather your question has to do with security? If the source code is available, how can it be secure?

Well, we know that "security by obscurity" doesn't work. Keeping something binary-only doesn't prevent exploits. On the other hand, publishing the source code allows many people to look at at and find vulnerabilities before they get exploited.

As well, just because you know how a lock works, doesn't mean it's possible to pick it. Specific to encryption, knowing how something is encrypted is a lot different than actually knowing the encryption key. Even by knowing the method by which something is encrypted, it can still take a staggering amount of time and computer power to break a key.

gaten
February 15th, 2008, 06:20 AM
If you mean user passwords, you are partly correct. They are stored in the /etc/shadow file, and they are hashed, not encrypted. See http://en.wikipedia.org/wiki/Cryptographic_hash_function
for an explanation of what a Hash is.

In short, your passwords are thrown into a one-way hashing algoriithm, so you cannot decrypt any of your user passwords; at this point and time no mathematical technique is know which is able to do this (it's theoretically impossble).

However, there are programs out there that can crack your password by hashing possible passwords and comparing them to the origonal hash. John the Ripper (http://en.wikipedia.org/wiki/John_the_Ripper) is one such program, check it out.

scorp123
February 16th, 2008, 06:24 AM
If Linux is open source any one can know where the password are stored /etc/shadow ... as is the case with most other UNIX-like OS'es. But knowing where the passwords are is one thing, being able to access them is another, and being able to crack the strongly encrypted hashes again another.

and if they are encrypted any one can decrypt it using source code. You are confusing a lot of things here. The source code is written in the C programming language and it's not encrypted and it doesn't store the passwords in any way.

The Cog
February 16th, 2008, 06:54 PM
What is stored in /etc/shadow, it's not directly decryptable. What is stored is a one-way hash. When the user gives a pssword, it is hashed and that hash is compared with the stored one.

Although the stored hash is not directly unhashable, if you know the hash, you can try lots of words and try to find one (the same or not) that gives the same hash. For this reason, /etc/shadow is only readable by root.

bmora96
February 17th, 2008, 04:47 PM
Hello

Unix and other systems including Windows, web sites, content management systems, databases etc do not store the passwords themselves. Instead, they calculate digest out of password and store that digest (in /etc/passwd or /etc/shadow file in case of Unix).

Regards,
Bmora

bobpaul
March 13th, 2008, 08:22 PM
How does one create their own hashes? I thought they were SHA1 hashes, but I just compared 'echo -n "password" | openssl sha1' and it was not the same as the hash field in /etc/shadow.

Dr Small
March 13th, 2008, 09:15 PM
How does one create their own hashes? I thought they were SHA1 hashes, but I just compared 'echo -n "password" | openssl sha1' and it was not the same as the hash field in /etc/shadow.
Use:
grub-md5-crypt

The only problem with it, it doesn't support stdin.


Dr Small

2point0
March 13th, 2008, 10:04 PM
I just compared 'echo -n "password" | openssl sha1' and it was not the same as the hash field in /etc/shadow.

It could very well be MD5 hashes. MD5 hashes are 32 character alpha-numeric strings. If you supply the password 'password' and hash it in SHA1 you come up with 40 alpha-numeric characters, MD5 generates a 32 character string.

That's usually the first noticeable difference.

Dr Small
March 13th, 2008, 10:18 PM
It could very well be MD5 hashes. MD5 hashes are 32 character alpha-numeric strings. If you supply the password 'password' and hash it in SHA1 you come up with 40 alpha-numeric characters, MD5 generates a 32 character string.

That's usually the first noticeable difference.
Yes, passwords in /etc/shadow are MD5 hashed. I have checked before, and that is how John dictionary attacks them.

kevdog
March 14th, 2008, 02:41 PM
No way to change the hash from md5 to something else is there without modification of the source code?

Just an FYI
Two passwords that hash to the same digest is known as a "collision".

bobpaul
March 18th, 2008, 11:51 PM
It could very well be MD5 hashes. MD5 hashes are 32 character alpha-numeric strings.

Hmm.. When I supply the passwd command and change the password, I consistently get 35 char hashes, but when I use the grub-md5-crypt command, I get 32 char hashes. Also interesting, every time I supply either command I get a different hash then previous times even though I'm supplying the same password (because it's salted?) and all hashes seem to work fine for authenticating.

3rdalbum
March 20th, 2008, 08:56 AM
The original poster posted exactly the same question to the Cnet forums a few days ago. I gave him exactly the same answer there as you guys have done here :-)

scorp123
March 22nd, 2008, 04:46 PM
The original poster posted exactly the same question to the Cnet forums a few days ago. Just enter his nickname into Google ... there are dozens of forums where he is posting the same question again and again and again. Here, another example:
http://www.daniweb.com/forums/thread111164.html

He ("techbrain55") will ask the same silly question about "decrypting Linux source code" and then start a discussion with what looks like a second nick "bmora96" (please note the same weird "accent", vocabulary and spelling errors!) and then always come to the same silly conclusion that "Linux is too closed, nobody can decrypt it -- use <insert silly pointless product here> instead!" ... And he repeats this on a dozen of forums.

Methinks this guy is just a spammer.

bhavi
March 24th, 2008, 02:54 AM
I'm not understanding it..The source code is in plain, readable text. You compile the source code to create the executable programs.. The main question is IS IT POSSIBLE TO STOP REVERSE ENGINEERS?

Passwords, on the other hand, are stored, encrypted, in the /etc/passwd and /etc/shadow files. They can be decrypted using John the ripper..

More info:

http://www.dwheeler.com/secure-programs/Secure-Programs-HOWTO/open-source-security.html

scorp123
March 24th, 2008, 04:31 AM
I'm not understanding it.. The threadstarter is a spammer and his original postings have already been removed. The current #1 posting was in fact #2 when this thread started. So just forget about this.

bhavi
March 24th, 2008, 06:37 AM
The threadstarter is a spammer and his original postings have already been removed. The current #1 posting was in fact #2 when this thread started. So just forget about this.
OK.... :)