Submitted by ANAND KUMAR

in partial fulfillment of requirement of the Degree of

Bachelor (B.Tech)

of IN












Certificat e
Certified that this is a bonafide record of the seminar entitled

of the VII semester, Computer Science and Engineering in the year 2008 in partial fulfillment of the requirements in the award of Degree of Bachelor of Technology in Computer Science and Engineering of Cochin University of Science and Technology.

Ms. Latha R. Nair. S. Seminar Guide Date :

Dr. David Peter Head of Division


Many people have contributed to the success of this. Although a single sentence hardly suffices, I would like to thank Almighty God for blessing us with His grace. I extend my sincere and heart felt thanks to Dr. David Peter, Head of Department, Computer Science and Engineering, for providing us the right ambience for carrying out this work. I am profoundly indebted to my seminar guide, Ms. Latha R. Nair for innumerable acts of timely advice, encouragement and I sincerely express my gratitude to her. I express my immense pleasure and thankfulness to all the teachers and staff of the Department of Computer Science and Engineering, CUSAT for their cooperation and support. Last but not the least, I thank all others, and especially my classmates who in one way or another helped me in the successful completion of this work.


Today, computer and networking are inseparable. A number of confidential transactions occur every second and today computers are used mostly for transmission rather than processing of data. So Network Security is needed to prevent hacking of data and to provide authenticated data transfer. Network Security can be achieved by Firewall. Conventional firewalls rely on the notions of restricted topology and controlled entry points to function. Restricting the network topology, difficulty in filtering of certain protocols, End-to-End encryption problems and few more problems lead to the evolution of Distributed Firewalls. Distributed firewalls secure the network by protecting critical network endpoints, exactly where hackers want to penetrate. It filters traffic from both the Internet and the internal network because the most destructive and costly hacking attacks still originate from within the organization. They provide virtually unlimited scalability. In addition, they overcome the single point-of-failure problem presented by the perimeter firewall. Some problems with the conventional firewalls that lead to Distributed Firewalls are as follows. Depends on the topology of the network. Do not protect networks from the internal attacks. Unable to handle protocols like FTP and RealAudio. Have single entry point and the failure of this leads to problems. Unable to stop spoofed transmissions (i.e., using false source addresses). Distribute firewall solves these problems and protecting critical network end points where hackers want to penetrate. It filters the traffic from both the internal network and internet because most destructive and costly hacking attacks still originate within organization.

4 Example Scenario 15 5 5.1 Kernel Extensions 20 Daemon 27 6 Work in Development Related Work 8 28 7 30 Conclusion References 32 9 35 i .3 25 5.1 Standard Firewall Example 13 1 2 5 3 6 10 3.2 Distributed Firewall Example 4 KeyNote Implementation 21 5.TABLE OF CONTENTS Chapter No. 24 2 Policy Policy Device 5. LIST ii 1 Title OF Page FIGURES Introduction Policy and Identifiers Distributed Firewall 3.

LIST OF FIGURES NO: NAME PAGE 1 Architecture of Distributed Firewall 2 Architecture of standard firewall 3 Connection to the Web Server in standard firewall 4 Connection to the Intranet in standard firewall 5 7 9 10 Distributed Firewall 6 Connection to the Web Server distributed firewall Connection to the Intranet in distributed firewall 15 16 Graphical representation with all components Filtering connect( ) and accept( ) system calls 8 Interactions with KeyNote 10 11 7 12 13 14 21 22 ii .

