• Stars
    star
    2,858
  • Rank 15,882 (Top 0.4 %)
  • Language
    C
  • License
    GNU General Publi...
  • Created about 7 years ago
  • Updated 12 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Introduction

INTANG is a research project for circumventing the "TCP reset attack" from the Great Firewall of China (GFW) by disrupting/desynchronizing the TCP Control Block (TCB) on the censorship devices. INTANG runs as a client-side only tool in background to protect the TCP connections from being interfered (or even monitored) by the GFW. It works on TCP/IP layers instead of application layer, thus considered more general and can help all application layer protocols to evade censorship, e.g. HTTP, DNS over TCP, OpenVPN, Tor. It can also be run on a proxy to make the deployment easier for those who are incapable of running INTANG (using OSes other than Linux or doesn't have root privillige).

Platform

Linux (must has netfilter supported in kernel)

Tested with Ubuntu 12.04/14.04/16.04.

Dependencies

  • libnetfilter-queue-dev
  • libnfnetlink-dev
  • redis-server
  • libhiredis-dev
  • libev-dev
  • python-redis (optional)
  • python-scapy (optional)

Compilation

  1. Install prerequisite packages:
sudo apt-get update
sudo apt-get install libnetfilter-queue-dev libnfnetlink-dev redis-server libhiredis-dev libev-dev python-redis python-scapy

or

./install_deps.sh
  1. Compile:
make

And the binary will be located under bin folder.

How to Run

  1. Use run.sh to start the daemon. Logs are by default written to /var/log/intangd.log. If you want to test a specific strategy, use run.sh <strategy ID>. Strategy IDs can be checked with run.sh -h.
  2. Use stop.sh to stop the daemon. It simply send SIGINT signal to the daemon.

The daemon needs root privilege to run. If you are using Virtual Machine, you'll need to configure the networks in Bridge Mode.

Source Code Organization

/
├── main.c                                      Entry point and Main Thread
├── globals.h                                   Global constants
├── protocol.h                                  Definition of protocol(IP/TCP/UDP/DNS) headers
├── memcache.c                                  In-memory cache
├── cache.c                                     Cache Thread
├── order.c                                     Shared in-memory queue between Main Thread and Cache Thread
├── redis.c                                     Communication interfaces to Redis
├── dns.c                                       DNS Thread
├── dnscli.c                                    Functions for Main Thread to send requests to DNS Thread.
├── logging.c                                   Logging functions
├── strategy.c                                  Strategy registration and selection
├── discrepancy.c                               Implementation of low-level "insertion packets", such as wrong checksum
├── socket.c                                    Socket related functions, sending crafted packets
├── feedback.c                                  Log uploading functions
├── helper.c                                    Shared global helper functions 
├── ttl_probing.c                               Functions for TTL probing and maintaining
├── test.c                                      Testing functions
├── run.sh/stop.sh                              Run/Stop INTANG
├── distgen.sh                                  Generating distributable code tarball
├── strategies/ 
│   ├── dummy.c                                 Dummy strategy (do nothing)
│   ├── rst_***.c                               TCB teardown strategies
│   ├── do_***.c                                Buffer prefilling(data overlapping) strategies
│   ├── reverse_tcb.c                           TCB reversal strategy
│   ├── multiple_syn.c                          Multiple SYN (Resync-Desync) strategy
│   ├── mixed_***.c                             Combined strategies. 
│   ├── ...
├── tools/                                      Folder containing python scripts for data analysis
│   ├── dump_stats.py                           Show success rates of strategies by reading from Redis. (INTANG must be running)
│   ├── dump_stats_from_log.py                  Show success rates of strategies by reading from log.
│   ├── ...

Disclaimer

INTANG is a research-oriented project. Anyone using it should be aware of the potential risks and responsible for his/her own actions against the censorship authority.

Contact

Any questions could be direct to [email protected]

Paper Published

Zhongjie Wang, Yue Cao, Zhiyun Qian, Chengyu Song, and Srikanth V. Krishnamurthy. 2017. Your State is Not Mine: A Closer Look at Evading Stateful Internet Censorship. In Proceedings of IMC ’17. ACM, New York,NY, USA, 14 pages. https://doi.org/10.1145/3131365.3131374

FAQ

Please see FAQ page.

More Repositories

1

SymTCP

Automatic Discrepancy Discovery for DPI Elusion
Python
250
star
2

tcp_exploit

Off-Path TCP Exploit: How Wireless Routers Can Jeopardize Your Secret
JavaScript
105
star
3

KOOBE

Towards Facilitating Exploit Generation of Kernel Out-Of-Bounds Write Vulnerabilities
82
star
4

SUTURE

Precise and high-order static points-to/taint analysis based on LLVM IR.
C++
69
star
5

SADDNS

SADDNS: Side Channel Based DNS Cache Poisoning Attack
C
51
star
6

SyzDescribe

C++
50
star
7

LLift

The source code of project "LLift" (Enhancing static analysis with LLM)
Python
46
star
8

SyzGen_setup

Go
42
star
9

UBITect

C++
38
star
10

IncreLux

Progressive Scrutiny: Incremental Detection of UBI bugs in the Linux Kernel
C++
29
star
11

GPT-Expr

Assisting Static Analysis with Large Language Models: A ChatGPT Experiment
27
star
12

SyzBridge

SyzBridge is a research project that adapts Linux upstream PoCs to downstream distributions. It provides rich interfaces that allow you to do a lot of cool things with Syzbot bugs
Python
24
star
13

Themis

Themis: Ambiguity-Aware Network Intrusion Detection based on Symbolic Model Comparison
C++
20
star
14

ShadowBlock

Code release for our WWW 2019 paper entitled "ShadowBlock: A Lightweight and Stealthy Adblocking Browser".
C++
18
star
15

Unias

A Hybrid Alias Analysis
C++
18
star
16

K-LEAK

C++
14
star
17

SADDNS2.0

Go
11
star
18

CLAP

This repository hosts the implementation of CLAP (Context Learning-based Adversarial Protection) that is proposed in our CoNEXT 2020 paper titled "You Do (Not) Belong Here: Detecting DPI Evasion Attacks with Context Learning". The code here can be used to reproduce the main results in the paper.
Python
9
star
19

SyzGenPlusPlus

Python
8
star
20

SCENT

TCP Side Channel Excavation Tool
C++
7
star
21

CCS24Mesh

7
star
22

Patchlocator

An Investigation of the Android Kernel Patch Ecosystem Usenix security 21
Python
6
star
23

PAPP

Prefetcher-Aware Prime+Probe
C
5
star
24

A4

Code and dataset release for our ACSAC 2021 paper titled "Eluding ML-based Adblockers With Actionable Adversarial Examples".
HTML
5
star