473,385 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Unpack the Radius "User-Password" attribute

Hi, currently i am developing a Radius server application. Cananyone show me how can i unpack the "User-Password" attribute sothat i can get back the password in plain text so that i canverify it against my database.
For example, the user entered password "testpassword". Assumethat the shared secret between the NAS and my radius server is"testshared". I am totally unfamiliar with .NET encryption (MD5,XOR), so please provide some sample codes if possible. Thanks inadvance.

--------------------------------
From: twhan twhan

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>EqVsddrKg0SkMD4smy1Qlw==</Id>
Jul 21 '05 #1
1 3309
I would really suggest you seek someone with some cryptographic knowledge or
read a good book on security and cryptography BEFORE building a good radius
server application.
This is not meant to be hard on you, but really, when developing
applications for security, do it good!

It also is not specific to .NET, its used in general, everywhere.

Starting with some basics:
Secure Hash functions, such as MD5, SHA-1, SHA-256 have a single property,
they are one way. This means it is possible to easily derive h (hash code,
the output) from p (plaintext). So h = MD5(p) is simple.
For someone with only h, it should be impossible in practice to find a
(computionally unfeasable) p that satisfies h = MD5(p).

During an authentication process you don't want someone to actually read the
password, so if you are able to derive p from h, then anyone else can too.
So sending h will not provide any information about the password. Its still
vulnerable, since when I know h (which is send over the network) I can also
impersonate you. So this way should not be used.
Basically you do MD5(server_stored_p) = MD5(client_given_p).

A challenge/response authentication works much better:
I send you 'r' being a random value.
You send me h = MD5(client_given_p + r)
I compare MD5(server_stored_p + r) which must match.

Of course
I send you 'r' being a random value.
You send me h = MD5( MD5(client_given_p) + r)
I compare MD5( MD5(server_stored_p) + r) which must match.
will work too.

Please, do youself a favor and get into security!
Always remember, encryption is only a tiny subset of security.

A second problem for you would be storing the passwords plain in a database.
This is very bad security practice. At least try to store hashes.

Books on cryptography.
http://www.google.nl/search?q=crypto...TF-8&hl=nl&lr=
http://www.youdzone.com/cryptobooks.html

Also try "Applied Cryptography", which gives a very mathematical approach
and is a very good book. Its freely available from the internet (use
google).

- Joris
Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: jissay | last post by:
Hi, I use the following scrit in an Intranet with the user name = "" and the password = "" : <?php $ftp_server = "192.168.25.25"; $ftp_user = ""; $ftp_pass = "";
4
by: Akhlaq Khan | last post by:
we are developing an intranet application (web based) which needs to detect the logged in user ID of the user hitting the website. the intranet is huge and based on win2k active directory (around...
2
by: Netto | last post by:
**** Post for FREE via your newsreader at post.usenet.com **** When I try to use a created attribute for the tag "input", it works fine with IE 6, but it seems not to be recognized by Netscape...
4
by: Guadala Harry | last post by:
Is there any way for one Session to remove and update objects in another Session? I seriously doubt it, but thought I'd ask. Here's why: I have some data that is unique per user (or per session -...
1
by: fl | last post by:
I am running ASPNET on my local machine. I have a problem when I try to connect to a SQL server database table. The data looks good when I right click SqlDataAdapter1 to preview the data. When F5...
4
by: Ying Lu | last post by:
Hello, I have a table named "USER" under MySQL database. When I am trying to move tables from MySQL to PostgreSQL, I found that I could not create a table namely "USER". I guess "USER" is a key...
5
by: mabond | last post by:
Hi all This question is one of "theory" rather than a search for the specifics of a solution. I need some pointers as to how to proceed with my project. Here goes. My application allows the...
0
by: godsmustbcrazy | last post by:
Here is my problem. Brand new SQL Server 2005 Installation 1. Create a database "Test" 2. Create a database user "Domain\user" and set user mapping to "Test" with datareader, datawriter...
6
by: maanasa | last post by:
hi, i've one question. I'm supposed to create oracle user on click of a button using oracle forms. I'm calling a procedure which i've written in sql+ which is supposed to create the user. The...
5
by: WP | last post by:
Hello, I need to communicate with a db2 database from a java program and this java program needs to check which "user tables" there are. I came up with the following query which I tried in Control...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.