International Computer Science Institue Networking Articles

Publications

Networking

__/__/2009
Efficient MAC in Cognitive Radio Networks: A Game-Theoretic Approach

M. Felegyhazi, M. Cagalj, and J.-P. Hubaux

Transactions on Wireless Communications (TWC), to appear

__/__/2009
Barter Trade Improves Message Delivery in Opportunistic Networks

L. Buttyan, L. Dora, M. Felegyhazi, and I. Vajda

Elsevier Ad Hoc Networks Journal, to appear

04/__/2009
Efficient Application Placement in a Dynamic Hosting Platform

Z. Al-Qudah, H. Alzoubi, M. Allman, M. Rabinovich, and V. Liberatore

Proceedings of International World Wide Web Conference, Madrid, Spain, to appear

04/__/2009
Comments on Selecting Ephemeral Ports

M. Allman

ACM Computer Communication Review, under submission

03/__/2009
Open Source vs. Closed Source Software: Towards Measuring Security

G. Schryen and R. Kadura

Proceedings of the Annual ACM Symposium on Applied Computing, Honolulu, Hawaii, to appear

03/__/2009
Automating Analysis of Large-Scale Botnet Probing Events

Z. Li, A. Goyal, Y. Chen, and V. Paxson

Proceedings of ACM Symposium on Information, Computer, and Communication Security (ASIACCS 2009), Sydney, Australia, to appear

02/__/2009
Tiered Fault Tolerance for Long-Term Integrity

B. Chun, P. Maniatis, S. Shenker, and J. Kubiatowicz

Proceedings of USENIX Conference on File and Storage Technologies (FAST), San Francisco, California, to appear

02/__/2009
Minuet: Rethinking Concurrency Control in Storage Area Networks

A. Ermolinskiy, D. Moon, B. Chun, and S. Shenker

Proceedings of USENIX Conference on File and Storage Technologies (FAST), San Francisco, California, to appear

02/__/2009
Detecting Forged TCP Reset Packets

N. Weaver, R. Sommer, and V. Paxson

Proceedings of the 16th Annual Network and Distributed System Security Symposium (NDSS 2009), San Diego, California, to appear

__/__/2008
An Analysis of Internet Voting Security: The Case of Estonia

G. Schryen

Proceedings of the Workshop on e-Business (WEB 2008), Paris, France, 13 December 2008. Also to appear in Lecture Notes on Business Information Processing, Springer Heidelberg

10/__/2008
Spamalytics: An Empirical Analysis of Spam Marketing Conversion

C. Kanich, C. Kreibich, K. Levchenko, B. Enright, G. Voelker, V. Paxson, and S. Savage

Proceedings of the 15th ACM Conference on Computer and Communications Security (ACM CCS), Alexandria, Virginia, pp. 3-14

10/__/2008
Revocation Games in Ephemeral Networks

M. Raya, M. H. Manshaei, M. Felegyhazi, and J.-P. Hubaux

Proceedings of ACM Computer and Communications Security (CCS), pp. 199-210, Alexandria, Virginia

10/__/2008
Reducing Transient Disconnectivity Using Anomaly-Cognizant Forwarding

A. Ermolinskiy and S. Shenker

Proceedings of the 7th ACM Workshop on Hot Topics in Networks (HotNets-VII), Calgary, Canada, pp. 91-96

10/__/2008
Pathlet Routing

P. B. Godfrey, S. Shenker, and I. Stoica

Proceedings of the 7th ACM Workshop on Hot Topics in Networks (HotNets-VII), Calgary, Canada, pp. 97-102

10/__/2008
Rethinking Packet Forwarding Hardware

D. Moon, M. Casado, T. Koponen, and S. Shenker

Proceedings of ACM Special Interest Group on Data Communications Workshop on Hot Topics in Networks (HotNets-VII), Calgary, Canada, pp. 1-6

09/__/2008
Predicting the Resource Consumption of Network Intrusion Detection Systems

H. Dreger, A. Feldmann, V. Paxson, and R. Sommer

Proceedings of the International Symposium on Recent Advances in Intrusion Detection (RAID), Cambridge, Massachusetts, pp. 135-154

