Monday, 24 February 2014

An Overview of the Singularity Project

An Overview of the Singularity Project:

Abstract.
Singularity is a research project in Microsoft Research that started with the question: what would a software platform look like if it was designed from scratch with the primary goal of dependability? Singularity is working to answer this question by building on advances in programming languages and tools to develop a new system architecture and operating system (named
Singularity), with the aim of producing a more robust and dependable software platform. Singularity demonstrates the practicality of new technologies and
architectural decisions, which should lead to the construction of more robust and dependable systems.

1 Introduction
Software runs on a platform that has evolved over the past 40 years and is increasingly showing its age. This platform is the vast collection of code—operating systems, programming languages, compilers, libraries, run-time systems, middleware, etc.—and hardware that enables a program to execute. On one hand, this platform is an enormous success in both financial and practical terms. The platform forms the foundation of the $179 billion dollar packaged software industry [3] and has enabled revolutionary innovations such as the Internet. On the other hand, the platform and software running on it are less robust, reliable, and secure than most users (and developers!) would wish.
Part of the problem is that our current platform has not evolved far beyond the computer architectures, operating systems, and programming languages of the 1960’s and 1970’s. The
computing environment of that period was very different from today’s milieu. Computers were
extremely limited in speed and memory capacity; used only by a small group of technically literate and non-malicious users; and were rarely networked or connected to physical devices.  None of these characteristics remains true, but modern computer architectures, operating systems,  and programming languages have not evolved to accommodate a fundamental shift in computers
and their use.
Singularity is a research project in Microsoft Research that started with the question: what would a software platform look like if it was designed from scratch with the primary goal of dependability, instead of the more common goal of performance?
Singularity is working to answer this question by building on advances in programming languages and programming tools to develop and build a new system architecture and operating system (named Singularity), with the aim of producing a more robust and dependable software platform. Although dependability is difficult to measure in a research prototype, Singularity shows the practicality of new
technologies and architectural decisions, which should lead to more robust and dependable
systems in the future.
With its exponential rate of progress, hardware evolution commonly appears to drive fundamental changes in systems and applications. Software, with its more glacial progress, rarely creates opportunities for fundamental improvements. However, software does evolve, and its change makes it possible—and necessary—to rethink old assumptions and practices. Advances in programming languages, run-time systems, and program analysis tools provide the building blocks to construct architectures and systems that are more dependable and robust than existing systems:
Expressive, safe programming languages, such as Java and C#. Type safety ensures a value or object is always correctly interpreted and manipulated. Memory safety ensures a program references memory only within the bounds of valid, live objects.
 Optimizing compilers and high performance run-time systems generate safe code that runs at speeds comparable to unsafe code [20]. These compilers, unlike the more common just-in-time (JIT) compilers, perform global optimizations that mitigate safetyrelated overhead. Garbage collectors in these systems reclaim memory with overhead comparable to that of explicit de-allocation.
Validation techniques ensure the end-to-end type safety of the compiler, compiled code, and run-time system. Typed intermediate and assembly language validate the proper operations of system components and ensure the language safety guarantees that underlie system correctness.
 Sound, specification-driven defect detection tools ensure the correctness of many aspects of the system. A sound tool finds all occurrences of an error—along with false positives—and consequently can reliably indicate when a particular defect has been eliminated. Specification-driven tools do not look for a hardwired collection of defects.
They are extensible and can be adapted to check that many program or library-specific abstractions are used correctly.
Languages and tools based on these advances are in use detecting and preventing programming errors. Less well explored is how these mechanisms enable deep changes in system architecture, which in turn might advance the ultimate goal of preventing and mitigating software defects [28].
The rest of this paper describes the Singularity system in detail. Section 2 contains an overview of the system and its novel aspects. Section 3 describes the Singularity system  architecture, focusing on the kernel, processes, and the language run-time system.
Section 4
describes the programming language support for the system. Section 5 describes the I/O and
security system. Section 6 provides some performance benchmarks. Section 7 surveys related
work. Appendix A contains a list of the kernel ABI calls.
2 Singularity
Singularity is a new operating system being developed as a basis for more dependable
system and application software [28]. Singularity exploits advances in programming languages
and tools to create an environment in which software is more likely to be built correctly, program
behavior is easier to verify, and run-time failures can be contained.
A key aspect of Singularity is an extension model based on Software-Isolated Processes
(SIPs), which encapsulate pieces of an application or a system and provide information hiding,
failure isolation, and strong interfaces. SIPs are used throughout the operating system and
application software. We believe that building a system on this abstraction will lead to more
dependable software.
SIPs are the OS processes on Singularity. All code outside the kernel executes in a SIP. SIPs
differ from conventional operating system processes in a number of ways:
 SIPs are closed object spaces, not address spaces. Two Singularity processes cannot  simultaneously access an object. Communications between processes transfers exclusive ownership of data.
 SIPs are closed code spaces. A process cannot dynamically load or generate code.
 SIPs do not rely on memory management hardware for isolation. Multiple SIPs can reside
