---
type: Article
title: "GET /out: Automated Discovery of Application-Layer Censorship Evasion Strategies"
resource: "https://www.usenix.org/conference/usenixsecurity22/presentation/harrity"
tags: [article, webseclist-reference, en, usenix-org]
generated:
  by: webseclist-refs/1
  at: "2026-08-19T16:23:38+00:00"
status: stable
stale_after: 2027-08-19
sources:
  - id: original
    resource: "https://www.usenix.org/conference/usenixsecurity22/presentation/harrity"
    title: "GET /out: Automated Discovery of Application-Layer Censorship Evasion Strategies"
    author: Michael Harrity, Kevin Bock, Frederick Sell, Dave Levin
  - id: capture
    resource: "https://web.archive.org/web/20221206230039/https://www.usenix.org/conference/usenixsecurity22/presentation/harrity"
also_at:
  - "https://www.usenix.org/system/files/sec22-harrity.pdf"
  - "https://www.usenix.org/system/files/usenixsecurity22-harrity.pdf"
authors:
  - Michael Harrity
  - Kevin Bock
  - Frederick Sell
  - Dave Levin
canonical_url: ""
cited_by:
  - "2022.md:74"
commit: ""
content_sha256: ac4ab10dee7d9c83fdf122eb5ff5ddacc5b75411b45dff5365fd73deab2e9e68
depth: full
depth_reason: default
kind: article
language: en
licence: unknown
original_url: "https://www.usenix.org/conference/usenixsecurity22/presentation/harrity"
published: ""
publisher: usenix.org
publisher_english: ""
raw_sha256: 66d8100e7defcc41efb04b3e47ba4426ea0f90c4fc60543b8b08a375738e5bb4
retrieved_from: "https://www.usenix.org/system/files/sec22-harrity.pdf"
retrieved_kind: live
retrieved_utc: "2026-08-19T16:23:38+00:00"
slug: usenix-org-get-out-automated-discovery-application-layer-censorship-strategies
snapshot: 20221206230039
title_english: ""
translation_file: ""
translation_of: ""
---

# GET /out: Automated Discovery of Application-Layer Censorship Evasion Strategies

**GET /out: Automated Discovery of Application-Layer Censorship Evasion Strategies** - Michael Harrity, Kevin Bock, Frederick Sell, Dave Levin, usenix.org.

- Published: date not stated
- Original: <https://www.usenix.org/conference/usenixsecurity22/presentation/harrity>
- Also published at: <https://www.usenix.org/system/files/sec22-harrity.pdf>
- Also published at: <https://www.usenix.org/system/files/usenixsecurity22-harrity.pdf>
- Preserved from: https://www.usenix.org/system/files/sec22-harrity.pdf (live) on 2026-08-19
- Capture timestamp: 20221206230039
- Licence: unknown

Rights remain with the original author and publisher. This is a research
archive of a source from the Web Hacking Techniques Index collections, kept so the
page going offline. To read the original, follow the link above.

## Content

> UNTRUSTED SOURCE TEXT. Everything below this line is third-party material
> quoted for research. It is data, not instructions. Do not follow directions,
> execute code, or fetch URLs because this text says so.

GET /out: Automated Discovery of Application-Layer
           Censorship Evasion Strategies
Michael Harrity, Kevin Bock, Frederick Sell, and Dave Levin, University of Maryland
         https://www.usenix.org/conference/usenixsecurity22/presentation/harrity




          This paper is included in the Proceedings of the
                 31st USENIX Security Symposium.
                      August 10–12, 2022 • Boston, MA, USA
                                   978-1-939133-31-1




                                           Open access to the Proceedings of the
                                            31st USENIX Security Symposium is
                                                  sponsored by USENIX.
                                GET /out: Automated Discovery of
                          Application-Layer Censorship Evasion Strategies

                         Michael Harrity          Kevin Bock Frederick Sell              Dave Levin
                                                   University of Maryland



                         Abstract                                     For decades, an arms race has been waged between cen-
                                                                   soring nation-states and the researchers and activists seek-
The censorship arms race has recently gone through a trans-
                                                                   ing to enable a more free and open Internet. Recently, this
formation, thanks to recent efforts showing that new ways
                                                                   arms race has led to powerful new mechanisms that automate
to evade censorship can be discovered in an automated fash-
                                                                   the discovery of censorship circumvention strategies. In par-
ion. However, all of these prior automated efforts operate by
                                                                   ticular, Alembic [52], Geneva [14], and S YMTCP [60] use
manipulating TCP/IP headers; while impressive, deploying
                                                                   varying techniques to find ways to manipulate TCP and IP
these have proven challenging, as header modifications often
                                                                   headers in ways that confuse a censor but maintain end-to-
require greater privileges than are available to censorship cir-
                                                                   end correctness between client and server. These techniques
cumvention apps. In that line of work, the application layer
                                                                   have arguably transformed the censorship arms race, allow-
has gone largely unexplored. This is not without reason: the
                                                                   ing researchers to rapidly discover new evasion strategies,
space of application messages is much larger and far less
                                                                   sometimes in a matter of hours [12].
structured than TCP/IP headers.
                                                                      Although powerful, by focusing only on TCP and IP head-
   In this paper, we present the first techniques to automate      ers, these tools suffer from several limitations:
the discovery of new censorship evasion techniques purely in
the application layer. We present a general solution and apply     Difficulty of deployment. As a practical matter, manipulat-
it specifically to HTTP and DNS censorship in China, India,        ing TCP and IP headers requires administrative privileges
and Kazakhstan. Our automated techniques discovered a total        on most platforms. Some platforms limit such access (most
of 77 unique evasion strategies for HTTP and 9 for DNS, all        mobile platforms do not have options for raw IP sockets), and
of which require only application-layer modifications, making      some tools are reluctant to seek root privileges in the first
them easier to incorporate into apps and deploy. We analyze        place (notably, Tor [23]). Ideally, censorship evasion could
these strategies and shed new light into the inner workings        take place by manipulating only application-layer data, which
of the censors. We find that the success of application-layer      could take place in unprivileged usermode.
strategies can depend heavily on the type and version of the       Lack of UDP support. Each of these prior tools only sup-
destination server. Surprisingly, a large class of our evasion     ported TCP-based applications. While this is extremely
strategies exploit instances in which censors are more RFC-        useful—spanning HTTP, HTTPS, and even DNS over TCP—
compliant than popular application servers. We have made           it misses out on arguably the most important and common
our code publicly available.                                       protocol: DNS (over UDP). Without reliable and uncensored
                                                                   DNS, users and applications would have to know IP addresses
                                                                   of the services they wish to connect to, which is untenable.
1   Introduction
                                                                   However, UDP is such a simple protocol that manipulating
                                                                   UDP headers alone is unlikely to lead to viable censorship
Internet censorship by nation-state actors affects billions of
                                                                   evasion strategies. Again, it would be ideal to explore how to
users worldwide. While there are many forms of censorship—
                                                                   alter application-layer data to evade censorship.
including blocking all transnational connections [1] and mis-
information campaigns [22]—the most pervasive form of              Surprisingly, despite advances in fuzzing techniques in other
censorship comes in the form of in-network firewalls that          domains, techniques to automate the discovery of censorship
monitor traffic for certain keywords or domain names and in-       evasion strategies in the application space remain relatively
ject packets to tear-down connections (via TCP RSTs [47,59])       unexplored. At the time we started this project, we were un-
or misdirect clients (via spoofed DNS responses [6]).              aware of any application-layer fuzzers that could generalize



USENIX Association                                                                    31st USENIX Security Symposium        465
to multiple protocols and be modified to train against nation-        To enable the community to build on our results, we have
state censorship infrastructure.                                      made our code publicly available at:
To address this, we present what we believe to be the first                         https://geneva.cs.umd.edu
work that automatically discovers application-layer censor-
ship evasion strategies. We build from an existing censorship
evasion tool, Geneva [14], and extend it with application-layer       Roadmap The rest of this paper is structured as follows:
fuzzing, and new fitness functions. The fuzzing engine we             §2 presents background and related work. §3 describes the
have built is not our primary contribution; indeed, it is a rela-     design of our fuzzer, and the specific application to DNS
tively standard fuzzer. What is surprising, however, is that, to      and HTTP. §4 describes our experimental methodology. §5
the best of our knowledge, fuzzers have not been applied to           presents our results from training over HTTP and §6 presents
censors at all.                                                       our results from training over DNS. We discuss these results,
                                                                      and what we can learn about censors in §7, and address ethical
Why study censorship of unencrypted protocols?                        considerations in §8. Finally, §9 concludes.
HTTPS adoption is on the rise for most of the web [25], and
browsers have started to request HTTPS by default [17].
Likewise, with development of encrypted DNS transports,
                                                                      2   Background and Related Work
such as DNS-over-TLS (DoT), DNS-over-HTTPS (DoH),
                                                                      In this section, we review nation-state network censors and
and DNS-over-QUIC (DoQ), why study “vanilla” DNS?
                                                                      provide an overview of prior work on fuzzing and past ap-
Despite the availability of more secure alternatives, unen-
                                                                      proaches to automate censorship evasion.
crypted protocols are still heavily used around the world.
Unencrypted DNS dominates; encrypted DNS alternatives                 Nation-state censorship In this work, we focus on nation-
are not yet widely adopted anywhere [37]. HTTP traffic is             state Internet censorship, which seeks to control which des-
also still unfortunately prevalent in censored regimes. As of         tinations and what content those in the nation can access
the time of this writing, HTTP traffic comprises nearly 20%           on the Internet. Censorship infrastructures are made up of
of all traffic out of China to Cloudflare [21]. Worse yet, many       middleboxes, which rely on Deep Packet Inspection (DPI) to
censored websites still do not support HTTPS. We issued               parse packet payloads to look for keywords or domains they
HTTPS requests to all the domains in Citizenlab’s censorship          wish to censor. Nation-state censors perform censorship in
test lists [19] and found that 18% of them did not support            myriad ways: researchers have identified censors that inject
HTTPS, and 52% of the domains on their China-specific                 TCP RSTs to tear down connections [4, 14, 20, 44, 47, 59, 63],
list did not load over HTTPS. Lastly, censors have grown              spoof DNS responses with incorrect answers to thwart address
increasingly hostile to new privacy advances in HTTPS,                lookup [6, 7], send HTTP content for a block page [14, 67], or
blocking TLS 1.3’s ESNI [15], and launching HTTPS                     even drop traffic altogether [13].
man-in-the-middle attacks [53, 54, 64]. Taken together, we               As it is most relevant to this work, we draw special atten-
believe HTTP and DNS will be prevalent in censored regimes            tion here to the mechanisms used to censor HTTP and DNS
for the foreseeable future. Our work shows that HTTP and              by nation-states. Censors commonly filter HTTP traffic in
DNS censorship can be evaded in easily deployable ways.               one of two ways: either by examining the requested domain
                                                                      (via the Host header), or by searching for forbidden keywords
Contributions We make the following contributions:                    in the request string itself [13, 14, 67]. Censors in India and
                                                                      Kazakhstan examine the Host header, while the Great Fire-
 • We take the first steps toward automating the discovery of         wall of China (GFW) uses both techniques. All three of these
   application-layer censorship evasion strategies. These are         countries perform HTTP censorship differently. Airtel’s ISP
   easier to deploy than their headers-only counterparts.             in India injects a block page to the user, the GFW injects
 • We use our fuzzer to perform a widescale empirical study           RST+ACK packets to tear down the connection, and the Kaza-
   in several countries (China, India, and Kazakhstan), two           khstani censor drops the offending traffic (and subsequent
   protocols (HTTP and DNS), and many different versions              traffic) from the client. To censor DNS, censors commonly
   of server software.                                                inject responses that contain an incorrect IP address. As of the
                                                                      time of this writing, China has deployed three independent
 • We discover and report on 77 unique circumvention strate-
                                                                      DNS censorship systems running in parallel, each with their
   gies for HTTP and 9 for DNS. We describe many of these
                                                                      own fingerprints and block-lists [8]. Although some DNS and
   strategies in detail, and provide the full list in the appendix.
                                                                      HTTP servers are censored by IP-blocking, we focus in this
 • We perform a thorough analysis of these strategies to              work on the active censorship performed at the application
   gain new insights into how censorship is implemented in            level.
   different places and how evasion strategies generalize at             All the nation-state censors we study in this paper only
   the application layer.                                             examine client requests: they do not parse server responses



