From d525c122be026ffb5bd4fdac7d93b27e82216429 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arturo=20Filast=C3=B2?= Date: Tue, 15 Mar 2016 14:58:24 +0100 Subject: [PATCH 1/5] Update lantern test specification to version 0.1.0 --- test-specs/ts-012-lantern.md | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/test-specs/ts-012-lantern.md b/test-specs/ts-012-lantern.md index 508bdfc..67c9193 100644 --- a/test-specs/ts-012-lantern.md +++ b/test-specs/ts-012-lantern.md @@ -1,6 +1,6 @@ # Specification version number -2015-04-03-000 +0.1.0 # Specification name @@ -24,11 +24,14 @@ See: https://github.com/getlantern/flashlight/blob/master/genconfig/proxiedsites # Test description This test launches Lantern in --headless mode, and parses output to determine -if it has bootstrapped. After bootstrap, it fetches the URL supplied by the ---url option using Lanterns http proxy interface listening on 127.0.0.1.8787. +if it has bootstrapped. After bootstrap, it fetches a URL using Lanterns HTTP +proxy interface listening on 127.0.0.1.8787 and checks to see if the response +body matches the expected result. +As a URL for testing we use http://www.google.com/humans.txt and look for the +string "Google is built by a large" in the response body. The specific string used to determine bootstrap from Lantern output in version -"2.0.10" is "Connected to proxy on localhost" from standard output. +"2.0.10" is "Successfully dialed via" from standard output. # Expected output @@ -72,13 +75,13 @@ failure: ## Possible conclusions We can determine whether or not Lantern is able to bootstrap, according to its output. -We can determine whether or not a given URL is reachable via Lantern. +We can determine whether or not a URL is reachable via Lantern. ## Example output sample ``` --- input_hashes: [] -options: [-u, google.com] +options: [] probe_asn: AS1234 probe_cc: US probe_city: null @@ -87,12 +90,10 @@ software_name: ooniprobe software_version: 1.2.3-rc1 start_time: 1428344311.0 test_name: lantern_circumvention_tool_test -test_version: 0.0.1 +test_version: 0.1.0 ... --- -body: "\n301 Moved\n

301 Moved

\nThe document has moved\n\ - here.\r\n\r\n" +body: "Google is built by a large team of engineers, designers, researchers, robots, and others in many different sites across the globe. It is updated continuously, and built with more tools and technologies than we can shake a stick at. If you'd like to help us out, see google.com/careers." bootstrapped: true input: null lantern --headless: {exit_reason: process_done, stderr: '', stdout: ''} From e827b852f56619fddcc555d3b6f68e75c828ab39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arturo=20Filast=C3=B2?= Date: Tue, 15 Mar 2016 15:01:15 +0100 Subject: [PATCH 2/5] Update psiphon test specification to 0.1.0 --- test-specs/ts-014-psiphon.md | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/test-specs/ts-014-psiphon.md b/test-specs/ts-014-psiphon.md index 7bc6c04..56bfece 100644 --- a/test-specs/ts-014-psiphon.md +++ b/test-specs/ts-014-psiphon.md @@ -1,6 +1,6 @@ # Specification version number -2015-10-11-000 +0.1.0 # Specification name @@ -8,7 +8,9 @@ Psiphon Test # Test preconditions -Have psiphon-circumvention-system (including psiphon-circumvention-system/pyclient/psi_client.py) cloned in the home of the user that runs ooni or somewhere else accessible to the user that runs ooni. +Have psiphon-circumvention-system (including +psiphon-circumvention-system/pyclient/psi_client.py) cloned in the home of the +user that runs ooni or somewhere else accessible to the user that runs ooni. # Expected impact @@ -17,13 +19,17 @@ Ability to measure whether Psiphon is working from the given network vantage poi # Expected inputs Optionally: -A single URL to fetch, supplied by command line argument "--url (-u)". Psiphon path, specified by the command line argument "--psiphonpath (-p)" The ip:port that Psiphon will use for the SOCKS proxy, with the command line argument "--socksproxy (-s)" # Test description -This test first check that the Psiphon path exists, then launches Psiphon and parses output to determine if it has bootstrapped. After bootstrap, it fetches google.com (or other URL specified by the --url argument) using Psiphons SOCKS proxy listening on 127.0.0.1:1080 (or otherwise specified by the --socksproxy argument). +This test first check that the Psiphon path exists, then launches Psiphon and +parses output to determine if it has bootstrapped. After bootstrap, it fetches +`http://www.google.com/humans.txt` using Psiphons SOCKS +proxy listening on 127.0.0.1:1080 (or otherwise specified by the --socksproxy +argument). +It will then check to see if the response body contains the string: "Google is built by a large" The specific string used to determine bootstrap from Psiphon output in version "0.0.1" is "Press Ctrl-C to terminate." from standard output. @@ -68,13 +74,13 @@ stderr: We can determine whether or not Psiphon is found. We can determine whether or not Psiphon is able to bootstrap, according to its output. -We can determine whether or not a given URL is reachable via Psiphon. +We can determine whether or not a URL is reachable via Psiphon. ## Example output sample ``` --- input_hashes: [] -options: [-u, google.com] +options: [] probe_asn: AS0 probe_cc: ZZ probe_city: null @@ -102,9 +108,7 @@ requests: tor: {is_tor: false} url: http://google.com response: - body: "\n301 Moved\n

