Skip to content
Info disclosure Advisory Advanced CVE-2019-5152

Shadowsocks-libev ss-server Stream Cipher Information Disclosure Vulnerability

The ss-server component of Shadowsocks-libev 3.3.2, when configured with a stream cipher, lacks authentication and integrity checks, so it will attempt to decrypt and act on any sufficiently long packet from an unknown source. An attacker who can observe network traffic can use this to fingerprint the server and, if they can intercept the outbound connection, obtain known plaintext-ciphertext pairs to offline-bruteforce the configured password or key.

Lilith >_> Follow

Originally disclosed on Cisco Talos

High 7.4 View original

An exploitable information disclosure vulnerability exists in the network packet handling functionality of Shadowsocks-libev 3.3.2. When utilizing a Stream Cipher, a specially crafted set of network packets can cause an outbound connection from the server, resulting in information disclosure.

Lilith [._.], on Cisco Talos

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the use of stream ciphers without authentication or integrity checks, combined with the server acting on unauthenticated packets, allows attackers to trigger outbound connections and obtain known plaintext-ciphertext pairs.

Impact

An attacker who can observe network traffic could fingerprint the server as a Shadowsocks server and, if they can intercept the outbound connection, offline-bruteforce the configured password or key, and subsequently alter encrypted traffic.

What the attacker needed

Server uses a stream cipher; attacker can observe network traffic (mitm); attacker can accept outbound connection

The fix

The vendor advised the issue is 'won't solve'; the mitigation is to use an AEAD cipher.

How it was found

  1. Send a packet with an increasing IV starting from zero followed by random data to the ss-server port.
  2. The server attempts to decrypt the packet and parse the destination address.
  3. If the destination is a hostname, the server performs a DNS lookup and then connects out.
  4. An attacker who can observe the outbound connection captures the encrypted and decrypted traffic.
  5. Using the known first packet and IV, the attacker can offline-bruteforce the configured password or key.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

Shadowsocks is a tool that encrypts internet traffic to bypass censorship. With older 'stream cipher' encryption, the server does not check whether incoming data is genuine, so it will try to process random junk as if it were a real request. This lets an attacker who can watch the network learn that the server is a Shadowsocks server and possibly guess its password.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.