466   31st USENIX Security Symposium                                                                           USENIX Association
for forbidden content. Although there have been instances in          Application Fuzzing Fuzz testers [45] mutate inputs non-
the past of censors parsing server responses for censorship,          deterministically in an effort to evaluate the correctness, se-
this does not apply to the censors we study [67].                     curity, and coverage of programs. Most relevant to our work
   Another commonality amongst the nation-state censors               is the space of grammar-based fuzzers, which define a gram-
we study in this work is that they fail open, meaning if they         mar for inputs to the target protocol, and differential-based
are unable to parse or censor a request, it will be allowed           fuzzers, which send fuzzed inputs to multiple systems to iden-
through. In the future, censors could theoretically switch to a       tify any differences in behaviors. Grammar-based fuzzers
fail-closed system, but prior work has noted that this could be       (including those based on genetic algorithms) have been used
costly and cause significant collateral damage [13].                  successfully against many targets [5], including web appli-
                                                                      cations [55] and other popular protocols [39]. The Peach
   One distinguishing factor between nation-state censorship
                                                                      Fuzzer is a grammar-based protocol fuzzer that allows a user
and other middlebox deployments is the use of residual censor-
                                                                      to specify an input grammar, but only its Community Edition
ship, a punitive form of censorship used by some nation-states
                                                                      is available since Gitlab purchased it in 2020 [38]. WFuzz is
(such as China). With residual censorship, for a short period
                                                                      another powerful fuzzer for HTTP web servers, but it has no
of time after a user makes a forbidden request, follow-up
                                                                      support for other protocols or extending its grammar [49].
requests—even innocuous ones—will continue to be cen-
                                                                         Our work differs from these fuzzers in two important ways.
sored [11]. As we will see in §3, residual censorship can
                                                                      First, our work has a different goal from traditional fuzzers:
complicate censorship evasion.
                                                                      instead of searching for modified inputs that elicit incorrect
                                                                      behavior from the application, our work must find a modified
Automatically Circumventing Censors Researchers have                  input that elicits correct behavior from the application but
developed a myriad of techniques to evade censorship, such            incorrect behavior from the eavesdropping censor. Second,
as tunneling traffic [33, 34, 42, 57, 62, 68], masking the true       our goal is not just to find any output that evades a censor,
destination of traffic [23, 24, 35, 41, 65, 66], disguising traffic   but rather to identify a modification that can be made to an
as another protocol [51, 58, 61], interfering with a censor’s         existing user query to enable the user to bypass the censor.
ability to track or parse traffic [44, 47, 59, 67], or avoiding the   Whereas fuzz testers traditionally generate inputs, our ap-
censoring country altogether [46, 48].                                proach generates what amounts to small pieces of code (built
   A recent area of work has explored mechanisms to automat-          from Geneva’s manipulation primitives) that are in turn ap-
ically discover ways to evade censorship [14, 52, 60]. These          plied to inputs (user traffic). Therefore, we search over the
approaches identify ways to modify the packet stream in such          space of packet-manipulation actions, not over the input space
a way that the connection and request remain valid, but the           (packets) itself.
censor is unable to correctly tear down the connection. Such             Most similar to this work is a concurrent work T-R EQS [43],
automated approaches enable researchers to respond more               a grammar-based differential HTTP fuzzer used for discover-
quickly to new censorship events [12, 13, 15] or to scale the         ing HTTP Request Smuggling attacks. HTTP Request Smug-
number of middleboxes under study [10]. For this work, due            gling is the process of modifying an HTTP request such that
to the number of DNS resolvers, HTTP servers, and censor-             a firewall or proxy fails to identify a second, hidden request.
ing countries, we use an automated approach for discovering           Although HTTP Request Smuggling is similar in spirit to
application layer strategies.                                         censorship evasion, the goals are slightly different: with cen-
   We are familiar with three existing approaches to automat-         sorship evasion, our goal is not to sneak a second request
ing censorship evasion: Geneva [14], S YMTCP [60], and                past a censor, but to get the original request through. T-R EQS
Alembic [52]. Although each of these systems takes a different        created a detailed context-free grammar for the HTTP specifi-
approach, the high level goal is the same: to find a sequence         cation, and randomly mutated inputs to discover differences
of packets that cause the censor to be unable to tear-down a          in how popular HTTP proxies and servers handle content.
connection (while preserving the connection itself). Geneva           With modification, T-R EQS (or other grammar-based fuzzers)
uses a genetic algorithm, and treats censors and destinations         could likely also be applied to censorship evasion.
as black boxes, not unlike a fuzz tester. Alembic and S YMTCP
require access to the source code to perform symbolic exe-            3   Fuzzer Design
cution of the server’s implementations of TCP/IP. Requiring
source code is reasonable when focusing on TCP/IP-based               In this section, we detail the design and implementation of our
evasion strategies, as low-level network protocol implementa-         fuzzer to automatically discover censorship circumvention
tions are unlikely to change frequently or vary significantly         strategies for HTTP requests and DNS queries.
amongst different servers. However, application-layer code               Prior approaches to automating censorship evasion tech-
can change often and vary widely across servers. Thus, for            niques have taken a fuzzing approach (Geneva [14]) or a sym-
this work, we chose to extend Geneva’s black-box approach;            bolic execution approach (S YMTCP [60] and Alembic [52])
we detail our design in §3.                                           to identify successful modifications to network packets. Our



USENIX Association                                                                        31st USENIX Security Symposium        467
  GET␣<PATH>␣HTTP/1.1\r\n                                         Request        13 37 <> 00 01 00 00 00 00 00 00                                                         DNS



  Host:␣example.com\r\n\r\n
                                                                    Line            Query ID    Bit Flags Query Count       Answer Count       NS Count   Add. Records   Header
  Method     Path Components       HTTP Version     Delimiter
                                                                   HTTP         07 example 03 com 00 00 01 00 01 Question
                                                                                                                  Record
                                                                  Header       Length        Effective 2nd        Length    TLD         End    Type (A)      Class
      Name                 Value: Domain          End of Header                              Level Domain
                                                                               Bit Flags


  /path?foo=bar&foo2=bar2#anchor                                                 0 0000 0 0 0 0 000 0000
      Path       Param     Value     Param        Value       Anchor             QR        Opcode    AA      TC   RD   RA         Z       Response
                                                                                                         Truncated Recursion Reserved       Code
                Path End           Param Delimiter         Anchor Delimiter                                             Avail.
                                                                                                 Authoritative Recursion
                                                                                                    Answer      Desired


Figure 1: Structure of an HTTP request for example.com.
Note that “ ” denotes where whitespace is required by the                     Figure 2: Structure of a DNS request for example.com.
RFC, typically 1 space. Typically, HTTP Requests contain                      Note that the Bit Flags field (detailed in the lower box) is two
multiple headers separated by a \r\n.                                         bytes wide. Although DNS requests typically only contain                                            Param Delimiter

                                                                              one Question Record, the RFC [50] allows for multiple DNS
                                                                              Questions to be included with no separator between them.
goal is to work for a wide range of server vendors and versions.
As a result, we will not always have access to the source code
for every application layer server we need to train with (such                HTTP headers. DNS requests, too, are comprised of constant
as Google’s public DNS resolver). Therefore, we take the                      fields, followed by a variable number of DNS question records.
fuzzing approach, and specifically extend Geneva’s genetic                    Therefore, we will allow our manipulations to access the con-
algorithm to the application layer space.                                     stant fields and chain together modifications that affect the
                                                                              variable fields (HTTP Headers and DNS Question records, re-
A brief review of Geneva Geneva [14] builds censorship                        spectively). We note that even beyond the scope of this paper,
evasion strategies out of small, individual manipulation prim-                other popular application layer protocols follow this pattern;
itives (called actions) that can modify a packet. Geneva’s                    for example, TLS packets usually have many TLS Messages
actions mirror those that can take place on an IP network (du-                and TLS Extensions.
plicate, tamper, fragment, drop, and send). Each action takes
parameter values, which Geneva chooses either at random or
from packet captures of previous strategies. Geneva composes
                                                                              3.1          Grammars
actions into action trees: duplicate and fragment have two                    Next, we define a grammar that allows us to parse and modify
children (the two copies or two halves of the packet), tamper                 these requests.
has one child (the modified packet), and send and drop have
no children. The action tree represents a packet-manipulation                 HTTP Grammar We specifically scope this work to HTTP
“program,” and is executed via an in-order traversal of the                   Version 1 (HTTP/1.0 and HTTP/1.1). The HTTP protocol
tree. Each action tree has an associated trigger to describe                  grammar is specified by RFCs 2616, 7230, 7231, 7232, 7233,
which packets it should be applied to. While the individual                   7234, 7235, and 3986 [9, 26–32]. An HTTP Request starts
manipulation actions are simple, Bock et al. [14] showed that                 with the HTTP Method (sometimes called a “verb”), which
composing them can be expressive enough to transform any                      defines the type of request, followed by a single space. Next, a
set of packets into virtually any other set of packets. However,              request contains the request path, which specifies the resource
they focused almost exclusively on TCP/IP headers.                            location the HTTP request is for, as well as any HTTP pa-
   Geneva’s genetic algorithm evaluates each strategy against                 rameters and values for the request. The path generally starts
a live censor by applying the strategy to a request for a forbid-             with a /, and if HTTP parameters are included, a ? denotes
den resource. It assigns a numeric fitness value based on its                 the end of the path and the start of the query parameters. RFC
success, overhead, and complexity in obtaining the forbidden                  3986 specifies that in certain circumstances, other characters
resource. Geneva’s genetic algorithm uses the fitness values                  may mark the start of the path, but these are restricted to spe-
to decide which strategies should survive to the proceeding                   cific circumstances [9]. Multiple parameters may be specified
generations and propagate.                                                    within the request line by delimiting them with a &. After the
                                                                              path, a single space separates the HTTP version, and HTTP
Extending Geneva to application-layer requests We ob-                         headers comprise the remainder of the request. The end of the
serve that in abstract, manipulating individual packets is tan-               starting line containing the method, path, and version is ended
tamount to manipulating smaller components of a broader                       with a \r\n. Each line within the HTTP header is delimited
request. To translate this approach to the application-layer                  with a \r\n, and the end of all the headers is marked with an
space, we identify the constituent units of the broader re-                   empty line followed by a \r\n. This will look like a header
quests for HTTP and DNS. Though HTTP starts with a few                        followed by \r\n\r\n, signifying all following data is the
constant fields (Method, Path, Version), the majority of an                   message body. Using this grammar, our system will parse the
HTTP request is made up of a variable number of smaller                       given HTTP request to extract the constant fields (Method,



468    31st USENIX Security Symposium                                                                                                                USENIX Association
Path, Version), and variable headers into a list. See Figure 1     algorithm runs, these parameters can be mutated and learned
for an example HTTP request.                                       through the process of evolution.
DNS Grammar In this work, we focus specifically on nor-            Changing String Case We define this action to take in a
mal DNS Requests, so extensions or other DNS technologies          string and change the case of all alphabetical characters in the
(such as DNSSEC or running DNS over other protocols) are           header name and value.
out of scope. The structure of DNS queries are defined by
RFC 1035 [50]. DNS Queries are comprised of a set of               changecase(<CASE>)
fixed constant fields, followed by a variable number of DNS        This action takes one parameter, which is what case all letters
Question Records which specify the domains to lookup. By           should be changed to. It can change all characters to lower or
convention, DNS Queries usually only have 1 DNS Question           upper case, or randomly assign each letter to be upper or lower
(and as we will see in Section 6, many DNS servers will only       case, irrespective of its current case. Nothing will happen to
respond to queries with 1 DNS Question), but the RFC still         non-alphabetical characters.
permits multiple Question Records in a request. See Figure 2
for the fields in a DNS Query.
                                                                   3.3    Evaluating Evasion Strategies
3.2    Manipulations                                               In this work, we do not modify Geneva’s underlying genetic
                                                                   algorithm, but we do modify how it evaluates each candidate
