summaryrefslogtreecommitdiff
path: root/usr.sbin/named/doc/rfc/rfc1535
blob: 03bddeebedcb90ceeba54f96cb59a9f3d6c3504f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283






Network Working Group                                          E. Gavron
Request for Comments: 1535                            ACES Research Inc.
Category: Informational                                     October 1993


              A Security Problem and Proposed Correction
                   With Widely Deployed DNS Software

Status of this Memo

   This memo provides information for the Internet community.  It does
   not specify an Internet standard.  Distribution of this memo is
   unlimited.

Abstract

   This document discusses a flaw in some of the currently distributed
   name resolver clients.  The flaw exposes a security weakness related
   to the search heuristic invoked by these same resolvers when users
   provide a partial domain name, and which is easy to exploit (although
   not by the masses).  This document points out the flaw, a case in
   point, and a solution.

Background

   Current Domain Name Server clients are designed to ease the burden of
   remembering IP dotted quad addresses.  As such they translate human-
   readable names into addresses and other resource records.  Part of
   the translation process includes understanding and dealing with
   hostnames that are not fully qualified domain names (FQDNs).

   An absolute "rooted" FQDN is of the format {name}{.} A non "rooted"
   domain name is of the format {name}

   A domain name may have many parts and typically these include the
   host, domain, and type.  Example:  foobar.company.com or
   fooschool.university.edu.

Flaw

   The problem with most widely distributed resolvers based on the BSD
   BIND resolver is that they attempt to resolve a partial name by
   processing a search list of partial domains to be added to portions
   of the specified host name until a DNS record is found.  This
   "feature" is disabled by default in the official BIND 4.9.2 release.

   Example: A TELNET attempt by    User@Machine.Tech.ACES.COM
                             to    UnivHost.University.EDU



Gavron                                                          [Page 1]

RFC 1535               DNS Software Enhancements            October 1993


   The resolver client will realize that since "UnivHost.University.EDU"
   does not end with a ".", it is not an absolute "rooted" FQDN.  It
   will then try the following combinations until a resource record is
   found:

                UnivHost.University.EDU.Tech.ACES.COM.
                UnivHost.University.EDU.ACES.COM.
                UnivHost.University.EDU.COM.
                UnivHost.University.EDU.

Security Issue

   After registering the EDU.COM domain, it was discovered that an
   unliberal application of one wildcard CNAME record would cause *all*
   connects from any .COM site to any .EDU site to terminate at one
   target machine in the private edu.com sub-domain.

   Further, discussion reveals that specific hostnames registered in
   this private subdomain, or any similarly named subdomain may be used
   to spoof a host.

        Example:        harvard.edu.com.        CNAME   targethost

   Thus all connects to Harvard.edu from all .com sites would end up at
   targthost, a machine which could provide a Harvard.edu login banner.

   This is clearly unacceptable.  Further, it could only be made worse
   with domains like COM.EDU, MIL.GOV, GOV.COM, etc.

Public vs. Local Name Space Administration

   The specification of the Domain Name System and the software that
   implements it provides an undifferentiated hierarchy which permits
   delegation of administration for subordinate portions of the name
   space.  Actual administration of the name space is divided between
   "public" and "local" portions.  Public administration pertains to all
   top-level domains, such as .COM and .EDU.  For some domains, it also
   pertains to some number of sub-domain levels.  The multi-level nature
   of the public administration is most evident for top-level domains
   for countries.  For example in the Fully Qualified Domain Name,
   dbc.mtview.ca.us., the portion "mtview.ca.us" represents three levels
   of public administration.  Only the left-most portion is subject to
   local administration.








Gavron                                                          [Page 2]

RFC 1535               DNS Software Enhancements            October 1993


   The danger of the heuristic search common in current practise is that
   it it is possible to "intercept" the search by matching against an
   unintended value while walking up the search list.  While this is
   potentially dangerous at any level, it is entirely unacceptable when
   the error impacts users outside of a local administration.

   When attempting to resolve a partial domain name, DNS resolvers use
   the Domain Name of the searching host for deriving the search list.
   Existing DNS resolvers do not distinguish the portion of that name
   which is in the locally administered scope from the part that is
   publically administered.