08/__/2008
Enriching Network Security Analysis with Time Travel

G. Maier, R. Sommer, H. Dreger, A. Feldmann, V. Paxson, and F. Schneider

Proceedings of ACM Special Interest Group on Data Communications Conference (SIGCOMM 2008), pp. 183-194, Seattle, Washington

08/__/2008
TCP Slow Start Survey: Standards and Issues

M. Allman

IETF Internet-Draft, Draft-ietf-tcpm-early-rexmt-00.txt, in progress

08/__/2008
Packet Caches on Routers: The Implications of Universal Redundant Traffic Elimination

A. Anand, A. Gupta, A. Akella, S. Seshan, and S. Shenker

Proceedings of ACM Special Interest Group on Data Communications Conference (SIGCOMM 2008), San Diego, California, pp. 219-230

08/__/2008
Accountable Internet Protocol (AIP)

D. Andersen, H. Balakrishnan, N. Feamster, T. Koponen, D. Moon, and S. Shenker

Proceedings of ACM Special Interest Group on Data Communications Conference (SIGCOMM 2008), Seattle, Washington, pp. 339-350

07/__/2008
RFC 5290: Comments on the Usefulness of Simple Best-Effort Traffic

S. Floyd and M. Allman

Request for Comments 5290, Informational

07/__/2008
IMRG Workshop on Application Classification and Identification Report

T. Strayer, M. Allman, G. Armitage, S. Bellovin, S. Jin and A. W. Moore

Editorial contribution to ACM Computer Communication Review, Vol. 38, Issue 3, pp. 87-90, July 2008

07/__/2008
Principles for Developing Comprehensive Network Visibility

M. Allman, C. Kreibich, V. Paxson, R. Sommer, and N. Weaver

Proceedings of USENIX Workshop on Hot Topics in Security (HotSec ’08), San Jose, California

07/__/2008
A Tool for Offline and Live Testing of Evasion Resilience in Network Intrusion Detection Systems

L. Juan, C. Kreibich, C.-H. Lin, and V. Paxson

Proceedings of the 5th GI International Conference on Detection of Intrusions and Malware \& Vulnerability Assessment (DIMVA), Paris, France, pp. 267-278

07/__/2008
NOX: Towards an Operating System for Networks

N. Gude, T. Koponen, J. Pettit, B. Pfaff, M. Casado, N. McKeown, and S. Shenker

ACM SIGCOMM Computer Communications Review, Vol. 38, Issue 3, pp. 105-110,

06/__/2008
Diverse Replication for Single-Machine Byzantine-Fault Tolerance

B.-C. Chun, P. Maniatis, and S. Shenker

Proceedings of USENIX Annual Technical Conference, Boston, Massachusetts, pp. 287-292

05/__/2008
Efficient and Robust TCP Stream Normalization

M. Vutukuru, H. Balakrishnan, and V. Paxson

Proceedings of IEEE Symposium on Security and Privacy, Oakland, California, pp. 96-110

04/__/2008
NetComplex: A Complexity Metric for Network System Designs

B-G. Chun, S. Ratnasamy, and E. Kohler

To appear in Proceedings of NSDI 2008

04/__/2008
A Reactive Measurement Framework

M. Allman and V. Paxson

Proceedings of Passive and Active Measurement Conference, Cleveland, Ohio, pp. 92-101

04/__/2008
On Community-Oriented Internet Measurement

M. Allman, L. Martin, M. Rabinovich, and K. Atchinson

Proceedings of Passive and Active Measurement Conference, Cleveland, Ohio, pp. 112-121

04/__/2008
What Ought a Program Committee to Do?

M. Allman

Proceedings of USENIX Workshop on Organizing Workshops, Conferences, and Symposia for Computer Systems (WOWCS), San Francisco, California

04/__/2008
Thoughts on Reviewing

M. Allman

ACM Computer Communication Review, Vol. 38, Issue 2, pp. 47-50

04/__/2008
On the Spam Campaign Trail

C. Kreibich, C. Kanich, K. Levchenko, B. Enright, G. Voelker, V. Paxson, and S. Savage

