Re: [OpenAFS] Migrating away from single DES

2020-09-16 Thread r. l.

I am using openafs-1.8.6 on SL-6.10/Centos-6.10

I just rekeyed successfully.

The docs in OpenAFS lead to some rxkad.keytab for some Openafs-1.6.x  
(around year 2013)


After creating such a file, one needs to apply 'akeyconvert' ; which 
transfers the heart of it


to the file KeyFileExt which is used for newer openafs versions , e.g. 
1.8x, for non-DES-Keys.



                     ===    In short:  ===
# cd /usr/afs/etc

 ## dont  -keepold:
kadmin.local:  cpw -e aes256-cts-hmac-sha1-96 -pw X afs/cellname

kadmin.local:  ktadd -k rxkad.keytab -norandkey  afs/cellname

# ls -la
total 36
drwxr-xr-x 2 root root 4096 Sep 16 16:47 .
drwxr-xr-x 6 root root 4096 Sep 11 16:12 ..
-rw-r--r-- 1 root root   60 Sep 11 16:31 CellServDB
-rw--- 1 root root   16 Sep 11 16:31 KeyFile
-rw--- 1 root root    4 Sep 11 16:31 KeyFileExt
-rw-r--r-- 1 root root   11 Sep 11 16:30 ThisCell
-rw-r--r-- 1 root root    6 Sep 11 16:31 UserList
-rw-r--r-- 1 root root   23 Sep 11 17:35 krb.conf
-rw--- 1 root root   88 Sep 16 16:47 rxkad.keytab

 cp -p KeyFile KeyFile.save

 hexdump -C KeyFileExt

  00 00 00 00 ||

0004

# /usr/afs/bin/akeyconvert
Wrote 1 keys
# ls -la
total 40
drwxr-xr-x 2 root root 4096 Sep 16 17:00 .
drwxr-xr-x 6 root root 4096 Sep 11 16:12 ..
-rw-r--r-- 1 root root   60 Sep 16 17:02 CellServDB
-rw--- 1 root root   16 Sep 16 17:02 KeyFile
-rw--- 1 root root   16 Sep 11 16:31 KeyFile.save
-rw--- 1 root root   56 Sep 16 17:02 KeyFileExt
    ##
-rw-r--r-- 1 root root   11 Sep 11 16:30 ThisCell
-rw-r--r-- 1 root root    6 Sep 11 16:31 UserList
-rw-r--r-- 1 root root   23 Sep 11 17:35 krb.conf
-rw--- 1 root root   88 Sep 16 16:47 rxkad.keytab

# umount /afs ; /usr/vice/etc/afsd -shutdown ; rmmod libafs
# killproc -y /bosserver

# --
# /usr/afs/bin/bosserver
# /root/startafsd
# kinit admin
# aklog -d -setpag
# touch /afs/.$cell/XXX   ## if this works , all is done
# klist -fe
#  you should not see anything with 'des' , only AES***

Now you should be done.


Jeffrey is right advising to rekey, see below.

My earlier mail about gssklog: it could circumvent an outage because of 
newer KRB5 distros,


but also uses DES and does not help the security concerns with it.

My above notices might be helpful insofar the 'akeyconvert' as a needed 
afterburner is set in place.


Best regards

Rainer


On 2020-09-15 19:33, Jeffrey E Altman wrote:

Hi Rainer,

The DES only limitatJeffreyion of the afs/cell@REALM service principal was
removed in the 2013 release of OpenAFS 1.4.15 and 1.6.5.  Since those
releases neither the server ticket key nor the session key are
restricted to the des-cbc-crc encryption type.  All cells should be
upgraded to current versions of OpenAFS on the servers and should rekey
the afs/cell@REALM service principal with the aes256-cts-hmac-sha1-96
encryption type.

This includes cells that have deployed gssklogd.  If the KeyFile
contains a des-cbc-crc key, the cell is vulnerable to the Brute Force
Attacks described by

   http://www.openafs.org/pages/security/OPENAFS-SA-2013-003.txt

Changing the service principal encryption type protects against this
brute force attack.  However, it is important to note that even when an
aes256-cts-hmac-sha1-96 session key is negotiated, the OpenAFS client
and server will derive from that key a 56-bit key to use for the fcrypt
encryption type used by rxkad for wire security.

Jeffrey Altman

