BitTorrent Nathan Marz Raylene Yung. BitTorrent BitTorrent consists of two protocols – Tracker HTTP protocol (THP) How an agent joins a swarm How an agent.

Slides:



Advertisements
Similar presentations
Debugging ACL Scripts.
Advertisements

Peer-to-peer and agent-based computing P2P Algorithms.
Time Management By Zahira Gonzalez.
BitTorrent or BitCrunch: Evidence of a credit squeeze in BitTorrent?
Ch. 7 Process Synchronization (1/2) I Background F Producer - Consumer process :  Compiler, Assembler, Loader, · · · · · · F Bounded buffer.
The BitTorrent Protocol
Bit Torrent (Nick Feamster) February 25, BitTorrent Steps for publishing – Peer creates.torrent file and uploads to a web server: contains metadata.
CCNA – Network Fundamentals
Introduction to the Enhanced AIM When Q.i was first introduced, a ladder logic driver program – called the Application Interface Module (AIM) - was created.
CHAPTER 21 Inferential Statistical Analysis. Understanding probability The idea of probability is central to inferential statistics. It means the chance.
Fundamentals of Python: From First Programs Through Data Structures
Variance reduction techniques. 2 Introduction Simulation models should be coded such that they are efficient. Efficiency in terms of programming ensures.
Problem Solving and Program Design in C (5th Edition) by Jeri R. Hanly and Elliot B. Koffman Chapter 4 (Conditional Statements) © CPCS
CompSci 356: Computer Network Architectures Lecture 21: Content Distribution Chapter 9.4 Xiaowei Yang
Tags and Image Scoring for Robust Cooperation By Nathan Griffiths Presented at AAMAS 2008.
Mrs. Chapman. Tabs (Block Categories) Commands Available to use Script Area where you type your code Sprite Stage All sprites in this project.
Paul Solomine Security of P2P Systems. P2P Systems Used to download copyrighted files illegally. The RIAA is watching you… Spyware! General users become.
6. More on the For-Loop Using the Count Variable Developing For-Loop Solutions.
Probabilistic Verification of Discrete Event Systems Håkan L. S. Younes.
Tutorial 4 Decision Making with Control Structures and Statements Section A - Decision Making JavaScript Tutorial 4 -Decision Making with Control.
Principle of Functional Verification Chapter 1~3 Presenter : Fu-Ching Yang.
Fundamentals of Python: From First Programs Through Data Structures
Time, Clocks, and the Ordering of Events in a Distributed System Leslie Lamport (1978) Presented by: Yoav Kantor.
MSF Testing Introduction Functional Testing Performance Testing.
Mr. Wortzman. Tabs (Block Categories) Available Blocks Script Area Sprite Stage All sprites in this project.
The Bittorrent Protocol
Lucent Technologies – Proprietary Use pursuant to company instruction Learning Sequential Models for Detecting Anomalous Protocol Usage (work in progress)
Advanced Web 2012 Lecture 4 Sean Costain PHP Sean Costain 2012 What is PHP? PHP is a widely-used general-purpose scripting language that is especially.
TESTING STRATEGY Requires a focus because there are many possible test areas and different types of testing available for each one of those areas. Because.
Slicing the Onion: Anonymity Using Unreliable Overlays Sachin Katti Jeffrey Cohen & Dina Katabi.
Exploring VoD in P2P Swarming Systems By Siddhartha Annapureddy, Saikat Guha, Christos Gkantsidis, Dinan Gunawardena, Pablo Rodriguez Presented by Svetlana.
BitTorrent Presentation by: NANO Surmi Chatterjee Nagakalyani Padakanti Sajitha Iqbal Reetu Sinha Fatemeh Marashi.
BitTorrent Internet Technologies and Applications.
BitTorrent How it applies to networking. What is BitTorrent P2P file sharing protocol Allows users to distribute large amounts of data without placing.
Designing For Testability. Incorporate design features that facilitate testing Include features to: –Support test automation at all levels (unit, integration,
Parallel Programming Models Jihad El-Sana These slides are based on the book: Introduction to Parallel Computing, Blaise Barney, Lawrence Livermore National.
Topics covered: Memory subsystem CSE243: Introduction to Computer Architecture and Hardware/Software Interface.
A P2P file distribution system ——BitTorrent Pegasus Team CMPE 208.
Computer Security and Penetration Testing
Programming & Scratch. Programming Learning to program is ultimately about learning to think logically and to approach problems methodically. The building.
David A. Bryan, PPSP Workshop, Beijing, China, June 17th and 18th 2010 PPSP Protocol Considerations.
Chapter 3: Processes. 3.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts - 7 th Edition, Feb 7, 2006 Process Concept Process – a program.
COMPUTER PROGRAMMING. Control Structures A program is usually not limited to a linear sequence of instructions. During its process it may repeat code.
1 Probabilistic Model Checking of Systems with a Large State Space: A Stratified Approach Shou-pon Lin Advisor: Nicholas F. Maxemchuk Department of Electrical.
Fundamentals of Proxying. Proxy Server Fundamentals  Proxy simply means acting on someone other’s behalf  A Proxy acts on behalf of the client or user.
CPS120: Introduction to Computer Science Decision Making in Programs.
Simulation is the process of studying the behavior of a real system by using a model that replicates the behavior of the system under different scenarios.
Traffic Management - OpenFlow Switch on the NetFPGA platform Chun-Jen Chung( ) Sriram Gopinath( )
11 CLUSTERING AND AVAILABILITY Chapter 11. Chapter 11: CLUSTERING AND AVAILABILITY2 OVERVIEW  Describe the clustering capabilities of Microsoft Windows.
Swap Space and Other Memory Management Issues Operating Systems: Internals and Design Principles.
Local Distributed Agent Matchmaking Elth Ogston and Stamatis Vassiliadis Computer Engineering Laboratory TU Delft.
1 1 Slide Simulation Professor Ahmadi. 2 2 Slide Simulation Chapter Outline n Computer Simulation n Simulation Modeling n Random Variables and Pseudo-Random.
M1G Introduction to Programming 2 3. Creating Classes: Room and Item.
More on OO Programming Our programs will no longer just be a main method or a main which calls a collection of other methods –instead, a program will be.
Software Systems Verification and Validation Laboratory Assignment 4 Model checking Assignment date: Lab 4 Delivery date: Lab 4, 5.
Lecture 17 Page 1 Advanced Network Security Network Denial of Service Attacks Advanced Network Security Peter Reiher August, 2014.
End-to-end Publishing Using Bittorrent. Bittorrent Bittorrent is a widely used peer-to- peer network used to distribute files, especially large ones It.
Agenda  Quick Review  Finish Introduction  Java Threads.
Learning Javascript From Mr Saem
Computer Programming 12 Lesson 6 – Loop structure By: Dan Lunney.
By: Brett Belin. Used to be only tackled by highly trained professionals As the internet grew, more and more people became familiar with securing a network.
11 Making Decisions in a Program Session 2.3. Session Overview  Introduce the idea of an algorithm  Show how a program can make logical decisions based.
An example of peer-to-peer application
Firewall Exercise.
Modeling Cyberspace Operations
Learning to Program in Python
HAPPY NEW YEAR! Lesson 7: If-statements unplugged
The BitTorrent Protocol
How to allow the program to know when to stop a loop.
Presentation transcript:

BitTorrent Nathan Marz Raylene Yung

BitTorrent BitTorrent consists of two protocols – Tracker HTTP protocol (THP) How an agent joins a swarm How an agent learns of other agents in the swarm – Peer Wire Protocol (PWP) How agents connect with each other (handshake) How agents tell each other what data they have How agents request and send data We focused on this part of the protocol

Peer Wire Protocol Messages Msg NameSenderRecipientPayload CHOKEPeer1Remote peer UNCHOKEPeer1Remote peer INTERESTEDPeer1Remote peer UNINTERESTEDPeer1Remote peer HAVEPeer1Peer2indexthe index of a piece that Peer1 has successfully downloaded and validated BITFIELDPeer1Peer2BitfieldContains bitfield of pieces successfully downloaded by Peer1 REQUESTPeer1Peer2 Used to identify specific block PIECEPeer1Peer2 CANCELPeer1Peer2 Used to identify specific block

Overview PRISM is not a natural way to define distributed protocols with non-deterministic adversary Presentation: 1.Overview of challenges of modeling a complicated protocol in PRISM 2.Techniques we used to overcome these challenges 3.Results

Generating PRISM Model We wrote PHP Script – Always generates: One seeder One attacker – Takes parameters: # Agents # Pieces # Blocks per Piece

Issues with PRISM Problem #1: We want to model logical structures like: If received block “l” for piece “p” If all blocks downloaded for “p” if all blocks for “p” verify set status of “p” to dl/verified else clear all blocks for “p” PRISM only allows commands of the following form: [condition] -> [probability distribution of results]

Issues with PRISM Solution: Hierarchical commands Cond: a = 1 Result: 0.5: a’= : a’=2 Cond: b = 1 & c=1 Result: c’=2 Cond: b=2 Result: c’=3 Cond: ELSE Result: NULL [] a=1 & b=1 & c=1 -> 0.5: (a’=0) & (c’=2) + 0.5: (a’=2) & (c’=2); [] a=1 & b=2 -> 0.5: (a’=0) & (c’=3) + 0.5: (a’=2) & (c’=3); [] a=1 & !(b=1 & c=1) & !(b=2) -> 0.5: (a’=0) + 0.5: (a’=2); ELSE Conjunction of negations of siblings

Issues with PRISM Problem #2: ONLY the attacker can be nondeterministic AND all agents must be able to make progress at the same time If agents are nondeterministic: – “Attacks” PRISM finds will include attacker’s decisions and agent’s decisions – This doesn’t make sense Attacker should only be allowed to do a certain amount of actions before letting the agents process their state/make requests/etc.

Issues with PRISM Solution Part 1: – Simulation is turn based – Turn counter increments from agent 0 to agent 1 to agent 2, etc. and eventually back to agent 0 Cond: turn=0 Result: NULL Cond:ELSE Result: turn’=1 (... Tasks for agent 0 …)

Issues with PRISM Solution Part 2: Force agent to execute tasks in sequence – Takes advantage of most tasks being self- contained and independent Ex: If I received an “interested” message from agent “2”, set internal state of “thinks_agent_2_is_interested” to true Ex: If I think agent “2” has a block, make a request for that block with random probability – Implemented with a “counter” variable

Issues with PRISM Solution Part 2 Cond: turn=0 Result: NULL Cond:ELSE Result: turn’=1 & counter’=0 Cond: counter=0 Result: counter’=1 Cond: counter=1 Result: counter’=2 Cond: ELSE Result: NULL Cond: ELSE Result: NULL (Task 1) (Task 2)

Issues with PRISM Problem #3: State space must be kept small or else PRISM runs out of memory – Various optimizations were made to reduce state space: 1.Counter variable instead of boolean flag for whether task was done during turn 2.Seeder doesn’t send requests and agents don’t send blocks to seeder – Maximum feasible model was (unfortunately): 2 agents 2 pieces 1 blocks 1 seeder 1 attacker Anything bigger causes PRISM to run out of memory

Sample Code

Results Our feasible model is too small to simulate any realistic scenario – Key part of attacks is #blocks/piece – # agents changes how attacks would work – In realistic scenario, agents are downloading from many different peers

Rational Reconstruction Handshaking protocol – Attackers can easily change agents perception of other agents (what pieces they have, what pieces they are interested in) – When something unusual happens, agents break connections – When connection reestablished they reset their perceptions

Rational Reconstruction Verify message consistency – BitTorrent protocol is unclear about what to do when a message is received – Example: What happens when an agent receives a “Piece” message? An agent should verify that they made a request for that data from the source IP address Otherwise, it could be an attacker sending bad data – Similar verification of IP addresses should occur with other BitTorrent messages

DOS Opportunity in BitTorrent Honest agent Good block Bad block If an attacker can cause an agent to accept one bad block, the agent needs to re-download entire piece! There are typically 200 blocks per piece by default! #blocks/piece is a speed/security tradeoff

Conclusion BitTorrent is too large and complicated to be analyzed by model checker More feasible approach would be to define specific attacks and use simulation to estimate their efficiency The conditions under which to accept data should be stricter than described in RFC