Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/modules/auxiliary/gather/citrix_published_applications.rb
Views: 11623
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Auxiliary6include Msf::Exploit::Remote::Udp78def initialize(info = {})9super(update_info(info,10'Name' => 'Citrix MetaFrame ICA Published Applications Scanner',11'Description' => %q{12This module attempts to query Citrix Metaframe ICA server to obtain13a published list of applications.14},15'Author' => [ 'aushack' ],16'References' =>17[18[ 'URL', 'http://www.securiteam.com/exploits/5CP0B1F80S.html' ],19]20))2122register_options(23[24Opt::RPORT(1604),25])26end2728def autofilter29false30end3132def run33connect_udp3435print_status("Attempting to contact Citrix ICA service...")3637client_connect =38"\x20\x00\x01\x30\x02\xfd\xa8\xe3\x00\x00\x00\x00\x00\x00\x00\x00" +39"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"4041# Server hello response42server_response =43"\x30\x00\x02\x31\x02\xfd\xa8\xe3\x02\x00\x06\x44"4445udp_sock.put(client_connect)46res = udp_sock.get(3)4748if (res[0,server_response.length] == server_response)49print_status("Citrix MetaFrame ICA server detected. Requesting Published Applications list...")5051find_published =52"\x2a\x00\x01\x32\x02\xfd\xa8\xe3\x00\x00\x00\x00\x00\x00\x00\x00" +53"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x21\x00\x02\x00" +54"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"55server_list_pre =56"\xea\x00\x04\x33\x02\xfd\xa8\xe3\x02\x00\x06\x44\xac\x1f\x03\x1f" +57"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00" +58"\x0b\x00\x28\x00\x00\x00\x00\x00"5960udp_sock.put(find_published)61res = udp_sock.get(3)6263if (res.index(server_list_pre) == 0) # good packet, with following data64print_status("Citrix Applications Reported:\r\n" + res[server_list_pre.length,res.length].gsub("\x00","\r\n"))65end66else67print_error("Citrix did not report any Published Applications. Try the brute force module instead.")68end6970disconnect_udp71end72end737475