On 9/15/2020 12:32 PM, r. l. (rainer.laat...@t-online.de) wrote:

The simplest solution: use  gssklog  of D.E.Engert.  The token then
comes from an AFS vlservers KeyFile

and not from an entry afs/**@*** in some krb5kdc. Just run some gssklogd
and switch from aklog to

gssklog in your profiles. Some times ago, even CERN.ch used it.

The original tarfile can still be found at

   http://www.hep.man.ac.uk/u/masj/gssklog/

or try my updated version at

   http://95.217.219.185/ContribAFS/Gssklog-0.11.tar

The binaries were done on ScientificLinux-6.10 with a newer KRB5 in
/opt/krb5/

and a static compilation of openafs (had to fix hcrypto and roken libs
there)


Best regards

R. Laatsch








=

On 2020-09-14 10:32, ProbaNet SRLS wrote:

Hello!

  Recent releases of krb5 (> 1.18) no longer support single des
encryption (the "allow_weak_crypto = yes" option in krb5.conf client
side has no longer effect), so now we get this error with "aklog -d":

---

Kerberos error code returned by get_cred : -1765328370
aklog: Couldn't get X AFS tickets:
aklog: KDC has no support for encryption type while getting AFS tickets

---

How should we proceed?


Stefano

___
OpenAFS-info mailing list
OpenAFS-info@openafs.org
https://lists.openafs.org/mailman/listinfo/openafs-info

___
OpenAFS-info mailing list
OpenAFS-info@openafs.org

Re: [OpenAFS] Migrating away from single DES

2020-09-15 Thread Jeffrey E Altman
Hi Rainer,

The DES only limitation of the afs/cell@REALM service principal was
removed in the 2013 release of OpenAFS 1.4.15 and 1.6.5.  Since those
releases neither the server ticket key nor the session key are
restricted to the des-cbc-crc encryption type.  All cells should be
upgraded to current versions of OpenAFS on the servers and should rekey
the afs/cell@REALM service principal with the aes256-cts-hmac-sha1-96
encryption type.

This includes cells that have deployed gssklogd.  If the KeyFile
contains a des-cbc-crc key, the cell is vulnerable to the Brute Force
Attacks described by

  http://www.openafs.org/pages/security/OPENAFS-SA-2013-003.txt

Changing the service principal encryption type protects against this
brute force attack.  However, it is important to note that even when an
aes256-cts-hmac-sha1-96 session key is negotiated, the OpenAFS client
and server will derive from that key a 56-bit key to use for the fcrypt
encryption type used by rxkad for wire security.

Jeffrey Altman

On 9/15/2020 12:32 PM, r. l. (rainer.laat...@t-online.de) wrote:
> The simplest solution: use  gssklog  of D.E.Engert.  The token then
> comes from an AFS vlservers KeyFile
> 
> and not from an entry afs/**@*** in some krb5kdc. Just run some gssklogd
> and switch from aklog to
> 
> gssklog in your profiles. Some times ago, even CERN.ch used it.
> 
> The original tarfile can still be found at
> 
>   http://www.hep.man.ac.uk/u/masj/gssklog/
> 
> or try my updated version at
> 
>   http://95.217.219.185/ContribAFS/Gssklog-0.11.tar
> 
> The binaries were done on ScientificLinux-6.10 with a newer KRB5 in
> /opt/krb5/
> 
> and a static compilation of openafs (had to fix hcrypto and roken libs
> there)
> 
> 
> Best regards
> 
> R. Laatsch
> 
> 
> 
> 
> 
> 
> 
> 
> =
> 
> On 2020-09-14 10:32, ProbaNet SRLS wrote:
>> Hello!
>>
>>  Recent releases of krb5 (> 1.18) no longer support single des
>> encryption (the "allow_weak_crypto = yes" option in krb5.conf client
>> side has no longer effect), so now we get this error with "aklog -d":
>>
>> ---
>>
>> Kerberos error code returned by get_cred : -1765328370
>> aklog: Couldn't get X AFS tickets:
>> aklog: KDC has no support for encryption type while getting AFS tickets
>>
>> ---
>>
>> How should we proceed?
>>
>>
>> Stefano
>>
>> ___
>> OpenAFS-info mailing list
>> OpenAFS-info@openafs.org
>> https://lists.openafs.org/mailman/listinfo/openafs-info
> ___
> OpenAFS-info mailing list
> OpenAFS-info@openafs.org
> https://lists.openafs.org/mailman/listinfo/openafs-info
<>

smime.p7s
Description: S/MIME Cryptographic Signature


Re: [OpenAFS] Migrating away from single DES

2020-09-15 Thread r. l.
The simplest solution: use  gssklog  of D.E.Engert.  The token then 
comes from an AFS vlservers KeyFile


and not from an entry afs/**@*** in some krb5kdc. Just run some gssklogd 
and switch from aklog to


gssklog in your profiles. Some times ago, even CERN.ch used it.

The original tarfile can still be found at

  http://www.hep.man.ac.uk/u/masj/gssklog/

or try my updated version at

  http://95.217.219.185/ContribAFS/Gssklog-0.11.tar

The binaries were done on ScientificLinux-6.10 with a newer KRB5 in 
/opt/krb5/


and a static compilation of openafs (had to fix hcrypto and roken libs 
there)



Best regards

R. Laatsch








=

On 2020-09-14 10:32, ProbaNet SRLS wrote:

Hello!

     Recent releases of krb5 (> 1.18) no longer support single des
encryption (the "allow_weak_crypto = yes" option in krb5.conf client
side has no longer effect), so now we get this error with "aklog -d":

---

Kerberos error code returned by get_cred : -1765328370
aklog: Couldn't get X AFS tickets:
aklog: KDC has no support for encryption type while getting AFS tickets

---

How should we proceed?


Stefano

___
OpenAFS-info mailing list
OpenAFS-info@openafs.org
https://lists.openafs.org/mailman/listinfo/openafs-info

___
OpenAFS-info mailing list
OpenAFS-info@openafs.org
https://lists.openafs.org/mailman/listinfo/openafs-info


Re: [OpenAFS] Migrating away from single DES

2020-09-14 Thread ProbaNet SRLS
Il 14/09/20 12:11, Andreas Ladanyi ha scritto:
> Rekey your AFS Server(s).
> Have a look at this document:
> https://www.openafs.org/pages/security/how-to-rekey.txt
> An interesting discussion about "how-to-rekey.txt":
> https://openafs-info.openafs.narkive.com/PVFdhGZD/afs-principal-rekeying-instructions-may-be-incomplete
>


Thank you, I'll take a read!


Stefano


>
> Am 14.09.20 um 10:32 schrieb ProbaNet SRLS:
>> Hello!
>>
>>  Recent releases of krb5 (> 1.18) no longer support single des
>> encryption (the "allow_weak_crypto = yes" option in krb5.conf client
>> side has no longer effect), so now we get this error with "aklog -d":
>>
>> ---
>>
>> Kerberos error code returned by get_cred : -1765328370
>> aklog: Couldn't get X AFS tickets:
>> aklog: KDC has no support for encryption type while getting AFS tickets
>>
>> ---
>>
>> How should we proceed?
>>
>>
>> Stefano
>>
>> __

-- 





ProbaNet s.r.l.s.

p.i. - c.f. 02453890200

tel. +39.333.9897553

fax. +39.0376.1850161 - email i...@probanet.it 

via Brusca, 12, 46030 Bigarello (MN)




Re: [OpenAFS] Migrating away from single DES

2020-09-14 Thread Andreas Ladanyi

Hi Stefano,

Rekey your AFS Server(s).

Have a look at this document:

https://www.openafs.org/pages/security/how-to-rekey.txt

An interesting discussion about "how-to-rekey.txt":

https://openafs-info.openafs.narkive.com/PVFdhGZD/afs-principal-rekeying-instructions-may-be-incomplete 



regards,

Andreas

Am 14.09.20 um 10:32 schrieb ProbaNet SRLS:

Hello!

     Recent releases of krb5 (> 1.18) no longer support single des
encryption (the "allow_weak_crypto = yes" option in krb5.conf client
side has no longer effect), so now we get this error with "aklog -d":

---

Kerberos error code returned by get_cred : -1765328370
aklog: Couldn't get X AFS tickets:
aklog: KDC has no support for encryption type while getting AFS tickets

---

How should we proceed?


Stefano

___
OpenAFS-info mailing list
OpenAFS-info@openafs.org
https://lists.openafs.org/mailman/listinfo/openafs-info

___
OpenAFS-info mailing list
OpenAFS-info@openafs.org
https://lists.openafs.org/mailman/listinfo/openafs-info