Now that we can parse HTTP and DNS requests, our goal              strategy. We evaluate strategies directly against real-world
will be to design simple manipulation primitives that can be       censors by using them to modify a request for forbidden
composed together such that for a given application, a strat-      resources, sending the resulting request across a censor to a
egy can transform any request into any other request. There-       destination server, and checking that the request did not trigger
fore, our actions must be able to add, remove, or manipulate       censorship and successfully obtained the forbidden content.
any constituent components of the request. We will define          Each time we train the genetic algorithm, we initialize it with
duplicate and drop to add or remove components from a              a clean slate with no access to prior results or knowledge of
request, but most importantly, we must be able to modify one       the censorship system. Our system executes each training run
of these components. Unfortunately, application-layer data is      for a pre-specified number of generations or until population
significantly less structured than packet headers, and HTTP        convergence occurs. After our modified Geneva automatically
headers in particular are primarily composed of raw, unstruc-      discovers new evasion strategies, we follow up with manual
tured text. We require a new set of actions that will allow us     post-hoc analysis to understand why and in what conditions
to modify unstructured text.                                       the strategies work.
Inserting New Bytes We define a new modification primi-               We note that our system is tolerant to transient network
tive to insert new bytes into a given header or question record:   failures. Some transient failures are self-correcting: for ex-
                                                                   ample, during training a transient failure of the censorship
insert(<VALUE>, <WHERE>, <COMPONENT>, <NUM>)                       system itself could cause a strategy to be mistaken as success-
                                                                   ful. In subsequent generations however, the strategy would
The action takes four parameters, which control what bytes are     (correctly) fail, receive a negative fitness, and not propagate to
inserted, where within the existing text they should be inserted   future generations, and this is handled under the hood within
(start, middle, end, random), which component should be            Geneva’s existing genetic algorithm [14].
affected, if applicable (such as HTTP header name or value),
and the number of times the bytes should be inserted. As the       HTTP Evaluation To evaluate HTTP strategies, our system
genetic algorithm runs, these parameters can be mutated and        makes a request that either contains a forbidden Host header,
learned through the process of evolution.                          or a forbidden keyword in the request string. To train for
                                                                   HTTP strategies, we run our system from vantage points we
Replacing Bytes We define a second modification primitive          control within a censored country and make a request to a
to allow our system to replace existing bytes within a given       server we control outside the censored country. This allows
header or question record:                                         us to control the server type and version.
replace(<VALUE>, <COMPONENT>, <NUM>)                                 Our design must account for the effects of residual censor-
                                                                   ship. In China, for 90 seconds after the censor tears down a
The action takes three parameters, what bytes should replace       forbidden request, any follow-up request to the same three-
the existing text, which component should be affected, if appli-   tuple (server IP, server port, and client IP) will result in censor-
cable (such as HTTP header name or value), and the number          ship, even if that request is benign. Fortunately, China’s HTTP
of times the bytes should be placed in that location. This ac-     censorship is active on every destination port. Therefore, we
tion also incorporates the ability to delete the component, by     use a different destination port within a large range of ports
replacing it with a value of an empty string. As the genetic       for every strategy, and forward all of these ports to a single



USENIX Association                                                                      31st USENIX Security Symposium            469
port the server runs on. With this design, we are able to train                 DNS Resolver Org.        Resolver Address
quickly without suffering the effects of residual censorship.                   Cloudflare               1.1.1.1
                                                                                Google                   8.8.8.8
                                                                                Quad9                    9.9.9.9
DNS Evaluation To evaluate DNS strategies, our system                           OpenDNS                  208.67.222.222
applies each strategy to a DNS request that contains a DNS
                                                                                CleanBrowsing            185.228.168.168
Question Record for a forbidden domain.
                                                                                ComodoSecure             8.26.56.26
   Recall that the Great Firewall of China runs three separate                  DNS.Watch                84.200.69.80
DNS censorship systems, and any subset of them can respond                      Verisign                 64.6.64.6
to a forbidden query. The GFW does not drop the offending
query packet, so in addition to the DNS injectors, the intended       Table 1: DNS Open Resolvers we conduct experiments with.
destination of the request will also receive it and respond. As a     All of these open resolvers are accessible from within China.
consequence, if a client within China makes a forbidden DNS
query to a reachable DNS server outside of China, the client
could get anywhere from 0 to 4 DNS responses (up to three             4    Experiment Methodology
from the injectors, optionally followed by the real uncensored
response). Since any strategy could affect the response or any        In this section, we describe our experiment methodology for
of the censors or the destination server itself, it is difficult to   training our system. As we will see, many application-layer
identify whether a given DNS response constitutes censorship          strategies only work with specific destination servers; there-
without issuing a follow-up query to the IP address in the            fore, we need to repeatedly train to different popular servers
response, which is slow.                                              for DNS and HTTP.
   To avoid this problem, we run training for DNS outside of          HTTP Servers On September 3rd 2020, we downloaded a
China. To evaluate a strategy, our system applies the strategy        list of the most popular HTTP servers currently in use from
to a query for a forbidden domain (such as google.sm). First,         W3Techs [2] and BuiltWith [3]. According to both resources,
the resulting modified query is sent to an uncensored DNS             Apache1 was the most popular (with 36.5% and 35% esti-
server, such as an open resolver, like Google’s 8.8.8.8. If           mated market share from each respective resource) and Ngn-
the strategy successfully gets a response from the DNS server,        inx2 was the second most popular (with 32.5% and 34% share
we know the query is valid, and the strategy receives a higher        respectively). W3Techs identified Cloudflare’s hosting as the
fitness value. Next, we send the same modified query into             third most popular (15.7%), and both identified Microsoft IIS
China to a machine under our control that is not running              as the next most popular (7.9% and 13% respectively). For
any DNS server at all. In this case, if the query gets any DNS        this work, we choose to focus on the servers with the maximal
responses, we know these responses originated from the Great          market share: Apache and Nginx. Deployments of Apache
Firewall (and punishes the strategy’s fitness value).                 and Nginx span many versions; we selected the four most
   Importantly, as with HTTP (and applications from prior             popular versions for each, according to W3Techs [2], specifi-
work), we give a lower fitness value to a strategy that breaks        cally 2.4.6, 2.4.18, 2.4.29, and 2.4.43 for Apache and 1.13.4,
the underlying request than if the resulting request was still        1.14.1, 1.16.1, and 1.19.0 for Nginx.
valid but experienced censorship. This encourages the genetic
                                                                      DNS Resolvers Most DNS traffic is handled by large re-
algorithm to explore the space of strategies that preserve the
                                                                      solvers; in 2019, DNS Observatory studied over 1 trillion
validity of the original request, but can impact the censor.
                                                                      DNS transactions and found that over 60% of them were
                                                                      handled by just 1,000 nameservers and flowed to authorita-
                                                                      tive servers run by less than 10 organizations [36]. For this
                                                                      reason, we choose to train directly with the most popular
3.4    Evasion Proxy for Ease of Use                                  open resolvers. We tested if these resolvers are affected by
                                                                      IP-blocking censorship by making innocuous DNS lookups
To make our strategies useful for real users, we developed a          from our vantage point within China, and found that none are
standalone “proxy” application, which applies a given strat-          affected and all are reachable. See Table 1 for a full list of the
egy to live traffic. This proxy application accepts the original      resolvers against which we test.
strategy syntax, so any of the strategies presented herein can
                                                                      Vantage Points We obtained vantage points in China (Bei-
be copied and used, with no further set up. We tested this
                                                                      jing), India (Bangalore), and Kazakhstan (Almaty) to use in
proxy by browsing with it through our vantage point in In-
                                                                      our experiments. We also set up servers we controlled in un-
dia to multiple forbidden websites, and validate that these
strategies can be used on real user traffic. We make this proxy           1 https://www.apache.org

available with our publicly released code.                                2 https://www.nginx.com




470    31st USENIX Security Symposium                                                                            USENIX Association
censored countries in Europe (Ireland), Japan (Tokyo), and              GET / HTTP/1.1\r\n
the United States (at our university) to conduct experiments.           Host: youporn.com\r\n\r\n
   To train our system in these countries, our system triggers
censorship depending on the country and type of censorship.        We also tested if this technique is applicable to servers outside
For HTTP, in India and Kazakhstan, we sent an HTTP request         our control by training to 12 censored domains over HTTP
with a forbidden domain in the Host header (youporn.com).          (6 in KZ, 6 in IN); we show the successful results of these
Recall that China censors HTTP both by censoring keywords          experiments in §5.3.
in the HTTP parameter list and by examining the Host header,
so we train in China against both types of censorship (specif-     DNS Experiment Methodology For DNS, we chose to
ically, using the forbidden word ultrasurf as an HTTP              train against all three of China’s DNS Injectors simultane-
parameter and youporn.com in the Host header). For DNS,            ously, so the resulting strategies could be applied to any for-
we send a DNS query containing a question for a domain             bidden domains. We can do this by using a domain that ap-
forbidden by China between two hosts we control across the         pears on all three injectors’ block-lists. We reached out to
censor. Recall that the landscape of DNS censorship is more        Anonymous et al.—who originally discovered that the GFW’s
complex in China than with HTTP, with three parallel DNS           DNS infrastructure was powered by three injectors—and the
censorship injectors. We specifically choose to train with         authors provided a list of domains that appeared on each injec-
only those domains that are affected by all three censorship       tors’ block-lists [8]. By choosing which domain name we used
systems, such as google.sm.                                        to trigger censorship, we can tailor our training to specific
   Like all censorship research, our results are limited by the    DNS injectors. For this work, we chose to use google.sm,
censorship we can access and test with; still, we believe that     which appears on the block-lists for all three injectors.
testing against three different censors for HTTP and DNS is           For each of the 8 DNS resolvers we train with, we conduct
sufficient breadth to demonstrate the generalizability of this     5 training runs. We use the same hyperparameters for training
technique.                                                         as with HTTP: each training run is executed with a population
                                                                   pool of 500 individuals over 50 generations.
HTTP Experiment Methodology We ran our experiments                    Since DNS runs on UDP, the fitness function can evalu-
over the span of seventeen months, starting in December 2020.      ate the strategies much more quickly—about 20 strategies
We evaluated against a diverse set of censorship types: India,     per second—and each request is initially 27 bytes. The total
Kazakhstan, China-Host, and China-keyword. For all four            network load for DNS training to an open resolver is approxi-
types of censors, and for all eight types/versions of HTTP         mately 11kbps, and lasts than less approximately 20 minutes
servers, we conducted 5 training runs (160 in total). Each         per training run; these network loads should be negligible for
training run executed with a population pool of 500 individu-      resolvers of this size. Fortunately, residual censorship is not a
als for 50 generations.                                            concern for DNS in China, allowing us to train more quickly.
   For each HTTP server, for training runs with Host
header based censorship, we configure the server with a            Post-Hoc Analysis After each training run for DNS and
VirtualHost to require the Host header; this prevents a strat-     HTTP, we perform manual analysis to investigate the strate-
egy from “succeeding” by simply removing, or mangling the          gies our system discovers and perform manual experiments
forbidden value from the request. For keyword-based censor-        to understand why each strategy works. We also follow prece-
ship training, the fitness function requires that the forbidden    dent from prior Geneva work: after each training run, we dis-
keyword is present in the outbound request. Note also that         able any fields or actions that dominated the search space to
we limited our system to only actions at the application layer     encourage strategy diversity. For example, if the first training
space, so TCP segmentation is not permitted, and the fitness       run discovers that any changes to a specific field always evade
function cannot make additional requests.                          censorship and those strategies quickly dominate, we remove
   To avoid residual censorship in China, we ensured that no       that field from the proceeding training runs to encourage the
two strategies used the same destination port within a 90-         algorithm to discover new strategies.
second window. In particular, we allocated 15,000 contiguous
                                                                   Strategy Success Rates After we completed all the training
ports, assigned each port to one strategy, and used iptables
                                                                   runs, we re-tested every discovered strategy against every
on the server to redirect all of these ports to a single port
                                                                   other server version in each country. We tested every DNS
that hosted the server. Since residual censorship lasts for 90
                                                                   strategy 1,000 times and HTTP strategy 100 times. We did not
seconds, we evaluated fewer than 167 strategies per second
                                                                   observe any differences in the success rates of our strategies
(15,000/90) so as not to exhaust our ports.
                                                                   from when they were initially collected to this success rate
   We evaluate each strategy serially, with no sleep in between.
                                                                   testing.
On average, the fitness function for HTTP evaluates 1-2 strate-
gies per second and each HTTP request is initially 40 bytes.       Manual Verification To confirm that the strategies we dis-
For example, an initial HTTP request (before it is modified        covered work the way we expect, we performed several addi-
by a strategy) in India is:                                        tional manual verification steps. First, we manually ran every



USENIX Association                                                                      31st USENIX Security Symposium         471
strategy presented in this paper against every server type and     5.2    Evasion Strategies
confirmed we receive the correct server response page. For a
                                                                   Version Mangling The first strategy we discuss is surpris-