in a physical or virtual address space.
 Communications between SIPs is through bidirectional, strongly typed, higher-order channels. A channel specifies its communications protocol as well as the values transferred, and both aspects are verified.
 SIPs are inexpensive to create and communication between SIPs incurs low overhead.
Low cost makes it practical to use SIPs as a fine-grain isolation and extension mechanism.
 SIPs are created and terminated by the operating system, so that on termination, a SIP’s resources can be efficiently reclaimed.  SIPs executed independently, even to the extent of having different data layouts, run-time systems, and garbage collectors.
SIPs are not just used to encapsulate application extensions. Singularity uses a single
mechanism for both protection and extensibility, instead of the conventional dual mechanisms of
processes and dynamic code loading. As a consequence, Singularity needs only one error
recovery model, one communication mechanism, one security policy, and one programming
model, rather than the layers of partially redundant mechanisms and policies in current systems.
A key experiment in Singularity is to construct an entire operating system using SIPs and
demonstrate that the resulting system is more dependable than a conventional system.
The Singularity kernel consists almost entirely of safe code and the rest of the system, which
executes in SIPs, consists of only verifiably safe code, including all device drivers, system
processes, and applications. While all untrusted code must
 be verifiably safe, parts of the
Singularity kernel and run-time system, called the trusted base, are not verifiably safe. Language
safety protects this trusted base from untrusted code.
The integrity of the SIPs depends on language safety and on a system-wide invariant that a
process does not hold a reference into another process’s object space.
Ensuring code safety is obviously essential. In the short term, Singularity relies on compiler
verification of source and intermediate code. In the future, typed assembly language (TAL) will
allow Singularity to verify the safety of compiled code [36, 38]. TAL requires that a program
executable supply a proof of its type safety (which can be produced automatically by a compiler
for a safe language). Verifying that a proof is correct and applicable to the instructions in an
executable is a straightforward task for a simple verifier of a few thousand lines of code. This
end-to-end verification strategy eliminates a compiler—a large, complex program—from
Singularity’s trusted base. The verifier must be carefully designed, implemented, and checked,
but these tasks are feasible because of its size and simplicity.
The memory independence invariant that prohibits cross-object space pointers serves several
purposes. First, it enhances the data abstraction and failure isolation of a process by hiding
implementation details and preventing dangling pointers into terminated processes. Second, it
relaxes implementation constraints by allowing processes to have different run-time systems and
their garbage collectors to run without coordination. Third, it clarifies resource accounting and
reclamation by making unambiguous a process’s ownership of a particular piece of memory.
Finally, it simplifies the kernel interface by eliminating the need to manipulate multiple types of
pointers and address spaces.
A major objection to this architecture is the difficulty of communicating through message
passing, as compared with the flexibility of directly sharing data. Singularity is addressing this
problem through an efficient messaging system, programming language extensions that concisely
specify communication over channels, and verification tools [19].


DOWNLOAD LINK:

Ant Algorithm

Ant Algorithm:

Contents
1 Abstract 1
2 Introduction 2
2.1 An Ant Colony . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3
2.2 Existing Protocols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2.1 Basic Ant Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.2.2 The Ant-Colony-Based Routing Algorithm for MANETs (ARA) . . . . 5
3 Algorithm 6
3.1 Basics of the Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.1.1 Random Walk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.1.2 FAnts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.1.3 Updating Routing Information . . . . . . . . . . . . . . . . . . . . . . 9
3.1.4 BAnts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.1.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.2 Extensions of the Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.2.1 Improving the route . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.2.2 Dealing with mobility . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.2.3 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4 Discussion 22
4.1 Comparison with Flooding . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.1.1 The Flooding Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.1.2 The Ant Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
4.1.3 Finding the Target . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.1.4 Quality of the found route . . . . . . . . . . . . . . . . . . . . . . . . 28
4.2 Route Maintenance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
4.2.1 Simulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
5 Summary and Conclusions 34
5.1 The ant algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
5.2 Simulation results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
6 Future Works 36
6.1 Ant parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
6.2 Route Maintenance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37


