Live data from Hacker News

How the great firewall of China detects and blocks fully encrypted traffic [pdf]

gfw.report

81–90 of 289 posts

Re: How the great firewall of China detects and blocks fully encrypted traffic [pdf]

#81
post #2

Seems like UDP is completely exempt, which would allow UDP-based VPNs, like Wireguard through. SSH is also exempt...

I'd go for ssh if I was trying to bypass it. At least legally I can claim that I'm just sshing to my aws server and not be jailed for using vpn.

I suspect TCP tunneling your traffic looks different than SFTP-ing some files around.

Re: How the great firewall of China detects and blocks fully encrypted traffic [pdf]

#84

Earlier quoted context omitted.

GFW only looks at connections with destination IPs outside of China, the private fibre line bypasses it entirely.

> the private fibre line bypasses it entirely Well, I'm sure the Chinese are tapping it. ;-) Its more that they are just not actively acting on the content.

Not much use tapping encrypted packets, which is why it terminates connections when able.

Re: How the great firewall of China detects and blocks fully encrypted traffic [pdf]

#85

The algorithm found seems so unintuitive that I wonder if it was not found by the AI. " Allow a connection to continue if the first TCP payload (pkt) sent by the client satisfies any of the following exemptions: Ex1: popcount(pkt) len(pkt) ≤ 3.4 or popcount(pkt) len(pkt) ≥ 4.6. Ex2: The first six (or more) bytes of pkt are [0x20,0x7e]. Ex3: More than 50% of pkt’s bytes are [0x20,0x7e]. Ex4: More than 20 contiguous by…

That looks hilariously easy to defeat though it will require introducing "0x20,0x7e" padding to protocols heh.

Re: How the great firewall of China detects and blocks fully encrypted traffic [pdf]

#86
post #41

I’ve done so much experimentation with GFW pre pandemic while staying in China for extended period of times. I was always amazed at how quickly they would catch up on my shadowsocks, random ssh tunnels…etc. 48 hours top before I had to rotate IPs. This report seems to indicate this is now instant? Fwiw My most reliable trick ended up piggie-backing off of a physical line going into Hong Kong from Shenzhen, and when r…

There's a more straightforward way: roam with a foreign sim card. Roaming traffic is tunneled to your home telco and for whatever reason the tunnel isn't inspected at all. With the advent of esims you can buy a roaming sim and use it on your phone within minutes.

Re: How the great firewall of China detects and blocks fully encrypted traffic [pdf]

#87
post #61

This paper is nice, but it goes over some finer technical things. So, not about the great wall, but there's projects out there, like this one https://github.com/salesforce/ja3 , which talk about how you can fingerprint fully encrypted traffic(TLS/HTPS). There's a great section in the Readme "How it works" that goes over it. Would be surprising if the great wall doesn't do this, when some open source firewall will.

Chrome randomizes the ClientHello these days[1], so JA3 is obsolete in that sense. You could still build a fingerprint off of the common advertised TLS parameters, disregarding their order. The linked paper references an incident where the list of ciphersuites were used to detect Tor-obfs connections[2][3].

[1] https://www.fastly.com/blog/a-first-look-at-chromes-tls-clie...

[2] https://gitlab.torproject.org/legacy/trac/-/issues/4744

[3] https://blog.torproject.org/ethiopia-introduces-deep-packet-...

Re: How the great firewall of China detects and blocks fully encrypted traffic [pdf]

#88
I mentioned this a few years ago (maybe 7-8 years ago) on HN when I was told everyone just uses a VPN. Even back then, the cat and mouse game was annoying. You would purchase a VPN (plenty offered), pay a year subscription, and then it would go dark a couple of weeks later (sort of like a membership at a gym that closes down a week after you renew a year subscription). I gave up quickly on outside access, though we had a line out at work so it wasn’t that bad.

Re: How the great firewall of China detects and blocks fully encrypted traffic [pdf]

#89
post #76

The algorithm found seems so unintuitive that I wonder if it was not found by the AI. " Allow a connection to continue if the first TCP payload (pkt) sent by the client satisfies any of the following exemptions: Ex1: popcount(pkt) len(pkt) ≤ 3.4 or popcount(pkt) len(pkt) ≥ 4.6. Ex2: The first six (or more) bytes of pkt are [0x20,0x7e]. Ex3: More than 50% of pkt’s bytes are [0x20,0x7e]. Ex4: More than 20 contiguous by…

It's extremely intuitive. You're trying to filter unusual, encrypted traffic. First rule exploits the IND-CPA property of most encryption. You want to kill traffic that has about 4 bits set to 1 per byte, i.e. traffic that "looks random". The following rules are exemptions for permissible encrypted or compressed traffic (note that compression, while not IND-CPA, results in high entropy and thus will trigger the first…

Thanks for the information, it is very interesting.

Re: How the great firewall of China detects and blocks fully encrypted traffic [pdf]

#90
post #65

The exact reverse engineered algorithm of the GFW is on page 4. It looks very reasonable (given what they are trying to achieve with it). The easiest bypass I can think of would be to tunnel your connections via TLS. For example socks server tunneled via SSH which in turn is tuneled via TLS to your gateway. Or perhaps you can somehow get your SSH client to transmit "GET " at the beginning of the connection, have the…

If it’s over https, an outside observer has no way of knowing your stream started with a GET. Unless they’ve tapped ssl certificates, but that would be major news
Post reply on HN