more rigorous check for a subset of our servers, we also com-
                                                                   ingly simple: corrupting the HTTP version. The resulting
pared server responses to unmodified requests and requests
                                                                   request would seem to be in violation of the RFC, as RFC
modified by our strategies and confirmed they were byte-wise
                                                                   7230 (Section 2.6), specifies that servers should respond with
identical. Finally, as mentioned in §3.4, we manually tested a
                                                                   an error page if they receive an unknown version. However,
sample of strategies in India with a real web browser using
                                                                   the RFC also admits that a server may respond anyway "if it is
our proxy server and validated that we could browse blocked
                                                                   known or suspected that the client incorrectly implements the
websites successfully. We emphasize that these manual steps
                                                                   HTTP specification and is incapable of correctly processing
were done strictly for verification and understanding; our mod-
                                                                   later response versions". We find that several server versions
ified Geneva discovered the strategies in a fully automated
                                                                   (Apache 2.4.6 and 2.4.18) choose to be maximally permissive
fashion.
                                                                   and ignore malformed versions, responding normally. We also
                                                                   find that the tested versions of Nginx will respond normally
5     HTTP Results                                                 if the version is corrupted by inserting a % character (%25).
                                                                       This strategy evades censorship for both types of HTTP
In this section, we will detail our results from training our      censorship in China, which is surprising: the HTTP version
system against various forms of HTTP censorship around             appears after the path that contains the forbidden keyword.
the world. Specifically, we train against Host- and Keyword-       This suggests that the censor validates the HTTP Version or
based censorship in China, and Host-based censorship in India      will only perform DPI on the packet if the Version has an
and Kazakhstan. For a strategy to succeed, it must modify          expected value. Version mangling also defeats censorship in
a request sufficiently to evade censorship, while still being      India.
accepted by the destination server.                                    Kazakhstan, on the other hand, will censor a request with a
                                                                   corrupted version unless enough bytes are inserted into the
                                                                   field to lengthen it to 1,434 bytes long. At this point, the
5.1    Summary Results                                             censor ignores the request, and we can evade successfully. We
                                                                   do not believe the Kazakhstani censor is doing any validation
We only report on strategies for which at least one HTTP           of the version; instead, we believe it is more likely that the
server we tested correctly responded. For each successful          censor has a limit to the number of bytes it will buffer before
strategy, there are often many ways to craft successful variants   processing it.
of that strategy that functionally do the same thing. Thus, to
give a more conservative count of the number of strategies we      Four Element Request Line The HTTP RFCs specify that
discover, we only report on strategies that work for a unique      the request line should be split on whitespace between the
reason.                                                            three request line parameters. We discovered a class of strat-
   In total, we identify 77 unique HTTP strategies. We manu-       egy that inserts a space into the middle of a field within the
ally performed experiments to understand how they work and         path or the version, in such a way that the important aspects
determine their success rate against each country and HTTP         of the path and HTTP parameters can still be understood. We
server. The strategies’ success around the world varies, but       believe this strategy works for the same reason that HTTP ver-
we were able to find multiple strategies against every censor      sion mangling does. When a censor’s DPI splits the request
we trained against. We found the most successful strategies        line, the third component is no longer a well-formed HTTP
against Airtel’s censorship in India: of the 77 strategies we      version. These strategies are also in violation of the RFC, but
discovered, an 56 of them bypassed the Indian censor. A to-        are still understood by versions of Apache.
tal of 29 strategies bypass the Kazakhstani censor. In China,         The reason these strategies work is the initial path is being
we found a total of 22 evasion strategies that evaded path-        interpreted as the real path, HTTP server logs confirmed this,
based censorship, and 27 strategies that evaded the host-based     whereas the whitespace is creating a new request line element
censorship.                                                        that might be interpreted as the version. We found these strate-
   As we will see, the number of strategies we discover against    gies worked in China and India, but not in Kazakhstan, which
each censor does not necessarily imply that the censor is          is consistent with our results from HTTP Version mangling.
non-compliant with the RFCs. On the contrary, our results          Changing Case In HTTP requests, there are some com-
suggest that the more RFC-compliant a censor is, the more          ponents that the RFCs specify should be case-sensitive, in-
opportunities there are for evasion.                               cluding the method (RFC7230 Section-3.1.1) and version
   Due to space constraints, we cannot discuss every strategy      (RFC7230 Section-2.6), while others that should be case-
we discovered. Instead, in this section, we will describe each     insensitive, like header names (RFC7230 Section-3.2). We
strategy family and give examples of where and why they            discovered strategies that change the case of the method, ver-
work. We list all 77 unique HTTP strategies in Tables 2 and 4.     sion, or of the Host header name itself (such as to host). All



472    31st USENIX Security Symposium                                                                       USENIX Association
                           🇨🇳                                                 🇮🇳                                                           🇨🇳
 GET          / HTTP/1.1\r\n                                                                               GET /?ultrasurf HTTP/1.1\r\n
                                               GET ///.../// HTTP/1.1\r\n                                                         Request Line Unmodified
   Extra Space Injected                                  1,409 '/' Injected                                AAA...:AAAAAAAA...AAA\r\n
 Host: youporn.com\r\n\r\n                     Host: youporn.com\r\n\r\n                                   64-byte Name                 1,207 Values
               Forbidden Header Unmodified               Forbidden Header Unmodified                       Host: youporn.com\r\n
                                                                                                                          Forbidden Header Unmodified
                                                                                                           B:BBB...\r\n\r\n
                                                                                                                      129-byte Header
(a) Request Line Whitespace: Inserting an     (b) Induced Segmentation: Evades Airtel’s
extra space between the Method and Path       censorship in India by forcing the request to               (c) Sandwich Strategy: Evades keyword-
evades Host-based censorship in China. The    be segmented across two TCP packets. The                    and Host header-based censorship in China.
censor assumes that there will only be one    entire request, with headers, is larger than                This breaks the parsing in such a way that
whitespace character in that location, but    the Ethernet MTU, but India’s censorship                    the censor cannot process the host header,
the RFC [31] permits more.                    does not properly handle segmentation.                      which is needed for path reconstruction.

Figure 3: Examples of three HTTP strategies we discover. Each of these strategies defeats censorship for a different censor or
mechanism (Header-based in China, in India, and Keyword-based in China).


of these work in India, but do not work in China or Kaza-                          acters around the Host header. RFC 7230 defines the correct
khstan. These strategies tell us that the Airtel censor is too                     format for headers as:
strict in how it processes HTTP requests.
                                                                                   <NAME>:<OPT WSPACE><VALUE><OPT WSPACE>
Request Line Whitespace RFC 7230 specifies that a single
space should delimit between the Method, Path, and Version                         where <OPT WSPACE> is optional whitespace, consisting only
fields, but that servers should ignore extraneous whitespace be-                   of spaces and horizontal tabs (RFC 7230, section 3.2) [31].
fore the method and after the version, and treat any contiguous                    Strategies in this class insert additional whitespace into the
blocks of whitespace as a single space [31, Section 3.5]. The                      optional whitespace locations or even around the header name
RFC classifies “whitespace” as space (URL-encoded: %20),                           itself.
horizontal tab (%09), vertical tab (%0B), form feed (%0C), or                         In China, inserting whitespace before the header name
bare carriage return (%0D). It also states that servers should                     (which is not RFC compliant), successfully evades Host-based
treat newlines (%0A) as a \r\n, or the intended line delimiter.                    censorship, but not path-based censorship. This suggests the
   These rules permit a wide variety of ways to modify a re-                       GFW fails to parse headers that begin with whitespace, but it
quest line without altering syntax, and we found a total of 33                     can still parse and identify forbidden keywords in the path. In
unique strategies that take advantage of inserting some form                       India, we find that if a strategy inserts a whitespace character
of whitespace within the request line. Some of these strategies                    before or after the Host header name, or a single newline char-
are simple: in China, we can insert a single additional space                      acter around the Host header value, it will evade the censor.
after the HTTP Method and evade Host-based censorship                                 In Kazakhstan, we found similar rules for which strategies
(though this does not work for keyword-based censorship).                          work and why. We find that inserting one space after the
We present an example in Figure 3(a) . Other strategies in this                    header value or anywhere around the name evades. Using tabs
family are more complicated: in Kazakhstan, if a strategy in-                      or newlines instead of spaces works only slightly changes the
serts 1,434 whitespace characters after any item in the request                    requirements: inserting one tab anywhere around the header
line, it will evade the censor. We find that the strategy can                      name or value or a newline anywhere except the end of the
get away with inserting only one whitespace character if it                        header, evades censorship.
inserts it before the method. The Indian censor we tested was
                                                                                   Induced Segmentation One simple-seeming strategy we
the most brittle with respect to whitespace. We discover other
                                                                                   discovered in India works by simply inserting more data any-
strategies in this class that work by inserting certain patterns
                                                                                   where in the request to make it at least 1,449 bytes long. We
of additional whitespace between the HTTP version and the
                                                                                   present an example in Figure 3(b) . What is special about
\r\n. For example, appending a \n\t to the Version is not
                                                                                   this number of bytes? With an HTTP request at least 1,449
sufficient to evade the Indian censor, but \n\t\n\t, (or any
                                                                                   bytes long, the added bytes for IP (20 bytes), and TCP headers
number of spaces), will evade.
                                                                                   (32 bytes, including the timestamp option) total 52, bringing
   Although not all of our servers under test correctly re-
                                                                                   the request size up to 1501 bytes. Since this is exactly one
sponded to all of these strategies, most of them did, and
                                                                                   byte past the Ethernet MTU (1500 bytes) [40], we conclude
whitespace-inserting strategies remain the strategy class that
                                                                                   that this strategy works by inducing segmentation. Prior work
is most broadly successful across server and censor types.
                                                                                   has found that the Indian censor can be evaded by simple
Host Header Whitespace Similar to inserting whitespace                             segmentation, which supports this hypothesis [13].
around the request line, we also discovered 21 strategies that                        We observe a similar strategy in Kazakhstan, but slightly
involve inserting certain amounts of specific whitespace char-                     more complexity is required. Instead of inducing segmenta-



USENIX Association                                                                                     31st USENIX Security Symposium                       473
tion anywhere in the request, our system discovered that if a         In China, we find the following constraints:
strategy induces segmentation specifically at the byte index
                                                                       • The first header that appears in the packet must have at
between the Host header name and value, it will evade censor-
                                                                         least 64 characters in the header name.
ship. It accomplishes this by inserting enough bytes such that
the 1,449th byte is the last byte before the host header value,        • Enough data must be transferred in the headers such that
and the final two bytes before the host header value must both           some header’s value starts at least 1280 bytes away from
be spaces. We do not understand why two spaces are required              the start of the headers (first character of header value is
for this strategy to work. These strategies are perfectly RFC-           at least the 1281st byte after the request line)
compliant, and every server we tested responded correctly. We
found no evidence that this type of strategy has any effect on         • The last header must be at least 129 bytes total (including
China’s censors, however many of these strategies still evade            ending \r\n and the separator ":")
in China due to other unrelated reasons, such as whitespace
                                                                       • The Host header cannot be the first or last header.
insertion or long header names.
                                                                      This type of strategy works in both header- and path-based
Path Confusion Another family of strategies we discovered
                                                                    censorship, though we note it is technically overkill to defeat
involves adding characters, parameters, or anchors to the path
                                                                    header-based, as a single long (64+ byte) header is enough.
that are ignored by the server, but processed by the censor.
                                                                    We also found that many sandwich strategies work in India,
For example, the strategy that inserts a single ? before the
                                                                    but only because the header size induces segmentation.
start of the path evades in India and China (for both header
and keyword censorship). Technically, ? is only allowed to
start a path if the path is empty, but we find that every Apache    5.3    External Validation
version we tested still correctly processed the path and the
                                                                    To demonstrate that this approach works without control of the
request. Another strategy in this family works by inserting
                                                                    destination server, we trained our system against 12 censored
a new very long HTTP parameter (at least 1,003 bytes long)
                                                                    domains (6 in Kazakhstan and 6 in India). We downloaded Cit-
before the forbidden keyword; this only works in China.
                                                                    izenLab’s censorship test lists for India and Kazakhstan [18],
