TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

MacOS X 10.10 and FreeBSD 10 Ftp Remote Comand Execution

113 pointsby thefreemanover 10 years ago

6 comments

astrangeover 10 years ago
An entirely different RCE in wget today:<p><a href="https:&#x2F;&#x2F;community.rapid7.com&#x2F;community&#x2F;metasploit&#x2F;blog&#x2F;2014&#x2F;10&#x2F;28&#x2F;r7-2014-15-gnu-wget-ftp-symlink-arbitrary-filesystem-access" rel="nofollow">https:&#x2F;&#x2F;community.rapid7.com&#x2F;community&#x2F;metasploit&#x2F;blog&#x2F;2014&#x2F;...</a>
评论 #8529294 未加载
lelfover 10 years ago
Note that it’s in the ftp <i>client</i>.
评论 #8525295 未加载
fyolnishover 10 years ago
What possible reason could the authors have had to pass everything following a pipe into popen? Did they think they were writing a shell?
评论 #8525380 未加载
评论 #8525226 未加载
评论 #8527098 未加载
marcopolisover 10 years ago
Interestingly, Windows&#x27; ftp.exe is BSD-derived also:<p><a href="http:&#x2F;&#x2F;everything2.com&#x2F;title&#x2F;BSD+Code+in+Windows" rel="nofollow">http:&#x2F;&#x2F;everything2.com&#x2F;title&#x2F;BSD+Code+in+Windows</a>
评论 #8525998 未加载
101914over 10 years ago
This ftp is otherwise known as tnftp and originates with NetBSD.<p>It is part of their base install and is the only ftp&#x2F;http client installed by default. It is the default client for installing packages.<p>Aside from the popen feature (-o&quot;|utility&quot; pipes output to utility), getting this program to segfault is quite easy. If you are concerned about security I would seek a workaround that you trust.<p>tnftp does not link to libfetch, but on NetBSD libfetch is still present (why? I am not sure), so a user could install fetch(1), the default ftp&#x2F;http client from FreeBSD, which is available as a package, and it will work &quot;out of the box&quot;. FreeBSD&#x27;s fetch(1) does link to libfetch.<p>There is also example code for a libfetch-linked client in the NetBSD source tree.<p>Whether the fetch(1) client has security issues of it own, I do not know, but at least it does not implement the popen feature.
_b8r0over 10 years ago
The exploit mechanism is a bit dodgy in TFA, so I wrote a proof of concept exploit using python for testing systems[1].<p>[1] - <a href="http://lab.dreamcats.org/ftp_exp.py" rel="nofollow">http:&#x2F;&#x2F;lab.dreamcats.org&#x2F;ftp_exp.py</a>