Solution(s)

   At a minimum, DNS resolvers must honor the BOUNDARY between local and
   public administration, by limiting any search lists to locally-
   administered portions of the Domain Name space.  This requires a
   parameter which shows the scope of the name space controlled by the
   local administrator.

   This would permit progressive searches from the most qualified to
   less qualified up through the locally controlled domain, but not
   beyond.

   For example, if the local user were trying to reach:

        User@chief.admin.DESERTU.EDU from
        starburst,astro.DESERTU.EDU,

   it is reasonable to permit the user to enter just chief.admin, and
   for the search to cover:

        chief.admin.astro.DESERTU.EDU
        chief.admin.DESERTU.EDU

   but not

        chief.admin.EDU

   In this case, the value of "search" should be set to "DESERTU.EDU"
   because that's the scope of the name space controlled by the local
   DNS administrator.

   This is more than a mere optimization hack.  The local administrator
   has control over the assignment of names within the locally
   administered domain, so the administrator can make sure that
   abbreviations result in the right thing.  Outside of the local
   control, users are necessarily at risk.



Gavron                                                          [Page 3]

RFC 1535               DNS Software Enhancements            October 1993


   A more stringent mechanism is implemented in BIND 4.9.2, to respond
   to this problem:

   The DNS Name resolver clients narrows its IMPLICIT search list IF ANY
   to only try the first and the last of the examples shown.

   Any additional search alternatives must be configured into the
   resolver EXPLICITLY.

   DNS Name resolver software SHOULD NOT use implicit search lists in
   attempts to resolve partial names into absolute FQDNs other than the
   hosts's immediate parent domain.

   Resolvers which continue to use implicit search lists MUST limit
   their scope to locally administered sub-domains.

   DNS Name resolver software SHOULD NOT come pre-configured with
   explicit search lists that perpetuate this problem.

   Further, in any event where a "." exists in a specified name it
   should be assumed to be a fully qualified domain name (FQDN) and
   SHOULD be tried as a rooted name first.

   Example:  Given  user@a.b.c.d connecting to e.f.g.h  only two tries
             should be attempted as a result of using an implicit
             search list:

                e.f.g.h.  and e.f.g.h.b.c.d.

             Given user@a.b.c.d. connecting to host those same two
             tries would appear as:

                x.b.c.d.  and x.

   Some organizations make regular use of multi-part, partially
   qualified Domain Names.  For example, host foo.loc1.org.city.state.us
   might be used to making references to bar.loc2, or mumble.loc3, all
   of which refer to whatever.locN.org.city.state.us

   The stringent implicit search rules for BIND 4.9.2 will now cause
   these searches to fail.  To return the ability for them to succeed,
   configuration of the client resolvers must be changed to include an
   explicit search rule for org.city.state.us.  That is, it must contain
   an explicit rule for any -- and each -- portion of the locally-
   administered sub-domain that it wishes to have as part of the search
   list.





Gavron                                                          [Page 4]

RFC 1535               DNS Software Enhancements            October 1993


References

   [1] Mockapetris, P., "Domain Names Concepts and Facilities", STD 13,
       RFC 1034, USC/Information Sciences Institute, November 1987.

   [2] Mockapetris, P., "Domain Names Implementation and Specification",
       STD 13, RFC 1035, USC/Information Sciences Institute, November
       1987.

   [3] Partridge, C., "Mail Routing and the Domain System", STD 14, RFC
       974, CSNET CIC BBN, January 1986.

   [4] Kumar, A., Postel, J., Neuman, C., Danzig, P., and S. Miller,
       "Common DNS Implementation Errors and Suggested Fixes", RFC 1536,
       USC/Information Sciences Institute, USC, October 1993.

   [5] Beertema, P., "Common DNS Data File Configuration Errors", RFC
       1537, CWI, October 1993.

Security Considerations

   This memo indicates vulnerabilities with all too-forgiving DNS
   clients.  It points out a correction that would eliminate the future
   potential of the problem.

Author's Address

   Ehud Gavron
   ACES Research Inc.
   PO Box 14546
   Tucson, AZ 85711

   Phone: (602) 743-9841
   EMail: gavron@aces.com

















Gavron                                                          [Page 5]