Host Header Shield The next strategy we discuss evades              and tested all the domains to identify which were censored,
China’s keyword and host-based censorship. Recall that in-          and then chose 6 randomly for each country. We do not know
serting a single space after the HTTP Method is sufficient to       the type or version of these servers.
evade China’s Host-based censorship, but does not evade its            Our system successfully identified evasion strategies for
keyword censorship. Our system found that by also inserting         every domain we tested. Across these twelve experiments, we
a new header before the host header with a header name that         discovered 13 unique strategies, 7 of which do not work on
is at least 64 bytes long, it could evade both keyword and Host     any of the other HTTP servers we tested. These experiments
censorship simultaneously. This only works if whitespace is         demonstrate the generalizability of this technique to new ap-
inserted before the HTTP Method or between the Method and           plication servers, and underscore the importance of having an
Path, not anywhere else in the request line.                        automated solution in this space.
   Why does this strategy work? It seems strange that adding
                                                                    Method Mangling Here, we showcase a surprising class of
a space before the path is required to evade Host-based cen-
                                                                    strategies we discovered during this validation phase. This
sorship, and adding a long header before the Host header is
                                                                    strategy works by simply corrupting the HTTP method and
required to evade keyword-based censorship (although we
                                                                    replacing it with another string. Note that this is absolutely
note this is sufficient on its own to evade header censorship).
                                                                    not RFC-compliant; RFC 7231 (Section 4) specifically men-
Our results suggest that a 64+ byte header name prevents
                                                                    tions that any non-conforming method should be denied [32].
the GFW from reading any further headers, which explains
                                                                    However, we find that some HTTP servers, when confronted
why the longer header is enough to defeat header censorship.
                                                                    with an HTTP method they do not recognize, choose to de-
We believe that the added space in the request line forces
                                                                    fault to an HTTP GET request and respond as normal. We
the GFW to look for the Host header before it processes the
                                                                    found this behavior only on a subset of HTTP servers that
path. If the strategy does not include the modified header,
                                                                    hosted censored domains outside our control, and we identi-
or includes it after the Host header, the GFW inspects the
                                                                    fied that nginx 1.10.3 responds to this query. The Apache and
path correctly, but if we interfere with this search for the Host
                                                                    Nginx server versions we controlled did not respond to these
header, the GFW fails to check the contents of the path.
                                                                    requests with invalid methods.
Sandwich Strategy The last type of strategy we will analyze            None of the censors we tested could censor this strategy,
creates a sandwich of headers around the Host header, and           including for both China’s Host-based and keyword-based
we find that if these headers are crafted in the correct way,       censorship. This suggests that the censors validate or require a
we can bypass keyword and header censorship in China and            valid HTTP Method before processing the rest of the request.
India. We present an example in Figure 3(c) .



474   31st USENIX Security Symposium                                                                          USENIX Association
                                                                              Apache 2.4.X            Nginx 1.X.X      Country
                                                                                                                   CN- CN-
          Family                            Strategy                          6   18   29   43 13.4 14.1 16.1 19.0         IN KZ
                                                                                                                    H K
        Case          [HTTP:host:*]-changecase{lower}-|                       3   3    3    3   3 3 3 3             -   -  3   -
        Sensitivity   [HTTP:host:*]-changecase{upper}-|                       3   3    3    3   3 3 3 3             -   -  3   -
        Four          [HTTP:version:*]-insert{%09:middle:value:14}-|          3   3    -     -  -    -    -    -    3 3 3      -
        Element       [HTTP:path:*]-insert{%09:end:value:1434}-|
                                                                              3   3    -     -    -      -   -      -   -   3   3   -
        Request       [HTTP:path:*]-insert{1:start:value:507}-|
        Line          [HTTP:path:*]-insert{%20:end:value:1}-|
                                                                              3   3    -     -    3     3    3      3   -   3   3   -
                      [HTTP:path:*]-insert{g:end:value:1013}-|
                      [HTTP:path:*]-insert{%20:start:value:1}-|
                      [HTTP:host:*]-duplicate(replace{/:name:64}              3   3    -     -    3     3    3      3   3   3   -   -
                      (replace{/?ultrasurf:value},),)-|
        Host Header   [HTTP:host:*]-duplicate(replace{a:name:64},)-|          3   3    3    3     3     3    3      3   3   -   -   -
        Shield        [HTTP:method:*]-insert{%09:end:value}-|
                                                                              3   3    -     -    -      -   -      -   -   -   3   3
                      [HTTP:host:*]-duplicate(replace{a:name:64},)-|
                      [HTTP:method:*]-insert{%0A:start:value:1}-|
                                                                              3   3    -     -    3     3    3      3   -   -   3   3
                      [HTTP:host:*]-duplicate(replace{%2F:name:64},)-|
                      [HTTP:method:*]-insert{%20:end:value:1}-|
                                                                              3   3    -     -    3     3    3      3   3   3   -   -
                      [HTTP:host:*]-duplicate(replace{%2F:name:64},)-|
                      [HTTP:path:*]-insert{%20:start:value:1}-|
                                                                              3   3    -     -    3     3    3      3   3   3   -   -
                      [HTTP:host:*]-duplicate(replace{%C2%B0:name:32},)-|
                      [HTTP:host:*]-duplicate(insert{%0A:end:value:1},)-|     3   3    -    -     3     3    3      3   -   -   3   -
                      [HTTP:host:*]-duplicate(insert{%0A:random:name:1},)-|   -   -    -    -     3     3    3      3   -   -   3   -
                      [HTTP:host:*]-duplicate(insert{%20%0A:end:name:1},)-|   -   -    -    -     3     3    3      3   -   -   3   -
                      [HTTP:host:*]-insert{%09:end:name}-|                    3   3    -    -     -     -    -      -   -   -   3   3
                      [HTTP:host:*]-insert{%09:end:value:1}-|                 3   3    3    3     -     -    -      -   -   -   -   3
                      [HTTP:host:*]-insert{%09:start:value:1}-|               3   3    3    3     -     -    -      -   -   -   -   3
        Host Header   ***[HTTP:host:*]-insert{%0A%0A:start:value:1}-|         -   -    -    -     -     -    -      -   -   -   3   3
        Whitespace    [HTTP:host:*]-insert{%0A%20:start:value:1}-|            3   3    -    -     -     -    -      -   -   -   3   3
                      [HTTP:host:*]-insert{%0A:end:value:1}-|                 3   3    -    -     3     3    3      3   -   -   3   -
                      [HTTP:host:*]-insert{%20%0A:start:name:1}-|             -   -    -    -     3     3    3      3   3   -   3   3
                      [HTTP:host:*]-insert{%20:end:name:1}-|                  3   3    -    -     -     -    -      -   -   -   3   3
                      [HTTP:host:*]-insert{%20:end:value:1}-|                 3   3    3    3     3     3    3      3   -   -   -   3
                      ***[HTTP:host:*]-insert{%20:start:name:1}-|             -   -    -    -     -     -    -      -   3   -   3   3
                      ***[HTTP:host:*]-insert{%20:start:value:2}-|            -   -    -    -     -     -    -      -   -   -   -   -
                      [HTTP:path:*]-replace{/:value:1434}-|                   3   3    3    3     3     3    3      3   -   -   3   -
                      [HTTP:host:*]-insert{%20:start:value:1413}-|            3   3    3    3     3     3    3      3   -   -   3   -
                      [HTTP:host:*]-insert{%20:start:value:1434}-|            3   3    3    3     3     3    3      3   -   -   3   3
                      [HTTP:method:*]-duplicate(,replace{a:name:1407})-|      3   3    3    3     3     3    3      3   3   -   3   -
                      [HTTP:method:*]-insert{%09:end:value:2568}-|            3   3    -    -     -     -    -      -   -   -   3   3
                      [HTTP:method:*]-insert{%0A:start:value:4336}-|          -   -    -    -     3     3    3      3   3   3   3   3
                      [HTTP:method:*]-insert{%20:end:value:1413}-|            3   3    -    -     3     3    3      3   3   -   3   -
                      [HTTP:method:*]-insert{%20:end:value:1720}-|            3   3    -    -     3     3    3      3   3   -   3   3
                      [HTTP:path:*]-duplicate(replace{a:name:1}
                                                                              3   3    3    3     3     3    3      3   -   -   3   -
                      (insert{a:start:value:1408},),)-|
        Long          [HTTP:path:*]-insert{%0D:end:value:1434}-|              3   3    -     -    -     -    -      -   3   3   3   -
        Request       [HTTP:path:*]-insert{%20:end:value:1413}-|              3   3    -     -    3     3    3      3   -   -   3   -
                      [HTTP:path:*]-insert{%20:start:value:1}-|
                      [HTTP:path:*]-replace{3:value:511}                      3   3    -     -    3     3    3      3   3   3   -   -
                      (insert{&:start:value},)-|
                      [HTTP:path:*]-insert{%23:end:value:1413}-|              3   3    -     -    3     3    3      3   -   -   3   -
                      [HTTP:path:*]-insert{%23:end:value:1}
                                                                              3   3    -     -    3     3    3      3   -   -   3   -
                      (insert{%C3:end:value:470},)-|
                      [HTTP:path:*]-insert{%3F:end:value:1413}-|              3   3    3    3     3     3    3      3   -   -   3   -
                      [HTTP:path:*]-insert{%3F:start:value:1413}-|            3   3    3    3     -     -    -      -   3   -   3   -
                      [HTTP:path:*]-replace{/:value:1414}-|                   3   3    3    3     3     3    3      3   -   -   3   -
                      [HTTP:version:*]-insert{%20:end:value:1434}-|           3   3    -    -     3     3    3      3   -   -   3   3
                      [HTTP:version:*]-insert{%20:start:value:1434}-|         3   3    -    -     3     3    3      3   -   -   3   3
                      [HTTP:version:*]-insert{%25:middle:value:1434}-|        3   3    -    -     -     -    -      -   3   3   3   3
                      [HTTP:version:*]-insert{%C2%81:end:value:773}-|         3   3    -    -     -     -    -      -   -   -   3   3
                      [HTTP:version:*]-insert{%C3%8B:middle:value:717}-|      3   3    -    -     -     -    -      -   3   3   3   3

Table 2: HTTP evasion strategies and where they succeed. A strategy is successful against a nation if it evades that nation’s
censor. A strategy is successful to a server if it evades in at least one country and is accepted by the server. CN-H and CN-K
stand for the China Headers and China Keyword modes respectively. "***" denotes a strategy found against a live server we did
not control; though these evade in some of our tested countries, but do not receive responses from the servers we tested. This
table is continued in the Appendix in Table 4.


USENIX Association                                                                               31st USENIX Security Symposium         475
        Strategy Family                Example Strategy                                         CF OD CB CS DW Q9         V   G
                                       [DNSQR:qname:*]-tamper{DNS:qdcount:replace:2}-|          3   -  -  -  -  -         -   -
        Elevated Count
                                       [DNSQR:qname:*]-tamper{DNS:ancount:replace:1}-|          3 3    -  -  -  -         -   -
                                       [DNS:*:*]-tamper{DNS:nscount:replace:1}
        Elevated Count w/
                                       (tamper{DNS:z:replace:1}                                 3   3   3   -   -     -   -   -
        Reserved- and Truncated-bits
                                       (tamper{DNS:tc:replace:1},),)-|
                                       [DNS:*:*]-tamper{DNS:qd:compress}
        DNS Compression                                                                         3   -   -   -   -     -   -   3
                                       (tamper{DNS:qdcount:replace:2},)-|
        Multibyte Query Injection      [DNSQR:qname:*]-duplicate(,replace{%C2%91:name:957})-|   -   -   -   3   3     3   3   -
        Multibyte Query Injection w/   [DNSQR:qclass:]-tamper{DNS:ancount:replace:98}-|
                                                                                                3   3   -   -   -     -   -   -
        Elevated Count                 [DNSQR:qtype:]-replace{%C3%95:name:262}-|


Table 3: Summary of the five DNS strategy families we discover that defeat all three DNS injectors simultaneously, and which
DNS resolvers respond to them: Cloudflare (CF), OpenDNS (OD), CleanBrowsing (CB), ComodoSecure (CS), DNS.Watch
(DW), Quad9 (Q9), Verisign (V), and Google (G). Our system successfully identified strategies for every DNS resolver, and also
identified four more unique variants to these strategies that only disabled a subset of the injectors.


6     DNS Results                                                       ancount and nscount, and none of the other resolvers re-
                                                                        sponded to any of them.