Proceedings of the First USENIX Workshop on Large-Scale Exploits and Emergent Threats, San Francisco, California

04/__/2008
OpenFlow: Enabling Innovation in Campus Networks

N. McKeown, T. Anderson, H. Balakrishnan, G. Parulkar, L. Peterson, J. Rexford, S. Shenker, and J. Turner

ACM Computer Communication Review, Vol. 38, Issue 2, pp. 69-74

04/__/2008
Detecting In-Flight Page Changes with Web Tripwires

C. Reis, S. Gribble, T. Kohno, and N. Weaver

Proceedings of USENIX Symposium on Networked Systems Design and Implementation (NSDI), San Fracnsico, pp. 31-44

03/__/2008
RFC 5166: Metrics for the Evaluation of Congestion Control Mechanisms

S. Floyd

RFC 5166, Information, March 2008

03/__/2008
Towards a Common TCP Evaluation Suite

L. Andrew, C. Marcondes, S. Floyd, L. Dunn, R. Guillier, W. Gang, L. Eggert, S. Ha, and I. Rhee

Proceedings of the International Workshop on Protocols for Fast Long-Distance Networks (PFLDnet), Manchester, United Kingdom

__/__/2007
Distributed Algorithmic Mechanism Design

J. Feigenbaum, M. Schapira, and S. Shenker

Chapter in Algorithmic Game Theory, Cambridge University Press, pp. 363-384

__/__/2007
A Modular Sensornet Architecture: Past, Present, and Future Directions

A. Tavakoli, P. Dutta, J. Jeong, S. Kim, J. Ortiz, P. Levis, S. Shenker

WWSNA 2007

__/__/2007
An Architecture for Energy Management in Wireless Sensor Networks

X. Jiang, J. Taneja, J. Ortiz, A. Tavakoli, P. Dutta, J. Jeong, D. Culler, P. Levis, and S. Shenker

WWSNA 2007

__/__/2007
Loss and Delay Accountability for the Internet

K. Argyraki, P. Maniatis, O. Irzak, A. Subramanian, and S. Shenker

ICNP 2007

__/__/2007
Attested Append-Only Memory: Making Adversaries Stick to their Word

B.-G. Chun, P. Maniatis, S. Shenker, and J. Kubiatowicz

SOSP 2007

11/__/2007
Enabling an Energy-Efficient Future Internet Through Selectively Connected End Systems

M. Allman, K. Christensen, B. Nordman, and V. Paxson

Proceedings of ACM Special Interest Group on Data Communications Workshop on Hot Topics in Networks (ACM SIGGCOMM HotNets-VI), Atlanta, Georgia

10/__/2007
A Data-oriented (and Beyond) Network Architecture

T. Koponen, M. Chawla, B.-G. Chun, A. Ermolinskiy, K.H. Kim, S. Shenker, and I. Stoica

Computer Communication Review, Vol. 37, Issue 4, ACM, pp. 181-192

10/__/2007
Issues and Etiquette Concerning Use of Shared Measurement Data

M. Allman and V. Paxson

Proceedings of ACM SIGCOMM Conference on Internet Measurement, San Diego, California, pp. 135-140

10/__/2007
A Brief History of Scanning

M. Allman, V. Paxson, and J. Terrell

Proceedings of ACM SIGCOMM Conference on Internet Measurement, San Diego, California, pp. 77-82

10/__/2007
Shunting: A Hardware/Software Architecture for Flexible, High-Performance Network Intrusion Prevention

J. Gonzalez, V. Paxson, and N. Weaver

Proceedings of ACM Computer and Communication Security Conference (ACM CCS), Alexandria, Virginia, pp. 139-149

10/__/2007
An Inquiry into the Nature and Causes of the Wealth of Internet Miscreants

J. Franklin, V. Paxson, A. Perrig, and S. Savage

Proceedings of ACM Computer and Communication Security Conference (ACM CCS), Alexandria, Virginia, pp. 375-388

09/__/2007
The NIDS Cluster: Scalable, Stateful Network Intrusion Detection on Commodity Hardware

