Lecture 17 Scribe Notes

Notes by: Nahush Dixit

NFS Layout

CLIENT ---------------------------------------------------------------------------------------------------- SERVER

The client connects through a network to the server. The server hosts the files and the client manipulates the file system through the network. The network may not be trusted. For example, if the client connects through the Internet the client is generally untrusted. If the client is connected through a LAN, then the client is trusted. The client and the server can use different file systems. The server provides the security.

Simple NFS Security

Who checks the file permissions?

Let's say the server!

Client wants to write to the password file, the server looks at the file and sees:

rw-r—r--root root

Client, eggert, says it has a file handle:

eggert is actually uid_t 1017

Server denies access because eggert is not recognized as root:

root is uid_t 0

Problem

It is possible that two clients are on the same machine. Even though the user is the same on the machine, it has access to two separate UIDs.

Answer

The UIDs must be consistent among all systems using the NFS, so each machine is setup using the exact same network settings, user, administrators, etc.

Problem

If a user can become root on a client, that user can masquerade as any UID. This means that any file is visible to that client. So, how would the server know that a packet claiming to be from a particular client is legitimate?

Newer NFS Implementations

NFS Version 4 Features

Guidelines for Security Design

Main Forms of Fraud Based Attacks

General Goals

Threat Modeling and Classification (Understand the Enemy)

Security Mechanisms Must Support

How to Authenticate

The Problems with External Authentication

All of these methods can be defeated in some for or another. Exercise all spy movie knowledge to get an idea of how.

Internal Authentication – Three Levels in Linux

  1. Login with Password

  2. Open a File – Permissions are checked

  3. Read/Write – Check file descriptor's properties