Sei sulla pagina 1di 6

Tor Country Codes - B3RN3D

1 de 6

http://www.b3rn3d.com/blog/2014/03/05/tor-country-codes/

B3RN3D
Let your plans be dark and impenetrable as night, and when you
move, fall like a thunderbolt.
RSS

Blog
Archives
Contact

Tor Country Codes


Tor has the ability to let you choose which exit nodes youd like to use either by name, fingerprint, or
country code. If you have a trusted list of nodes youd like to use as a whitelist, you can use that, or if you
have a list of nodes on a blacklist, it supports that configuration. But for those of us that are attempting to be
someone else, specifically someone from a different country, we can use Tor to not only hide our identity, but
make it appear to be from a specific geographic location.
Our example here may be an identity where you want to appear like a Ukrainian dissident when in reality
youre a soccer Mom from Chicago, IL. By setting up a dedicated machine, with a specific Tor configuration,
you can make sure that all of your traffic is routed out of an Ukrainian Exit Node.

TORRC
The configuration is simple, modify your torrc file to add the follwoing line to ensure Tor will only use Ukraine
based exit nodes:
1
2

ExitNodes {ua}
StrictNodes 1

Please note that in all of these examples, we must enable StrictNodes. This example will use either Ukraine,
Uganda, South Korea, or Ireland as an exit:
1

ExitNodes {ua},{ug},{kp},{ie}

Blacklisting

24/04/2016 13:42

Tor Country Codes - B3RN3D

2 de 6

http://www.b3rn3d.com/blog/2014/03/05/tor-country-codes/

You can also use this as a defensive measure as well. If youve believe there is some kind of geo-centric threat
in Uganda, you can configure Tor to never use these exit nodes.
1

ExcludeExitNodes {ua}

You can exclude all node types for a specific country as well exits, relays, entry, and bridge nodes.
1

ExcludeNodes {us}

You have the ability to whitelist all node types which is to say you can make sure that your entire Tor circuit
only uses a certain country. This is NOT recommended of course. An ideal circuit will cross countries and
legal jurisdictions.

The ?? Country
Tor uses Maxminds Geo-ip lookup system for this functionality. Some of the versions of their database
contain a ?? country code. This is reserved for IPs they either dont know, or arent willing to share. (Tor is
making some changes to compensate for this in the future.)
Knowing this can be useful in one of two ways. First, you may think that if you dont know what country
youre going to be using as a node, then you dont want to use it. This is probably a legitimate thought without
having more information on what causes an IP to have ??. Second, and more interestingly, some (poorly
configured) firewalls will automatically drop connections from certain countries. Admins will say Screw it,
block China. Hacking problem solved! and ask for a raise. Maxmind is a very popular Geo-ip lookup
database and you can imagine that all of the security services built into those fancy enterprise firewalls will
most likely be using it if its doing geographic lookups. While many of these admins will have policies for how
to handle us, cn, and de, Ive found many have issues with a country code that is ??. In one case,
Ive found a system that blocks all exit nodes, except those coming from a ?? country. I have not identitied
why this mis-configuration occurs, but hopefully someone can leverage this to their advantage.

List of country codes for Tor


Country
ASCENSION ISLAND
AFGHANISTAN
ALAND
ALBANIA
ALGERIA
ANDORRA
ANGOLA
ANGUILLA
ANTARCTICA
ANTIGUA AND BARBUDA
ARGENTINA REPUBLIC
ARMENIA
ARUBA
AUSTRALIA
AUSTRIA
AZERBAIJAN
BAHAMAS
BAHRAIN
BANGLADESH

Abbrev
{ac}
{af}
{ax}
{al}
{dz}
{ad}
{ao}
{ai}
{aq}
{ag}
{ar}
{am}
{aw}
{au}
{at}
{az}
{bs}
{bh}
{bd}

24/04/2016 13:42

Tor Country Codes - B3RN3D

3 de 6