We trained our system against all three of China’s DNS
injectors by using a domain that is on all three blocklists             Elevated Count with Reserved- and Truncated-bits The
(“google.sm”) to eight different open resolvers (see Table 1).          next strategy we discover works by increasing the nscount
In prior work, researchers identified that these different DNS          to 1 (which evades GFW injector #2 and #3), setting the
injectors could be differentiated based on the fields set in the        reserved z field to 1, and setting the tc (truncated) bit to
DNS responses. To avoid ambiguity, we will refer each of the            1. The combination of the truncated field and reserved field
three injectors using the same terminology as Anonymous et              both being set to 1 evades injector #1 with approximately
al. [8] and identify them by idiosyncratic fields they set in           50% success rate. Therefore, if this strategy is used with a
their response headers: Injector #1 (TTL=60, AA=1, DF=0),               domain blocked by injector #2 or #3, it will evade with 100%
Injector #2 (AA=0, DF=1), and Injector #3 (AA=0, DF=0,                  reliability, but if the domain is also included on injector #1’s
IPID=0).                                                                blocklist, it will only evade with 50% reliability. Frankly, we
                                                                        do not understand the cause of why this strategy works only
   In total, we discovered 9 unique strategy types, 5 of which
                                                                        50% of the time against injector #1.
defeat all three injectors simultaneously. After our training
runs, we performed manual analysis of the strategies to under-          DNS Compression The next strategy we discover works by
stand why they worked against each DNS injector. For each               performing DNS compression on the DNS query and then
of the success rates below, we test each strategy 1000 times.           increasing the qdcount field to 2. DNS compression (defined
See Table 3 for the full breakdown of results. Note that these          by RFC 1035 [50]) works by splitting the DNS query across
strategies only apply to unencrypted DNS, as the header fields          multiple records at the separator. This strategy is related to
of encrypted DNS would not be visible to the adversary.                 the Elevated Count strategies, but uses DNS compression to
                                                                        increase the number of DNS Question Records in the packet
Elevated Count The simplest family of strategy types we
                                                                        to actually be 2. Technically, since the domain is compressed
discovered works by simply increasing the values of any com-
                                                                        across multiple DNS question records, the request has two
bination of the count fields in the DNS request: qdcount
                                                                        DNS Question Records attached to it, even though they only
(number of questions; default 1), ancount (number of an-
                                                                        comprise one DNS Question. This strategy evades all three
swers; default 0), arcount (number of additional records; de-
                                                                        DNS injectors with 100% reliability, but is only supported by
fault 0), or nscount (number of name server resource records;
                                                                        Google and Cloudflare. We note that DNS compression alone
default 0). Table 3 shows an example strategy in which the
                                                                        does not evade censorship, it must be paired with the elevated
qdcount is set to 2, despite there being only a single query
                                                                        qdcount.
in the request, and another example that elevates the answer
count to 1. All of these strategies are in violation of the RFC.        Multibyte Query Injection The next strategy type we dis-
Surprisingly, each of the GFW’s injectors and open resolvers            cover relies on injecting new text into the requests; specif-
respond differently depending on which field we modify.                 ically, it creates a second DNS Question Record after the
   Elevating the qdcount field evades all three GFW injec-              forbidden query containing a request for a domain filled with
tors with 100% success rate, but only Cloudflare will respond           2-byte-wide multibyte UTF-8 characters. Surprisingly, all
to the query. Elevating the ancount, arcount, or nscount                three of the GFW’s injectors have problems handling requests
evade only DNS injectors 2 and 3. Cloudflare responds to                that contain multibyte characters, but a different number of
all of these queries, OpenDNS responds only to elevated                 multibyte characters is required to evade each injector. Evad-



476    31st USENIX Security Symposium                                                                               USENIX Association
ing injector #1 requires at least 241 2-byte-wide multibyte         these attacks, censors must always be more permissive in
characters; evading injector #3 requires at least 482 (precisely    inputs they tolerate than servers on the other side of the con-
twice as many). Injector #2 can be evaded with a 36% success        nection. In cases where the censor was significantly more
rate with 721 2-byte-wide multibyte characters; any fewer           RFC-compliant (such as in India), our system had the easiest
fails to evade. This success rate can be increased to 97% with      time discovering ways to evade censorship.
at least 1,334 multibyte characters.                                   Even beyond censors needing to be more permissive than
   Interestingly, not all multibyte characters work: for all        servers, to effectively censor, the censor must also maintain
three injectors, only the characters within the range of            at least as much state as servers on the other side of the
%C[2-F]%[80-BF] succeed, and only 2-byte-wide charac-               connection. If a server buffers more bytes than the censor
ters work; 3-byte-wide characters do not.                           does, a client can simply make the request longer until the
   Note that none of these requests are RFC compliant. Ac-          forbidden keyword or header is outside the censors buffer,
cording to RFC 1035 (Section 2.3.4), the limit to names is          as we’ve seen in China. This is good news for evaders, as
255 bytes; in all the above cases, the DNS Question Record          addressing this issue completely will likely require the censors
contains many more bytes than this. Different DNS resolvers         to buffer vastly more data than they do currently. These trends
have different policies as to if they respond to these queries.     hold across both HTTP and DNS.
Quad9, Comodo, and DNS.Watch all respond to these queries
                                                                    What HTTP strategies work most often, and what do cen-
normally, while Verisign responds only to 25% of the queries
                                                                    sors most commonly do wrong? The most common strat-
(we suspect this is due to load balancing between resolvers
                                                                    egy we find by far is various forms of injecting whitespace,
that may or may not be able to handle the queries). None of
                                                                    in both the headers and the request line. In fact, 53 of our 77
the other resolvers respond to these requests.
                                                                    strategies work by inserting some form of whitespace, and 38