M. Vallentin, R. Sommer, J. Lee, C. Leres, V. Paxson, and B. Tierney

Proceedings of the International Symposium on Recent Advances in Intrusion Detection (RAID), Queensland, Australia

08/__/2007
Resolving Inter-domain Policy Disputes

C.T. Ee, V. Ramachandran, B.-G. Chun, K. Lakshminarayanan, and S. Shenker

Proceedings of Conference on Applications, Technologies, Architechtures, and Procols for Computer Communications (SIGCOMM 2007), ACM, pp. 157-168, Kyoto, Japan

08/__/2007
Specifying New Congestion Control Algorithms

S. Floyd and M. Allman

Request For Comments 5033, Best Current Practice 133

08/__/2007
Hidden-Action in Network Routing

M. Feldman, J. Chuang, I. Stoica, and S. Shenker

IEEE Journal on Selected Areas in Communications, Vol. 25, Issue 6, IEEE Computer Society, pp. 1161-1172

08/__/2007
Ethane: Taking Control of the Enterprise

M. Casado, M. Freedman, J. Pettit, N. McKeown, and S. Shenker

SIGCOMM 2007

08/__/2007
Achieving Convergence-Free Routing using Failure-Carrying Packets

K. Lakshminarayanan, M. Caesar, M. Rangan, T. Anderson, S. Shenker, and I. Stoica

SIGCOMM 2007

08/__/2007
The Strengths of Weaker Identities: Opportunistic Personas

M. Allman, C. Kreibich, V. Paxson, R. Sommer, and N. Weaver

Proceedings of USENIX Workshop on Hot Topics in Security (HotSec ’07), Boston, Massachusetts

08/__/2007
Stress Testing Cluster Bro

N. Weaver and R. Sommer

Proceedings of USENiX DETER Community Workshop on Cyber Security Experimentation and Test, Boston, Massachusetts

07/__/2007
On the Adaptive Real-Time Detection of Fast-Propagating Network Worms

J. Jung, R. Milito, and V. Paxson

Proceedings of the 4th GI International Conference on Detection of Intrusions and Malware \& Vulnerability Assessment (DIMVA), Lucerne, Switzerland, pp. 175-192. Also Journal on Computer Virology, Vol. 4, Number 1, pp. 197-210, February 2008

05/__/2007
Determining an Appropriate Sending Rate Over an Underutilized Network Path

P. Sarolahti, M. Allman, and S. Floyd

Computer Networks Special Issue on Protocols for Fast, Long-Distance Networks, 51(7), May 2007

05/__/2007
An Architecture for Exploiting Multi-Core Processors to Parallelize Network Intrusion Prevention

V. Paxson, R. Sommer, and N. Weaver

Proceedings of IEEE Sarnoff Symposium, pp. 1-7, Princeton, New Jersey

04/__/2007
X-trace: A Pervasive Network Tracing Framework

R. Fonseca, G. Porter, R.H. Katz, S. Shenker, and I. Stoica

Proceedings of Sumposium on Networked Systems Design and Implementation (NDSI 2007), USENIX/ACM , pp. 271-284, Cambridge, Mass.

04/__/2007
RFC 4828: TCP Friendly Rate Control (TFRC): the Small-Packet (SP) Variant

S. Floyd and E. Kohler

RFC 4828, Experimental, April 2007

04/__/2007
A Declarative Sensornet Architecture

A. Tavakoli, D. Chu, J. Hellerstein, P. Levis, and S. Shenker

in ACM SIGBED Review, Special Edition on International Workshop on Wiresless Sensor Network Architechture (WWSNA 2007), Vol. 4, Issue 3, pp. 55-60, Cambridge, Mass.

02/__/2007
The Shunt: An FPGA-Based Accelerator for Network Intrusion Prevention

N. Weaver, V. Paxson, and J.M. Gonzalez

Proceedings of International Symposium on Field Programmable Gate Arrays (FPGA), Monterey, California, pp. 199-206

02/__/2007
Congestion Control Without a Startup Phase

D. Liu, M. Allman, S. Jin, and L. Wang

To appear in Proceedings of Protocols for Fast, Long Distance Networks Workshop

