Radius Authentication Server

by: burt rosenberg
at: university of miami

Client Trace
$ make run-client-nr
./mradius -vR -h localhost pikachu LaaOVTXLgtk0
passwd_md5 (mradius-utils.c:331)
	passwd: LaaOVTXLgtk0
	md5: f47d b855 4dc8 5c8b 9dce 0c19 94c3 2174 
special_encrypt (mradius-utils.c:349)
	secret:	7061 3535 776f 7264 30
	r.auth:	0102 0304 0506 0708 090a 0b0c 0d0e 0f10 
	md5:	da10 f6e9 9e8c 5304 0ce7 2039 5425 1f27 
	plain:	f47d b855 4dc8 5c8b 9dce 0c19 94c3 2174 
	crypt:	2e6d 4ebc d344 0f8f 9129 2c20 c0e6 3e53 
socket_sendto (mradius-socket.c:175)
	sent 47 bytes from port 33207 to 127.0.0.1:3333
	01 01 00 2f 01 02 03 04 05 06 07 08 09 0a 0b 0c 
	0d 0e 0f 10 01 09 70 69 6b 61 63 68 75 02 12 2e 
	6d 4e bc d3 44 0f 8f 91 29 2c 20 c0 e6 3e 53 
socket_recvfrom (mradius-socket.c:146)
	got 20 bytes from 127.0.0.1:3333 on port 33207
	02 01 00 14 b4 b4 cb c0 7d b0 47 af 46 77 e2 5f 
	39 b4 85 18 
access_packet (mradius-client.c:72)
	code: 2; ident: 1; length: 20; 
	auth: b4b4 cbc0 7db0 47af 4677 e25f 39b4 8518 
	end of attributes
verify_response (mradius-utils.c:302)
	msg: 0201 0014 b4b4 cbc0 7db0 47af 4677 e25f 39b4 8518 
	r.auth: 0102 0304 0506 0708 090a 0b0c 0d0e 0f10 
	key: 7061 3535 776f 7264 30
	sig: b4b4 cbc0 7db0 47af 4677 e25f 39b4 8518 
YES
sleep 1
./mradius -vR -h localhost pikachu wrong
passwd_md5 (mradius-utils.c:331)
	passwd: wrong
	md5: 2bda 2998 d9b0 ee19 7da1 42a0 447f 6725 
special_encrypt (mradius-utils.c:349)
	secret:	7061 3535 776f 7264 30
	r.auth:	0102 0304 0506 0708 090a 0b0c 0d0e 0f10 
	md5:	da10 f6e9 9e8c 5304 0ce7 2039 5425 1f27 
	plain:	2bda 2998 d9b0 ee19 7da1 42a0 447f 6725 
	crypt:	f1ca df71 473c bd1d 7146 6299 105a 7802 
socket_sendto (mradius-socket.c:175)
	sent 47 bytes from port 47052 to 127.0.0.1:3333
	01 01 00 2f 01 02 03 04 05 06 07 08 09 0a 0b 0c 
	0d 0e 0f 10 01 09 70 69 6b 61 63 68 75 02 12 f1 
	ca df 71 47 3c bd 1d 71 46 62 99 10 5a 78 02 
socket_recvfrom (mradius-socket.c:146)
	got 20 bytes from 127.0.0.1:3333 on port 47052
	03 01 00 14 4f de 3a f6 71 34 45 82 f4 4b 30 9e 
	ff 96 0c 2f 
access_packet (mradius-client.c:72)
	code: 3; ident: 1; length: 20; 
	auth: 4fde 3af6 7134 4582 f44b 309e ff96 0c2f 
	end of attributes
verify_response (mradius-utils.c:302)
	msg: 0301 0014 4fde 3af6 7134 4582 f44b 309e ff96 0c2f 
	r.auth: 0102 0304 0506 0708 090a 0b0c 0d0e 0f10 
	key: 7061 3535 776f 7264 30
	sig: 4fde 3af6 7134 4582 f44b 309e ff96 0c2f 
NO
sleep 1
./mradius -vR -h localhost nonexistant none
passwd_md5 (mradius-utils.c:331)
	passwd: none
	md5: 334c 4a4c 42fd b79d 7ebc 3e73 b517 e6f8 
special_encrypt (mradius-utils.c:349)
	secret:	7061 3535 776f 7264 30
	r.auth:	0102 0304 0506 0708 090a 0b0c 0d0e 0f10 
	md5:	da10 f6e9 9e8c 5304 0ce7 2039 5425 1f27 
	plain:	334c 4a4c 42fd b79d 7ebc 3e73 b517 e6f8 
	crypt:	e95c bca5 dc71 e499 725b 1e4a e132 f9df 
socket_sendto (mradius-socket.c:175)
	sent 51 bytes from port 60034 to 127.0.0.1:3333
	01 01 00 33 01 02 03 04 05 06 07 08 09 0a 0b 0c 
	0d 0e 0f 10 01 0d 6e 6f 6e 65 78 69 73 74 61 6e 
	74 02 12 e9 5c bc a5 dc 71 e4 99 72 5b 1e 4a e1 
	32 f9 df 
socket_recvfrom (mradius-socket.c:146)
	got 20 bytes from 127.0.0.1:3333 on port 60034
	03 01 00 14 4f de 3a f6 71 34 45 82 f4 4b 30 9e 
	ff 96 0c 2f 
access_packet (mradius-client.c:72)
	code: 3; ident: 1; length: 20; 
	auth: 4fde 3af6 7134 4582 f44b 309e ff96 0c2f 
	end of attributes
verify_response (mradius-utils.c:302)
	msg: 0301 0014 4fde 3af6 7134 4582 f44b 309e ff96 0c2f 
	r.auth: 0102 0304 0506 0708 090a 0b0c 0d0e 0f10 
	key: 7061 3535 776f 7264 30
	sig: 4fde 3af6 7134 4582 f44b 309e ff96 0c2f 
NO

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

Author: Burton Rosenberg
Created: 4 April 2022
Last Update: 4 April 2022