<div>ha. Simple obfuscation.<br/>
<br/>
It seems like it wouldn't be too difficult to take the shared-secret, not print them into the main config, and store them in a separate file that wouldn't be svn diffed.... I think..<br/>
<br/>
<br/>
<font color="#888888"><font color="#888888">Sent from my android device.</font></font><br/><br/>-----Original Message-----<br/>From: Alex DEKKER <rancid@ale.cx><br/>To: rancid-discuss@shrubbery.net<br/>Sent: Thu, 05 Oct 2017 18:46<br/>Subject: Re: [rancid] Update configs by an external means<br/><br/></div>The encryption key for the tunnel must be encrypted with some kind of <br/>
reversible encryption [not least because you can see it unencrypted in <br/>
the web interface]. The shared-secret field is also present in lots of <br/>
places other than VPN tunnels [eg RADIUS secrets].<br/>
<br/>
I have done some testing:<br/>
- Any of the outputted versions of the shared-secret work and decrypt <br/>
back to the same shared-secret.<br/>
- Large amounts of the shared-secret are padding [to be expected really <br/>
as the plaintext shared secret is of variable length but always encodes <br/>
to the same length].<br/>
<br/>
For example, the shared-secret 'bagsworth' encrypted to:<br/>
<br/>
shared-secret <br/>
4,e903b6311e5e345e6d36a055d78ee628c21bf9176ed43d083408218d71e48e9425f69649f36783318de12f1ea0b0c90b6d623f71f17b7aade8d2570d9d14d10ea4ea5c0834f337bfb2031a84baadd3005b3808f2de576a89be1707dc9d138fbd2eb3d8785ce16259a340a87d515c678731b<a href="tel:1489409">1489409</a>b766165cdbc58dae13b104cacb2b656903c50a<br/>
<br/>
which through trial and error, could be input as:<br/>
<br/>
shared-secret <br/>
4,e903b6311e5e345e6d36a055d78ee628c21bf9176ed43d0800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000<br/>
<br/>
and still decrypt correctly. Replace the final 8 with a zero and it <br/>
decrypts as bagswort��G<lots of nonsense>.<br/>
<br/>
alexd<br/>
<br/>
On 05/10/17 16:05, Doug Hughes wrote:<br/>
><br/>
> It would be interesting to know if :<br/>
><br/>
> you can restore the shared-secret from any of the various outputed one<br/>
> you can only restore from the latest one<br/>
> you can restore without having it at all.<br/>
><br/>
> Do you have any test devices to confirm?<br/>
><br/>
> It strikes me as slightly problematic from a security perspective that <br/>
> it would be possible to restore from any of these, because it means <br/>
> that you can just keep dumping the config over and over and over again <br/>
> and get a large sampling of these encrypted strings. If they are all <br/>
> equivalent, it implies that the key space may not be sufficient since <br/>
> the more you print it, there's a lot of information leakage.<br/>
><br/>
><br/>
<br/>
_______________________________________________<br/>
Rancid-discuss mailing list<br/>
<a href="mailto:Rancid-discuss@shrubbery.net">Rancid-discuss@shrubbery.net</a><br/>
<a href="http://www.shrubbery.net/mailman/listinfo/rancid-discuss">http://www.shrubbery.net/mailman/listinfo/rancid-discuss</a>