01/__/2007
RFC 4782 Quick-Start for TCP and IP

S. Floyd, M. Allman, A. Jain, and P. Sarolahti

Request For Comments 4782

__/__/2006
End-host Controlled Multicast Routing

K. Lakshminarayanan, A. Rao, I. Stoica, and S. Shenker

Elsevier Computer Networks, Special Issue on Overlay Distribution Structures and their Applications.

__/__/2006
The Design and Implementation of a Declarative Sensor Network System

D. Chu, L. Popa, A. Tavakoli, J. Hellerstein, P. Levis, S. Shenker, and I. Stoica

Technical Report EECS-2006-132, EECS Department, University of California, Berkeley

__/__/2006
Service Portability

S. Singh, S. Shenker, and G. Varghese

Proceedings of Hotnets 2006

Some AuthDigest Configuration Directives

static const command_rec digest_cmds[] =
{
    AP_INIT_TAKE1("AuthName", set_realm, NULL, OR_AUTHCFG,
     "The authentication realm (e.g. \"Members Only\")"),
    AP_INIT_ITERATE("AuthDigestProvider", add_authn_provider, NULL, OR_AUTHCFG,
                     "specify the auth providers for a directory or location"),
    AP_INIT_ITERATE("AuthDigestQop", set_qop, NULL, OR_AUTHCFG,
     "A list of quality-of-protection options"),
    AP_INIT_TAKE1("AuthDigestNonceLifetime", set_nonce_lifetime, NULL, OR_AUTHCFG,
     "Maximum lifetime of the server nonce (seconds)"),
    AP_INIT_TAKE1("AuthDigestNonceFormat", set_nonce_format, NULL, OR_AUTHCFG,
     "The format to use when generating the server nonce"),
    AP_INIT_FLAG("AuthDigestNcCheck", set_nc_check, NULL, OR_AUTHCFG,
     "Whether or not to check the nonce-count sent by the client"),
    AP_INIT_TAKE1("AuthDigestAlgorithm", set_algorithm, NULL, OR_AUTHCFG,
     "The algorithm used for the hash calculation"),
    AP_INIT_ITERATE("AuthDigestDomain", set_uri_list, NULL, OR_AUTHCFG,
     "A list of URI's which belong to the same protection space as the current URI"),
    AP_INIT_TAKE1("AuthDigestShmemSize", set_shmem_size, NULL, RSRC_CONF,
     "The amount of shared memory to allocate for keeping track of clients"),
    {NULL}
};

/*
 * client list code
 *
 * Each client is assigned a number, which is transferred in the opaque
 * field of the WWW-Authenticate and Authorization headers. The number
 * is just a simple counter which is incremented for each new client.
 * Clients can't forge this number because it is hashed up into the
 * server nonce, and that is checked.
 *
 * The clients are kept in a simple hash table, which consists of an
 * array of client_entry's, each with a linked list of entries hanging
 * off it. The client's number modulo the size of the array gives the
 * bucket number.
 *
 * The clients are garbage collected whenever a new client is allocated
 * but there is not enough space left in the shared memory segment. A
 * simple semi-LRU is used for this: whenever a client entry is accessed
 * it is moved to the beginning of the linked list in its bucket (this
 * also makes for faster lookups for current clients). The garbage
 * collecter then just removes the oldest entry (i.e. the one at the
 * end of the list) in each bucket.
 *
 * The main advantages of the above scheme are that it's easy to implement
 * and it keeps the hash table evenly balanced (i.e. same number of entries
 * in each bucket). The major disadvantage is that you may be throwing
 * entries out which are in active use. This is not tragic, as these
 * clients will just be sent a new client id (opaque field) and nonce
 * with a stale=true (i.e. it will just look like the nonce expired,
 * thereby forcing an extra round trip). If the shared memory segment
 * has enough headroom over the current client set size then this should
 * not occur too often.
 *
 * To help tune the size of the shared memory segment (and see if the
 * above algorithm is really sufficient) a set of counters is kept
 * indicating the number of clients held, the number of garbage collected
 * clients, and the number of erroneously purged clients. These are printed
 * out at each garbage collection run. Note that access to the counters is
 * not synchronized because they are just indicaters, and whether they are
 * off by a few doesn't matter; and for the same reason no attempt is made
 * to guarantee the num_renewed is correct in the face of clients spoofing
 * the opaque field.
 */