301 Moved

\nThe document has\ - \ moved\nhere.\r\n\r\n" + body: "Google is built by a large team of engineers, designers, researchers, robots, and others in many different sites across the globe. It is updated continuously, and built with more tools and technologies than we can shake a stick at. If you'd like to help us out, see google.com/careers." code: 301 headers: - - Content-Length @@ -137,7 +141,7 @@ test_start_time: 1444686052.0 # Privacy considerations -Psiphon does not seek to provide anonymity. +Psiphon does not seek to provide anonymity. An adversary can observe that a user is connecting to Psiphon servers. Psiphon servers can also determine the users location. From 170cc4a661e5c524d67d217f86a59168eaf8c050 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arturo=20Filast=C3=B2?= Date: Tue, 15 Mar 2016 15:10:26 +0100 Subject: [PATCH 3/5] Add test specification for vanilla tor test --- test-specs/ts-016-vanilla-tor.md | 195 +++++++++++++++++++++++++++++++ 1 file changed, 195 insertions(+) create mode 100644 test-specs/ts-016-vanilla-tor.md diff --git a/test-specs/ts-016-vanilla-tor.md b/test-specs/ts-016-vanilla-tor.md new file mode 100644 index 0000000..27d3f14 --- /dev/null +++ b/test-specs/ts-016-vanilla-tor.md @@ -0,0 +1,195 @@ +# Specification version number + +0.1.0 + +# Specification name + +Vanilla Tor Test + +# Test preconditions + +* An internet connection + +* Tor is installed + +# Expected impact + +Ability to determine if Tor in it's default configuration is able to bootstrap +or at what point in bootstrapping it fails. + +# Expected inputs + +None + +# Test description + +The test will run the tor executable and monitor the standard +output looking for a line in it's output indicating it has +bootstrapped to 100%. + +# Expected output + +## Parent data format + +None + +## Required output data + +A flag to indicate if we were able to establish a Tor connection. + +## Semantics + +error: + **string** indicating that an error occurred + + timeout-reached: to indicate tor was unable to bootstrap in the allocated time. + + null: no error was detected. + +success: + **boolean** indiciating if whether or not we were able to connect to the + Tor network. + + True: indicates that we reached 100% bootstrap + + False: indicates that we were unable to reach 100% bootstrap before the + timeout was reached. + + null: indicates that tor exited before we were able to complete the test, + this can be due to some unhandled error. + + +timeout: + **integer** indicating the timeout, in seconds, after which we should + consider Tor as not working. The default it is set to 200 seconds. + +transport_name: + **string** always set to vanilla + +tor_version: + **string** indicating the version string of the tor client being used. + +tor_progress: + **integer** indicating the percentage of tor bootstrapping at which we + stopped. + +tor_progress_tag: + **string** a string giving a textual description of what the progress + percentage means. + +tor_progress_summary: + **string** a more verbose string giving a textual description of what the + progress percentage state is. + +tor_log: + **string** notice level log output of tor. + +## Possible conclusions + +Based on the ouput data what conclusions can you draw? + +## Example output sample + +``` +########################################### +# OONI Probe Report for vanilla_tor (0.1.0) +# Tue Mar 15 15:09:33 2016 +########################################### +--- +annotations: null +input_hashes: [] +options: [] +probe_asn: AS0 +probe_cc: ZZ +probe_city: null +probe_ip: 127.0.0.1 +report_id: wvKi9dtBJXFub4lBSwgcA0DZDiCJ38DRjhh3rYeBOwpwfJ0bfUznBLva5djRFOHR +software_name: ooniprobe +software_version: 1.3.2 +start_time: 1458047373.0 +test_helpers: {} +test_name: vanilla_tor +test_version: 0.1.0 +... +--- +{error: null, input: null, success: true, test_runtime: 7.101379871368408, test_start_time: 1458047374.0, + timeout: 200, tor_log: 'Mar 15 15:09:34.000 [notice] Tor 0.2.6.10 (git-58c51dc6087b0936) + opening new log file. + + Mar 15 15:09:34.063 [warn] OpenSSL version from headers does not match the version + we''re running with. If you get weird crashes, that might be why. (Compiled with + 1000204f: OpenSSL 1.0.2d 9 Jul 2015; running with 1000206f: OpenSSL 1.0.2f 28 + Jan 2016). + + Mar 15 15:09:34.064 [notice] Tor v0.2.6.10 (git-58c51dc6087b0936) running on Darwin + with Libevent 2.0.22-stable, OpenSSL 1.0.2f and Zlib 1.2.5. + + Mar 15 15:09:34.082 [notice] Tor can''t help you if you use it wrong! Learn how + to be safe at https://www.torproject.org/download/download#warning + + Mar 15 15:09:34.121 [notice] Configuration file "/non-existant" not present, using + reasonable defaults. + + Mar 15 15:09:34.172 [notice] Opening Socks listener on 127.0.0.1:1886 + + Mar 15 15:09:34.173 [notice] Opening Control listener on 127.0.0.1:27345 + + Mar 15 15:09:34.000 [notice] Parsing GEOIP IPv4 file /usr/local/Cellar/tor/0.2.6.10/share/tor/geoip. + + Mar 15 15:09:34.000 [notice] Parsing GEOIP IPv6 file /usr/local/Cellar/tor/0.2.6.10/share/tor/geoip6. + + Mar 15 15:09:34.000 [notice] Bootstrapped 0%: Starting + + Mar 15 15:09:34.000 [notice] New control connection opened from 127.0.0.1. + + Mar 15 15:09:34.000 [notice] Tor 0.2.6.10 (git-58c51dc6087b0936) opening log file. + + Mar 15 15:09:35.000 [notice] Bootstrapped 5%: Connecting to directory server + + Mar 15 15:09:35.000 [notice] Bootstrapped 10%: Finishing handshake with directory + server + + Mar 15 15:09:35.000 [notice] Bootstrapped 15%: Establishing an encrypted directory + connection + + Mar 15 15:09:35.000 [notice] Bootstrapped 20%: Asking for networkstatus consensus + + Mar 15 15:09:35.000 [notice] Bootstrapped 25%: Loading networkstatus consensus + + Mar 15 15:09:36.000 [notice] I learned some more directory information, but not + enough to build a circuit: We have no usable consensus. + + Mar 15 15:09:36.000 [notice] Bootstrapped 40%: Loading authority key certs + + Mar 15 15:09:36.000 [notice] Bootstrapped 45%: Asking for relay descriptors + + Mar 15 15:09:36.000 [notice] I learned some more directory information, but not + enough to build a circuit: We need more microdescriptors: we have 0/7138, and + can only build 0% of likely paths. (We have 0% of guards bw, 0% of midpoint bw, + and 0% of exit bw = 0% of path bw.) + + Mar 15 15:09:37.000 [notice] Bootstrapped 50%: Loading relay descriptors + + Mar 15 15:09:38.000 [notice] Bootstrapped 57%: Loading relay descriptors + + Mar 15 15:09:38.000 [notice] Bootstrapped 66%: Loading relay descriptors + + Mar 15 15:09:39.000 [notice] Bootstrapped 72%: Loading relay descriptors + + Mar 15 15:09:39.000 [notice] Bootstrapped 78%: Loading relay descriptors + + Mar 15 15:09:39.000 [notice] Bootstrapped 80%: Connecting to the Tor network + + Mar 15 15:09:39.000 [notice] Bootstrapped 90%: Establishing a Tor circuit + + Mar 15 15:09:41.000 [notice] Tor has successfully opened a circuit. Looks like + client functionality is working. + + Mar 15 15:09:41.000 [notice] Bootstrapped 100%: Done + + Mar 15 15:09:41.000 [notice] Catching signal TERM, exiting cleanly. + + ', tor_progress: 100, tor_progress_summary: Done, tor_progress_tag: done, tor_version: 0.2.6.10, + transport_name: vanilla} +... ''} +``` From 1b8b62c44da177f04dfa8d81bfc6fd3012379ccd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arturo=20Filast=C3=B2?= Date: Tue, 15 Mar 2016 17:54:36 +0100 Subject: [PATCH 4/5] Make fixes based on feedback from @andaraz --- test-specs/ts-012-lantern.md | 4 +--- test-specs/ts-016-vanilla-tor.md | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/test-specs/ts-012-lantern.md b/test-specs/ts-012-lantern.md index 67c9193..3bd8115 100644 --- a/test-specs/ts-012-lantern.md +++ b/test-specs/ts-012-lantern.md @@ -17,9 +17,7 @@ Ability to measure whether Lantern is working from the given network vantage poi # Expected inputs -A single URL to fetch, supplied by command line argument "--url (-u)". To test -Lantern, it must be a URL from the whitelisted set. -See: https://github.com/getlantern/flashlight/blob/master/genconfig/proxiedsites/ +None # Test description diff --git a/test-specs/ts-016-vanilla-tor.md b/test-specs/ts-016-vanilla-tor.md index 27d3f14..dba0517 100644 --- a/test-specs/ts-016-vanilla-tor.md +++ b/test-specs/ts-016-vanilla-tor.md @@ -86,7 +86,7 @@ tor_log: ## Possible conclusions -Based on the ouput data what conclusions can you draw? +If Tor with the default configuration can successfully bootstrap. ## Example output sample From fc91b6f32ba8c5edbe8b9ee079eb43e7c4a701a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arturo=20Filast=C3=B2?= Date: Wed, 16 Mar 2016 15:10:08 +0100 Subject: [PATCH 5/5] Add details about the default configuration parameter --- test-specs/ts-012-lantern.md | 6 +++++- test-specs/ts-014-psiphon.md | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/test-specs/ts-012-lantern.md b/test-specs/ts-012-lantern.md index 3bd8115..d1aa1cf 100644 --- a/test-specs/ts-012-lantern.md +++ b/test-specs/ts-012-lantern.md @@ -68,7 +68,7 @@ failure: 'lantern --headless': 'stdout' - Contents of standard output produced by Lantern. 'stderr' - Contents of standard error produced by Lantern. - +'default_configuration' - True or False - whether it is using the default, sane, configuration or not ## Possible conclusions @@ -93,12 +93,16 @@ test_version: 0.1.0 --- body: "Google is built by a large team of engineers, designers, researchers, robots, and others in many different sites across the globe. It is updated continuously, and built with more tools and technologies than we can shake a stick at. If you'd like to help us out, see google.com/careers." bootstrapped: true +default_configuration: true input: null lantern --headless: {exit_reason: process_done, stderr: '', stdout: ''} ``` ## Expected Post-processing efforts +You should be aware of the `default_confguration` parameter as the user may +have misconfigured the test leading to inconsistent results. + # Privacy considerations Lantern does not seek to provide anonymity. Lantern contains tracking analytics diff --git a/test-specs/ts-014-psiphon.md b/test-specs/ts-014-psiphon.md index 56bfece..54a3f99 100644 --- a/test-specs/ts-014-psiphon.md +++ b/test-specs/ts-014-psiphon.md @@ -68,7 +68,7 @@ stderr: '/tmp/': 'stdout' - Contents of standard output produced by Psiphon. 'stderr' - Contents of standard error produced by Psiphon. - +'default_configuration' - True or False - whether it is using the default, sane, configuration or not ## Possible conclusions @@ -100,6 +100,7 @@ test_version: 0.0.1 agent: agent input: null psiphon_installed: true +default_configuration: true requests: - request: body: null @@ -139,6 +140,9 @@ test_start_time: 1444686052.0 ## Expected Post-processing efforts +You should be aware of the `default_confguration` parameter as the user may +have misconfigured the test leading to inconsistent results. + # Privacy considerations Psiphon does not seek to provide anonymity.