ArticlePDF Available

Hijacking AFS

Authors:

Abstract

We have identified several techniques that allow uncontrolled access to files managed by AFS 3.0. One method relies on administrative (or root) access to a user's workstation. Defending against this sort of attack is very difficult. Another class of attacks comes from promiscuous access to the physical network. Stronger cryptographic protocols, such as those employed by AFS 3.1, obviate this problem. These exercises help us understand vulnerabilities in the distributed systems that we employ (and deploy), and offer guidelines for securing them. 1. Introduction At the Center for Information Technology Integration, we are concerned with building large-scale, multi-protocol, multi-vendor systems. Typical of many academic computing environments, the University of Michigan is "growing " such a system. While this growth is largely from the bottom-up, we identified at an early date some of the major building blocks that are likely to prevail in the near- and intermediate-term: Macs, PCs, UN...
-- --
CITI Technical Report 914
Hijacking AFS
P. Honeyman
honey@citi.umich.edu
L.B. Huston
lhuston@citi.umich.edu
M.T. Stolarchuk
mts@citi.umich.edu
ABSTRACT
We have identified several techniques that allow uncontrolled access to files managed by
AFS 3.0. One method relies on administrative (or root) access to a user’s workstation.
Defending against this sort of attack is very difficult. Another class of attacks comes
from promiscuous access to the physical network. Stronger cryptographic protocols,
such as those employed by AFS 3.1, obviate this problem. These exercises help us
understand vulnerabilities in the distributed systems that we employ (and deploy), and
offer guidelines for securing them.
August 28, 1991
-- --
Hijacking AFS
P. Honeyman
honey@citi.umich.edu
L.B. Huston
lhuston@citi.umich.edu
M.T. Stolarchuk
mts@citi.umich.edu
Introduction
At the Center for Information Technology
Integration, we are concerned with building
large-scale, multi-protocol, multi-vendor systems.
Typical of many academic computing environ-
ments, the University of Michigan is ‘‘growing’’
such a system. While this growth is largely from
the bottom-up, we identified at an early date some
of the major building blocks that are likely to pre-
vail in the near- and intermediate-term future:
Macs, PCs, UNIX systems, Kerberos [1], X [2],
AFS [3], and NFS [4]. Unfortunately, our vision
sometimes blurs when the security aspects of the
system are scrutinized.
The security architecture of several widely used
network-based components has come into ques-
tion in recent years, see e.g., [5, 6,7,8] (but see
also [9]). While users’ privacy concerns usually
center on their files, they may also wish to protect
their screen contents, keystrokes, or network
traffic from being seen. We cover this ground in
more detail in a recent report [10], where we
emphasize the importance of access control in a
distributed file system.
Because many components of a distributed sys-
tem rely on the file system, they can be no more
trustworthy than the file system. Consequently,
we study our file systems closely, with an eye to
identifying vulnerabilities in their access control
mechanisms.
In the next section, we describe several tech-
niques to sidestep the access control mechanisms
in AFS 3.0. We have validated these techniques
by building working programs. In the remainder
of the paper, we describe the changes in AFS 3.1
that prevent these and other sorts of attacks, and
discuss some of the lessons we learned along the
way.
Hijacking Rx connections
AFS 3.0 uses a remote procedure call package
called Rx for communication between file servers
and client cache managers [11]. Rx is
connection-oriented; i.e., before a server and a
cache manager can do any real work, they must
verify their identities to one another, agree to
communicate, and generally shake hands. Rx
allows the use of different security objects in
communications. A security object is a data type
that provides procedures useful to services built
on Rx, detailed in Table 1.
Operation Description
Close Discard security object.
NewConn (Re)create a connection.
DestroyConn Destroy a connection.
PreparePacket Encode packet.
CheckPacket Decode packet.
CheckAuth Check whether a connection au-
thenticated properly. Server
only.
CreateChallenge Select a nonce. Server only.
GetChallenge Wrap the nonce in a challenge
packet. Server only.
GetResponse Respond to a challenge. Client
only.
CheckResponse Process a response to a challenge.
Server only.
Table 1
The security object employed by AFS 3.0 does
not use the full power of the security class. When
a connection is established, Rx goes to lengths to
authenticate identities securely, relying on the
- 1 -
-- --
Honeyman/Huston/Stolarchuk
ticket granting capabilities of Kerberos. These
tickets contain secret passwords that the server
and client use to vouch their identities. But after
connection establishment, communications take
place without additional cryptographic
verification.1
At CITI, we are playing with ways to hijack Rx
connections, validating our concern about the
overall trustworthiness of our computing environ-
ment. We have uncovered two schemes. One
involves stealing tickets from a user’s worksta-
tion. (We’ll call the person stealing the tickets
the bad guy, and the user the victim.) The other
can be accomplished surreptitiously, from a
workstation on any physical network between the
victim’s workstation and the file server. In this
latter scheme, the bad guy writes raw IP packets
on an Ethernet (or similar medium), masquerad-
ing as the victim.
From the victim’s workstation
Unlike standard UNIX† file systems, the adminis-
trative account, called root, has no special
privileges in AFS. On the contrary, root usually
has fewer privileges than an authenticated user.
However, becoming root on a user’s workstation
while she is logged in offers ways to gain access
to the user’s files, even those stored in AFS.
Many easy attacks are possible from the adminis-
trative account, such as modifying local binaries,
reading or modifying the contents of the AFS disk
cache, etc. It is not within the scope of AFS to
prevent access to resources maintained on client
machines. The attack described below uses root
to gain access to the memory devices
/dev/mem,/dev/kmem). Obviously root is
not required — any technique that allows access
to the physical memory of the machine suffices.
By rooting around in UNIX kernel memory,
enough information can be gleaned to create new,
authenticated Rx connections in the name of the
unsuspecting victim. We do this at the user pro-
cess level, without using any AFS kernel services
to reach the remote file server. We can then
traverse the AFS file system hierarchy, inspecting
and modifying files with abandon.
Our goal is to read or write an AFS file to which
1Rx can use other authentication policies, but the
only ones implemented in AFS 3.0 are the one we
describe here, and the ‘‘unauthenticated’’ policy.
† UNIX is a Trademark of AT&T Bell Labora-
tories.
access would ordinarily be denied. To accom-
plish this, we need three pieces of information:
the internal AFS name for the file, called a FID;
the address of the file server that can service our
data access request; and a Kerberos ticket for
mutual authentication with that file server.
There are several ways to determine the FID for
an AFS file. The one we use opens the file and
examines the in-kernel vnode for the file; the
vnode contains the FID.
From the FID, we glean the file’s parent cell and
its volume [12]. Traversing the afs_volumes
table in the kernel gives us the address of the
server for that volume.
Now that we know the identity of the server that
can do our work, all we need to finish the job are
the Kerberos credentials of an authenticated user
who has the proper access rights to the file.2With
this, we create an authenticated connection to the
server, along which we can pass our FETCH-
DATA request. Conveniently, AFS maintains the
afs_users table in kernel memory, indexed by
cell and user id. This table has a pointer to the
victim’s Kerberos ticket, which we use to create
an authenticated connection of our own.
Liberal use of AFS support libraries simplifies the
task. We leave as an exercise the details of how
to access the file if we do not have permission to
open it. The essential point is that we can start
from the root of a cell, issuing authenticated
directory lookups to find the FID.
From the victim’s network
A trickier way to arrogate uncontrolled access is
to snoop on an Ethernet, waiting for an AFS
request packet along an authenticated connection.
By running the Ethernet interface in promiscuous
mode, a single machine can monitor the authenti-
cation protocol between other clients and servers.
The bad guy can then hijack this authenticated
connection and use it for his own purposes.
This attack is possible on any network where
eavesdropping is possible. The bad guy does not
have to be on the same subnet as the client — as
long as the bad guy has promiscuous access to a
physical network between the victim and the file
server, he can monitor the protocol.
Prying open the Rx packets, we copy the IP,
2We have elided some of the complexity from this
description, e.g., pretending to have a callback ser-
vice available.
- 2 -
-- --
Hijacking AFS
UDP, and Rx information into a packet of our
own manufacture. The trick is to alter the Rx
connection in a subtle way, so that our packets do
not interfere with those of the victim.
Rx is connection-oriented, i.e., a client and server
must shake hands before communication can take
place. It is at this point that mutual authentication
takes place. Thereafter, the connection is
assumed to be authenticated for a period of time,
during which requests are assumed to be authen-
tic. In AFS 3.0, the connection is good for up to a
day or so, although the server may clean up (or
reap) idle connections at any time.
By reading and writing raw packets from the phy-
sical network, the bad guy can ‘‘borrow’’ authen-
ticated connections, inspecting communication
between the victim and the server, and issue IP
packets to the server that appear to originate from
the victim. Through this misrepresentation, the
bad guy can convince the server that it is acting
on behalf of an authentic request from the victim.
Rx is a windowing protocol, which presents cer-
tain subtleties. Both client and server keep track
of the highest call number used to completion.
Any call number less than this is discarded as a
straggler. Straightforward use of the victim’s
connection may cause the server to discard the
victim’s later, valid requests, possibly exposing
the bad guy. Fortunately, Rx offers an easy solu-
tion to this dilemma with channels, which allow
multiple simultaneous calls to share the same
authentication information.
0 Epoch
4 Connection ID
8 Call
12 Sequence
16 Serial
20 Type Flags Status Security
24 Service ID Reserved
Figure 1
An Rx header, depicted in Figure 1, is 28 bytes.
The two-bit field marked specifies the Chan-
nel ID.
Rx supports up to four channels per connection.
When a remote procedure call is made, the Rx
client uses the lowest channel with no calls out-
standing. Most calls take place on channel zero,
but channels one, two, and three may also be
used. It is very rare for channel three to be used,
although we have seen it happen.
Using connection and channel identification
information that we snoop off the network, we
employ channel three to do our work. The beauty
of this scheme is that the victim’s Rx connection
silently discards the responses to our bogus
requests, so the subterfuge is completely invisible
to the victim!
A challenge/response oracle
As an alternative to passively borrowing an exist-
ing connection, we have devised a more proactive
method to create an authenticated connection.
Our scheme requires the momentary assistance of
an already authenticated cache manager to act as
an ‘‘oracle.’’
To explain this scheme, we first describe in more
detail the mechanism by which a cache manager
authenticates itself with a file server. Whenever a
file system request is received by a server, it
checks to see whether the request is associated
with an authenticated connection. If so, the
request is serviced with the cached credentials
associated with the connection. Otherwise, the
server issues a ‘‘challenge’’ to the cache manager
that made the request. A cache manager is
prepared to accept a challenge at any time. This
allows the server to reap old connection state
without explicitly tearing down the connection.
A challenge packet consists principally of a 32-bit
nonce identifier. Using the procedures described
in Table 1, a challenge packet is sent to a client.
The client increments the nonce, seals the
response with the session key in the Kerberos
ticket, and returns the result to the challenger.
The oracle subterfuge takes advantage of a
client’s willingness to repond to a challenge at
any time, and the lack of any connection specific
information in the response. The bad guy creates
a file server connection by issuing a request to the
server, e.g., with a fetch or store request. The
server sees this as a new, unauthenticated connec-
tion and issues the bad guy a challenge packet.
Now the dirty work. The bad guy takes this chal-
lenge packet and changes the Rx header to make
the packet appear to be a challenge to an existing
Rx connection on the victim’s machine. The bad
guy then sends this request to the victim’s
machine as though it were from the file server.
The forwarded request is processed by the
victim’s unsuspecting cache manager, which
prepares and sends a response. Although this
response is seen by the file server, it is quickly
discarded because a response packet on this
- 3 -
-- --
Honeyman/Huston/Stolarchuk
connection is not pending.
Now the bad guy, who was listening for the
response, modifies the Rx header to make it
correspond to the challenge that is pending. By
sending it to the server, the bad guy is rewarded
with an authenticated connection that can be used
for a lengthy period. Neither the server nor the
victim is aware that she has been had!
Changes in AFS 3.1
The latest version of AFS from Transarc, AFS
3.1, addresses these crucial security issues. In
particular, Rx now includes an encrypted verifier
on every packet exchanged between a client and a
server. This verifier is built by smashing together
the connection ID,
the call number,
the channel number,
the security index,
the packet sequence number, and
the session key
for the connection. The packet sequence number
is included to assure that the verifier changes on
every packet. The call, channel, and connection
ID insulate the connection from replay attacks.
These values are combined with the per-
connection session key to obscure the contents,
because they appear in cleartext in the Rx header.
The resulting 64-bit word is encrypted under the
session key. If the session key is distributed to
the client and server securely, its use ensures that
only the client and server can construct a proper
verifier. Finally, a 16-bit chunk of the resulting
64-bit word is included as the packet header
verifier. Although such a small verifier is suscep-
tible to exhaustive search attack, if the server is
ever presented with an invalid verifier, it instructs
the client to abort the connection.
With these changes to the Rx security object, the
network-based attacks described here no longer
function. We are unable to bypass the access
control protections in AFS 3.1.
Discussion
In penetrating our file servers, we have
discovered (or rediscovered) important lessons
and useful techniques for securing our computing
environment.
In a typical university computing site that enjoys
public access with minimal supervision, we can
not assume trusted kernels or utilities on worksta-
tions, and must view them as pawns continually
under attack. What we really need is a way to
‘‘scrub,’’ or initialize a workstation to a known
state in a secure way whenever a new user wants
to login. But our scrub procedure is not secure,
and in any event takes too long.
Although still subject to a Trojan horse attack
[13], the environment would be somewhat more
secure by prohibiting simultaneous use of a
workstation by more than one user, as in Project
Athena [14].
The guarantees offered by the security object in
AFS 3.0 are fatally weakened by the absence of
an encrypted verifier in every packet. AFS 3.1,
based on an extensively modified version of Rx,
obviates the network and oracle attacks. In addi-
tion, Transarc identified other security protocol
issues, ones that escaped our attention, and
modified the protocol to deal with them as well.
Of course, it must be kept in mind that passive
snooping on an Ethernet offers many opportuni-
ties to attack insecure systems; cleartext pass-
words regularly appear on our local Ethernet,
especially those of our system administrators. In
the intermediate term, the University’s strategic
direction is toward network technologies that do
not admit promiscuous access, such as twisted
pair Ethernet.
Acknowledgements
Dave Bachmann and Bob Braden helped track
down much useful information in mailing list
archives.
This work was partially funded by the IBM Cor-
poration.
References
1. J. G. Steiner, B. C. Neuman, and J. I. Schiller,
‘‘Kerberos: An Authentication Service for
Open Network Systems,’’ pp. 191-202 in
Usenix Conference Proceedings, Dallas,
Texas (February, 1988).
2. R.W. Scheifler and J. Gettys, ‘‘The X Win-
dow System,’’ ACM Transactions on Graph-
ics 5(2), pp. 79109 (April, 1987).
3. J.H. Howard, ‘‘An Overview of the Andrew
File System,’’ pp. 2326 in Winter 1988
- 4 -
-- --
Hijacking AFS
USENIX Conference Proceedings, Dallas
(February, 1988).
4. D. Walsh, B. Lyon, G. Sager, J.M. Chang, D.
Goldberg, S. Kleiman, T. Lyon, R. Sandberg,
and P. Weiss, ‘‘Overview of the Sun Network
Filesystem,’’ Winter Usenix Conference
Proceedings, Dallas (1985).
5. R.T. Morris, ‘‘A Weakness in the 4.2BSD
UNIX TCP/IP Software,’’ Computer Science
Technical Report No. 117, AT&T Bell Labs,
Murray Hill (1985).
6. W.E. Sommerfeld, ‘‘Re: Ethernet Bridge
(really: NFS ‘security’),’’ Message
1761@bloom-beacon.MIT.EDU, TCP-IP
mailing list (November, 1987).
7. S.M. Bellovin, ‘‘Security Problems in the
TCP/IP Protocol Suite,’’ Computer Communi-
cation Review 19(2), pp. 3248, ACM
SIGCOMM (April, 1989).
8. S.M. Bellovin and M. Merritt, ‘‘Limitations
of the Kerberos Authentication System,’’
Computer Communication Review 20(5),
pp. 119132 (October, 1990).
9. Stephen T. Kent, ‘‘Comments on ‘Security
Problems in the TCP/IP Protocol Suite’,’’
Computer Communication Review 19(3),
pp. 1019 (July, 1989).
10. C.J. Antonelli, W.A. Doster, and P. Honey-
man, ‘‘Access Control in a Workstation-based
Distributed Computing Environment,’’ Proc.
of the IEEE Workshop on Experimental Dis-
tributed Systems, Huntsville, pp. 1319, also
available as CITI Technical Report 90-2
(October, 1990).
11. R.N. Sidebotham, ‘‘Rx: Extended Remote
Procedure Call,’’ in Proceedings of the
Nationwide File System Workshop, Informa-
tion Technology Center, Carnegie Mellon
University, Pittsburgh (August, 1988).
12. R.N. Sidebotham, ‘‘Volumes: The Andrew
File System Data Structuring Primitive,’’
European Unix User Group Conf. Proc., also
available as Technical Report CMU-ITC-053,
Information Technology Center, Carnegie
Mellon University (August, 1986).
13. K. Thompson, ‘‘Reflections on Trusting
Trust,’’ Communications of the ACM 27(8),
pp. 761763 (August, 1984).
14. E. Balkovich, S.R. Lerman, and R.P. Par-
melle, ‘‘Computing in Higher Education: The
Athena Experience,’’ Communications of the
ACM 28(11), pp. 12141224 (November,
1985).
- 5 -
-- --
ResearchGate has not been able to resolve any citations for this publication.
Conference Paper
Full-text available
The Kerberos authentication system, a part of MIT's Project Athena, has been adopted by other organizations. Despite Kerberos's many strengths, it has a number of limitations and some weaknesses. Some are due to specifics of the MIT environment; others represent deficiencies in the protocol design. We discuss a number of such problems, and present solutions to some of them. We also demonstrate how special-purpose cryptographic hardware may be needed in some cases.
Article
The 4.2 Berkeley Software Distribution of the Unix operating system (4.2BSD for short) features an extensive body of software based on the "TCP/IP" family of protocols. In particular, each 4.2BSD system "trusts" some set of other systems, allowing users logged into trusted systems to execute commands via a TCP/IP network without supply-ing a password. These notes describe how the design of TCP/IP and the 4.2BSD imple-mentation allow users on untrusted and possibly very distant hosts to masquerade as users on trusted hosts. Bell Labs has a growing TCP/IP network connecting machines with varying security needs; perhaps steps should be taken to reduce their vulnerability to each other.
Article
In the April issue of Computer Communication Review, S. M. Bellovin described attacks on protocols in the TCP/IP suite [1]. He stated that the attacks were "inherent in the protocols, regardless of the correctness of any implementations." His article proposed specific defenses against these attacks and discussed more comprehensive defenses. This note attempts to place in perspective some of the concerns cited by Bellovin and to correct some errors present in his article, especially in his discussion of comprehensive defenses.
Conference Paper
In an open network computing environment, a workstation cannot be trusted to identify its users correctly to network services. Kerberos provides an alternative approach whereby a trusted third-party authentication service is used to verify users' identities. This paper gives an overview of the Kerberos authentication model as imple- mented for MIT's Project Athena. It describes the protocols used by clients, servers, and Kerberos to achieve authentication. It also describes the management and replication of the database required. The views of Kerberos as seen by the user, programmer, and administrator are described. Finally, the role of Kerberos in the larger Athena picture is given, along with a list of applications that presently use Kerberos for user authentica- tion. We describe the addition of Kerberos authentication to the Sun Network File Sys- tem as a case study for integrating Kerberos with an existing application.
Conference Paper
Andrew is a distributed computing environment being developed in a joint pro- ject by Carnegie Mellon University and IBM. One of the major components of Andrew is a distributed file system. The goal of the Andrew File System is to support growth up to at least 7000 workstations (one for each student, faculty member, and staff at Carnegie Mellon) while providing users, application programs, and system administrators with the amenities of a shared file system. This overview describes the environment, design, and features of the file system, and ends with a summary of how it "feels" to end users and to system administrators.
Article
To what extent should one trust a statement that a program is free of Trojan horses? Perhaps it is more important to trust the people who wrote the software.
Article
The X Window System -- has become widely accepted by many manufacturers. X provides network transparent access to display servers, allowing local and remote client programs to access a user's display. X is used on high performance workstation displays as well as terminals, and client programs run on everything from micro to super computers. This paper describes the tradeoffs and basic design decisions made during the design of X Version 11. We presume familiarity with the paper describing X Version 10. Keywords: X Window System, interactive human-computer interface system, distributed systems. c flDigital Equipment Corporation and Silicon Graphics Computer Systems 1990. All rights reserved. -- The X Window System is a Massachusetts Institute of Technology trademark. This paper will appear in a special issue of Software Practice and Experience. y Digital Equipment Corporation, Cambridge Research Lab, One Kendall Square, Bldg. 700, Cambridge, MA 02139, U.S.A. jg@crl.de...
Article
In this article the use of computation in higher education is approached from the broad sense of its actual use in the curriculum. The authors try to identify areas where current educational methods have observable deficiencies that might be alleviated by the use of appropriate software/hardware combinations. Project ATHENA at MIT is the example the article is based on
Conference Paper
About fifteen years ago, I wrote a paper on security problems in the TCP/IP protocol suite, In particular, I focused on protocol-level issues, rather than implementation flaws. It is instructive to look back at that paper, to see where my focus and my predictions were accurate, where I was wrong, and where dangers have yet to happen. This is a reprint of the original paper, with added commentary.