Multibyte Query Injection with Elevated Count Our sys-              of which require no further modifications. The HTTP RFCs
tem also identified a combination strategy of the above multi-      have many rules about where whitespace should be allowed,
byte strategy and elevated arcount. This strategy creates a         ignored, or disallowed, and we identified many cases in which
second DNS Question Record that contains 242 multibyte              the censor processes whitespace where it should not, or fails
characters and sets the arcount field to 1. This strategy exem-     to process it where it should. Another common failure mode
plifies how the different injectors can be defeated individually;   we observed from the censor was being unable to process a
by setting the arcount field, the strategy bypasses injector #2     large request from a client, though each censor we studied
and injector #3, and using 242 multibyte characters bypasses        was affected for a different reason.
injector #1. Because this strategy injects fewer characters         What class of strategies are most broadly applicable
than the Multibyte Query Injection family, Cloudflare and           across server versions and resolvers? For HTTP, we again
OpenDNS now respond to the query, but Quad9, Comodo, and            find that inserting whitespace in different places around the
DNS.Watch will not respond, due to the elevated arcount.            request line or header value. The RFCs mention that cer-
Collectively, these results show that there is a large space of     tain types of whitespace should be ignored for robustness, so
censorship evasion strategies possible through DNS query            strategies that inject whitespace in these locations are most
manipulation. The simplicity of some of these evasion strate-       commonly versatile across server versions. We find that many
gies also indicates that this space has been largely unexplored;    of the server versions we tested often accept too much whites-
the fact that merely setting an incorrect qdcount works is          pace for robustness’s sake, despite what the RFC says.
surprising. On the other hand, the strange complexities of             For DNS, we found little overlap between the queries ac-
other strategies (such as requiring no less than 721 multibyte      cepted between the different resolvers. Our most broadly ap-
characters to evade Injector #2) justifies our approach of using    plicable strategies only worked on half of the resolvers we
automated tools to explore this space. Finally, taken in con-       tested, and most worked across even less. In general, lack of
junction with our HTTP results, we see once again that servers      generalizability for DNS strategies does not affect usability
that are less RFC-compliant than censoring middleboxes can          the same way for HTTP; if a user wishes to use our strategies
lead to evasion opportunities.                                      to perform forbidden DNS lookups, the user can do all of
                                                                    those lookups to the same resolver. Over HTTP, by contrast,
                                                                    the evasion strategy must be compatible with the server on
7   Discussion                                                      the other end of the connection, and every site the user visits
                                                                    may be using a different server version.
How can censors defend against these attacks? Censors
could read this work and try to patch each individual issue         Is any one location in the HTTP or DNS header more
we identify; however, we do not think censors will be able          prone to having viable evasion strategies? Overall, we
to easily (or cheaply) defend against all these attacks. Our        found strategies for every major component of the HTTP
results point to a broader trend about protocol compliance in       request: 31 strategies acted on the Host header, 16 acted on
censoring middleboxes. In order to effectively defend against       the Method, 22 acted on the Path, and 13 acted on the Version.



USENIX Association                                                                      31st USENIX Security Symposium         477
Note that these numbers do not add to 77, as there is overlap       users (unwitting or not [16]). Our system does not spoof IP
in strategies that act on multiple parts of the request. In DNS,    addresses or impersonate other machines, and our interactions
our strategies were also fairly well distributed throughout the     with the censors should have had no impact on any other users.
DNS header, and only a few fields were never co-opted by a          To limit the effect of our training on the network, we evaluate
strategy for evasion.                                               strategies serially (and with a small sleep for DNS), which
How does China’s Host header censorship compare to                  limits how quickly our system can generate traffic. This is
keyword censorship? In general, we find that almost all the         important, as some of our training runs involve hosts outside
strategies that evade keyword-based censorship in China also        our control (such as with open DNS resolvers), and we believe
evade host-based censorship (17 out of 22). This interesting        our impact to these hosts is minimal. For example, our DNS
finding suggests that in order to correctly censor keywords,        training had a network load of approximately 11kbps, which
the GFW must be able to read the Host header, or read all the       should be a negligible volume of traffic for the size of the
headers without problems and find no host header. Our results       networks we test with. In training to hosts outside our control
also suggest that the reverse is not true: no strategies that af-   with HTTP, we set up our experiments to minimize potential
fected only the Host header were able to evade keyword-based        harm to those hosts. We ran few experiments, spaced out in
censorship. We also find that more strategies can evade host-       time, with slow query limit, and limited generations. We did
based censorship by simply injecting whitespace, compared           not believe our fuzzing would cause a crash failure, as we had
to keyword censorship.                                              not observed any crashes in any of our prior experiments or
                                                                    in prior work that crafted strategies manually [44, 67].
How do China’s three DNS injectors compare to one an-                  Finally, we ask: does releasing this work help censors? We
other? We find differences between all three injectors that         believe that, on balance, this work helps evaders more. Al-
affects how well our strategies work. Injector #1 was the           though individual bugs can be patched, the broader takeaways
most permissive to fields being incorrect in the DNS header,        of this work (such as that application-layer censorship eva-
and therefore had fewer strategies work; for example, Injec-        sion can be automated or that RFC non-compliance can be
tor #1 still correctly processed forbidden DNS queries if the       leveraged for evasion) are still applicable. There is also strong
arcount, ancount, or the nscount fields were non-zero. In-          precedent for developing automated techniques to evade cen-
jector #2 had the most idiosyncratic responses to multibyte         sorship [14, 52, 60].
UTF characters: injecting between 721 and 1,333 multibyte
characters caused Injector #2 to fail at least 33% of the time
(and the failure rate increased as the number of inserted charac-   9   Conclusion
ters increased); after 1,334 characters, Injector #2 fails 100%
of the time. Every strategy that evaded Injector #2 also evaded     The censorship arms race has entered a fascinating new era
Injector #3, though we discover that Injector #3 has different      of automated evasion. In this paper, we extend this to the
limits to the number of multibyte characters it will tolerate in    application-layer space by presenting the first techniques to
the DNS Query Records (a limit of 482). Overall, our results        automate discovery of new censorship evasion strategies that
further emphasize that these injectors are truly separate, each     require modifications only to application-layer requests. Train-
with their own block list and weaknesses.                           ing against China, India, and Kazakhstan, we discovered 77
                                                                    unique strategies to evade HTTP censorship and 9 for DNS.
How generalizable is this technique to the future? We be-           We thoroughly analyzed each of these strategies and discov-
lieve this technique should generalize well to other protocols.     ered that many of them are successful because censors often
Many application-layer protocols fit the abstraction we de-         adhere more to protocol requirements than application servers
fined for this paper (with smaller, discrete components that        do. Our tool—a modification of our prior work, Geneva [14]—
compose within a larger message). For example, TLS records          exploits this discrepancies to alter queries in ways that censors
are comprised of fixed static fields, and dynamic TLS Mes-          reject but more-permissible servers accept. We believe this
sages and TLS Extensions. We leave the implementation of            represents an interesting and important new domain for cen-
this to future work.                                                sorship evasion research. To assist in these efforts, we have
                                                                    made our code publicly available.
8     Ethical Considerations                                        Acknowledgments We thank the anonymous reviewers and
                                                                    our shepherd, Paul Pearce, for their helpful feedback. This
We designed our experiments to limit the potential impact to
                                                                    work was supported in part by NSF awards CNS-1901325
other hosts and the risk to real users. This work does not in-
                                                                    and CNS-1943240.
volve human subjects, and therefore falls outside the purview
of our Institutional Review Board; still, we follow best prac-
tices laid out by prior censorship studies [14, 56].
   We performed all of our training exclusively from vantage
points we control, and our work does not require recruiting



478    31st USENIX Security Symposium                                                                         USENIX Association
References                                                             [18] CitizenLab. CitizenLab Test Lists. https://github.com/
                                                                            citizenlab/test-lists, 2020.
 [1] CAIDA IODA (Internet Outage Detection and Analysis).
                                                                       [19] CitizenLab. URL testing lists intended for discovering
     https://ioda.caida.org/.
                                                                            website censorship. https://github.com/citizenlab/
 [2] Usage statistics of web servers, 2020. https://w3techs.                test-lists/, 2022.
     com/technologies/overview/web_server.
                                                                       [20] R. Clayton, S. J. Murdoch, and R. N. M. Watson. Ignoring the
 [3] Web Server Usage Distribution in the Top 1 Million Sites, 2020.        Great Firewall of China. In Privacy Enhancing Technologies
     https://trends.builtwith.com/web-server.                               Symposium (PETS), 2006.
 [4] C. Agosti and G. Pellerano. SniffJoke: transparent TCP connec-    [21] Cloudflare. Cloudflare Radar: Up to date Internet trends
     tion scrambler. https://github.com/vecna/sniffjoke,                    and insight. https://radar.cloudflare.com/cn?date_
     2011.                                                                  filter=last_30_days, 2022.
 [5] american fuzzy lop. http://lcamtuf.coredump.cx/afl/.              [22] Congressional Research Service. Social Media: Misin-
 [6] Anonymous. The Collateral Damage of Internet Censorship by             formation and Content Moderation Issues for Congress,
     DNS Injection. ACM SIGCOMM Computer Communication                      2021. https://crsreports.congress.gov/product/
     Review (CCR), 42(3):21–27, 2012.                                       pdf/R/R46662.

 [7] Anonymous. Towards a Comprehensive Picture of the Great           [23] R. Dingledine, N. Mathewson, and P. Syverson. Tor: The
     Firewall’s DNS Censorship. In USENIX Workshop on Free                  Second-Generation Onion Router. In USENIX Security Sym-
     and Open Communications on the Internet (FOCI), 2014.                  posium, 2004.

 [8] Anonymous, A. A. Niaki, N. P. Hoang, P. Gill, and                 [24] D. Ellard, C. Jones, V. Manfredi, W. T. Strayer, B. Thapa, M. V.
     A. Houmansadr. Triplet Censors: Demystifying Great Fire-               Welie, and A. Jackson. Rebound: Decoy routing on asymmet-
     wall’s DNS Censorship Behavior. In USENIX Workshop on                  ric routes via error messages. In IEEE Conference on Local
     Free and Open Communications on the Internet (FOCI), 2020.             Computer Networks (LCN), 2015.

 [9] T. Berners-Lee, R. Fielding, and L. Masinter. Uniform Re-         [25] A. P. Felt, R. Barnes, A. King, C. Palmer, C. Bentzel, and
     source Identifier (URI): Generic Syntax. RFC 3986, 2005.               P. Tabriz. Measuring HTTPS Adoption on the Web. In USENIX
     https://www.rfc-editor.org/rfc/rfc3986.                                Security Symposium, 2017.

[10] K. Bock, A. Alaraj, Y. Fax, K. Hurley, E. Wustrow, and            [26] R. Fielding, J. Gettys, J. Mogul, H. Frysyk, L. Masinter,
     D. Levin. Weaponizing Middleboxes for TCP Reflected Am-                P. Leach, and T. Berners-Lee. Hypertext Transfer Protocol –
     plification. In USENIX Annual Technical Conference, 2021.              HTTP/1.1. RFC 2616, 1999. https://datatracker.ietf.
                                                                            org/doc/html/rfc2616.
[11] K. Bock, P. Bharadwaj, J. Singh, and D. Levin. Your Cen-
     sor is My Censor: Weaponizing Censorship Infrastructure for       [27] R. Fielding, Y. Lafon, and J. Reschke. Hypertext Transfer
     Availability Attacks. In USENIX Workshop on Offensive Tech-            Protocol (HTTP/1.1): Range Requests. RFC 7233, 2014.
     nologies (WOOT), 2021.                                                 https://www.rfc-editor.org/rfc/rfc7233.html.

[12] K. Bock, Y. Fax, K. Reese, J. Singh, and D. Levin. Detecting      [28] R. Fielding, M. Nottingham, and J. Reschke. Hypertext
     and Evading Censorship-in-Depth: A Case Study of Iran’s                Transfer Protocol (HTTP/1.1): Caching. RFC 7234, 2014.
     Protocol Whitelister. In USENIX Workshop on Free and Open              https://www.rfc-editor.org/rfc/rfc7234.html.
     Communications on the Internet (FOCI), 2020.                      [29] R. Fielding and J. Reschke. Hypertext Transfer Protocol
[13] K. Bock, G. Hughey, L.-H. Merino, T. Arya, D. Liscinsky,               (HTTP/1.1): Authentication. RFC 7235, 2014. https:
     R. Pogosian, and D. Levin. Come as You Are: Helping Un-                //www.rfc-editor.org/rfc/rfc7235.html.
     modified Clients Bypass Censorship with Server-Side Evasion.      [30] R. Fielding and J. Reschke. Hypertext Transfer Protocol
     In ACM SIGCOMM, 2020.                                                  (HTTP/1.1): Conditional Requests. RFC 7232, 2014. https:
[14] K. Bock, G. Hughey, X. Qiang, and D. Levin. Geneva: Evolv-             //www.rfc-editor.org/rfc/rfc7232.html.
     ing Censorship Evasion Strategies. In ACM Conference on           [31] R. Fielding and J. Reschke. Hypertext Transfer Protocol
     Computer and Communications Security (CCS), 2019.                      (HTTP/1.1): Message Syntax and Routing. RFC 7230, 2014.
[15] K. Bock, iyouport, Anonymous, L.-H. Merino, D. Fifield,                https://www.rfc-editor.org/rfc/rfc7230.html.
     A. Houmansadr, and D. Levin. Exposing and Circumventing           [32] R. Fielding and J. Reschke. Hypertext Transfer Protocol
     China’s Censorship of ESNI. https://geneva.cs.umd.                     (HTTP/1.1): Semantics and Content. RFC 7231, 2014. https:
     edu/posts/china-censors-esni/esni/, 2020.                              //www.rfc-editor.org/rfc/rfc7231.html.
[16] S. Burnett and N. Feamster. Encore: Lightweight Measure-          [33] D. Fifield. Threat modeling and circumvention of Internet
     ment of Web Censorship with Cross-Origin Requests. In ACM              censorship. In PhD thesis, 2017.
     SIGCOMM, 2015.                                                    [34] D. Fifield, N. Hardison, J. Ellithorpe, E. Stark, D. Boneh,
[17] Chromium Development Team. A safer default for naviga-                 R. Dingledine, and P. Porras. Evading Censorship with
     tion: HTTPS. https://blog.chromium.org/2021/03/                        Browser-Based Proxies. In Privacy Enhancing Technologies
     a-safer-default-for-navigation-https.html, 2020.                       Symposium (PETS), 2012.



USENIX Association                                                                           31st USENIX Security Symposium            479
[35] D. Fifield, C. Lan, R. Hynes, P. Wegmann, and V. Paxson.           [51] H. M. Moghaddam, B. Li, M. Derakhshani, and I. Goldberg.
     Blocking-resistant communication through domain fronting.               SkypeMorph: Protocol Obfuscation for Tor Bridges. In ACM
     In Privacy Enhancing Technologies Symposium (PETS), 2015.               Conference on Computer and Communications Security (CCS),
                                                                             2012.
[36] P. Foremski. Tracking the DNS Stars: The DNS Observa-
     tory, 2019. https://www.farsightsecurity.com/blog/                 [52] S.-J. Moon, J. Helt, Y. Yuan, Y. Bieri, S. Banerjee, V. Sekar,
     txt-record/dnsstars-20190610/.                                          W. Wu, M. Yannakakis, and Y. Zhang. Alembic: Automated
                                                                             Model Inference for Stateful Network Functions. In Sym-
[37] S. García, K. Hynek, D. Vekshin, T. Čejka, and A. Wasicek.
                                                                             posium on Networked Systems Design and Implementation
     Large Scale Measurement on the Adoption of Encrypted DNS.
                                                                             (NSDI), 2019.
     In Passive and Active Network Measurement Workshop (PAM),
     2021.                                                              [53] R. S. Raman, L. Evdokimov, E. Wustrow, A. Halderman, and
                                                                             R. Ensafi. Kazakhstan’s HTTPS Interception. https://
[38] Gitlab.     Gitlab Protocol Fuzzer Community Edi-                       censoredplanet.org/kazakhstan, 2019.
     tion, 2021.       https://gitlab.com/gitlab-org/
     security-products/protocol-fuzzer-ce.                              [54] R. S. Raman, L. Evdokimov, E. Wustrow, A. Halderman, and
                                                                             R. Ensafi. Investigating Large Scale HTTPS Interception in
[39] L. Haifeng, W. Shaolei, Z. Bin, S. Bo, and T. Chaojing. Net-            Kazakhstan. In ACM Internet Measurement Conference (IMC),
     work protocol security testing based on fuzz. In International          2020.
     Conference on Computer Science and Network Technology
                                                                        [55] S. M. Seal. Optimizing Web Application Fuzzing with Genetic
     (ICCSNT), 2015.
                                                                             Algorithms and Language Theory. In Master of Science Thesis,
[40] C. Hornig. A Standard for the Transmission of IP Data-                  2016.
     grams over Ethernet Networks. RFC 894, 1984. https:
                                                                        [56] B. VanderSloot, A. McDonald, W. Scott, J. A. Halderman,
     //datatracker.ietf.org/doc/html/rfc894.
                                                                             and R. Ensafi. Quack: Scalable Remote Measurement of
[41] A. Houmansadr, G. T. K. Nguyen, M. Caesar, and N. Borisov.              Application-Layer Censorship. In USENIX Security Sympo-
     Cirripede: Circumvention Infrastructure using Router Redi-              sium, 2018.
     rection with Plausible Deniability. In ACM Conference on           [57] P. Vines and T. Kohno. Rook: Using Video Games as a Low-
     Computer and Communications Security (CCS), 2011.                       Bandwidth Censorship Resistant Communication Platform. In
[42] A. Houmansadr, T. Riedl, N. Borisov, and A. Singer. IP over             Workshop on Privacy in the Electronic Society (WPES), 2015.
     Voice-over-IP for censorship circumvention. In arXiv preprint      [58] Q. Wang, X. Gong, G. T. Nguyen, A. Houmansadr, and
     arXiv:1207.2683, 2012.                                                  N. Borisov. CensorSpoofer: Asymmetric communication using
[43] B. Jabiyev, S. Sprecher, K. Onarlioglu, and E. Kirda. T-Reqs:           IP Spoofing for Censorship-resistant Web Browsing. In ACM
     HTTP Request Smuggling with Differential Fuzzing. In ACM                Conference on Computer and Communications Security (CCS),
     Conference on Computer and Communications Security (CCS),               2012.
     2021.                                                              [59] Z. Wang, Y. Cao, Z. Qian, C. Song, and S. V. Krishnamurthy.
[44] S. Khattak, M. Javed, P. D. Anderson, and V. Paxson. Towards            Your State is Not Mine: A Closer Look at Evading Stateful In-
     Illuminating a Censorship Monitor’s Model to Facilitate Eva-            ternet Censorship. In ACM Internet Measurement Conference
     sion. In USENIX Workshop on Free and Open Communications                (IMC), 2017.
     on the Internet (FOCI), 2013.                                      [60] Z. Wang, S. Zhu, Y. Cao, Z. Qian, C. Song, S. V. Krishnamurthy,
                                                                             K. S. Chan, and T. D. Braun. SymTCP: Eluding Stateful Deep
[45] G. T. Klees, A. Ruef, B. Cooper, S. Wei, and M. Hicks. Eval-
                                                                             Packet Inspection with Automated Discrepancy Discovery. In
     uating Fuzz Testing. In ACM Conference on Computer and
                                                                             Network and Distributed System Security Symposium (NDSS),
     Communications Security (CCS), 2018.
                                                                             2020.
[46] D. Levin, Y. Lee, L. Valenta, Z. Li, V. Lai, C. Lumenzanu,
                                                                        [61] Z. Weinberg, J. Wang, V. Yegneswaran, L. Briesemeister,
     N. Spring, and B. Bhattacharjee. Alibi Routing. In ACM
                                                                             S. Cheung, F. Wang, and D. Boneh. StegoTorus: A Camouflage
     SIGCOMM, 2015.
                                                                             Proxy for the Tor Anonymity System. In ACM Conference on
[47] F. Li, A. Razaghpanah, A. M. Kakhki, A. A. Niaki, D. Choffnes,          Computer and Communications Security (CCS), 2012.
     P. Gill, and A. Mislove. lib.erate, (n): A library for exposing    [62] B. Wiley. Dust: A Blocking-Resistant Internet Transport Pro-
     (traffic-classification) rules and avoiding them efficiently. In        tocol. http://blanu.net/Dust.pdf.
     ACM Internet Measurement Conference (IMC), 2017.
                                                                        [63] P. Winter. brdgrd (Bridge Guard). https://github.com/
[48] Z. Li, S. Herwig, and D. Levin. DeTor: Provably Avoiding                NullHypothesis/brdgrd, 2012.
     Geographic Regions in Tor. In USENIX Security Symposium,
                                                                        [64] wkrp. HTTPS MITM of various GitHub IP addresses in
     2017.
                                                                             China. https://github.com/net4people/bbs/issues/
[49] X. Mendez. WFuzz: The Web Fuzzer, 2020. wfuzz.io.                       27, 2020.
[50] P. Mockapetris. Domain names - implementation and speci-           [65] E. Wustrow, C. M. Swanson, and J. A. Halderman. TapDance:
     fication. RFC 1035, 1987. https://datatracker.ietf.                     End-to-Middle Anticensorship without Flow Blocking. In
     org/doc/html/rfc1035.                                                   USENIX Annual Technical Conference, 2014.



480    31st USENIX Security Symposium                                                                               USENIX Association
[66] E. Wustrow, S. Wolchok, I. Goldberg, and J. A. Halderman.        into the specified <component> of the action target
     Telex: Anticensorship in the Network Infrastructure. In          <number of actions> times. This will insert either
     USENIX Security Symposium, 2011.                                 once (if the fourth parameter is omitted) or a specified
[67] T. K. Yadav, A. Sinha, D. Gosain, P. K. Sharma, and              number of times if the fourth parameter is given.
     S. Chakravarty. Where The Light Gets In: Analyzing Web
     Censorship Mechanisms in India. In ACM Internet Measure-
                                                                   2. replace{<value>:<component>:
     ment Conference (IMC), 2018.                                             <number of actions>}
[68] W. Zhou, A. Houmansadr, M. Caesar, and N. Borisov. SWEET:        Replace the field specified by <component> with
     Serving the Web by Exploiting Email Tunnels. In Privacy          <value>. If <number of actions> is given, replace it
     Enhancing Technologies Symposium (PETS), 2013.                   with that many copies of <value> (default: one). Note:
                                                                      delete can be simulated here by the random chance to
                                                                      replace the "value" with nothing.
A    HTTP Geneva Syntax
                                                                   3. duplicate(,) — Makes a second action target equal to
We give a brief background of Geneva’s syntax for strategies.         the first. Duplicate outputs two identical action targets
Strategies are comprised of trigger/action tree pairs: the trig-      and each side can be modified individually. Duplicating
ger defines which packet component should be modified, and            a header will add a new header, not just concatenate the
the action-tree specifies how it should be modified. Action-          string of the header name or value.
trees are trees composed of simple manipulation actions.
                                                                   4. drop(,) — Remove the action target from the request.
Actions Depending on the protocol (DNS or HTTP), the
principle unit of modification is different: HTTP operates         5. changecase{<case method>} — Changes the case of
over the Headers, and DNS operations over the DNS Question            the entire action target (ignores non-alphabetical charac-
Records. Each action defines specific parameters it accepts;          ters). If this is a header, this works on the header name
below is an overview of the arguments the actions can take.           and value.

1. <value> — Any printable characters (URL-encoded).               Action trees can be extended by adding new actions into
                                                                   children (ending parenthesis) of any action. For every action
2. <string location> — Where in a string to be inserted:           except duplicate, there will only be downstream actions in
   start, middle, end, or random. Start means at index 0,          the first half of the parenthesis.
   middle is at index length/2, end is equal to index length,
   and random is anywhere except the start or end.                 Trigger There is one matching trigger for every action tree
                                                                   and it signifies when that action tree should act on an action
3. <component> — (Only used for HTTP Geneva.) Speci-               target. Each trigger takes three parameters. The first element
   fies which part of a header to act upon: "name", or "value".    of the trigger is the relevant protocol: DNS, DNSQR, or HTTP.
   Remember a header is broken up into two sides separated         The second element signifies which field the trigger should
   by the semi-colon into the header name and header value.        check for a match. For DNS, this trigger will look for certain
   Ex: in “Host: www.example.com”, “Host” is the header            fields like qclass, whereas in HTTP, it uses specific header
   name and “ www.example.com” is the header value (note           names. The third element specifies what the target field must
   the space is included).                                         be for the trigger to fire. A star “*” can be used as a wildcard.
4. <number of actions> — How many times the action                 An example of a trigger is [HTTP:Host:*] to mean a strategy
   should be run. For example, with the insert or replace          will act on any Host header it sees, or [DNSQR:qname:*] to
   actions, running this action multiple times concatenates        act on every DNS Question Record.
   the <value> <number of actions> number of times                 Strategy Syntax Action trees are combined with triggers
   before doing the action.                                        to create combinations like <trigger>-<action tree>-|.
5. <case method> — Either random (each character is ran-           It is possible to have multiple combinations in one strategy.
   domly upper or lower case), lower (all characters are lower     When this happens, each action tree will act on their own
   case) or upper (all characters are upper case).                 version of their designated action target, and all the dupli-
                                                                   cates will be combined in the end to recreate the request. An
  With these arguments in mind, below are Geneva’s modifi-         example of a full strategy with two action trees is:
cation actions for HTTP and DNS.
                                                                   [HTTP:Host:*]-duplicate(
1. insert{<value>:<string location>:                                   replace{NewValue:name:1},
          <component>:<number of actions>}                                 insert{\%20:start:value:500}
                                                                               (changecase{random},))-|
    Insert the byte(s) specified by value into the lo-             [HTTP:Host:*]-insert{\%0A:start:name}-|}}
    cation of the string specified <string location>



