473,396 Members | 2,109 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,396 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 3312
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: 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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.