Need help with sssniff?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

isofew
217 Stars 193 Forks 2 Commits 0 Opened issues

Description

ShadowSocks(SS) traffic sniffer

Services available

!
?

Need anything else?

Contributors list

# 81,139
golang
tuntap
sni
The Jul...
2 commits

ssSniff

ShadowSocks(SS) traffic sniffer

Aim

Proof of concept of detecting SS traffic. Could be used for the improvement of SS. Or, for the censorship against SS. Either way, it is better to expose the vulnerabilities in advance and take the initiative.

Usage

# install libpcap first, then
pip install -r requirements.txt
sudo ./sssniff.py

Finally, browse the web via your SS proxy. When the script detects more than 15 suspicious connections to/from one source, it will flag it to be a ShadowSocks server and print to the terminal.

Method

ShadowSocks is famous for its randomness feature; however, the first packet of a connection is usually not expected to be random. Even in a TLS session, we expect to see some plaintext sections in the handshake stage. Therefore, one can detect ShadowSocks traffic by simply looking at the first few packets and calculating their entropy (as a measure of randomness). Together with some minor adjustments, this method suffices to detect the current ShadowSocks protocol at a high accuracy.

TODO

  • Develop a more general method to detect proxy traffic.
  • Test for false-positive results.

Credits

  • scapy for packet sniffing/manipulation
  • dpkt for packet parsing/creation

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.