Abstract
In this report we present a routing algorithm for mobile ad hoc networks (MANETs). The algorithm uses techniques of route discovery that was observed by ants. FAnts walk randomly around the network to find the target. These FAnts leave their track in writing routing table entries in each node they pass. If the target is found, another ant (BAnt) can walk back along this route and also writes the routing table entries. When the BAnts reaches the source the routing table of all nodes between the source and the destination carry the necessary routing information and data packets can be sent.
The routing algorithm based on ants was developed by G. Di Carlo and M. Dorigo [3] and M. Günes, U. Sorges and I. Bouazizi in [7] and further discussed in [6]. However, none of these works investigated the problem of mobile networks, where nodes change their position over time. In such a mobile network, some nodes may be connected during route discovery, but are disconnected when the data should be transferred. If this happen a mechanism called Route Maintenance will start to find the node the messages should be sent to. That is how we guaranteed that the route is stable and doesn’t break down.
Simulation results show that the total number of messages to find the target can be reduced compared to a basic flooding algorithm.
Introduction
In this report we introduce a routing protocol we developed. It is based on ideas of different ant algorithms. In particular, we consider mobile ad hoc networks (MANETs), where the network
nodes are able to change their position and the communication between the network nodes is established over a wireless medium. Also, we consider homogenous networks with no additional
infrastructure. There is no difference between the nodes. This has among other things the following consequences:
• Nodes can leave and join the network at any time
• There is no centralized control or overview
• Packets have to be forwarded form node to node
Routing in MANETs is a challenge due to the fact that a good path can suddenly become an inefficent or even an infeasible one. To succeed, a routing algorithm for such an environment
needs to be adaptive and to be able to deal with sudden changes in the topology of the network. These properties can also be found in nature. Insect populations show us a robust and efficient
way to adapt to the changing environment. This fact inspired us to design a routing algorithm based on simple biological agents, in our case ants.



DOWNLOAD LINK:

A Tutorial on the Implementation of Ad-hoc On Demand Distance Vector (AODV) Protocol in Network Simulator (NS-2)

A Tutorial on the Implementation of Ad-hoc On Demand Distance Vector (AODV) Protocol in Network Simulator (NS-2)


Contents
1 Introduction 3
2 File Dependency of AODV Protocol 3
3 Flow of AODV 3
4 Trace Format of AODV 5
5 Main Implementation Files aodv.cc and aodv.h 6
5.1 How to Enable Hello Packets . . . . . . . . . . . . . . . . . . . . 6
5.2 Timers Used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
5.3 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
5.3.1 General Functions . . . . . . . . . . . . . . . . . . . . . . 7
5.3.2 Functions for Routing Table Management . . . . . . . . . 8
5.3.3 Functions for Neighbors Management . . . . . . . . . . . 9
5.3.4 Functions for Broadcast ID Management . . . . . . . . . 9
5.3.5 Functions for Packet Transmission Management . . . . . 9
5.3.6 Functions for Packet Reception Management . . . . . . . 10
6 Appendex : A Simple TCL Script to Run the AODV Protocol 11

Abstract
The Network Simulator (NS-2) is a most widely used network simulator. It has the capabilities to simulate a range of networks including wired and wireless networks. In this tutorial, we present the implementation of Ad Hoc On-Demand Distance Vector (AODV) Protocol in NS-2. This tutorial is targeted to the novice user who wants to understand the implementation of AODV Protocol in NS-2.



DOWNLOAD LINK:

Ariadne: A Secure On-Demand Routing Protocol for Ad Hoc Networks

Ariadne: A Secure On-Demand Routing Protocol for Ad Hoc Networks:

Abstract. An ad hoc network is a group of wireless mobile computers (or nodes), in which individual nodes cooperate by forwarding packets for each other to allow nodes to communicate beyond direct wireless transmission range. Prior research in ad hoc networking has generally studied the routing problem in a non-adversarial setting, assuming a trusted environment. In this paper, we present attacks
against routing in ad hoc networks, and we present the design and performance evaluation of a new secure on-demand ad hoc network routing protocol, called Ariadne. Ariadne prevents attackers or compromised nodes from tampering with uncompromised routes consisting of uncompromised nodes, and also prevents many types of Denial-of-Service attacks. In addition, Ariadne is efficient, using only highly efficient symmetric cryptographic primitives.

1. Introduction
An ad hoc network is a group of wireless mobile computers (or nodes), in which nodes cooperate by forwarding packets for each other to allow them to communicate beyond direct wireless transmission range. Ad hoc networks require no centralized administration or fixed network infrastructure such as base stations or access points, and can be quickly and inexpensively set up as needed. They can be used in scenarios in which no infrastructure exists, or in which the existing infrastructure does not meet application requirements for reasons such as security or cost. Applications such as military
exercises, disaster relief, and mine site operation, for example, may benefit from ad hoc networking, but secure and reliable communication is a necessary prerequisite for such applications.



DOWNLOAD LINK:

Attacks on Peer-to-Peer Networks

Attacks on Peer-to-Peer Networks

Abstract
In this thesis, we collect information about known attacks on P2P networks. We try to classify them as well as study the different possible defense mechanisms. As a case study, we take Freenet, a third generation P2P system, which we deeply analyze, including simulating possible behaviors and reactions. Finally, we draw several conclusions about what should be avoided when designing P2P
applications and give a new possible approach to making a P2P application as resilient as possible to malicious users.

Contents
1 Introduction 3
1.1 Peer-to-Peer Network Definition . . . . . . . . . . . . . . . . . . . 3
1.2 Historical . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Future and Vulnerability . . . . . . . . . . . . . . . . . . . . . . . 4
1.4 Thesis Organisation . . . . . . . . . . . . . . . . . . . . . . . . . 4
2 General Attacks and Defences 6
2.1 DOS Attacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.1.1 Defenses . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2 Man-in-the-middle Attack . . . . . . . . . . . . . . . . . . . . . . 7
2.2.1 Defenses . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.3 Worm Propagation . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.3.1 Defenses . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.4 The Human Factor . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3 Specific P2P Attacks and Defenses 11
3.1 Rational Attacks . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.2 File Poisoning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.2.1 Defenses . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.3 Sybil Attack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.3.1 Defenses . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.4 Eclipse Attack . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.4.1 Defenses . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4 First conclusions 16
4.1 Only Pure P2P! . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.2 Reputation-based Systems . . . . . . . . . . . . . . . . . . . . . . 16
4.3 Randomization . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
5 Case study: Freenet 18
5.1 Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
5.2 Protocol Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 18
5.3 Protocol Details . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
5.3.1 Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
5.3.2 Retrieving Data . . . . . . . . . . . . . . . . . . . . . . . 20
5.3.3 Storing Data . . . . . . . . . . . . . . . . . . . . . . . . . 21
5.3.4 Managing Data . . . . . . . . . . . . . . . . . . . . . . . . 21
5.3.5 Adding Nodes . . . . . . . . . . . . . . . . . . . . . . . . . 22
5.4 Facts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
5.5 Attacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
5.5.1 DOS Attack I . . . . . . . . . . . . . . . . . . . . . . . . . 22
5.5.2 Malice and Eavesdropping . . . . . . . . . . . . . . . . . . 23
5.5.3 Anonymity . . . . . . . . . . . . . . . . . . . . . . . . . . 24
5.5.4 More-then-just-routing Attacks . . . . . . . . . . . . . . . 24
5.5.5 Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . 25
5.5.6 DOS Attack II . . . . . . . . . . . . . . . . . . . . . . . . 27
5.6 Future . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
6 Final Conclusions 29
6.1 Concluding Weaknesses . . . . . . . . . . . . . . . . . . . . . . . 29
6.2 Our Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
6.2.1 Observations . . . . . . . . . . . . . . . . . . . . . . . . . 30
6.2.2 PGP, Web of Trust and Darknets . . . . . . . . . . . . . . 30
6.2.3 P2GP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
6.3 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32



DOWNLOAD LINK:

Computer Networking : A Top-Down Approach Featuring the Internet

