Quarantyne is a reverse-proxy that protects web applications and APIs from fraudulent behavior, misuse, bots and cyber-attacks in real-time.
- Java 8
It is a reverse-proxy written in java. It fronts a web application or API and protects it from fraudulent behavior, misuse, bots and cyber-attacks. It cannot stop them all, but it will definitely make it harder and more expensive to perform.
It’s like a firewall but smarter, because it does not just block traffic because the user-agent is not in a whitelist. It also performs deep request inspection to detect if, for example, the password used has been compromised before, or if the email is disposable, with minimal configuration and no changes in your application. Our coverage section precisely lists what it can identify.
See coverage for a complete list of the threats and misuse it can identify and stop.
It performs deep inspection of web traffic going to your application to verify that the data being sent is not compromised or junk.
It adds extra HTTP headers to the request it proxies to your service. For example, an HTTP request coming from AWS will bear the following headers:
It can be configured to stop malicious requests from reaching your servers, avoiding wasting computing/DB/cache resources, metrics skew, junk data… See (Passive vs Active)[#passivevsactive].
It binds to an internal
adminPort, where metrics (latencies, success rate…) as well as the health of the proxy are reported.
It is offline software. It runs inside your private network and does not communicate over the Internet with anyone to share data about your traffic, your business, or your users.
Single jar with 0 dependencies. Metrics are available on
[proxyHost]:[adminPort]/metrics. Service health is available on
It is able to detect the following threats and misuse.
|LBD||Large Body Data||Overload target’s form processor with POST/PUT request with body > 1MB||yes|
|FAS||Fast Browsing||Request rate faster than regular human browsing||yes|
|CPW||Compromised Password||Password used is known from previous data breach. Possible account takeover||yes|
|DMX||Disposable Email||Email used is a disposable emails service||yes|
|IPR||IP Address Rotation||Same visitor is rotating its IP addresses||no|
|SHD||Suspicious Request Headers||Abnormal HTTP Request headers||yes|
|SUA||Suspicious User-Agent||User Agent not from a regular web browser||yes|
|PCX||Public Cloud Execution||IP address belongs to a public cloud service like AWS or GCP||no|
|IPD||IP/Country discrepancy||Country inferred from visitor IP is different from country field in submitted request||no|
|SGE||Suscpicious Geolocation||This request is not usually received from this geolocation. Possible account takeover.||no|
It lets you decide how you want to handle requests it flags. Quarantyne’s default configuration is to NOT block tainted traffic. This traffic will make its way to your server and will be labelled as such via HTTP headers.
Passive mode is the recommended way to get familiar with it and to get a sense of what’s going on inside your web traffic. In your application, log or plot the incoming Quarantyne labels and you might be surprised (or not) by what you find!
In active mode, Quarantyne prevents tainted traffic from reaching your application. Blocking happens only you configure explicitely Quarantyne to do so. The configuration section explains how traffic blocking can be enabled.
Two complementary configuration systems are used: command-line arguments and an external (local or remote) JSON configuration file.
Run the following command to display the help and what arguments are available
$ java -jar quarantyne -h
internal ip:port where to access admin, UI and metrics. Optional
Optional URL or local path to a Quarantyne JSON configuration file
HTTP destination where Quarantyne forwards annotated web traffic.
–help, -help, –h, -h
Display help about available configuration arguments
ip:port of inbound web traffic.
--config-file is an optional JSON configuration file that tells Quarantyne how requests to your service are structured. It enables deep traffic analysis and increase coverage.
The traffic config file is optional and can either be an absolute local path or a remote HTTP(S) URL to a JSON file containing a single JSON object with the following structure. Describing the structure of your HTTP requests helps Quarantyne perform deep inspection of critical data such as password, emails or countries.
“email_param_keys”: [“email”, “contact[email]”],
Quarantyne is able to parse payloads submitted via
PUT with a
Root properties are optional.
|Path where data is submitted||Must start by |
|Form/JSON key name where the user identifier is sent|
|Form/JSON key where the user password is sent|
|Form/JSON key where email addresses are sent|
|Form/JSON key where country iso codes are sent|
|HTTP response to return when blocking a request||It’s better when this looks like a legit page/error as to not tip off the attack. Even better if you can inject fake data 🙂|
|An array of attack classes to block.|
Available at https://demo.quarantyne.com/. In this scenario, Quarantyne is fronting httpbin.org in passive mode. Threats and misuse sent will be flagged via HTTP headers so querying https://demo.quarantyne.com/headers or https://demo.quarantyne.com/anything is a good start to see what’s going on. Hint: start simple, start with curl.
Quarantyne ships as a single 0-dependencies executable jar. Download a release and run:
$ java -jar quarantyne.jar
Clone this repo or and run the following
$ ./gradlew run
You should see the following:
- “2018-11-28T22:25:17.152-0800” [main] INFO com.quarantyne.proxy.Main – 0.0.0.0:8080 <= quarantyne => http://httpbin.org:80
- “2018-11-28T22:25:17.223-0800” [main] INFO com.quarantyne.proxy.Main – see available options with –help
- “2018-11-28T22:25:17.234-0800” [main] DEBUG com.quarantyne.proxy.Main – ==> event loop size is 8
- “2018-11-28T22:25:17.234-0800” [main] DEBUG com.quarantyne.proxy.Main – ==> detected 4 cpus core
- “2018-11-28T22:25:17.496-0800” [main] INFO com.quarantyne.config.ConfigRetrieverOptionsSupplier – remote configuration file found at https://s3-us-west-2.amazonaws.com/releases.quarantyne.com/quarantyne.test.json
You are all set! By default, Quarantyne starts on 127.0.0.1:8080, and proxies traffic to http://httpbin.org.
Send a few requests to http://127.0.0.1:8080/headers via various means. If fraudulent behavior is detected, you should see
X-Quarantyne-Label HTTP headers in the request receive by your application. Hint: try with curl.