/*
 * Get the client given its client number (the key). Returns the entry,
 * or NULL if it's not found.
 *
 * Access to the list itself is synchronized via locks. However, access
 * to the entry returned by get_client() is NOT synchronized. This means
 * that there are potentially problems if a client uses multiple,
 * simultaneous connections to access url's within the same protection
 * space. However, these problems are not new: when using multiple
 * connections you have no guarantee of the order the requests are
 * processed anyway, so you have problems with the nonce-count and
 * one-time nonces anyway.
 */

Distributing free software is an opportunity

Selling Free Software

Many people believe that the spirit of the GNU project is that you should not charge money for distributing copies of software, or that you should charge as little as possible — just enough to cover the cost.

Actually we encourage people who redistribute free software to charge as much as they wish or can. If this seems surprising to you, please read on.

The word “free” has two legitimate general meanings; it can refer either to freedom or to price. When we speak of “free software”, we’re talking about freedom, not price. (Think of “free speech”, not “free beer”.) Specifically, it means that a user is free to run the program, change the program, and redistribute the program with or without changes.

Free programs are sometimes distributed gratis, and sometimes for a substantial price. Often the same program is available in both ways from different places. The program is free regardless of the price, because users have freedom in using it.

Non-free programs are usually sold for a high price, but sometimes a store will give you a copy at no charge. That doesn’t make it free software, though. Price or no price, the program is non-free because users don’t have freedom.

Since free software is not a matter of price, a low price isn’t more free, or closer to free. So if you are redistributing copies of free software, you might as well charge a substantial fee and make some money. Redistributing free software is a good and legitimate activity; if you do it, you might as well make a profit from it.

Free software is a community project, and everyone who depends on it ought to look for ways to contribute to building the community. For a distributor, the way to do this is to give a part of the profit to the Free Software Foundation or some other free software development project. By funding development, you can advance the world of free software.

Distributing free software is an opportunity to raise funds for development. Don’t waste it!

In order to contribute funds, you need to have some extra. If you charge too low a fee, you won’t have anything to spare to support development.

Did your WordPress site get hacked?

Did your WordPress site get hacked?

Remember a few weeks ago there was all that noise about WordPress blogs getting hacked? Remember how everyone was urged to upgrade their blogs. You did upgrade didn’t you? No? It was inevitable that you’d be hacked. If you haven’t been hacked yet, it’s only a matter of time.

Unfortunately for some who did upgrade, it was too late. The hacker slimeballs may have known about the security issues before we did and went about their merry way breaking into blogs and websites, grabbing usernames and passwords, and planting backdoor scripts to log them in again at a later date.
That’s how even diligently upgraded blogs were hacked. The bad guys got there before you.

In the last week the hackers have started again. There is no zero day WordPress exploit. There is no evidence that version 2.5.1 of WordPress is vulnerable to any exploit at this time. They’re using the old exploits all over again. This time they’re redirecting hits from Google to your blog. Those hits are instead being redirected to your-needs.info and anyresult.net

If you’ve been hacked

  1. Upgrade to the latest version of WordPress.
  2. Make sure there are no backdoors or malicious code left on your system. This will be in the form of scripts left by the hacker, or modifications to existing files. Check your theme files too.
  3. Change your passwords after upgrading and make sure the hacker didn’t create another user.

Hidden Code

The bad guys are using a number of ways to hide their hacks:

The simplest way is hiding their code in your php scripts. If your blog directory and files are writable by the webserver then a hacker has free reign to plant their code anywhere they like. wp-blog-header.php seems to be one place. Theme files are another. When you upgrade WordPress your theme files won’t be overwritten so make sure you double check those files for any strange code that uses the eval() command, or base64_decode(). Here’s a code snippet taken from here:

Mosaic User Authentication Tutorial

NCSA HTTPd

