TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Using SVN makes your site extremely vulnerable

41 点作者 fdeth超过 15 年前

15 条评论

hassy超过 15 年前
Summary:<p>A lot of people don't use "svn export" and leave .svn directories readable to everyone.<p>The authors of the article wrote a crawler that scanned 2.2 million domains, mostly in the .ru zone, for the vulnerability over the last couple of months.<p>They got access to (parts of) the source code of over 3 thousand sites, including some big ones like:<p>* yandex.ru and rambler.ru -- Russian search engines<p>* mail.ru -- Biggest Russian email host<p>* rbk.ru -- Large online publisher<p>* 003.ru, bolero.ru -- Online retailers<p>* habrahabr.ru -- Webdev/blogging/new media community site<p>* opera.com
ionfish超过 15 年前
For your Apache config.<p><pre><code> # Disallow viewing of .svn and .git directory contents &#60;DirectoryMatch \.(svn|git)&#62; Order allow,deny Deny from all &#60;/DirectoryMatch&#62;</code></pre>
评论 #839506 未加载
评论 #839301 未加载
评论 #908473 未加载
评论 #908338 未加载
评论 #908342 未加载
axod超过 15 年前
Title is misleading and plain wrong.<p>The issue is not in "using SVN". It's in using any revision control system that has .svn .git etc directories, and accidentally making those directories world readable from a webserver.<p>User error.
cousin_it超过 15 年前
Russian speaker here, I'll translate some selected comments for your convenience.<p>harm: <i>We need more people who, upon finding a hole, go on to scan the whole Runet, for no nefarious reasons but just to warn unwitting site owners.</i><p>SilenceAndy: <i>In olden times such people were called hackers, until journalists perverted that word to mean cyber criminals.</i><p>grayhex: <i>This comment is impervious to Google Translate.</i><p>cancel: <i>Google inurl:.svn/entries, lots of interesting stuff.</i><p>Nirvanko: <i>This ain't new, see <a href="http://www.adamgotterer.com/2009/01/26/hacking-the-svn-directory/" rel="nofollow">http://www.adamgotterer.com/2009/01/26/hacking-the-svn-direc...</a> </i><p>SynteZ: <i>IIS doesn't have this vulnerability :-) By default it doesn't send files without extensions, because it doesn't know the mime type.</i><p>varyen: <i>Funny, Wii disks from SEGA also have .svn folders, though they're empty.</i><p>crazywebdev: <i>Now I know how <a href="http://vkontakte.ru" rel="nofollow">http://vkontakte.ru</a> came about.</i>
Sujan超过 15 年前
Using a working copy as your website is a pretty bad idea. That's what svn export is meant for.
评论 #839003 未加载
评论 #839309 未加载
评论 #839008 未加载
walesmd超过 15 年前
This isn't really a vulnerability - just developers not doing their job. Anyone who uses SVN (or any other version management system, for that matter) should know how it works.<p>I know SVN creates these hidden directories (named .svn) within every directory of my project that contains the working copies of the files within that directory. Therefore I either use export (to not upload the hidden folders) or I make them not accessible to the public via .htaccess.<p>Saying this is a vulnerability is like telling someone copying/pasting their code into a Pastie is a vulnerability. Common sense.
评论 #839320 未加载
InclinedPlane超过 15 年前
tl;dr Don't accidentally leave an svn working copy available to the internet, it could be a security vulnerability.
评论 #839001 未加载
评论 #839033 未加载
评论 #838990 未加载
brown9-2超过 15 年前
From the translation:<p><i>It would seem that in the XXI century is difficult to find such a vulnerability.</i><p>Do Russian speakers generally write the century in roman numerals like that? That's kind of neat..
评论 #839205 未加载
DrJokepu超过 15 年前
I'm no security expert but I'm not sure if I get it - assuming that your code is well written, how would exposing the source code and change history make it more vulnerable? By using this logic, every piece of open source software is "vulnerable". Security through obscurity is not really security.<p>I thought not checking in safety critical things such as passwords or keys into the repository tree is a standard practice. If it's not, it should be.
评论 #839055 未加载
masklinn超过 15 年前
And as usual, PHP is at the top of the game: <a href="http://fr2.php.net/.svn/entries" rel="nofollow">http://fr2.php.net/.svn/entries</a> (note: interestingly, not all subdomains are open, the us* ones aren't, the uk* ones aren't either, and fr.php.net is also closed)
fdeth超过 15 年前
Sorry for the machine translation but an English text is not up just yet.
评论 #839200 未加载
kennu超过 15 年前
Git is much nicer, because everything is in one .git directory and it can be kept outside the public webroot.
seedy超过 15 年前
We deploy like this, and it looks like I cannot get to the source files in the way described.<p>It appears that IIS is naively not serving up these file types. If I drop a plain html file in the .svn folder I can get to it, but any .svn-base file or files lacking an extension are unreachable.
AndrewDucker超过 15 年前
It's not actually clear to me what the problem is.<p>Are they saying that people can read your code (not actually a problem for open source projects) or that they can update it and thus alter your site?<p>The former doesn't seem so bad - the latter is obviously catastrophic.<p>I wish I spoke Russian...
评论 #839021 未加载
评论 #839014 未加载
bcl超过 15 年前
Well duh. You shouldn't be publishing your repository. Use svn export instead.