Specific individuals or remote networks may be allowed access to all or parts of the protected infrastructure (extranets. it is desirable that telecommuters’ systems comply with the corporate security policy. because the latter lacks certain knowledge that is readily available at the endpoints. and that anyone on the other side is. the combination of more complex protocols and the tremendous increase in the amount of data that must be passed through the firewall has been and likely will continue to outpace Moore’s Law. There exist protocols. telecommuters' machines that use the Internet for connectivity need protection when encrypted tunnels are not in place. the traditional notion of a security perimeter can no longer hold unmodified. for example. Consequently. at least for the foreseeable future. while computers (and hence firewalls) are getting faster. on the other hand. firewalls tend to become congestion points. The assumption that all insiders are trusted has not been valid for a long time.CUSAT 1 . So-called "extranets" can allow outsiders to reach the "inside" of the firewall. at least potentially. This gap between processing and networking speeds is likely to increase. etc. such solutions are viewed as architecturally “unclean” and in some cases too invasive. More precisely. Department of Computer Science.SOE. telecommuting. FTP and RealAudio are two such protocols. they rely on the assumption that everyone on one side of the entry point--the firewall--is to be trusted. The vastly expanded Internet connectivity in recent years has called that assumption into question. several trends in networking threaten to make it obsolete: Due to the increasing line speeds and the more computation intensive protocols that a firewall must support (especially IPsec). and new protocols are designed. Although there exist application-level proxies that handle such protocols. an enemy. While this model worked well for small to medium size networks.). that are difficult to process at the firewall. Introduction Conventional firewalls rely on the notions of restricted topology and control entry points to function.Data Security in Local network Using Distributed Firewall 1.

This is an artifact of firewall deployment: internal traffic that is not seen by the firewall cannot be filtered. This makes administration particularly difficult. many sites employ internal firewalls to provide some form of compartmentalization. IPsec is a protocol suite. unauthorized entry point to the network without the administrator’s knowledge and consent. While firewalls are in general not intended to guard against misbehavior by insiders. If firewalls were placed everywhere. as a result. since no unified and comprehensive management mechanism exists. as it prevents them from looking at the packet fields necessary to do filtering. data integrity. both from a practical point of view and with regard to policy consistency. Finally. there is an increasing need for finer-grained (and even application specific) access control which standard firewalls cannot readily accommodate without greatly increasing their complexity and processing requirements.Worse yet. failover. authentication. internal users can mount attacks on other users and networks without the firewall being able to intervene. recently standardized by the IETF that provides network-layer security services such as packet confidentiality. Allowing end-to-end encryption through a firewall implies considerable trust to the users on behalf of the administrators. Various forms of tunnels. 2 . and dial-up access methods allow individuals to establish backdoor access that bypasses all the security mechanisms provided by traditional firewalls. End-to-end encryption can also be a threat to firewalls. Furthermore. and automated key management. there is a tension between internal needs for more connectivity and the difficulty of satisfying such needs with a centralized firewall. replay protection. wireless. it has become trivial for anyone to establish a new. this would not be necessary. and other reasons). Large (and even not-so-large) networks today tend to have a large number of entry points (for performance.

More subtly. often impossible. especially as internal IP addresses change. The key reason that firewalls are still useful is that they provide an obvious. Just as file permissions enforce an internal security policy. They offer the advantage of filtering traffic from both the Internet and the internal network. The system propagates the central policy to all endpoints. some machines need more access to the outside than do others. firewalls provide a convenient first-level barrier that allows quick responses to newly-discovered bugs.Other trends are also threatening firewalls. Policy distribution may take various forms. Furthermore. they are the only mechanism for security. routers. firewalls are still usef ul in providing some measure of security. older protocols (and their implementations) are more difficult.). While newer protocols typically have some provisions for security. but only with difficulty. or it may be provided to the users in the form of credentials that they use when trying to communicate with the hosts or it may be a combination of both. To address the shortcomings of firewalls while retaining their advantages. since the firewall generally does not have the necessary keys to peek through the encryption. That is. they permit a site's administrator to set a policy on external access. etc. The extent of mutual trust between endpoints is specified by the policy Distributed firewalls are host-resident security software applications that protect the enterprise network's servers and end-user machines against unwanted intrusion. For example. security policy is defined centrally but enforced at each individual network endpoint (hosts. a firewall can enforce an external security policy. This enables them to prevent hacking attacks that originate from both the Internet and the internal network. Despite their shortcomings. Conventional firewalls can do this. This is important because the most costly and destructive attacks still originate from within the organization. 3 . it may be pushed directly to the end systems that have to enforce it. mostly hassle-free. to secure. End-to-end encryption is another threat. proposed the concept of a distributed firewall . For example. In distributed firewalls. mechanism for enforcing network security policy. firewalls are a mechanism for policy control. For legacy applications and networks.

To implement a distributed firewall. the network-level encryption mechanism for TCP/IP. policies in a distributed firewall are functionally equivalent to packet filtering rules. and even today there are protocols designed with no security review. three components are necessary: A language for expressing policies and resolving requests. However. A mechanism for safely distributing security policies. The basic idea is simple. Our prototype implementation uses the KeyNote trust-management system. This is by no means a universal trait. And incoming packets are accepted or rejected by each "inside" host. A compiler translates the policy language into some internal format. such as Microsoft's SMS or ASD and (c) IPSEC. Credentials 4 . they may be digitally . The integrity of the policies transferred must be guaranteed. A mechanism that applies the security policy to incoming packets or connections. The language and resolution mechanism should also support credentials. either through the communication protocol or as part of the policy object description ( e. providing the enforcement part.g. The system management software distributes this policy file to all hosts that are protected by the firewall. for delegation of rights and authentication purposes. This may be the IPsec key management protocol when possible. (b) any of a number of system management tools. or some other protocol. In their simplest form. extensible language for expressing policies and credentials. it is desirable to use an extensible system (so other types of applications and security checks can be specified and enforced in the future). which provides a single. according to both the policy and the cr yptographically-verified identity of each sender.Distributed firewalls rest on three notions: (a) a policy language that states what sort of connections are permitted or prohibited. signed).

Finally. The distribution of credentials and user authentication occurs are part of the Internet Key Exchange (IKE) [12] negotiation. the GUIs that are found on most modern commercial firewalls. Thus. policies may be distributed from a central location when a policy update is performed. Alternatively. protect KeyNote are signed. or they may be fetched as-needed (from a webserver. though clearly the language must be powerful enough to express the desired policy. thus simple file-transfer protocols may be used for policy distribution. A sample is shown in Figure. any credentials given to the user. and any credentials stored in a central location and retrieved ondemand. the overall security policy relevant to a particular user and a particular end host is the composition of the security policy “pushed” to the end host. 5 . as long as the users follow the overall policy. giving away their password. and general policy languages such as KeyNote. we implement the mechanism that enforces the security policy in a TCP-connection granularity. Users are also able to delegate authority to access machines or services they themselves have access to. We also make use of the IPsec stack in the OpenBSD system to authenticate users.g. and distribute credentials. decentralized administration becomes feasible (establishing a hierarchy or web of administration. or through some other protocol). it is better to allow for some flexibility in the system. Since KeyNote allows delegation. The exact nature is not crucial.). for the different departments or even individual systems). X. the mechanism is split in two parts. one residing in the kernel and the other in a user-level process. firewalls embody the concept of centralized control). Thus. In our implementation. proxy or login server on some other port. Also note that it is possible to “turn off” delegation. Although this may initially seem counterintuitive (after all. usually by the most insecure and destructive way possible ( e.500 directory. 2. Policies and Identifiers Many possible policy languages can be used. etc. including file-oriented schemes similar to Firmato. setting up a . in our experience users can almost always bypass a firewall’s filtering mechanisms.

3. to simplify system administration and to permit some level of central control. A conventional firewall could do the same. "DMZ". which are likely present in any event. but only by adding complexity. since distributed firewalls are independent of topology. individuals are not necessarily the administrators of the computers they use. new software distributed. For example. policies can be "pulled" dynamically by the end system. etc. We use the same mechanisms. network interfaces are designated "inside". In a different sense. Distributed firewalls can use IP addresses for host identification. a specified IP address may be fully trusted. etc. "outside". Such information could be carried over a network protocol. a license server or a security clearance server can be asked if a certain communication should be permitted. Today's firewalls rely on topology. to control a distributed firewall. furthermore. thus. If a machine is granted certain privileges based on its certificate. Instead. Our preferred identifier is the name in the cryptographic certificate used with IPSEC.What is important is how the inside hosts are identified. able to receive incoming mail from the Internet. a system management package is used to administer individual machines. End systems may know things like which files are involved. etc. and what their security levels might be. Distributed Firewalls In a typical organizational environment. We abandon this notion (but see Section). 6 . Patches can be installed. A second common host designator is IP address. those privileges can apply regardless of where the machine is located physically. but it lacks important knowledge about the context of the request. ownership of a certificate is not easily spoofed. They are independent of topology. though with a reduced level of security. That is. Certificates can be a very reliable unique identifier.

1: Architecture of Distributed Firewall well apply to the application layer. all hosts on the inside are in some sense equal.Policy is enforced by each individual host that participates in a distributed Security firewall. to verify their compliance. they can launch attacks on hosts that they would not 7 . The resulting policy (probably. much like any other change. The security administrator--who is no longer necessarily the "local" administrator. If any such machines are subverted. though not necessarily. If so. This policy file is consulted before processing incoming or outgoing messages. compiled to some convenient internal format) is then shipped out. In the latter case. the local host has a much stronger assurance of its identity than in a traditional firewall. but policies and enforcement can equally Fig. since we are no longer constrained by topology--defines the security policy in terms of host identifiers. For example. Policy enforcement is especially useful if the peer host is identified by a certificate. It is most natural to think of this happening at the network or transport layers. some sites might wish to force local Web browsers to disable Java or JavaScript.

an incoming TCP packet is sometimes presumed legitimate if it has the "ACK" bit set. access to other internal hosts would be blocked. But spoofed ACK packets can be used as part of "stealth scanning". Thus. The most obvious is that there is no longer a single chokepoint. other internal machines. permit contact only from the mail gateway. Throughput is no longer limited by the speed of the firewall. Some sites attempt to solve these problems by using multiple firewalls. as identified by its certificate. A second advantage is more subtle. Because of a long-standing history of security problems in mailers. Instead. this is a major benefit. similarly. however. On the inside of the firewall. Note how much stronger this protection is: even a subverted internal host cannot exploit possible mailer bugs on the protected machines. it 8 . there is no longer a single point of failure that can isolate an entire network. though. all machines have some rule concerning port 25. The mail gateway permits anyone to connect to that port. though. They in turn will relay the mail to internal mail servers. they have to rely on externally-visible features of assorted protocols. Consider the problem of electronic mail. Today's firewalls don't have certain knowledge of what a host intends. possibly by impersonating trusted hosts for protocols such as rlogin. With a distributed firewall. Distributed firewalls have other advantages as well. Similarly. With a distributed firewall. most sites with firewalls let only a few. Traditional firewalls would express this by a rule that permitted SMTP (port 25) connections to the internal mail gateways. in many cases. such spoofing is not possible. that redundancy is purchased only at the expense of an elaborate (and possibly insecure) firewall-to-firewall protocol. This is most easily understood by contrasting it to traditional packet filters. designated hosts receive mail from the outside. access to port 25 is unrestricted.normally talk to. From both a performance and an availability standpoint. each host's identity is cryptographically assured. though. since such a packet can only be legitimate if it is part of an ongoing conversation--a conversation whose initiation was presumably allowed by the firewall.

are granted more privileges. such use is often in violation of corporate guidelines. Corporate packets. knows. FTP clients use the PORT command to specify the port number used for the data channel. however. this port is for an incoming call that should be permitted. and can reject random probes. 9 . But that requires that generic Internet use be tunneled into the corporate network and then back out the Internet. The most important advantage. the host itself knows when it is listening for a particular data connection. And no triangle routing is needed. and hence legal. an operation that is generally not permitted through a firewall. How should this machine be protected? A conventional approach can protect the machine while tunneled. With a distributed firewall. By default. is that distributed firewalls can protect hosts that are not within a topological boundary. a distributed firewall protects the machine all of the time. The sending host. though. packets from random Internet hosts can be rejected. By contrast. because they cannot tell if they are replies to outbound queries. regardless of whether or not a tunnel is set up. Relying on the host to make the appropriate decision is therefore more secure. Consider a telecommuter who uses the Internet both generically and to tunnel in to a corporate net. Today's firewalls--even the stateful packet filters--generally use an application-level gateway to handle such commands. Apart from efficiency hard for firewalls to treat UDP packets properly. there is no protection whatsoever when the tunnel is not set up. authenticated by IPSEC. This advantage is even clearer when it comes to protocols such as FTP. Furthermore. or if they are incoming attacks.


one is trusted (Internal host 1) and other one is untrusted (Internal host 2). web server. network. 11 . internet. web server and intranet web server are also connected to the network. Example contains internal and external host. firewall. intranet web server. There is also a external host which is connected to the internet. Then network connected to the internet and between network and internet. there is two hosts. there is firewall. Both hosts are connected to the corporate network.Fig 2: Architecture of standard firewall This is the example of architecture of standard firewall. In internal part of network.

we can see that when internal hosts want to connected with web server. they can connect.Fig 3: Connection to the Web Server In this figure. firewall allowed to connect with the web server. So external host will connect to web server. For external host. 12 . It is not important that they are trusted or not.

we can see that internal hosts are connected to the intranet web server (company private). External hosts are not allowed to connect with the intranet web server. But for external host.Fig 4: Connection to the Intranet In this figure. It is not also important that they are trusted or not. Here there is no blocking rule for internal hosts. Here we can see that the disadvantage this conventional firewall. Internal hosts are allowing to connect with the intranet web server. intranet web server is blocked by this firewall. but here one host is untrusted. 13 . Here.

Here firewall policy is distributed to all the systems and web server. there are two hosts. network. Example contains internal and external host. Both hosts are connected to the corporate network.3. Then network connected to the internet and 14 . web server and intranet web server are also connected to the network. web server. intranet web server. internet.2 DISTRIBUTED FIREWALL EXAMPLE Fig 5: Distributed Firewall This figure is the example of architecture of Distributed firewall. If firewall policy allowed connecting with server or systems. one is trusted (Internal host 1) and other one is untrusted (Internal host 2). then only they connect. In internal part of network. and a internal host on other side of network which is communicating through telnet.

Although internal host of external side of network and external host can connect to the web server. There is also an external host and internal host using telecommuting which is connected to the internet. Because they are allowed to connect with the server. 15 . Fig 6: Connection to Web Server In this figure. they can connect. we can see that when internal hosts want to connected with web server. there is firewall.between network and internet.

KEYNOTE 16 . we can see that only internal host 1 and internal host of external side is connected to the intranet web server (company private).Fig 7: Connection to Intranet In this figure. If firewall policy allowed only then they can connect. So here it is not necessary that internal host will connect to private server. Here it gives the advantage of protecting the systems from internal untrusted hosts. other are untrusted. Because only these two are trusted. 4.

and any credentials. The Verifier needs to determine whether the Requester is allowed to perform the requested action. the local policy.” have the same syntax as policy assertions. Making use of public key cryptography for authentication. but are also signed by the entity delegating the trust. Applications communicate with a “KeyNote evaluator” that interprets KeyNote assertions and returns results to applications. However. One instance of a trust-management system is KeyNote. Policies and credentials contain predicates that describe the trusted actions permitted by the holders of specific public keys (otherwise known as principals). and optionally provides credentials. trust management dispenses with unique names as an indirect means for performing access control. It is responsible for providing to KeyNote all the necessary information. it uses a direct binding between a public key and a set of authorizations. KeyNote provides a simple notation for specifying both local security policies and credentials that can be sent over an untrusted network. which serve the role of “certificates. as represented by a safe programming language. Signed credentials. This results in an inherently decentralized authorization system with sufficient impressibility to guarantee flexibility in the face of novel authorization scenarios Figure 8:Application Interactions with KeyNote. different 17 . as shown in Figure 8. Instead. The Requester is typically a user that authenticates through some application-dependent protocol. It is also responsible for acting upon KeyNote’s response.Trust is a relatively new approach to solving the authorization and Management security policy problem.

The KeyNote evaluator determines whether proposed actions are consistent with local policy by applying the assertion predicates to the action environment. In this environment. and a set of attributes. if there is any subset that would cause the request to be approvedthen the complete set will also cause the request to be approved. or to port 22 (ssh) 18 . An important concept in KeyNote (and. It is worth noting here that although KeyNote uses cryptographic keys as principal identifiers. the identifier of the principal requesting an action must be securely established. more generally.). A KeyNote evaluator accepts as input a set of local policy and credential assertions. The KeyNote evaluator can return values other than simply true and false. delegation must be controlled by the operating system (or some implicitly trusted application). This simply means that given a set of ” credentials associated with a request. KeyNote-Version: 2 Authorizer: "POLICY" Licensees: "rsa-hex:1023abcd" Comment: Allow Licensee to connect to local port 23 (telnet) from Internal addresses only.hosts and environments may provide a variety of interfaces to the KeyNote evaluator (library. kernel service. In the example of a single host. For example. in trust management) is “monotonicity . etc. similar to the mechanisms used for transferring credentials in Unix or in capability-based systems. depending on the application and the action environment definition. Also. the operating system can provide this information. UNIX daemon. Monotonicity is enforced by the KeyNote language (it is not possible to write non-monotonic policies). usernames may be used to identify principals inside a host. other types of identifiers may also be used. in the absence of cryptographic authentication. This greatly simplifies both request resolution (even in the presence of conflicts) and credential management. called an “action environment.” that describes a proposed trusted action associated with a set of public keys (the requesting principals).

KeyNote-Version: 2 Authorizer: "rsa-hex:1023abcd" Licensees: "dsa-hex:986512a1" || "x509-base64:19abcd02==" Comment: Authorizer delegates SSH connection access to either of the Licensees. any delegation acts as refinement. Conditions: (remote_address == "139. or to the SSH port from any address. local_port == "22" && protocol == "tcp" -> "true".006.from anywhere.130. end hosts (as identified by their IP address) are also considered principals when IPsec is not used to secure communications. if coming from a specific address.001. Note that the first key can effectively delegate at most the same rights it possesses.007.130.255) -> "true". That user then delegates to two other users (keys) the right to connect to SSH from one specific address. Since this is a policy. This allows local policies or 19 .001" && local_port == "22") -> "true". In our prototype. Conditions: (local_port == "23" && protocol == "tcp" && remote_address > "158. Signature: "rsa-md5-hex:f00f5673" Example 1: Example KeyNote Policy and Credential.000" && remote_address < "158. The local policy allows a particular user (as identified by their public key) connect access to the telnet port by internal addresses. no signature field is required.091. KeyNote does not allow rights amplification .

g. In KeyNote. Perhaps of more interest. KeyNote allows us to use the same. or they may depend exclusively on credentials from the administrator. potentially for different applications. our ultimate goal is to use it as an interoperability layer language that “ties together” the various applications that need access control services. of local policy.g . may be distributed over an insecure communication channel. The latter. credentials may be viewed as parts of a hypothetical access matrix. it is possible to “merge” policies from different administrative entities and process them unambiguously. or do anything in between these two ends of the spectrum. End hosts may specify their own security policies. simple language for both policy and credentials. being signed. they are equivalent to standard packet filtering. in the form of intersection (conjunction) and union (disjunction) of the component sub-policies. [2]) or GUI . e. or refinement. credentials may be considered as an extension. getsockopt(2) calls). Naturally. This merging can be expressed in the KeyNote language. An administrator would use a higher-level language (e. it is trivial to support applicationspecific credentials. and made available to the end application through some OS-specific mechanism ( e. In that respect. Credentials that specify. Since KeyNote allows multiple policy constraints.) that are not present in KeyNote. the union of all policy and credential assertions is the overall network security policy. to be contained in the same assertion. The only known solution to this is the use of cryptographic protocols to secure communications. Alternately.credentials issued by administrative keys to specify policies similar to current packet filtering rules. or to layer them in increasing levels of refinement. services. This higher-level language would provide grouping mechanisms and network-specific abstractions (for networks. could be . to specify correspondingly higher-level policy and then have this compiled to a set of KeyNote credentials. . etc. Using KeyNote as the middle language offers a number of benefits: 20 .g. Although KeyNote uses a human-readable format and it is indeed possible to write credentials and policies that way. hosts. such policies or credentials implicitly trust the validity of an IP address as an identifier. delivered under any of the distribution schemes described in Section 2.In the context of the distributed firewall. Java applet permissions.

SSL. Our system is comprised of three components: a set of kernel extensions.It can handle a variety of different applications (since it is applicationindependent but customizable). covering email. However. thus allowing for decentralized administration. produced. KeyNote. Our prototype implementation totals approximately 1150 lines of C code. IMPLEMENTATION For our development platform we decided to use the OpenBSD operating system. 5. KeyNote-Version: 2 Authorizer: "rsa-hex:1023abcd" Licensees: "IP: 158. OpenBSD provides an attractive platform for developing security applications because of the well-integrated security features and libraries (an IPsec stack.). or revoked).130. which implements the distributed firewall policies. a userlevel daemon process. which is used for two-way communication between the kernel and the policy daemon.6. Provides built-in delegation. .141" Conditions: (@remote_port < 1024 && @local_port == 22) -> "true". which implement the enforcement mechanisms. Example 1 shows two sample KeyNote assertion.g . Example 2 shows an example of a key delegating to an IP address. active code content.). each component is roughly the same size. similar implementations are possible under other operating systems. allowing for more comprehensive and mixedlevel policies (e. and a device driver. etc. IPsec. Allows for incremental or localized policy updates (as only the relevant credentials need to be modified. policy and a (signed) credentials. etc. Signature: "rsa-sha1-hex: bee11984" 21 .

Since the remote host has no way of supplying the credential to the distributed firewall through a security protocol like IPsec. This would allow the specified address to connect to the local SSH port. The two units communicate via a loadable pseudo device driver interface. The policy specification and processing unit lives in user space inside the policy daemon process. The core of the enforcement mechanism lives in kernel space and is comprised of the two modified system calls that interest us. the distributed firewall must search for such credentials or must be provided with them when policy is generated/updated. connect(2) and accept(2) .Example 2:An example credential where an (administrative) key delegates to an IP address. if the connection is coming from a privileged port. Messages travel from the system call layer to the user level daemon and back using the policy context queue 22 . with all its components. Figure 9:The Figure shows a graphical representation of the system.

In the following three subsections we describe the various parts of the architecture. and how they interact with each other. 23 . some “filtering” mechanism is needed. Similar principles can be applied to other protocols. for unreliable protocols. In the UNIX operating system users create outgoing and allow incoming TCP connections using the connect(2) and accept(2) system calls respectively. A user level approach. some form of reply caching is desirable to improve performance. with all its components. Since any user has access to these system calls. This has the advantage of operating system-independence. 4. However.g. requires each application of interest to be linked with a library that provides the required security mechanisms. as depicted in Figure 10. potentially leading to a major security problem. their functionality. a modified . Filters can be implemented either in user space or inside the kernel. . libc. such a scheme does not guarantee that the applications will use the modified library. This filtering should be based on a policy that is set by the administrator.Figure 9 shows a graphical representation of the system. Each has its advantages and disadvantages. e.1 Kernel Extensions For our working prototype we focused our efforts on the control of the TCP connections. and thus does not require any changes to the kernel code.

The commit t operation adds the context to the list of contexts the policy daemon needs to handle. this includes the ID of the user that initiated the connection. Any credentials acquired through IPsec may also be added to the context at this stage.Figure 10: Wrappers for filtering the connect(2) and accept(2) system calls are added to a system library. Accepting a connection works in a similar fashion. While this approach offers considerable flexibility. We can. and the process blocks waiting for a reply from the policy daemon . associated with Once all the information is in place. commi that context. The policy context is a container for all the information related to that specific connection. A kernel level approach. policy context (see Example 3). When accept (2) enters the kernel. The only difference is that we now also include the source address and port. the application is blocked waiting for the policy daemon reply. as shown in the left side of Figure 9. This restricts us to open source operating systems like BSD and Linux. There is no limit as to the kind or amount of information we can associate with a context. The main advantage of this approach is that the additional security mechanisms can be enforced transparently on the applications. we allocate a new context which we fill in similarly to the connect (2) case. include the time of day or the number of other open connections of that user. Upon receipt. the destination address and port. it suffers from its inability to guarantee the enforcement of security policies. it blocks until an incoming connection request arrives. In the case of the connect(2). As we mentioned previously. After this. etc. we create what we call a that connection. we 24 . for example. requires modifications to the operating system kernel. as applications might not link with the appropriate library . When a connect (2) is issued by a user application and the call traps into the kernel. We associate a sequence number to each such context and then we start filling it with all the information the policy will need to decide whether to permit daemon it or not. the two system calls we need to filter are connect (2) and accept (2). if we want them to be considered by our decision–making strategy. The context is then enquired.

char *. policy_context *policy_context_next. void policy_commit_context (policy_context *). void policy_add_string (policy_context *. 25 .typedef struct policy_mbuf policy_mbuf. }. policy_context *policy_create_context (void). }. Example 3:The connect(2) and accept(2) system calls create contexts which contain information relevant to that connection. in_addr_t *). u_int32_t sequence. void policy_add_int(policy_context *. char *. void policy_destroy_context (policy_context *). char *reply. These are appended to a queue from which the policy daemon will receive and process them. char *. int). char *). void policy_add_ipv4addr (policy_context *. struct policy_context { policy_mbuf *p_mbuf. struct policy_mbuf { policy_mbuf *next. int length. char data[POLICY_DATA_SIZE]. typedef struct policy_context policy_context. The policy daemon will then return to the kernel a decision on whether to accept or deny the connection.

4. To support this architecture. and may in fact be used without any modifications by other kernel components that require similar security policy handling. Closing the device will free any allocated resources and disable the distributed firewall. and then waking it up. we have included an ioctl(2) call for “house–keeping”. Opening the device activates the distributed firewall and initializes data structures.3 Policy Daemon The third and last component of our s ystem is the policy daemon. This increases the functionality of our system even more. close(2). by discarding the current policy context and dropping the associated connection. This allows the kernel and the policy daemon to re–synchronize in case of any errors in creating or parsing the request messages. The policy daemon handles the policy resolution messages from the kernel. If no policy daemon has opened /dev/policy. read(2). The write(2) is responsible for returning the policy daemons decision to the blocked connection call. and the modified system calls in the kernel. no connection filtering is done. Our device driver supports the usual operations (open(2). we implemented a pseudo device driver . Furthermore. we decided to make the policy daemon a user level process. /dev/policy that serves as a communication path between the user–space policy daemon. 26 . It should be noted that both the device and the associated messaging protocol are not tied to any particular type of application. Finally. we have implemented the device driver as a loadable module. on whether to allow or deny connections. based on policies that are specified by some administrator and credentials retrieved remotely or provided by the kernel.2 Policy Device To maximize the flexibility of our system and allow for easy experimentation. When reading from the device the policy daemon blocks until there are requests to be served. write(2). All subsequent connect(2) and accept(2) calls will go through the procedure described in the previous section. without needing to recompile the whole kernel. since we can add functionality dynamically.4. and writes back a reply. It is a user level process responsible for making decisions. and ioctl(2)).

In the current implementation. The daemon receives each request (see Example 4) from the kernel by reading the device. literally without any modifications. /* Sequence Number */ /* User Id */ /* Number of Fields */ /* Lengths of Fields */ /* Fields */ 27 . The request contains all the information relevant to that connection as described in Section 4. char *field[N]. such policy changes only affect new connections. are initially read in from a file. Processing of the request is done by the daemon using the KeyNote library. It is possible to remove old policies and add new ones dynamically. u_int32_t seq. If credential “privacy” is a requirement. relevant to the distributed firewall). The credentials are stored by user ID and IP address. as we mentioned earlier. u_int32_t N. u_int32_t l[N]. one could secure this connection using IPsec or SSL. u_int32_t uid. A very simple approach to that is fetching the credentials via HTTP from a remote web server.Policies. While the information received in a particular message is applicationdependent (in our case. and a decision to accept or deny it is reached. using the policy device. and provided to anyone requesting them. In Section 5 we will discuss how these changes can potentially be made to affect existing connections. the daemon itself has no awareness of the specific application. Communication between the policy daemon and the kernel is possible. it can be used to provide policy resolution services for many different applications. Finally the daemon writes the reply back to the kernel and waits for the next request. the policy daemon is not subject to the connection filtering mechanism.1. To avoid potential deadlocks. When using a remote repository server. if such functionality is required. or with the local or remote IP address (such credentials may look like the one in Example 2). as shown in Example 1. Thus. the daemon can fetch a credential based on the ID of the user associated with a connection.

the kernel will construct the appropriate context as discussed in Section 4. As part of the IKE exchange. in the f orm of one or more credentials. and has a local policy as shown in Example 5. The lack of a Conditions field means that there are no restrictions imposed on the policies specified by the administrative key. This context will contain the local and remote IP addresses and ports for the connection. we discuss the course of events during two incoming TCP connection requests. the fact that the connection is protected by IPsec. the lengths of those fields. and finally the fields themselves.Example 4: The request to the policy daemon is comprised of the following fields: a sequence number uniquely identifying the request. a KeyNote credential as shown in Example 6 is provided to the local host. the remote user or host will have established an IPsec Security Association with the local host using IKE. the number of information fields that will be included in the request. 4. In our particular scenario. the policy simply states that some administrative key will specify our policy.1. In the case of a connection coming in over IPsec. one of which is IPsec–protected. the ID of the user the connection request belongs to.4 Example Scenario To better explain the interaction of the various components in the distributed firewall. KeyNote-Version: 2 Authorizer: "POLICY" Licensees: ADMINISTRATIVE_KEY Example 5:End-host local security policy. Once the TCP connection is received. 28 . The local host where the connection is coming is part of a distributed firewall.

130. the connection is ultimately denied. the positive response will be sent back to the kernel. a distributed/replicated database could be used instead. In our current implementation. a chain of credentials delegating authority). the policy daemon will try to acquire relevant credentials by contacting a remote server where these are stored. credentials where the user’s public key or the remote host’s address appears in the Licensees field are retrieved and cached locally (Example 2 lists an example credential that refers to an IP address). The policy daemon uses the public key of the remote user (when it is known. If KeyNote does not authorize the connection. etc.006.e.141") -> "true". when IPsec is in use) and the IP . we use a web server as the credential repository. which will then permit the TCP connection to proceed. This information along with the credential acquired via IPsec will be passed to the policy daemon. i. These are then used in conjunction with the information provided by the kernel to re-examine the request. (app_domain == 29 . The policy daemon will perform a KeyNote evaluation using the local policy and the credential. If it is again denied.the time of day. more specifically. In our case. In a large-scale network. KeyNote-Version: 2 Authorizer: ADMINISTRATIVE_KEY Licensees: USER_KEY Conditions: (app_domain == "IPsec policy" && encryption_algorithm == "3DES" && local_address == "158. Note that more credentials may be provided during the IKE negotiation (for example. address of the remote host as the keys to lookup credentials with. and will determine whether the connection is authorized or not.

it adds the overhead of cross domain calls between user space and kernel. we could simply merge the two clauses (the IPsec policy clause could specify that the specific user may talk to TCP port 23 only over that SA). we use the fact that multiple expressions can be included in a single KeyNote credential. KeyNote is used as a common language for expressing policies that can be distributed in different applications and systems. As we described in Section 4. the policy daemon runs as a user level process that communicates with the kernel via a device driver. we are of building a more general and complete system. WORK DEVELOPMENT IN There are a number of possible extensions that we plan to work on in the process As part of the STRONGMAN project at the University of Pennsylvania. Example 6:A credential from the administrator to some user. we could simplify the overall architecture by skipping the security check for TCP connections coming over an IPsec tunnel. In that case. This is a subject of ongoing research." distributed firewall " && @local_port == 23 && encrypted == "yes" && authenticated == "yes") -> "true". The distributed firewall is an important component in the STRONGMAN architecture.. Since IPsec also enforces some form of access control on packets. Signature: . Unfortunately. examining the application of higher-level security policy languages to large-scale network management. An alternate design 30 . 5. To do this. authorizing that user to establish an IPsec Security Association (SA) with the local host and to connect to port 23 (telnet) over that SA.3.. This design maximizes the flexibility of our system and allows for easy experimentation.

The rest of the rules would be established dynamically through the key exchange (or policy discovery) mechanisms in IPsec (or equivalent protocol). we invoke the policy daemon only the first time we encounter a new type of packet. This will allow per-packet. as opposed to per-connection. a . We plan to expand our implementation by adding an IP filter-like mechanism for a more fine grained control (perhaps based on some existing filtering package. e. like IPF). potentially allowing for even higher throughput and much lower cost.g . The cost of always-encrypted communication is less than one might think: PCI cards that cost less than US$300 retail (year 2000 prices) can easily achieve 100Mbps sustained throughput while encrypting/decrypting. In order to avoid the high overhead of such an approach we plan to use “policy caching. and any other packets of the same type will be treated accordingly. Another point to address is policy updates. However. This approach can potentially scale much better than initializing or updating packet filters at the same time policy is updated. thus. we can simply flush the cache. a packet based implementation would also limit the types of “scanning” that an attacker might perform. much like nfssvc(2). The policy daemon will then have direct access to the policy context queue. most hosts would have a minimal set of filtering entries established at boot time. packet belonging to a new connection. This however imposes greater demands on the credentialdistribution mechanism. We should note here that in our view most communications should be secured end-to-end (via IPsec or other similar mechanism). In the event of a policy change. As we mentioned in Section 4. there also exist a number of ethernet cards with built-in support for IPsec. as a form of pre-caching. Apart from protecting applications based on UDP.3.” With policy caching. we can update the policies of the daemon dynamically. eliminating the system call overhead.would be to run the policy daemon inside the kernel. Given the simplicity of the KeyNote language. policy updates do not 31 . policing. The decision of the policy daemon may be cached (subject to policy) in the filtering mechanism. Our current system focuses on controlling TCP connections. it is also possible to statically analyze the policies and credentials and derive in advance the necessary packet filtering rules.

The interaction between application-specific and lower-level (such as those equivalent to packet filtering) policies is of particular interest. The Napoleon system [18] defines a layered group-based access control scheme that is in some ways similar to the distributed firewall concept we have described. Connections that do not comply with the changes will be terminated by the kernel. although they could potentially be extended to support some credential-based policy mechanism similar to what we describe in our paper. We have already mentioned that KeyNote may be used to express applicationspecific policies. A simple way of adding this capability is by using the already existing setsockopt (2) system call. One final point to address is credential discovery . web server. RELATED A lot of work has been done over the previous years in the area of (traditional) Described different approaches to host-based enforcement of security policy. We would like to add a revocation mechanism that goes through the list of all the connections and re-applies the policies. The policy daemon can then process these credentials along with the request.affect already existing connections in the current implementation. This approach requires minimal modifications in our existing system. WORK firewalls. and the relevant credentials may be distributed over the same channels (IPsec. These credentials will then be added to any policy context requests associated with the socket. as it is possible to do ver y fine-grained access control by appropriately mixing these. Policies are compiled 32 . One obvious method of doing so is by adding an ioctl(2) call that notifies the kernel of a policy update. 6. the kernel then walks the list of TCP connections and sends a policy resolution request to the policy daemon. Users need a way to discover what credentials they (might) need to supply to the system along with their request for a connection. These mechanisms depend on the IP addresses for access control.). although it is mostly targeted to RMI environments like CORBA. pretending the connection was just initiated. etc.

Permit delegation.Express multi-application policies. only those relevant to a specific firewall). through use of wrapper modules that understand the application specific protocols. or forward them (using DCE RPC) to a remote host. policies of the type “email has to either be . although a pull-based method can also be used. since. The language used is independent of the firewalls and routers used. an intermediate level language (KeyNote) used by the mechanisms. 2. In our approach. Perhaps the most relevant work is that of [2]. The Adage/Pledge system uses SSL and X. and end users and used in an integrated policy framework. that would be each end host) and pushed out to them at policy creation or update time. The STRONGMAN project at the University of Pennsylvania is aiming at simplifying security policy management by providing an application-independent policy specification language that can be compiled to application-specific KeyNote credentials. Connections to protected ports are reported to a local security manager which decides whether to drop.509-based authentication to provide applications with a library that allows centralized rights management. 33 .Express Mixed-layer policies ( e.g. . which enables decentralized management (since KeyNote allows building arbitrary hierarchies of trust). Access Control Lists (ACLs) appropriate for each application (in our case.Allows incremental and asynchronous policy updates. when policy changes. rather than just packet filtering rules. These credentials can then be distributed to applications. and the actual mechanisms enforcing policy. Policies are compiled to ACLs and distributed to the various hosts in the secured network. 3.g. based on the ACLs. This allows us to: 1. 4. signed in the application layer or delivered over an IPsec SA that was authenticated with a credential matching the user in the From field of the email”). hosts. we introduce a three-layer system: a high-level policy language (equivalent in some sense to that used in Firmato). The approach there is use of a “network grouping” language that is customized for each managed firewall at that firewall. only the relevant KeyNote credentials need to be updated and distributed ( e. Snare Work [9] is a DCE-based system that can provide transparent security services (including access control) to end-applications.

i. a web server. Alternately. since all the relevant information is present at the decision point. various shortcomings of traditional firewalls are overcome: Security is no longer dependent on restricting the network topology. Under this scheme. telecommuters. a directory-like mechanism. . .e. Security policy is specified using KeyNote policies and credentials. Since enforcement occurs at the endpoints. This allows considerable flexibility in defining the “security perimeter. network security policy specification remains under the control of the network administrator. e. Its enforcement. CONCLUSION Since we no longer solely depend on a single firewall for protection.g. however. the end host. 8. is left up to the hosts in the protected network. also do not create windows of vulnerability. since it delegates a lot of the filtering to the end hosts. FTP) which was difficult when done on a . 34 . traditional firewall. either intentionally or inadvertently. The number of outside connections the protected network is no longer a cause for administration nightmares.g.We have discussed the concept of a distributed firewall. the burden placed on the traditional firewall is lessened significantly. “Backdoor” connections set up by users. Adding or removing links has no impact on the security of the network. and is distributed (through IPsec. becomes significantly easier. Filtering of certain protocols ( e.” which can easily be extended to safely include remote hosts and networks ( extranets). or some other protocol) to the users and hosts in the network. we eliminate a performance bottleneck.

In fact.g . AT&T phone network). which may be very large for large networks (e. the . other than potential performance degradation. even if traditional firewalls are utilized. 35 .End-to-end encryption is made possible without sacrificing security. Furthermore. This significantly eases the task of policy updating. On the other hand. Denial-of-service attack mitigation is more effective at the network ingress points (depending on the particular kind of attack). only the hosts that actually need to communicate need to determine what the relevant policy with regard to each other is. end-to-end encryption greatly improves the security of the distributed firewall. distributed firewall architecture requires high quality administration tools. Note that this is mostly an implementation issue. Also. The latter is still useful in certain tasks: It is easier to counter infrastructure attacks that operate at a level lower than the distributed firewall. that is. policies and their distribution scales much better with respect to the network size and user base than a more tightly-coupled and synchronized approach would. and does not require each host/ firewall to maintain the complete set of policies. and de facto places high confidence in them. already. as was the case with traditional firewalls. large networks with a modest number of perimeter firewalls are becoming difficult to manage manually. there is no reason why a distributed firewall cannot operate at arbitrarily low layers. We believe that this is an inevitable trend however. note that the introduction of a distributed firewall infrastructure in a network does not completely eliminate the need for a traditional firewall. Application-specific policies may be made available to end applications over the same distribution channel. Filtering (and other policy) rules are distributed and established on an as-needed basis.

e.Intrusion detection systems are more effective when located at a traditional firewall. A final point is that. to avoid duplicated filters and windows of vulnerability. even more interesting. The traditional firewall may protect end hosts that do not (or cannot) support the distributed firewall mechanisms. switched or broadcast) and . Integration with the policy specification and distribution mechanisms is especially important here. We have demonstrated the feasibility of the distributed firewall by building a working prototype.g. efficiency. The mechanism we have already described may be used in both environments. The interactions between traditional (and. Since most of the security enforcement has been moved to the end hosts. 36 . transparent firewalls may be used ). a traditional firewall may simply act as a fail-safe security mechanism. a fully distributed firewall architecture is very similar to a network with a large number of internal firewalls. Finally. f rom an administrative point of view. the task of a traditional firewall operating in a distributed firewall infrastructure is significantly eased. We hope that our work will stimulate further research in this area. transparent) and distributed firewalls are a subject for future research. and scalability of this architecture. Further experimentation is needed to determine the robustness. the end-to-end security guarantees (better infrastructure support is needed to make IPsec work through a firewall. The two main differences between the two approaches lie in the granularity of “internal” protection (which also depends on the protected subnet topology. alternately. where complete traffic information is available.

htm l Kurose and Ross .interhack. REFERENCES t www.zdnet.columbia.9.cs.Computer Networking A TopDown Approach Featuring The Internet 37 .co m

Sign up to vote on this title
UsefulNot useful