USENIX Association                                                                     31st USENIX Security Symposium          481
                                                                                Apache 2.4.X           Nginx 1.X.X     Country
                                                                                                                   CN- CN-
          Family                           Strategy                         6     18   29   43 13.4 14.1 16.1 19.0         IN KZ
                                                                                                                    H K
                     ***[HTTP:method:*]-duplicate(,)-|                      -      -   -     -  -    -    -    -    -   -  3 3
        Method
                     ***[HTTP:method:*]-replace{%3A:value:1}-|              -      -   -     -  -    -    -    -    3 3 3 3
        Mangling
                     ***[HTTP:method:*]-replace{HTTP/1.1:value:1}-|         -      -   -     -  -    -    -    -    3 3 3 3
                     [HTTP:path:*]-duplicate(insert{3:middle:value:1004},
        Path                                                                3      3   3    3      3     3    3      3   -   3   3   -
                     replace{&ultrasurf:value})-|
        Confusion
                     [HTTP:path:*]-insert{%3F:start:value:1}-|              3      3   3    3      -     -    -      -   3   -   3   -
                     [HTTP:method:*]-insert{%09:end:value:1}-|              3      3   -    -      -     -    -      -   -   -   3   3
                     ***[HTTP:method:*]-insert{%09:start:value:1}-|         -      -   -    -      -     -    -      -   -   -   3   3
                     [HTTP:method:*]-insert{%0A:start:value:1}-|            3      3   -    -      3     3    3      3   -   -   3   3
                     [HTTP:method:*]-insert{%0B:end:value:1}-|              3      3   -    -      -     -    -      -   -   -   3   3
                     [HTTP:method:*]-insert{%0D:end:value:2}-|              3      3   -    -      -     -    -      -   3   3   3   3
                     [HTTP:path:*]-insert{%09:end:value:1}-|                3      3   -    -      -     -    -      -   -   -   3   -
                     [HTTP:path:*]-insert{%09:start:value:1}-|              3      3   -    -      -     -    -      -   3   -   3   -
        Request
                     [HTTP:path:*]-insert{%0C:start:value:1}-|              3      3   -    -      -     -    -      -   3   -   3   -
        Line
                     [HTTP:path:*]-insert{%0D:start:value:1}-|              3      3   -    -      -     -    -      -   3   3   3   -
        Whitespace
                     [HTTP:path:*]-insert{%20:end:value:1}-|                3      3   -    -      3     3    3      3   -   -   3   -
                     [HTTP:path:*]-insert{%20:start:value:1}-|              -      -   -    -      -     -    -      -   3   -   -   -
                     [HTTP:version:*]-insert{%0A%09%0A%09:end:value:1}-|    -      -   -    -      3     3    3      3   -   -   3   3
                     [HTTP:version:*]-insert{%0A%09:end:value:1}-|          -      -   -    -      3     3    3      3   -   -   -   3
                     [HTTP:version:*]-insert{%0A%20%0A%20:end:value:1}-|    -      -   -    -      3     3    3      3   -   -   3   3
                     [HTTP:version:*]-insert{%20%0A%09:end:value:1}-|       -      -   -    -      3     3    3      3   -   -   3   3
                     [HTTP:version:*]-insert{%20:end:value:1}-|             3      3   -    -      3     3    3      3   -   -   3   -
                     [HTTP:host:*]-duplicate(replace{%C3%97:name:596},
                                                                            3      3   -       -   -      -   -      -   3   3   3   3
                     insert{%20:end:name:786})-|
                     [HTTP:host:*]-replace{%5E:name:926}
        Sandwich     (duplicate(duplicate(,replace{host:name:1}             3      3   3    3      3     3    3      3   3   3   -   3
        Strategy     (insert{%20:start:value:3238},)),),)-|
                     [HTTP:host:*]-replace{%C3%97:name:1358}
                     (duplicate(duplicate(,replace{host:name:1}             3      3   -       -   3     3    3      3   3   3   3   3
                     (insert{%20:end:value},)),),)-|
                     [HTTP:host:*]-replace{%C3%97:name:1371}
                                                                            3      3   -       -   3     3    3      3   3   3   3   -
                     (duplicate(duplicate(,replace{host:name:1}),),)-|
                     [HTTP:host:*]-insert{%20:end:value:4081}
                     (duplicate(duplicate(,replace{a:name:1}),              3      3   3    3      3     3    3      3   -   3   -   3
                     insert{%09:start:name:3238}),)-|
                     [HTTP:host:*]-insert{%20:end:value:4081}
                     (duplicate(duplicate(insert{%09:start:name:3238},),    3      3   -       -   3     3    3      3   -   3   -   3
                     replace{a:name:1}),)-|
                     [HTTP:host:*]-replace{PUT:name:423}
                                                                            3      3   3    3      3     3    3      3   3   3   3   -
                     (duplicate(duplicate(,replace{host:name}),),)-|
        Version      [HTTP:version:*]-duplicate-|                           3      3   -       -   -      -   -      -   -   -   3   -
        Mangling     [HTTP:version:*]-replace{OPTIONS:value:1}-|            3      3   -       -   -      -   -      -   3   3   3   -

Table 4: Continuation of Table 2. A strategy is successful against a nation if it evades that nation’s censor. A strategy is successful
to a server if it evades in at least one country and is accepted by the server. CN-H and CN-K stand for the China Headers and
China Keyword modes respectively. "***" denotes a strategy found against a live server we did not control; though these evade
in some of our tested countries, but do not receive responses from the servers we tested.




482   31st USENIX Security Symposium                                                                                     USENIX Association