Mosaic User Authentication Introduction
This tutorial surveys the current methods in NCSA Mosaic and NCSA HTTPd for restricting access to documents. The tutorial also walks through setup and use of these methods.

Mosaic 2.0 and NCSA HTTPd allow access restriction based on several criteria:

* Username/password-level access authorization.
* Rejection or acceptance of connections based on Internet address of client.
* A combination of the above two methods.

This tutorial is based heavily on work done by Ari Luotonen at CERN and Rob McCool at NCSA. In particular, Ari wrote the client-side code currently in Mosaic 2.0, and Rob wrote NCSA HTTPd 1.3.

Tutorial Contents

* Introduction
* Getting Started
* General Information
* How Secure is it?
* Basic By-Password Authentication: Step By Step
* Multiple Usernames/Passwords
* More Examples
* For More Information

Getting Started
Before you can explore access authorization, you need to install NCSA HTTPd 1.0a5 or later on a Unix machine under your control, or get write access to one or more directories in a filespace already being served by NCSA HTTPd. Other HTTP Servers also support access authentication, and some of the information presented here will help you understand how it works, but this tutorial is designed specifically for NCSA HTTPd.

NCSA HTTPd 1.5 has support for HTTP Basic Authentication (Basic), as well as the proposed Message Digest Authentication (MD5). Most, if not all, current browsers should support HTTP Basic Authentication, but not all browsers support MD5. Some browsers that do include NCSA Mosaic/X 2.7 and Spyglass Mosaic

General Information
There are two levels at which authentication information can be passed to the server: the global access configuration file and the per-directory configuration files. This tutorial primarily covers per-directory configuration. See the NCSA HTTPd documentation for information on global configuration.

Per-directory configuration means that users with write access to part of the filesystem that is being served (the Document Tree) can control access to their files as they wish. They need not have root access on the system or write access to the server’s primary configuration files. Also, the per-directory configuration files are read and parsed by the server on each access, allowing run-time re-configuration. The global configuration files are only parsed on start-up or restart, which usually requires root authority. There is a speed penalty associated with using the per-directory configuration files, but that’s the trade-off you have to take.

Access control for a given directory is controlled by a specific file in the directory with a filename as specified by the AccessFileName directive. The default filename is .htaccess

How Secure Is It?
In Basic HTTP Authentication, the password is passed over the network not encrypted but not as plain text — it is “uuencoded.” Anyone watching packet traffic on the network will not see the password in the clear, but the password will be easily decoded by anyone who happens to catch the right network packet.

So basically this method of authentication is roughly as safe as telnet-style username and password security — if you trust your machine to be on the Internet, open to attempts to telnet in by anyone who wants to try, then you have no reason not to trust this method also.

In MD5 Message Digest Authentication, the password is not passed over the network at all. Instead, a series of numbers is generated based on the password and other information about the request, and these numbers are then hashed using MD5. The resulting “digest” is then sent over the network, and it is combined with other items on the server to test against the saved digest on the server. This method is more secure over the network, but it has a penalty. The comparison digest on the server must be stored in a fashion that it is retrievable. Basic Authentication stores the password using the one way crypt() function. When the password comes across, the server uudecodes it and then crypts it to check against the stored value. There is no way to get the password from the crypted value. In MD5, you need the information that is stored, so you can’t use a one way hashing function to store it. This means that MD5 requires more rigorous security on the server machine. It is possible, but non-trivial, to implement this type of security under the UnixTM security model.

Basic ByPassword Authentication: Step By Step
This should help you set up protection on a directory via the Basic HTTP Authentication method. This method also uses the standard plaintext password file. If you have a large user base, NCSA HTTPd supports a DBM based password file for faster access.

So let’s suppose you want to restrict files in a directory called turkey to username pumpkin and password pie. Here’s what to do:

Create a file called .htaccess in directory turkey that looks like this:

AuthUserFile /otherdir/.htpasswd
AuthGroupFile /dev/null
AuthName ByPassword
AuthType Basic

require user pumpkin

Note that the password file will be in another directory (/otherdir).

AuthUserFile must be the full Unix pathname of the password file.

