4

I'm working on a project and need to determine how tor determines directory authorities. Looking at the source of version 0.2.8.0-alpha-dev (git-d015c70a118e4357) in file or/config.c there are a number of default directories:

/** List of default directory authorities */

static const char *default_authorities[] = {
  "moria1 orport=9101 "
    "v3ident=D586D18309DED4CD6D57C18FDB97EFA96D330566 "
    "128.31.0.39:9131 9695 DFC3 5FFE B861 329B 9F1A B04C 4639 7020 CE31",
  "tor26 orport=443 "
    "v3ident=14C131DFC5C6F93646BE72FA1401C02A8DF2E8B4 "
    "86.59.21.38:80 847B 1F85 0344 D787 6491 A548 92F9 0493 4E4E B85D",
  "dizum orport=443 "
    "v3ident=E8A9C45EDE6D711294FADF8E7951F4DE6CA56B58 "
    "194.109.206.212:80 7EA6 EAD6 FD83 083C 538F 4403 8BBF A077 587D D755",
  "Tonga orport=443 bridge "
    "82.94.251.203:80 4A0C CD2D DC79 9508 3D73 F5D6 6710 0C8A 5831 F16D",
  "gabelmoo orport=443 "
    "v3ident=ED03BB616EB2F60BEC80151114BB25CEF515B226 "
    "131.188.40.189:80 F204 4413 DAC2 E02E 3D6B CF47 35A1 9BCA 1DE9 7281",
  "dannenberg orport=443 "
    "v3ident=585769C78764D58426B8B52B6651A5A71137189A "
    "193.23.244.244:80 7BE6 83E6 5D48 1413 21C5 ED92 F075 C553 64AC 7123",
  "urras orport=80 "
    "v3ident=80550987E1D626E3EBA5E5E75A458DE0626D088C "
    "208.83.223.34:443 0AD3 FA88 4D18 F89E EA2D 89C0 1937 9E0E 7FD9 4417",
  "maatuska orport=80 "
    "v3ident=49015F787433103580E3B66A1707A00E60F2D15B "
    "171.25.193.9:443 BD6A 8292 55CB 08E6 6FBE 7D37 4836 3586 E46B 3810",
  "Faravahar orport=443 "
    "v3ident=EFCBE720AB3A82B99F9E953CD5BF50F7EEFC7B97 "
    "154.35.175.225:80 CF6D 0AAF B385 BE71 B8E1 11FC 5CFF 4B47 9237 33BC",
  "longclaw orport=443 "
    "v3ident=23D15D965BC35114467363C165C4F724B64B4F66 "
    "199.254.238.52:80 74A9 1064 6BCE EFBC D2E8 74FC 1DC9 9743 0F96 8145",
  NULL
};

I've placed a breakpoint on the function using these values and it is not executed (immediately) at runtime. Running wireshark the following transcript is shown:

tor packet capture

However, the address 193.11.114.46 is not present within the source code (at least in plain text/unencoded form). Using strace doesn't reveal any useful information either:

    $ strace -e poll,select,connect,recvfrom,sendto ./tor
poll([{fd=3, events=POLLIN}], 1, 10)    = 1 ([{fd=3, revents=POLLIN}])
poll([{fd=3, events=POLLIN}], 1, 10)    = 1 ([{fd=3, revents=POLLIN}])
Dec 26 11:37:35.625 [notice] Tor v0.2.8.0-alpha-dev running on Linux with Libevent 2.0.21-stable, OpenSSL 1.0.1k and Zlib 1.2.8.
Dec 26 11:37:35.625 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
Dec 26 11:37:35.625 [notice] This version is not a stable Tor release. Expect more bugs than usual.
Dec 26 11:37:35.625 [notice] Configuration file "/usr/local/etc/tor/torrc" not present, using reasonable defaults.
sendto(3, "\24\0\0\0\22\0\1\3O\302~V\0\0\0\0\0\0\0\0", 20, 0, {sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = 20
sendto(3, "\24\0\0\0\26\0\1\3P\302~V\0\0\0\0\0\0\0\0", 20, 0, {sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = 20
connect(3, {sa_family=AF_INET, sin_port=htons(9), sin_addr=inet_addr("18.0.0.1")}, 16) = 0
Dec 26 11:37:35.629 [notice] Opening Socks listener on 127.0.0.1:9050
Dec 26 11:37:35.000 [notice] Bootstrapped 0%: Starting
Dec 26 11:37:35.000 [notice] Bootstrapped 80%: Connecting to the Tor network
poll([?] 0x7ffe952f4b00, 1, 10)         = 1
connect(8, {...}, 16)                   = -1 EINPROGRESS (Operation now in progress)
sendto(9, 0x7ffe952f49b0, 20, 0, {...}, 12) = 20
sendto(9, 0x7ffe952f49b0, 20, 0, {...}, 12) = 20
sendto(9, 0x7ffe952f49b0, 20, 0, {...}, 12) = 20
sendto(9, 0x7ffe952f49b0, 20, 0, {...}, 12) = 20
Dec 26 11:37:37.000 [notice] Bootstrapped 85%: Finishing handshake with first hop
Dec 26 11:37:37.000 [notice] Bootstrapped 90%: Establishing a Tor circuit
Dec 26 11:37:37.000 [notice] Tor has successfully opened a circuit. Looks like client functionality is working.
Dec 26 11:37:37.000 [notice] Bootstrapped 100%: Done

Where can I find the list of predefined directory authorities?

3

Found it.tor creates a directory .tor in the home directory (on Linux).

$ ls ~/.tor
cached-certs  cached-microdesc-consensus  cached-microdescs  cached-microdescs.new  lock  state
$ grep -Rn 193.11.114.46
cached-microdesc-consensus:24929:r mdfnet3 uD3BVY8NNDU7uZLvk6/q/bImpz4 2015-12-26 11:02:15 193.11.114.46 9003 9032

The directory authorities above are used on the first run (when the .tor directory has not been created yet).

0

Actually the servers are listed in source you have discovered. And a lot of nodes are running the mirrors for signed directory data, so in .tor folder you will have a lot of mirrors, but the directories are hard coded as far as I know

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.