oss-sec mailing list archives

Re: Security risk of vim swap files


From: "Simon Waters (Surevine)" <simon.waters () surevine com>
Date: Tue, 31 Oct 2017 14:46:59 +0000



On 31 Oct 2017, at 12:23, Hanno Böck <hanno () hboeck de> wrote:

I was wondering how to best avoid this on my own servers and I first
thought about saving the swap files to tmp ( with "set directory”).

The specific website issue, the web server config can exclude dot files.

Apache ships with

<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
</Files>

The obvious generalisations of this work. Although some sources also recommend blocking in “Location” to prevent 
requests with “*/.*stuff”  which are parsed by templating libraries or other directives.

To rub salt in most distros ship Apache with

IndexIgnore .??* *~ *# RCS CVS *,v *,t

Which means that if you use the Apache directory indexing approach these files will be hidden but not blocked.

I now realise the Alexa top 1 million will now be searched for remaining uses of RCS and CVS ;)

In a previous role the roll out scripts cleaned this sort of junk and told you if any new files had been added to the 
web application, this approach has much to recommend it if you have the time to perfect your applications, and your 
roll out procedures.

Attachment: signature.asc
Description: Message signed with OpenPGP


Current thread: