xkeyscorerules


SUBMITTED BY: Guest

DATE: July 3, 2014, 7:30 p.m.

FORMAT: Text only

SIZE: 6.3 kB

HITS: 886

  1. http://daserste.ndr.de/panorama/xkeyscorerules100.txt
  2. // START_DEFINITION
  3. /**
  4. * Fingerprint Tor authoritative directories enacting the directory protocol.
  5. */
  6. fingerprint('anonymizer/tor/node/authority') = $tor_authority
  7. and ($tor_directory or preappid(/anonymizer\/tor\/directory/));
  8. // END_DEFINITION
  9. // START_DEFINITION
  10. /*
  11. Global Variable for Tor foreign directory servers. Searching for potential Tor
  12. clients connecting to the Tor foreign directory servers on ports 80 and 443.
  13. */
  14. $tor_foreign_directory_ip = ip('193.23.244.244' or '194.109.206.212' or
  15. '86.59.21.38' or '213.115.239.118' or '212.112.245.170') and port ('80' or
  16. '443');
  17. // END_DEFINITION
  18. // START_DEFINITION
  19. /*
  20. this variable contains the 3 Tor directory servers hosted in FVEY countries.
  21. Please do not update this variable with non-FVEY IPs. These are held in a
  22. separate variable called $tor_foreign_directory_ip. Goal is to find potential
  23. Tor clients connecting to the Tor directory servers.
  24. */
  25. $tor_fvey_directory_ip = ip('128.31.0.39' or '216.224.124.114' or
  26. '208.83.223.34') and port ('80' or '443');
  27. // END_DEFINITION
  28. // START_DEFINITION
  29. requires grammar version 5
  30. /**
  31. * Identify clients accessing Tor bridge information.
  32. */
  33. fingerprint('anonymizer/tor/bridge/tls') =
  34. ssl_x509_subject('bridges.torproject.org') or
  35. ssl_dns_name('bridges.torproject.org');
  36. /**
  37. * Database Tor bridge information extracted from confirmation emails.
  38. */
  39. fingerprint('anonymizer/tor/bridge/email') =
  40. email_address('bridges@torproject.org')
  41. and email_body('https://bridges.torproject.org/' : c++
  42. extractors: {{
  43. bridges[] = /bridge\s([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}):?([0-9]{2,4}?[^0-9])/;
  44. }}
  45. init: {{
  46. xks::undefine_name("anonymizer/tor/torbridges/emailconfirmation");
  47. }}
  48. main: {{
  49. static const std::string SCHEMA_OLD = "tor_bridges";
  50. static const std::string SCHEMA_NEW = "tor_routers";
  51. static const std::string FLAGS = "Bridge";
  52. if (bridges) {
  53. for (size_t i=0; i < bridges.size(); ++i) {
  54. std::string address = bridges[i][0] + ":" + bridges[i][1];
  55. DB[SCHEMA_OLD]["tor_bridge"] = address;
  56. DB.apply();
  57. DB[SCHEMA_NEW]["tor_ip"] = bridges[i][0];
  58. DB[SCHEMA_NEW]["tor_port_or"] = bridges[i][1];
  59. DB[SCHEMA_NEW]["tor_flags"] = FLAGS;
  60. DB.apply();
  61. }
  62. xks::fire_fingerprint("anonymizer/tor/directory/bridge");
  63. }
  64. return true;
  65. }});
  66. // END_DEFINITION
  67. // START_DEFINITION
  68. /*
  69. The fingerprint identifies sessions visiting the Tor Project website from
  70. non-fvey countries.
  71. */
  72. fingerprint('anonymizer/tor/torpoject_visit')=http_host('www.torproject.org')
  73. and not(xff_cc('US' OR 'GB' OR 'CA' OR 'AU' OR 'NZ'));
  74. // END_DEFINITION
  75. // START_DEFINITION
  76. /*
  77. These variables define terms and websites relating to the TAILs (The Amnesic
  78. Incognito Live System) software program, a comsec mechanism advocated by
  79. extremists on extremist forums.
  80. */
  81. $TAILS_terms=word('tails' or 'Amnesiac Incognito Live System') and word('linux'
  82. or ' USB ' or ' CD ' or 'secure desktop' or ' IRC ' or 'truecrypt' or ' tor ');
  83. $TAILS_websites=('tails.boum.org/') or ('linuxjournal.com/content/linux*');
  84. // END_DEFINITION
  85. // START_DEFINITION
  86. /*
  87. This fingerprint identifies users searching for the TAILs (The Amnesic
  88. Incognito Live System) software program, viewing documents relating to TAILs,
  89. or viewing websites that detail TAILs.
  90. */
  91. fingerprint('ct_mo/TAILS')=
  92. fingerprint('documents/comsec/tails_doc') or web_search($TAILS_terms) or
  93. url($TAILS_websites) or html_title($TAILS_websites);
  94. // END_DEFINITION
  95. // START_DEFINITION
  96. requires grammar version 5
  97. /**
  98. * Aggregate Tor hidden service addresses seen in raw traffic.
  99. */
  100. mapreduce::plugin('anonymizer/tor/plugin/onion') =
  101. immediate_keyword(/(?:([a-z]+):\/\/){0,1}([a-z2-7]{16})\.onion(?::(\d+)){0,1}/c : c++
  102. includes: {{
  103. #include <boost/lexical_cast.hpp>
  104. }}
  105. proto: {{
  106. message onion_t {
  107. required string address = 1;
  108. optional string scheme = 2;
  109. optional string port = 3;
  110. }
  111. }}
  112. mapper<onion_t>: {{
  113. static const std::string prefix = "anonymizer/tor/hiddenservice/address/";
  114. onion_t onion;
  115. size_t matches = cur_args()->matches.size();
  116. for (size_t pos=0; pos < matches; ++pos) {
  117. const std::string &value = match(pos);
  118. if (value.size() == 16)
  119. onion.set_address(value);
  120. else if(!onion.has_scheme())
  121. onion.set_scheme(value);
  122. else
  123. onion.set_port(value);
  124. }
  125. if (!onion.has_address())
  126. return false;
  127. MAPPER.map(onion.address(), onion);
  128. xks::fire_fingerprint(prefix + onion.address());
  129. return true;
  130. }}
  131. reducer<onion_t>: {{
  132. for (values_t::const_iterator iter = VALUES.begin();
  133. iter != VALUES.end();
  134. ++iter) {
  135. DB["tor_onion_survey"]["onion_address"] = iter->address() + ".onion";
  136. if (iter->has_scheme())
  137. DB["tor_onion_survey"]["onion_scheme"] = iter->scheme();
  138. if (iter->has_port())
  139. DB["tor_onion_survey"]["onion_port"] = iter->port();
  140. DB["tor_onion_survey"]["onion_count"] = boost::lexical_cast<std::string>(TOTAL_VALUE_COUNT);
  141. DB.apply();
  142. DB.clear();
  143. }
  144. return true;
  145. }});
  146. /**
  147. * Placeholder fingerprint for Tor hidden service addresses.
  148. * Real fingerpritns will be fired by the plugins
  149. * 'anonymizer/tor/plugin/onion/*'
  150. */
  151. fingerprint('anonymizer/tor/hiddenservice/address') = nil;
  152. // END_DEFINITION
  153. // START_DEFINITION
  154. appid('anonymizer/mailer/mixminion', 3.0, viewer=$ascii_viewer) =
  155. http_host('mixminion') or
  156. ip('128.31.0.34');
  157. // END_DEFINITION

comments powered by Disqus