Computer Networking : A Top-Down Approach Featuring the Internet:

1.   Computer Networks and the Internet
1. What is the Internet?
2. What is a Protocol?
3. The Network Edge
4. The Network Core
   Interactive Programs for Tracing Routes in the Internet
   Java Applet: Message Switching and Packet Switching
5. Access Networks and Physical Media
6. Delay and Loss in Packet-Switched Networks
7. Protocol Layers and Their Service Models
8. Internet Backbones, NAPs and ISPs
9. A Brief History of Computer Networking and the Internet
10.ATM
11.Summary
12.Homework Problems and Discussion Questions
2. Application Layer
1. Principles of Application-Layer Protocols
2. The World Wide Web: HTTP
3. File Transfer: FTP
4. Electronic Mail in the Internet
5. The Internet's Directory Service: DNS
■  Interactive Programs for Exploring DNS
6. Socket Programming with TCP
7. Socket Programming with UDP
8. Building a Simple Web Server
9. Summary
10.Homework Problems and Discussion Questions
3. Transport Layer
1. Transport-Layer Services and Principles
2. Multiplexing and Demultiplexing Applications
3. Connectionless Transport: UDP
4. Principles of Reliable of Data Transfer
■  Java Applet: Flow Control in Action
5. Connection-Oriented Transport: TCP
6. Principles of Congestion Control
7. TCP Congestion Control
8. Summary
9. Homework Problems and Discussion Questions
4. Network Layer and Routing
1. Introduction and Network Service Model
2. Routing Principles
3. Hierarchical Routing
4. Internet Protocol
■  Java Applet: IP Fragmentation
5. Routing in the Internet
6. What is Inside a Router?
7. IPv6
8. Multicast Routing
9. Summary
10.Homework Problems and Discussion Questions
5. Link Layer and Local Area Networks
1. The Data Link Layer: Introduction, Services
2. Error Detection and Correction
3. Multiple Acces Protocols and LANs
4. LAN Addresses and ARP
5. Ethernet
■  CSMA/CD Applet
6. Hubs, Bridges and Switches
7. Wireless LANs: IEEE 802.11
8. The Point-to-Point Protocol
9.
ATM
10.
X.25 and Frame Relay
11.Summary
12.Homework Problems and Discussion Questions
6. Multimedia Networking
1. Multimedia Networking Applications
2. Streaming Stored Audio and Video
3. Making the Best of the Best-Effort Service: An Internet Phone Example
4. RTP
5. Beyond Best Effort
6. Scheduling and Policing Mechanisms for Providing QoS Guarantees
7. Integrated Services
8. RSVP
9. Differentiated Services
10. Summary
11. Homework Problems and Discussion Questions
7.  Security in Computer Networks
1. What is Network Security?
2. Principles of Cryptography
3. Authentication: Who are You?
4. Integrity
5. Key Distribution and Certification
6. Secure E-Mail
7. Internet Commerce
8. Network-Layer Security: IPsec
■  1999 Panel Discussion on Internet Security
9. Summary
10. Homework Problems and Discussion Questions
8.  Network Management
Appendix
1. What is Network Managmenet?
2. The Infrastructure for Network Management
3. The Internet Network Management Framework
4. ASN.1
5. Firewalls
6. Summary
7. Homework Problems and Discussion Questions
●     Lab: Building a multi-threaded Web server in Java
●     Lab: Building a mail user agent in Java
●     Lab: Implementing a reliable transport protocol
●     Lab: Implementing a distributed, asynchronous distance vector routing algorithm


DOWNLOAD LINK:

A Taxonomy of DDoS Attack and DDoS Defense Mechanisms

A Taxonomy of DDoS Attack and DDoS Defense Mechanisms:

ABSTRACT
Distributed denial-of-service (DDoS) is a rapidly growing problem. The multitude and variety of both the attacks and the defense approaches is overwhelming. This paper presents two taxonomies for classifying attacks and defenses, and thus provides researchers with a better understanding of the problem and the current solution space. The attack classfication criteria was selected to highlight commonalities and important features of attack strategies, that define challenges and dictate the design of countermeasures. The defense taxonomy classifies the body of existing DDoS defenses based on their design decisions; it then shows how these decisions dictate the advantages and deficiencies of proposed solutions.



DOWNLOAD LINK: