Giter Club home page Giter Club logo

sp3's Introduction

(SP)^3: A Simple Practical & Safe Packet Spoofing Protocol

Install an SP^3 Server: go get github.com/willscott/sp3

SP3 provides a mechanism through which a server which has the capability to spoof packets can offer that capability in a limited capacity. In particular, the protocol supports spoofing packets as long as the destination client consents in advance to receive those communications.

Why?

There are several uses of SP^3 we've thought of, and we're sure there are many more.

  • NAT hole-punching facilitation. Currently, NAT holepunching only works for UDP, partially because even when the clients are controlled, it generally requires root permissions to send packets with a specific sequence number. Having a source of packet injection can provide a mechanism to synchronize sequence numbers and create TCP connections between two NAT'ed machines.

  • Firewall characterization. It's often difficult to test how your network will respond to packets sent from black-holed or unadvertised prefixes. A source of packets can allow you to validate firewall rules and routing policy.

  • Circumvention. The ability to send packets from arbitrary sources can help to mask traffic by adding a layer of cover trafic and IP diversity that makes surveilance much more difficult.

Design

There are three participants in SP3: the server, client, and sender. The server is the host which can send spoofed packets. It acts as a relay, accepting encapsulated IP packets from the sender and sending them to the client, even when their source address is spoofed. The client is the destination that receives the packets. The sender is the host that generates the packets.

One issue with packet spoofing is the number of attack vectors it opens. In order to provide a service that makes a reasonable trade-off between enabling valid use cases while not opening itself up to abuse and attacks, the server enforces a policy on packets it is willing to send. The primary property the server attempts to guarantee is that the client consents to receiving spoofed packets.

The server provides a number of mechanisms by which the client can provide this consent. The simplest is that the client establishes a connection to the server, and directly tells the server it is wiling to receive traffic. This is done with a web-socket based connection, and supports a client running in a web browser. When the client cannot or is unwilling to establish a direct connection to the server, it can generate a proof-of-ownership for the sender to prove its location and intent without direct communication to the server.

Server

Build:

apt-get install libpcapdev
cd server
go build

Run

sudo ./server [--port 8080]

Sender

Client

A web based client is included in the client directory.

sp3's People

Contributors

willscott avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

sp3's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.