BARBADOS
BELARUS
BELGIUM
BELIZE
BENIN
BERMUDA
BHUTAN
BOLIVIA
BOSNIA AND HERZEGOVINA
BOTSWANA
BOUVET ISLAND
BRAZIL
BRITISH INDIAN OCEAN TERR
BRITISH VIRGIN ISLANDS
BRUNEI DARUSSALAM
BULGARIA
BURKINA FASO
BURUNDI
CAMBODIA
CAMEROON
CANADA
CAPE VERDE
CAYMAN ISLANDS
CENTRAL AFRICAN REPUBLIC
CHAD
CHILE
PEOPLE'S REPUBLIC OF CHINA
CHRISTMAS ISLANDS
COCOS ISLANDS
COLOMBIA
COMORAS
CONGO
CONGO (DEMOCRATIC REPUBLIC)
COOK ISLANDS
COSTA RICA
COTE D IVOIRE
CROATIA
CUBA
CYPRUS
CZECH REPUBLIC
DENMARK
DJIBOUTI
DOMINICA
DOMINICAN REPUBLIC
EAST TIMOR
ECUADOR
EGYPT
EL SALVADOR
EQUATORIAL GUINEA
ESTONIA
ETHIOPIA
FALKLAND ISLANDS
FAROE ISLANDS
FIJI
FINLAND
FRANCE
FRANCE METROPOLITAN
FRENCH GUIANA
FRENCH POLYNESIA
FRENCH SOUTHERN TERRITORIES
GABON
GAMBIA
GEORGIA
GERMANY
GHANA

http://www.b3rn3d.com/blog/2014/03/05/tor-country-codes/

{bb}
{by}
{be}
{bz}
{bj}
{bm}
{bt}
{bo}
{ba}
{bw}
{bv}
{br}
{io}
{vg}
{bn}
{bg}
{bf}
{bi}
{kh}
{cm}
{ca}
{cv}
{ky}
{cf}
{td}
{cl}
{cn}
{cx}
{cc}
{co}
{km}
{cg}
{cd}
{ck}
{cr}
{ci}
{hr}
{cu}
{cy}
{cz}
{dk}
{dj}
{dm}
{do}
{tp}
{ec}
{eg}
{sv}
{gq}
{ee}
{et}
{fk}
{fo}
{fj}
{fi}
{fr}
{fx}
{gf}
{pf}
{tf}
{ga}
{gm}
{ge}
{de}
{gh}

24/04/2016 13:42

Tor Country Codes - B3RN3D

4 de 6

GIBRALTER
GREECE
GREENLAND
GRENADA
GUADELOUPE
GUAM
GUATEMALA
GUINEA
GUINEA-BISSAU
GUYANA
HAITI
HEARD & MCDONALD ISLAND
HONDURAS
HONG KONG
HUNGARY
ICELAND
INDIA
INDONESIA
IRAN, ISLAMIC REPUBLIC OF
IRAQ
IRELAND
ISLE OF MAN
ISRAEL
ITALY
JAMAICA
JAPAN
JORDAN
KAZAKHSTAN
KENYA
KIRIBATI
KOREA, DEM. PEOPLES REP OF
KOREA, REPUBLIC OF
KUWAIT
KYRGYZSTAN
LAO PEOPLE'S DEM. REPUBLIC
LATVIA
LEBANON
LESOTHO
LIBERIA
LIBYAN ARAB JAMAHIRIYA
LIECHTENSTEIN
LITHUANIA
LUXEMBOURG
MACAO
MACEDONIA
MADAGASCAR
MALAWI
MALAYSIA
MALDIVES
MALI
MALTA
MARSHALL ISLANDS
MARTINIQUE
MAURITANIA
MAURITIUS
MAYOTTE
MEXICO
MICRONESIA
MOLDAVA REPUBLIC OF
MONACO
MONGOLIA
MONTENEGRO
MONTSERRAT
MOROCCO
MOZAMBIQUE

http://www.b3rn3d.com/blog/2014/03/05/tor-country-codes/

{gi}
{gr}
{gl}
{gd}
{gp}
{gu}
{gt}
{gn}
{gw}
{gy}
{ht}
{hm}
{hn}
{hk}
{hu}
{is}
{in}
{id}
{ir}
{iq}
{ie}
{im}
{il}
{it}
{jm}
{jp}
{jo}
{kz}
{ke}
{ki}
{kp}
{kr}
{kw}
{kg}
{la}
{lv}
{lb}
{ls}
{lr}
{ly}
{li}
{lt}
{lu}
{mo}
{mk}
{mg}
{mw}
{my}
{mv}
{ml}
{mt}
{mh}
{mq}
{mr}
{mu}
{yt}
{mx}
{fm}
{md}
{mc}
{mn}
{me}
{ms}
{ma}
{mz}

24/04/2016 13:42

Tor Country Codes - B3RN3D

5 de 6

