Security and Cryptography
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsSystem AdministrationSecurity and Cryptography

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 13th, 2001, 04:08 PM
JMM JMM is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Feb 2001
Location: USA
Posts: 830 JMM User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 17 m 56 sec
Reputation Power: 13
User Authentication

I have a site hosted on a Linux / Apache platform and will be password-protecting an area of the site. I have been contemplating doing this with HTTP Basic Authentication. I read some information on the web that stated that when using HTTP Authentication, username and password are transmitted unencrypted across the web, which seems to defeat the whole purpose of the password-protection, except when dealing with users that are non-malicious, or malicious, but inept. Is there a way to implement HTTP Basic Authentication in conjunction with SSI so that username and password are encrypted for transmission?

Reply With Quote
  #2  
Old June 13th, 2001, 10:09 PM
rod k rod k is offline
Apprentice Deity
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Jul 1999
Location: Niagara Falls (On the wrong side of the gorge)
Posts: 3,237 rod k User rank is Private First Class (20 - 50 Reputation Level)rod k User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 m 8 sec
Reputation Power: 17
Send a message via AIM to rod k
Do you mean SSL? If so, yes. If SSL is implemented, EVERYTHING (including HTTP Basic Auth usernames and passwords) will be encrypted.
__________________
FSBO (For Sale By Owner) Realty

Reply With Quote
  #3  
Old June 14th, 2001, 06:47 AM
ame12 ame12 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2000
Posts: 23 ame12 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 m 26 sec
Reputation Power: 0
basic authentication

yes, a user's credentials entered after a 401 browser challenge (which brings up the standard browser dialog box asking for username and password) will be passed in the header request as essentially clear-text. Like this:

Authorization: Basic hu748dlAG837842BZzU==

Don't be fooled that the usernameassword string (which is what the junk text represents) is encrypted... it's not. It's in base64 format, so that anyone can easily decrypt it.


===========================================
http://badblue.com/helpphp.htm
Free small footprint web server for Windows
PHP, P2P file-sharing, transcoding and more
===========================================

Reply With Quote
  #4  
Old June 14th, 2001, 10:03 AM
JMM JMM is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Feb 2001
Location: USA
Posts: 830 JMM User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 17 m 56 sec
Reputation Power: 13
User Authentication

Rod K,

Yes, you're right of course, I did mean SSL. The thing is, I don't want to put everything behind SSL due to the performance penalty and other issues, I would like to just authenticate the user in that fashion and then have them go back to a regular HHTP connection to continue browsing the site.

ame12,

That kind of defeats the purpose then, doesn't it?

Reply With Quote
  #5  
Old June 14th, 2001, 10:45 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
>> I don't want to put everything behind SSL due to the performance penalty and other issues

What performance penalty? What other issues? In 5 years or so, http will be gone, just https that is left.

Reply With Quote
  #6  
Old June 15th, 2001, 12:44 PM
gsohl gsohl is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Posts: 4 gsohl User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Look into the method used by PHPLib for handling this very issue without SSL. They use MD5 and a randomly generated key value to create a hash value to be returned from the client to the server. The Password is never sent as clear text.

Reply With Quote
  #7  
Old June 15th, 2001, 02:51 PM
rod k rod k is offline
Apprentice Deity
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Jul 1999
Location: Niagara Falls (On the wrong side of the gorge)
Posts: 3,237 rod k User rank is Private First Class (20 - 50 Reputation Level)rod k User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 m 8 sec
Reputation Power: 17
Send a message via AIM to rod k
That's nothing be a horrible hack.

Since no decryption is done server side, all a sniffer would have to do is send what they sniff. I.E. the md5 hash

Reply With Quote
  #8  
Old June 15th, 2001, 02:55 PM
gsohl gsohl is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Posts: 4 gsohl User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
True a sniffer could get the hash, but the key which is randomly generated, passed to the login page to be used in the MD5 hash generation, is only valid for the current session. Even if a sniffer had all that information, it is only valid for the session that was in progress, unless I'm missing something here.

Reply With Quote
  #9  