Also note that in this case there is no group file, so we specify /dev/null (the standard Unix way to say “this file doesn’t exist”).

AuthName can be anything you want. The AuthName field gives the Realm name for which the protection is provided. This name is usually given when a browser prompts for a password, and is also usually used by a browser in correlation with the URL to save the password information you enter so that it can authenticate automatically on the next challenge. Note: You should set this to something, otherwise it will default to ByPassword, which is both non-descriptive and too common.

AuthType should be set to Basic, since we are using Basic HTTP Authentication. Other possibilities for NCSA HTTPd 1.5 are PEM, PGP, KerberosV4, KerberosV5, or Digest. These other types of authentication will be discussed later.

In this example, only the method GET is restricted using the LIMIT directive. To limit other methods (particularly in CGI directories), you can specify them separated by spaces in the LIMIT directive. For example:

require user pumpkin

If you only use GET protection for a CGI script, you may be finding that the REMOTE_USER environment variable is not getting set when using METHOD=”POST”, obviously because the directory isn’t protected against POST.

Create the password file /otherdir/.htpasswd

The easiest way to do this is to use the htpasswd program distributed with NCSA HTTPd. Do this:

htpasswd -c /otherdir/.htpasswd pumpkin

Type the password — pie — twice as instructed.

Check the resulting file to get a warm feeling of self-satisfaction; it should look like this:

pumpkin:y1ia3tjWkhCK2

That’s all. Now try to access a file in directory turkey — your browser should demand a username and password, and not give you access to the file if you don’t enter pumpkin and pie. If you are using a browser that doesn’t handle authentication, you will not be able to access the document at all.

Multiple Usernames/Passwords
If you want to give access to a directory to more than one username/password pair, follow the same steps as for a single username/password with the following additions:

Add additional users to the directory’s .htpasswd file.

Use the htpasswd command without the -c flag to add additional users; e.g.:

htpasswd /otherdir/.htpasswd peanuts
htpasswd /otherdir/.htpasswd almonds
htpasswd /otherdir/.htpasswd walnuts

Create a group file.

Call it /otherdir/.htgroup and have it look something like this:

my-users: pumpkin peanuts almonds walnuts

… where pumpkin, peanuts, almonds, and walnuts are the usernames.

Then modify the .htaccess file in the directory to look like this:

AuthUserFile /otherdir/.htpasswd
AuthGroupFile /otherdir/.htgroup
AuthName ByPassword
AuthType Basic

require group my-users

Note that AuthGroupFile now points to your group file and that group my-users (rather than individual user pumpkin) is now required for access.

That’s it. Now any user in group my-users can use his/her individual username and password to gain access to directory turkey.

Prepared Examples
Following are several examples of the range of access authorization capabilities available through Mosaic and NCSA HTTPd. The examples are served from a system at NCSA.

Simple protection by password.

This document is accessible only to user fido with password bones.

Important Note: There is no correspondence between usernames and passwords on specific Unix systems (e.g. in an /etc/passwd file) and usernames and passwords in the authentication schemes we’re discussing for use in the Web. As illustrated in the examples, Web-based authentication uses similar but wholly distinct password files; a user need never have an actual account on a given Unix system in order to be validated for access to files being served from that system and protected with HTTP-based authentication.

Protection by password; multiple users allowed.

This document is accessible to user rover with password bacon and user jumpy with password kibbles.

Protection by network domain.

This document is only accessible to clients running on machines inside domain ncsa.uiuc.edu.

Note for non-NCSA readers: The .htaccess file used in this case is as follows:

AuthUserFile /dev/null
AuthGroupFile /dev/null
AuthName ExampleAllowFromNCSA
AuthType Basic

order deny,allow
deny from all
allow from .ncsa.uiuc.edu

Protection by network domain — exclusion.

This document is accessible to clients running on machines anywhere but inside domain ncsa.uiuc.edu.

Note for NCSA readers: The .htaccess file used in this case is as follows:

AuthUserFile /dev/null
AuthGroupFile /dev/null
AuthName ExampleDenyFromNCSA
AuthType Basic

order allow,deny
allow from all
deny from .ncsa.uiuc.edu