MYANMAR
NAMIBIA
NAURU
NEPAL
NETHERLANDS ANTILLES
NETHERLANDS, THE
NEW CALEDONIA
NEW ZEALAND
NICARAGUA
NIGER
NIGERIA
NIUE
NORFOLK ISLAND
NORTHERN MARIANA ISLANDS
NORWAY
OMAN
PAKISTAN
PALAU
PALESTINE
PANAMA
PAPUA NEW GUINEA
PARAGUAY
PERU
PHILIPPINES (REPUBLIC OF THE)
PITCAIRN
POLAND
PORTUGAL
PUERTO RICO
QATAR
REUNION
ROMANIA
RUSSIAN FEDERATION
RWANDA
SAMOA
SAN MARINO
SAO TOME/PRINCIPE
SAUDI ARABIA
SCOTLAND
SENEGAL
SERBIA
SEYCHELLES
SIERRA LEONE
SINGAPORE
SLOVAKIA
SLOVENIA
SOLOMON ISLANDS
SOMALIA
SOMOA,GILBERT,ELLICE ISLANDS
SOUTH AFRICA
SOUTH GEORGIA, SOUTH SANDWICH ISLANDS
SOVIET UNION
SPAIN
SRI LANKA
ST. HELENA
ST. KITTS AND NEVIS
ST. LUCIA
ST. PIERRE AND MIQUELON
ST. VINCENT & THE GRENADINES
SUDAN
SURINAME
SVALBARD AND JAN MAYEN
SWAZILAND
SWEDEN
SWITZERLAND
SYRIAN ARAB REPUBLIC

http://www.b3rn3d.com/blog/2014/03/05/tor-country-codes/

{mm}
{na}
{nr}
{np}
{an}
{nl}
{nc}
{nz}
{ni}
{ne}
{ng}
{nu}
{nf}
{mp}
{no}
{om}
{pk}
{pw}
{ps}
{pa}
{pg}
{py}
{pe}
{ph}
{pn}
{pl}
{pt}
{pr}
{qa}
{re}
{ro}
{ru}
{rw}
{ws}
{sm}
{st}
{sa}
{uk}
{sn}
{rs}
{sc}
{sl}
{sg}
{sk}
{si}
{sb}
{so}
{as}
{za}
{gs}
{su}
{es}
{lk}
{sh}
{kn}
{lc}
{pm}
{vc}
{sd}
{sr}
{sj}
{sz}
{se}
{ch}
{sy}

24/04/2016 13:42

Tor Country Codes - B3RN3D

6 de 6

TAIWAN
TAJIKISTAN
TANZANIA, UNITED REPUBLIC OF
THAILAND
TOGO
TOKELAU
TONGA
TRINIDAD AND TOBAGO
TUNISIA
TURKEY
TURKMENISTAN
TURKS AND CALCOS ISLANDS
TUVALU
UGANDA
UKRAINE
UNITED ARAB EMIRATES
UNITED KINGDOM (no new registrations)
UNITED KINGDOM
UNITED STATES
UNITED STATES MINOR OUTL.IS.
URUGUAY
UZBEKISTAN
VANUATU
VATICAN CITY STATE
VENEZUELA
VIET NAM
VIRGIN ISLANDS (USA)
WALLIS AND FUTUNA ISLANDS
WESTERN SAHARA
YEMEN
ZAMBIA
ZIMBABWE

http://www.b3rn3d.com/blog/2014/03/05/tor-country-codes/

{tw}
{tj}
{tz}
{th}
{tg}
{tk}
{to}
{tt}
{tn}
{tr}
{tm}
{tc}
{tv}
{ug}
{ua}
{ae}
{gb}
{uk}
{us}
{um}
{uy}
{uz}
{vu}
{va}
{ve}
{vn}
{vi}
{wf}
{eh}
{ye}
{zm}
{zw}

Posted by b3rn3d
Tweet

Perspectives of OPSEC Models CIA Operative teaches spycraft and psychology

Recent Posts
OPSEC for New Police Tools
Reasons to Let PGP Die #3: Outdated Crypto
Reasons to Let PGP Die #2: Web-of-Trust
Reasons to Let PGP Die #1: Metadata
The Internet of Threats
Growing a Flower in the Dark
Mass Surveillance for the Masses
Using a VPN With Tor
The Worst That Could Happen: Substantiating Their Fears
OPSEC of Actor vs Drug Dealer
Copyright 2016 - b3rn3d -

24/04/2016 13:42

Potrebbero piacerti anche