Old June 15th, 2001, 08:12 PM
bumperbox bumperbox is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2001
Location: Tauranga, NZ
Posts: 349 bumperbox User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 13
If i was to the pass the session via a url
example
https://secutesite.com/mysite/index.php$session_id$

Will it be encrypted using SSL
or am I better off the to post the session id via a form ?

Reply With Quote
  #10  
Old June 16th, 2001, 08:38 AM
ame12 ame12 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2000
Posts: 23 ame12 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 m 26 sec
Reputation Power: 0
penalty

Just an FYI.. yes there is a huge performance penalty for implementing SSL (20X on some systems). That's why there's a great business in selling hardware crypto accelerators.

Regarding MD5... depends upon the implementation, but usually MD5 is susceptible to sniffing because it is a flat hash that is compared with the server's version of the same credentials.

Not entirely secure in most cases...


===========================================
http://badblue.com/helpphp.htm
Free small footprint web server for Windows
PHP, P2P file-sharing, transcoding and more
===========================================

Reply With Quote
  #11  
Old June 16th, 2001, 03:18 PM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
>> yes there is a huge performance penalty for implementing SSL (20X on some systems)

Wrong. The performance difference is minimal. There is no reason not to implement SSL for such situation.

>> That's why there's a great business in selling hardware crypto accelerators

This statement doesn't support the performance penalty of SSL.

Reply With Quote
  #12  
Old June 16th, 2001, 09:00 PM
ame12 ame12 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2000
Posts: 23 ame12 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 m 26 sec
Reputation Power: 0
SSL performance penalty

>>> The performance difference is minimal. There is no reason not to implement SSL for such situation.

Y'know I did a search and... you appear to be absolutely correct in this statement. I've got to back to my IT department and figure out why they are buying these SSL hardware accelerators. The reason they were buying these is - they told me - 10x or 20x delays in SSL... but having done a search I found that typically delays are 22%... not 20x.

Research paper here:
http://www.cs.nyu.edu/artg/research...comparison.html

Thanks for the heads up


===========================================
http://badblue.com/helpphp.htm
Free small footprint web server for Windows
PHP, P2P file-sharing, transcoding and more
===========================================

Reply With Quote
  #13  
Old June 17th, 2001, 03:59 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Not to mention 20%, even 30% is reasonable. 20x is just way too non-sense. Getting better hardware would also make the difference less significant, maybe just 5%.

Reply With Quote
  #14  
Old June 21st, 2001, 09:19 AM
JMM JMM is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Feb 2001
Location: USA
Posts: 830 JMM User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 17 m 56 sec
Reputation Power: 13
security

Everyone's input is greatly appreciated, but is there any consensus on this subject: how to implement a secure form of user authentication? I didn't realize this was going to be uncharted territory. I mentioned a performance penalty with SSL becuase that is what I had heard. My site is already taking aperformance hit because I am using a single PHP template as the basis for the entire site and using includes to incorporate the content for individual pages, so if there is a performance penalty with SSL I think the combination would cripple the site. At this point, the option that seems to be most viable is to create a database of usernames and passwords, then have the user enter their username and password on a form that is submitted through a https connection. If the username and password checks out, place a cookie (that will expire after, say, a day) on their machine that will be checked for by all pages in the protected area of the site. A couple of questions about that approach...how safe would my database be on the server? I actually don't even know where the database is located, I have a virtual hosting account and just connect to the database with a datasource name. Also, I apparently get just one database, so I would be putting various tables in the same database that are not related to each other , such as a table storing usernames / passwords, a table containing a membership directory for the organization, etc. Is that a good idea in general / in this context? Any advice appreciated.

Reply With Quote
  #15  
Old June 28th, 2001, 05:41 AM
robert.swift's Avatar
robert.swift robert.swift is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Location: Manchester, UK
Posts: 80 robert.swift User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 13
i have a question. is the security issue more on the server or client side? if the issue is with server side snooping then my suggestion below will not be valid, if the issue is more on the client side then...

why not authenticate on an alternative port? would you guess to snoop on port 1603? (this is an example port number ) a redirect could then take you to the approriate page back on the http port.

i would be interested to hear what others think to this approach.

cheers - robert.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationSecurity and Cryptography > User Authentication

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap