You are on page 1of 116

Carna Botnet

Telnet’s threat to the World (and Brazil)

Parth Shukla
Information Security Analyst
pparth@auscert.org.au
http://twitter.com/pparth

BlackHat – Sao Paulo


Why should you care about Carna Botnet?
• This research shows that there is a high ratio of easily vulnerable devices
Worldwide – which highlights a major security concern.
• Malicious agents can use this to take root control of vulnerable devices
• Can have a serious impact on any economy because root shell access
means:
• Sniff all passing network traffic, and/or
• Modify passing network traffic, and/or
• Shutdown/reboot devices at will, and/or
• Use it to relay illegal traffic (such as child porn) and/or
• Perform cyber attacks on other countries or companies and innocent countries or
companies might be blamed

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Format of this presentation
• This presentation will split over two sessions with a break in
between:
• 10:30am to 11:10am
• 11:30am to 12:10pm

• Take a break in the middle and restart at 11:30am for Part 2


• If I go too quickly then we will take a break at 11:10am as scheduled
• Otherwise if people are happy then I can continue until around 11:20am and
we can take only a 10 minute break?
• If we run out of time – we can continue after 12:10.
• Please fill out Session Evaluation at the end to provide feedback.

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Introduction

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


What is the Carna Botnet?
• Millions of devices that were compromised for use in
conducting the “Internet Census 2012” by an anonymous
researcher

• Wait, what is Internet Census 2012?

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


What is the Internet Census 2012?
• Complete Scan of the allocated IPv4 ranges of the Internet
• Results & paper released Mid-March by an anonymous researcher
• http://internetcensus2012.bitbucket.org/paper.html
• Results contain 9 TB of logs (pure text!)
• Publicly available for download through a torrent as 568 GB of
highly compressed (ZPAQ) files
• I just finished my thesis on this public data of the Internet Census
• My thesis project: http://bit.ly/census-thesis

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


What is in the 9 TB of data?
• ICMP Ping (52 billion records) - 1.8 TB
• Reverse DNS (10.5 billion records) - 366 GB
• Service Probes (175 billion records; 4000 billion requests) - 5.5 TB
• Hostprobes (19.5 billion records) - 771 GB
• Syncscans (71 billion ports scanned) - 435 GB
• TCP IP Fingerprint (80 million records) - 50 GB
• IP ID Sequence (75 million records) - 2.7 GB
• Traceroutes (68 million records) - 18 GB

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


How is this feasible?
• Maximum of 4,294,967,296 IPv4 Addresses
• Only 3,706,650,624 are allocated
• Using 1 device to scan and perform a comprehensive scan of 1 IP
address per second, it would take:
• 3.7 billion seconds ≈ 117.5 Years (11.7yrs if 10 IP/s or 1.17yrs if 100 IP/s)
• But with 420,000 devices it would only take 2.6 hours!
• In well under 24 hours you can easily collect all the data you need
for all allocated IPv4 ranges!
• For problems of logistics and how the researcher handled collection
of the data, refer to the Internet Census 2012 paper
by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo
What is the Carna Botnet?
• Millions of devices that were compromised for use in conducting
the “Internet Census 2012” by an anonymous researcher
• 70% of these devices were either too small, didn’t run Linux or
were somehow limited (e.g. no “ifconfig”)
• Traceroutes of some of these devices are part of the public torrent
• ≈1.3 million of these were not limited and had “ifconfig” on
them so they could be identified
• 420 Thousand of these met minimum CPU/RAM requirements of the
researcher and were therefore used to perform Internet Census 2012
• A list of these devices has never been released or published
• I am the only researcher/organisation who has this full list (not counting the
original anonymous researcher)

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


The obvious
• Just stating the obvious so it’s in people’s mind when thinking of
this data and the rest of the presentation.
• Why has this researcher remained Anonymous?
• No permission was asked to compromise devices.
• What was done would most definitely be considered illegal in many
countries. That’s why I’m presenting on the data and not him or her.
• And NO, I am not the original researcher.
• I don’t want to steal his/her credit

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


How to be part of the Carna Botnet?
• A device must be directly reachable from the Internet
• Have telnet listening on default port 23 (with no firewall)
• Allow login using one of the default manufacturer credentials
• E.g. admin:admin, admin:password, root:password etc

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo
How to be part of the Carna Botnet?
• A device must be directly reachable from the Internet
• Have Telnet listening on default port 23 (with no firewall)
• Allow login using one of the default manufacturer credentials
• E.g. admin:admin, admin:password, root:password etc
• Not just make 1 mistake but 3 mistakes to be part of this botnet!
• To be part of the ≈1.3 million analysed here, also needed ‘ifconfig’
• To be part of the subnet of ≈420k actually used for the Internet Census,
needed ability to upload custom binary and must meet some minimum RAM
and CPU requirements. According to the anonymous researcher, this was to
avoid interfering with industrial controls or mission critical hardware

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


This presentation
• About the ≈1.3 million identifiable compromised devices
• This data obtained directly from the anonymous researcher
• Used for analysis for the rest of the presentation
• NOT publicly available! Exclusively given to me.
• Particular focus on devices located in Brazil and South America in the data
• However we will look at some other countries and continents.
• Clarify:
• Internet Census = 9 TB data (public torrent) – my thesis
• Carna Botnet = Devices compromised to conduct Internet Census (private) – my
research in this presentation
• Side note: the Carna botnet is unusual because it’s not created by phishing,
exploiting a coding error or social engineering!
by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo
Why so many compromised devices?
• ≈1.3 million! WHY?!
• Are there really that many ‘stupid’ people?
• We will come back to this later

• Let’s develop some foundation and context first by looking at what


data I was given and what it contains

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Story time

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


The story begins
• Small story to get started on how I got this exclusive data.
• It hasn’t even been one full year since I started working in the IT
Security Industry.
• So, it is really a story of luck in my opinion.
• Anonymous research sent email to Full Disclosure mailing list on
18th of March.
• I first emailed him on 28th of March.
• He replied on 30th of March.
• Last communication from him/her on 27th of May.

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


My first email
• I sent my first email on 28th of March (10 days after original
researcher’s email on Full Disclosure).

• “I was hoping you can provide AusCERT with the list of devices and
their information (IP addresses, date/time and any other relevant
information) for all the unprotected devices you discovered that are
located in Australia.”

• Didn’t really expect a reply. I sent it because I thought “why not?”


by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo
First reply email
• “Hi and thanks for your email. Congratulations, you are the first
CERT/Security research who contacted me and asked if I had
something more.” – 30th of March 2013.

• S/he then sent 12 MB of encrypted ZPAQ files which would


decompress to 882 MB.

• More importantly, it contained ALL compromised devices not just


the ones located in Australia.
• Nice surprise =)

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Last email
• Dated 27th of May 2013.
• I asked: “I'm curious to know if I'm still the only one with the data?”

• Reply: “No, no other emails, you are still the only one.”

• S/he offline since. I have sent a couple of emails since then but no
reply. I guess this is not too surprising!

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Infected Devices Data

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Information for each compromised device
1. MAC address - the last byte replaced by an ascending number
2. Manufacturer - derived from MAC address
3. RAM - in kilobytes - parsed from /proc/meminfo
4. Uname - output of uname -a
5. CPU Info - output of /proc/cpuinfo
6. IPs - list of all IPs associated with this device. Last byte of each IP
was zeroed by researcher. Accuracy of each IP to within a C class.
• Country Code - two letter country code for each of the IPs. Correct at the
time the device was compromised.

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


How was this data supplied?
• 3 ZPAQ files totalling 12 MB which uncompressed to 3 text files
which totalled about ~900 MB.
• Each line contained information on one device
• All information for each device was separated by tabs.
• Eg.: [MAC]\t[Manufacturer] \t[RAM] \t[Uname] \t[CPU Info]
\t[IP1];[Country1] \t[IP2];[Country2] etc..
• Creates a small problem because number of fields per line cannot
be predicted since even the IP addresses are separated by tabs

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Priorities
• Originally I only cared about the IP addresses because we can use
that to find these devices!
• Ideal situation would be to notify all device owners
• But not possible because we only have C class of the IP address of the
compromised device.
• NO timestamps!
• An entire C class might not necessary belong to one company or the same
company as it belonged to at the time of the compromise
• Next best: analyse the data in detail so to make it easier for people
to find these devices themselves in their networks and homes.
by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo
Re arranging data to create conformity
• First needed to create uniform columns.
• Need to be reliably able to say for example that the 4th column is
always a list of IP addresses for example.
• Through some linux/PHP magic, I replaced the separator for the
fields with a $ instead of a tab.
• I left the IP address list separator as tabs.
• I chose $ because some searching revealed that I couldn’t use other
characters such as commas etc. because some of the data actually contained
those characters
• $ was the character that didn’t exist anywhere in the data.

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Re-arranged data example
• Re-arranged data looked like this:
• [MAC address]$[Manufacturer]$[RAM]$[uname]$[IP addresses and
country code]$[/proc/cpuinfo]
• [IP addresses and country code] =
[IP1];[Country1]\t[IP2];[Country2]\t[IP3];[Country3]…
• Uniformity of fields achieved.
• Moved CPU info to the end because it’s a huge and messy field.
Purely for visual reasons.

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Initial analysis

Total Records: 1,336,692


Records with No IPs: -665
Records with IPs in more than 1 country: -904

Records with IPs in a single country: 1,335,123

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Distribution of Records based on IPs

No IP
665
IPs in Single
Other
Country
1569
1335123 IPs in Multiple
Countries
904

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Further refining

Duplicate
Records, 49931,
4%

Unique Records,
1285192, 96%
by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo
In the 1,285,192 compromised devices there
were
• 200 unique country codes
• 2,098 unique device manufacturers
• 3,880 different RAM sizes
• 10,875 unique unames
• 35,997 unique CPUs
• 787,665 unique C class IP ranges
• 1,264,223 unique MAC addresses

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Primitive tools for a primitive analysis
• I relied completely on the ‘cut’ utility from Linux for analysis for my
first presentation at the AusCERT 2013 conference in May.
• Unique Manufacturer by Count:
• cut -d $ -f 2 carna_botnet.tsv | sort | uniq -c | sort -n -r > unique-
manufacturer
• Very manual work. For every country or continent or manufacturer I
want to analyse I have to split the caran_botnet.tsv into a smaller
file with ‘egrep’ and then run the ‘cut’ utility on it.
• OK for one presentation. But when I started getting accepted at
other conferences, I needed to change my plan.

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


MariaDB
• What better to run unexpected querying then on a relational
database?
• I wrote a PHP script to insert the data into two tables in MariaDB
(MySQL fork).
• This would allow me to create arbitrary indexes on the data and
search and run queries on it easily.

• Let’s take a quick look at the PHP file I used for inserting. Nothing
complicated. Also see the final table.
by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo
Rest of presentation
• Hopefully you have some foundation of the data now.
• We will focus on the statistics that I created using this.
• 1.3 million is bad, yes, but what does it really mean? Analysis
necessary to truly understand the data.
• We need to go beyond the obvious to reveal the hidden.
• I will refer to the MariaDB database through out the presentation as
necessary.
• If we still have time at the end of the presentation we will run some
live queries so you can see how easy it becomes to create statistics.

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Countries

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Compromised Device Distribution by
Countries
United States, Russia, 21357, 2%
24243, 2%
Taiwan, 24352, 2%

Brazil, 30452, 2%
China, 720141,
South Korea, 56%
38200, 3%
India, 58766, 5%

Turkey, 87815, 7%
Hong Kong, 91453,
7%
by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo
Devices by Continents
• We can also create graphs on which continent is most prevalent.
• I used dev.maxmind.com/geoip/codes/country_continent to decide
which country belonged to which geographical continent.
• Created a table in MariaDB to represent this information.
• Let’s take a quick look at ‘country’, ‘continent’ and
‘european_union’ table.
• Creating statistics with this new information wouldn’t be very
fun/easy to do through command line.

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Compromised Device Distribution by
Continents
Asia, 1006634,
78%

Anonymous Proxy
or Satelite
Provider, 31, 0% Europe, 167320,
13%
Oceania, 2623, 0% North America, South America,
Africa, 7923, 1% 35139, 3% 65522, 5%

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Compromised Device Distribution by
Continents – including European Union

Asia, 1006587, 78%

Anonymous Proxy or Cyprus, 47, 0%


Satelite Provider, 31, 0%
European Union, 43023, 3%
Ocenia, 2623, 0%
Africa, 7923, 1% Rest of Europe, 124297,
10%
North America, 35139, 3%
South America, 65522, 5%
- Cyprus is part of continental Asia and European Union, hence the separate slice.

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Compromised Device Distribution for South
America
Guyana, 28, 0% French Guiana, 11,
Ecuador, 393, 1%
0%
Curaçao, 490, 1% Paraguay, 126, 0%
Suriname, 4, 0%
Bolivia, 690, 1%
Peru, 1265, 2%
Venezuela, 1593,
Chile, 2963, 5% Brazil, 30452, 46%
2%

Colombia, 6454,
10% Uruguay,
13173, 20%
Argentina, 7880,
12%

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Where is Brazil?
• 30,452 devices located in Brazil in the data
• 6th Largest Slice (2.36%) Worldwide
• Largest Slice (46.47%) in South America

• Not very good. Scary enough for Brazil!


• For more of a scare, we will look at how easy it would be to find
one of these devices in Brazil and other countries in the world at
the end of the presentation.

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Compromised Device Distribution for Oceania
New Zealand, Fiji, 25, 1% Others, 25, 1%
201, 8%

Guam, 758,
29%
Australia, 1614,
61%

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Compromised Device Distribution for Asia
Korea, Republic of, Taiwan, 24352, 3%
India, 58766, 6% 38200, 4%
Philippines, 14224, 1% Israel, 8475, 1%
Hong Kong, 91453, 9% Malaysia,
13781, 1% Thailand, 7282, 1%

Iran, 4587, 1%
Viet Nam, 4078, 0%
Georgia, 3343, 0%
Indonesia, 2841, 0%
Azerbaijan, 2234, 0%

China, 720141, 72%


Others, 12877, 1%

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Compromised Device Distribution for Europe
Czech Republic, 1097, 1% Netherlands, 1036, 1%
Portugal, 1046, 1%
Sweden, 1460, 1% Others, 8185, 5%
Belarus, 1087, 1%
Germany, 3176, 2%
France, 2436, 1%
United Kingdom, 3284, 2%
Bulgaria, 3885, 2%
Turkey, 87815, 52%
Italy, 3896, 2%
Romania, 4365, 3%
Spain, 5141, 3%

Russian
Poland, 7180, 4% Federation,
21357, 13%

Ukraine, 10874, 6%

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Compromised Device Distribution for European
Union
Netherlands, 1036, 2% Others, 5068, 12%
Poland, 7180, 17%
Portugal, 1046, 2%
Czech Republic, 1097,
3%
Sweden, 1460, 3% Spain, 5141, 12%
France, 2436, 6%

Germany, 3176, 7% Romania, 4365, 10%

Italy, 3896, 9%
United Kingdom, 3284,
8% Bulgaria, 3885, 9%

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Manufacturers - Analysis

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Distribution of Device Manufacturers –
Worldwide – Original ‘manufacturer’ field
shenzhen coship
aztech
electronics co, 19212, Other Manufacturers,
electronics pte,
1% 194214, 15%
14201, 1%
sony computer
entertainment, 17042, 1%
asustek
dlink, 20140, 2% unknown, 266252, 21%
computer,
30928, 2%
zhejiang dahua
technology co, zte, 174864, 14%
32744, 3%

alpha networks, yuxing electronics


33807, 3% company limited,
37020, 3%

airties wireless
smd informatica
networks, 43564,
sa, 109406, 9%
3% sunniwell cyber
tech co, 93341, shenzhen gongjin
7% tvt co, 98494, 8% electronics co, 99963, 8%

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


21% ‘unknown’ manufacturer?
• Checked these against the IEEE official list
• 71% of the 21% unknowns matched to the list!
• New unknown reduced from 21% to about 6%
• Also checked the other 79% (100-21=79) against IEEE official list
• Perfect match to already recorded info in the manufacturer field of the data.
• Reliability/consistency of data confirmed.
• Hence, ‘manufacturer’ field in data provided incomplete but not inconsistent.
• Could be many reasons why ‘unknown’ was recorded in the data
• A result of error encountered when deriving manufacturer (e.g. timeout)
• Using out-dated mac to manufacturer list to derive manufacturers
• The entire field deleted from data and re-derived using IEEE official list

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Distribution of Device Manufacturers –
Worldwide – Re-derived ‘manufacturer’ field
aztech Other Manufacturers,
electronics pte, 194524, 15%
sony computer 14201, 1% unknown, 77555, 6%
entertainment, 17042, 1%

shenzhen coship electronics


co, 19533, 2%

dlink corporation, 20139, zte, 353436, 28%


2%
asustek computer, 31457,
2%
zhejiang dahua alpha networks,
technology co, 33807, 3%
32744, 3% yuxing electronics
company limited, smd informatica
airties sa, 109406, 9%
37020, 3%
wireless
networks,
43564, 3% sunniwell cyber tech shenzhen gongjin
co, 93341, 7% tvt co, 98494, 8% electronics co, 108929, 8%

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Distribution of Device Manufacturers –
Worldwide – Original ‘manufacturer’ field
shenzhen coship
aztech
electronics co, 19212, Other Manufacturers,
electronics pte,
1% 194214, 15%
14201, 1%
sony computer
entertainment, 17042, 1%
asustek
dlink, 20140, 2% unknown, 266252, 21%
computer,
30928, 2%
zhejiang dahua
technology co, zte, 174864, 14%
32744, 3%

alpha networks, yuxing electronics


33807, 3% company limited,
37020, 3%

airties wireless
smd informatica
networks, 43564,
sa, 109406, 9%
3% sunniwell cyber
tech co, 93341, shenzhen gongjin
7% tvt co, 98494, 8% electronics co, 99963, 8%

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Still not happy with 6% ‘unknown’
 Provision in the IEEE specification for Locally Administered MACs
• This range is not up for grabs from IEEE
• Can be used in VMs or when setting manual MACs

• If 7th bit of a MAC address is 1 then it is considered Locally


administered
• i.e. second HEX digit of MAC: 2, 3, 6, 7, A, B, E, F
• Let’s take a look at Universally vs Locally Administered MACs in the
Records for the World in the currently 6% ‘unknown’ data.

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


IEEE Local vs Universal sidenote
• Interesting unrelated story from my research
• Some MAC address should be locally administered according to
specification but have been assigned to organisations by the IEEE.
• I emailed IEEE 802 committee to ask for what’s going on in early
August. Last I checked, they were still trying to figure it out.
• I found 13 MAC ranges that should be locally administered but have
been allocated by the IEEE.
• 02:07:01, 02:1C:7C, 02:60:86, 02:60:8C, 02:70:01, 02:70:B0, 02:70:B3,
02:9D:8E, 02:AA:3C, 02:BB:01, 02:C0:8C, 02:CF:1C, 02:E6:D3.

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


How many ‘Unknown’ vs Locally Administered
MACs in the data
2nd Character of MAC Number of Ocurrances
0 18717
2 47132
3 1
4 1088
6 434
8 9147
9 1
a 394
c 157
e 483
f 1

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Unrecognized Manufacturers - Worldwide

Actually Unknown,
29110, 2%

Recogniszed
Unrecognised,
Manufacturers,
77555, 6%
1207637, 94%

Locally
Administered MAC,
48445, 4%

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Official IEEE List Problems
• List at http://standards.ieee.org/develop/regauth/oui/oui.txt
• Many MACs didn’t match – 77555 (6%) devices reported as unkown.
• Manufacturer’s don’t always use same name to register:
• 00:19:5B registered to “D-Link Coropration”
• 00:50:BA registered to “D-LINK”
• 00:80:C8 Registerd to “D-LINK SYSTEMS, INC.”
• 14:D6:4D registered to “D-Link International”
• They can also be inconsistent by a little bit:
• FC-8B-97 registered to “Shenzhen Gongjin Electronics Co.,Ltd”
• F4-3E-61 registered to “Shenzhen Gongjin Electronics Co., Ltd”
• 00-07-26 registered to “Shenzhen Gongjin Electronics Co., Ltd.”

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Official IEEE List Problems
• Therefore to create Manufacturer graphs from the Official IEEE list,
the following was done to make automatic matching easier:
• All company names were converted to lower case
• All special characters (.,_# etc) were removed.

• Hope that most company names would match together for


statistics.
• If they didn’t match, then same company would appear twice in the list with
slightly different names instead of being summed together into one entry.
• Not a big problem of concern.
• The Wireshark list gets around this by having a unique
manufacturer name that can be easily matched up.
by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo
Wireshark MAC to Manufacturer List
• Located at http://anonsvn.wireshark.org/wireshark/trunk/manuf
• Contains IEEE official list and other sources
• Snippet:
• 00:19:5B listed as “D-Link” (description: “D-Link Corporation”)
• 00:50:BA listed as to “D-Link” (no description)
• 00:80:C8 listed as to “D-Link” (description: D-LINK SYSTEMS, INC.)
• 14:D6:4D listed as to “D-LinkIn” (description: D-Link International)
• FC:8B:97, F4:3E:61 and 00:07:26 listed as “Shenzhen” (description: Shenzhen Gongjin
Electronics Co., Ltd)
• Contains MACs from manufacturers that are known to violate the mac address
assignment scheme and use MACs that should be Locally Assigned.
• These will not be included in the IEEE official list for obvious reasons
• Linux has this in /etc/udev/rules.d/70-persistent-net.rules

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Matching the 77,555 “Unrecognised” against
Wireshark’s List
• 3 matches:
MAC Manufacturer Description Devices
00:55:00 Xerox 1
Realtek (UpTech?
52:54:00 RealtekU 2
also reported)
52:54:4c Novell20 Novell 2000 45060
• Yellow are MACs from manufactures that should be Locally Administered MACs
but are known to violate the IEEE rules.
• Unknown Reduced by 45063.
• Updated ‘manufacturer’ field in the data with new findings above.

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Unrecognized Manufacturers – Updated

Actually Unknown,
29109, 2%

Recogniszed
Other, 32492,
Manufacturers,
2%
1252700, 98% Locally
Administered MAC,
3383, 0%

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Distribution of Device Manufacturers –
Worldwide – Using Wireshark’s list
SONY Computer
D-Link Systems, Entertainment inc,,
Inc., 20146, 2% 17042, 1% Others,
ASUSTEK COMPUTER 205550,
INC., 31457, 2% 16% ZTE CORPORATION,
Unknown, 32492, 3% 353436, 27%
Zhejiang Yutong Network
Communication Co Ltd.,
32747, 3%
Alpha Networks
Inc., 33821, 3%
Yuxing Electronics Company Shenzhen Gongjin
Limited, 37020, 3% Electronics Co., Ltd.,
AirTies Wireless 131616, 10%
Networks, 43564, 3%

Novell 2000, 45060, 3% SMD INFORMATICA


Sunniwell Cyber Tech. TVT CO.,LTD, 98494, 8% S.A., 109406, 9%
Co., Ltd., 93341, 7%

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Distribution of Device Manufacturers –
Worldwide – re-derived Using Official IEEE list
sony computer aztech electronics pte, Other Manufacturers,
entertainment, 17042, 14201, 1% 194524, 15%
shenzhen coship 1%
electronics co, 19533, 2%
zte, 353436, 28%
dlink corporation, 20139,
asustek computer, 2%
31457, 2%
zhejiang dahua
technology co, 32744,
3% smd informatica sa,
109406, 9%
alpha networks, 33807,
yuxing electronics
3%
company limited, 37020,
3% shenzhen gongjin
sunniwell cyber tech co, electronics co, 108929,
airties wireless networks, 8%
93341, 7% tvt co, 98494, 8%
43564, 3% unknown, 77555, 6%

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Story of the ‘Unknowns’
• Original Unknown: 266252 (21%)
• Unknown after Re-driving against IEEE List: 77555 (6%)
• Unknown After checking against Wireshark List: 32492 (3%)
• Difference between IEEE and Wireshark:
• 77555 - 32492 = 45063
• Therefore the only thing Wireshark has contributed is in identifying
3 extra MACs – 2 of which are Locally Administered. Other than
that, nothing new has been added from Wireshark.
• Except confusion – next slide

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Shenzhen Gongjin Electronics Co., Ltd.
• These are classified as ‘Shenzhen’ in Wireshark’s list:
• 00:02:09 - Shenzhen SED Information Technology Co., Ltd.
• 00:0a:eb - Shenzhen Tp-Link Technology Co; Ltd.
• f0:62:0d - Shenzhen Egreat Tech Corp.,Ltd
• Are these all the same company? 232 companies classified as ‘Shenzhen’!
• ‘Shenzhen’ is a city in China.
• ‘D-Link International’ and ‘D-Link Corporation’ are the same, but
• ‘Shenzhen Tp-Link Technology” and “Shenzhen Gongjin Electronics’ are NOT!
• We won’t use Wireshark because it combines companies into one that
shouldn’t be combined. Not very reliable.

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Reasoning
• When pointing an accusing finger at a company it is good idea to
have verifiable, solid and reliable information.
• Can’t say ‘Shenzhen Gongjing’ has 131616 compromised devices
• The method used to combine the IEEE list (lower case and remove special
characters) can miss combining certain companies.
• It’s better to under-estimate how prevalent a company is.
• Over estimating can create loss of reputation/discarding of results.

• Since the manufacturer field in the data has been updated with the
new results, no need to look at Wireshark again.
• For the new findings, manufacturer was changed from “unknown” to the
correct one (“novell 2000”, or “realtek (uptech? also reported)” or “xerox
corporation”)
by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo
Manufacturers - Statistics

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Distribution of Device Manufacturers –
Worldwide - Final
sony computer aztech electronics pte ltd, Others, 194527,
entertainment inc, 17042, 14201, 1% 15%
1%
shenzhen coship electronics
co ltd, 19533, 2%
dlink corporation, 20139, zte corporation, 353436,
2% 28%
asustek computer
unknown, 32492, 3%inc,
31457, 2%

zhejiang dahua technology smd informatica sa, 109406,


coltd, 32744, 3% 9%
alpha networks inc, 33807,
3%
shenzhen gongjin
yuxing electronics company
electronics co ltd, 108929,
limited, 37020, 3% airties wireless networks,
8%
43564, 3%
sunniwell cyber tech co ltd,
novell 2000, 45060, 4% 93341, 7% tvt coltd, 98494, 8%

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Distribution of Device Manufacturers –
South America
anneal technology digitalks inc, 915, 1%
inc, 1142, 2% unknown, 1135, 2% Others, 6075, 9%
asustek computer inc,
1341, 2%
ralink technology corp,
tvt coltd, 14407, 22%
2884, 4%
dlink corporation,
2933, 4% zte corporation,
12946, 20%
aztech electronics pte
ltd, 3670, 6%
smd informatica sa,
zhejiang dahua 5765, 9% novell 2000, 6960, 11%
technology coltd, 5349,
8%

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Distribution of Device Manufacturers - Brazil
unknown, 568, 2%
Others, 2859, 9%
aztech electronics
anneal technology pte ltd, 786, 3%
inc, 890, 3%
smd informatica sa, tvt coltd, 10669,
955, 3% 35%
asustek computer
inc, 1332, 4%
dlink corporation,
1365, 5%
zhejiang dahua
ralink technology technology coltd,
3935, 13% novell 2000,
corp, 2858, 9% 4235, 14%

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Why so many devices?

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Number of Manufacturers
• Worldwide - 2100 unique device manufacturers
• Can only see 15 in the Graph – rest in the “Others” category
• South America – 331 unique device manufacturers
• Can only see 11 in the Graph – rest in the “Others” category
• Brazil – 204 unique device manufacturers
• Can see 9 in the Graph – rest in the “Others” category
• Above does not count “unknown” manufacturers or “Others” category.
• Why are the rest of the manufacturers so small?
• More importantly why are some SO BIG!
by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo
Worldwide - Number of Manufacturers by
Number of Records
between 1000 to between 10000 to
9999 devices, 47, 99999 devices, 13, more than 100000
between 100 to 999 devices, 3, 0%
2% 1%
devices, 111, 5%
between 10 to 99
devices, 268, 13% 1 device,
1034, 49%

between 2 to 9
devices, 624, 30%

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


South America - Number of Manufacturers by
Number of Records
between 1000 to between 10000
between 100 to 999 9999 devices, 9, 3% to 99999
devices, 19, 6% devices, 2, 0%
between 10 to 99
devices, 30, 9%

1 device, 195, 59%

between 2 to 9
devices, 76, 23%

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Brazil - Number of Manufacturers by Number of
Records
between 1000 to between 10000
between 100 to 999 9999 devices, 5, 2% to 99999
devices, 11, 5% devices, 1, 1%
between 10 to 99
devices, 15, 7%

1 device, 120, 59%


between 2 to 9
devices, 52, 26%

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


So why so many devices?
• Given the prominence of certain manufacturers, it seems obvious
that most devices in the data are not because of ‘stupid’ people
• Certain devices by certain manufacturers may:
• not allow the change of default logins for telnet
• Have a ‘backdoor’ hardcoded with default credentials perhaps to allow for
remote diagnostics (ISPs could have requested this!)
• Lack of documentation that there is even a telnet server running on it!
• what device wouldn’t you bother looking for an open telnet port?
• Require devices to have Internet Reachable IP to benefit from full
functionality of the product (i.e. remote viewing of CCTV camera)

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Progress of presentation
• Data fields analysed so far:
• Countries
• Manufacturers (& MAC Addresses)
• Still to have a look:
• Uname – Very quick look next
• RAM – Up next
• CPU Info – Not analysed due to inconsistency of the field
• IP Addresses – at the end for a scary ending

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Uname

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Worldwide Distribution of ‘uname’

Others,
261158, 20%

unknown,
1024034, 80%

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


RAM

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Worldwide Devices – RAM Distribution
> 256 MB Unknown <= 8 MB
> 128 MB <= 256 MB 2593 2606 70888 > 8MB <= 16 MB
112561 0% 0% 6% 212939
9%
17%

> 64 MB <= > 16 MB <= 32 MB


128 MB 104409
490592 8%
38%

> 32 MB <= 64 MB
288604
22%

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Worldwide Devices - RAM Statistics

Description Value
Unique RAMs 3,880 different RAM sizes
Lowest RAM 5,488 kilobytes (5.35 MB) – 1 device in Germany
2nd Lowest RAM 5,688 kilobytes (5.55 MB) – 1 device in USA
Highest RAM 4,828,263,435 kilobytes (4.49 TB) – 1 device in China
2nd Highest RAM 1,000,000,000 kilobytes (0.93 TB) – 5 in China, 1 in Ukraine
Most common 11,500 kilobytes (11.2 MB) – 98,947 devices (7.7%)
2nd Most common 124,620 kilobytes (121.7 MB) – 96,543 devices (7.5%)

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


South American Devices – RAM Distribution
> 128 MB <= 256 > 256 MB, 26, 0% Unknown, 68, 0%
MB, 594, 1% <= 8 MB, 3702, 6%

> 64 MB <= 128 MB, > 8MB <= 16 MB,


13229, 20% 8914, 14%

> 16 MB <= 32 MB,


2690, 4%

> 32 MB <= 64 MB,


36299, 55%

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


South American Devices – RAM Statistics
Description Value
Unique RAMs 413 different RAM sizes
Lowest RAM 6,072 kilobytes (5.93 MB) – 1 device in Brazil
2nd Lowest RAM 6,268 kilobytes (6.12 MB) – 4 devices in Argentina and 1
device in Bolivia
Highest RAM 2,074,768 kilobytes (1.98 GB) – 1 device in Colombia
2nd Highest RAM 1,810,172 kilobytes (1.73 GB) – 1 device in Brazil
Most common 58,620 kilobytes (57.25 MB) – 12,858 devices (19.6%)
2nd Most common 61,436 kilobytes (59.996 MB) – 6,766 devices (10.3%)

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Brazilian Devices – RAM Distribution
> 128 MB <= 256 > 256 MB, 15, 0% Unknown, 24, 0%
MB, 328, 1%
<= 8 MB, 822, 3% > 8MB <= 16 MB,
5598, 18%
> 64 MB <= 128 MB,
8570, 28%
> 16 MB <= 32
MB, 1495, 5%

> 32 MB <= 64 MB,


13600, 45%

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Brazilian Devices – RAM Statistics
Description Value
Unique RAMs 270 different RAM sizes
Lowest RAM 6,072 kilobytes (5.93 MB) – 1 device
2nd Lowest RAM 6,300 kilobytes (6.15 MB) – 780 devices
Highest RAM 1,810,172 kilobytes (1.73 GB) – 1 device
2nd Highest RAM 1,036,676 kilobytes (0.99 GB) – 1 device
Most common 61,436 kilobytes (59.996 MB) – 4,885 devices (16%) – 4884
of them exact same device made by TVT coltd
2nd Most common 92,736 kilobytes (90.56 MB) – 2,288 devices (7.5%)

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Identifying device by TVT Co. LTD.
• RAM = 61,436 kilobytes
• Manufacturer = TVT Co. LTD.
• MAC Address begins with: 00:18:ae:([21-29] or 2a or 2b)
• Product information on Official website contain no RAM in specs:
http://en.tvt.net.cn
• Not enough info to identify?!

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Worldwide RAM vs South American RAM
Unknown
> 256 MB <= 8 MB
0% > 128 MB <= > 256 MB Unknown
0% 6% > 8MB <= 16 0% 0% <= 8 MB
256 MB
> 128 MB <= MB 1% 6%
256 MB 17%
> 64 MB <= > 8MB <=
9%
128 MB 16 MB
20% 14%
> 16 MB <=
> 16 MB <= 32 MB
32 MB 4%
8%
> 32 MB > 32 MB <=
> 64 MB <= <= 64 MB 64 MB
128 MB 22% 55%
38%

Worldwide South America

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


South American RAM vs Brazilian RAM

> 128 MB <= > 256 MB Unknown > 256 MB Unknown


0% 0% <= 8 MB > 128 MB <= 0% 0%
256 MB
6% 256 MB
1%
1% <= 8 MB
> 64 MB <= > 8MB <= > 8MB <= 16
128 MB 16 MB 3% MB
20% 14% 18%
> 64 MB <=
> 16 MB <= 128 MB
32 MB 28% > 16 MB <=
4%
32 MB
> 32 MB <= 5%
> 32
64 MB MB <=
55% 64 MB
45%

South America Brazil

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Worldwide RAM vs Brazilian RAM
Unknown
> 256 MB 0% <= 8 MB > 256 MB Unknown
0% 6% > 8MB <= 16 > 128 MB <= 0% 0%
> 128 MB <= MB 256 MB
256 MB 17% 1% <= 8 MB > 8MB <= 16
9% 3% MB
18%
> 64 MB <=
128 MB
> 16 MB <=
28% > 16 MB <=
32 MB
8% 32 MB
> 32 MB 5%
> 32
> 64 MB <= <= 64 MB
MB <=
128 MB 22%
64 MB
38% 45%

Worldwide Brazil

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Scary Statistics

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Scary Stats – How easy to find a device?
• We can calculate how easy it would be for someone to find a
vulnerable device with this simple equation:

𝑁𝑜. 𝑜𝑓 𝑖𝑛𝑓𝑒𝑐𝑡𝑒𝑑 𝑑𝑒𝑣𝑖𝑐𝑒𝑠 𝑓𝑜𝑟 𝑡ℎ𝑒 𝑟𝑒𝑔𝑖𝑜𝑛


=
𝑁𝑜. 𝑜𝑓 𝐴𝑙𝑙𝑜𝑐𝑎𝑡𝑒𝑑 𝐶 𝑐𝑙𝑎𝑠𝑠 𝐼𝑃 𝑟𝑎𝑛𝑔𝑒𝑠 𝑓𝑜𝑟 𝑡ℎ𝑒 𝑟𝑒𝑔𝑖𝑜𝑛

= 𝐼𝑛𝑓𝑒𝑐𝑡𝑒𝑑 𝑑𝑒𝑣𝑖𝑐𝑒𝑠 𝑝𝑒𝑟 𝐼𝑃 𝑟𝑎𝑛𝑔𝑒 𝑓𝑜𝑟 𝑡ℎ𝑒 𝑟𝑒𝑔𝑖𝑜𝑛

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Clarification on Calculations
• IP Allocations have changed over time
• World/South America or Brazil did not have as many IPs allocated during
the initial formation of the Carna Botnet as it does now
• Old IP allocation statistics from RIRs were used in these
calculations
• Allocated IP ranges as of 1st December 2012 were used for calculations
to get an accurate idea of infection ratio around the time the Carna
Botnet was formed
• Rations are assumed to be a good approximation for now as well
• assuming that the rate of growth of allocated IPs is directly comparable
to rate of growth of vulnerable devices added to the Internet over time
by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo
Worldwide - How easy to find a device?
𝑁𝑜. 𝑜𝑓 𝑖𝑛𝑓𝑒𝑐𝑡𝑒𝑑 𝑑𝑒𝑣𝑖𝑐𝑒𝑠 𝑓𝑜𝑟 𝑡ℎ𝑒 𝑊𝑜𝑟𝑙𝑑
= 1,285,192
𝑁𝑜. 𝑜𝑓 𝐴𝑙𝑙𝑜𝑐𝑎𝑡𝑒𝑑 /24 𝐼𝑃 𝑟𝑎𝑛𝑔𝑒𝑠 𝑓𝑜𝑟 𝑡ℎ𝑒 𝑊𝑜𝑟𝑙𝑑 13,587,587
• ~0.095 device per /24 IP range
• ~9.46 devices per 100 C class ranges
• Average 1 vulnerable device every ~10.57 subnet
• Average 1 vulnerable device every ~2706 IPs
• Scanning 10 IPs/sec would take ~4 minutes 31 seconds to find a device
• No. of Allocated /24 IP ranges for the world deduced by adding all
allocated ranges by each of the Regional Registries as of 1 December 2012

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


South America - How easy to find a device?
𝑁𝑜. 𝑜𝑓 𝑖𝑛𝑓𝑒𝑐𝑡𝑒𝑑 𝑑𝑒𝑣𝑖𝑐𝑒𝑠 𝑓𝑜𝑟 𝑆𝑜𝑢𝑡ℎ 𝐴𝑚𝑒𝑟𝑖𝑐𝑎
= 65,522
𝑁𝑜. 𝑜𝑓 𝐴𝑙𝑙𝑜𝑐𝑎𝑡𝑒𝑑 /24 𝐼𝑃 𝑟𝑎𝑛𝑔𝑒𝑠 𝑓𝑜𝑟 𝑆𝑜𝑢𝑡ℎ 𝐴𝑚𝑒𝑟𝑖𝑐𝑎 399,232
• ~0.164 device per /24 IP range
• ~1.64 devices per 10 C class ranges
• Average 1 vulnerable device every ~6.09 subnets
• Average 1 vulnerable device every ~1,559.83 IPs
• Scanning 10 IPs/sec would take ~2 minutes 36 seconds to find a device
• No. of Allocated /24 IP ranges for South America deduced by adding all
allocated IP ranges for each country in South America as of 1 Dec. 2012

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Europe - How easy to find a device?
𝑁𝑜. 𝑜𝑓 𝑖𝑛𝑓𝑒𝑐𝑡𝑒𝑑 𝑑𝑒𝑣𝑖𝑐𝑒𝑠 𝑓𝑜𝑟 𝐸𝑢𝑟𝑜𝑝𝑒
= 167,320
𝑁𝑜. 𝑜𝑓 𝐴𝑙𝑙𝑜𝑐𝑎𝑡𝑒𝑑 /24 𝐼𝑃 𝑟𝑎𝑛𝑔𝑒𝑠 𝑓𝑜𝑟 𝐸𝑢𝑟𝑜𝑝𝑒 2,958,803.4
• ~0.0565 device per /24 IP range
• ~5.65 devices per 100 C class ranges
• Average 1 vulnerable device every ~17.68 subnets
• Average 1 vulnerable device every ~4,526.98 IPs
• Scanning 10 IPs/sec would take ~7 minutes 32 seconds to find a device
• No. of Allocated /24 IP ranges for Europe deduced by adding all allocated
IP ranges for each country in Europe as of 1 December 2012

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Oceania - How easy to find a device?
𝑁𝑜. 𝑜𝑓 𝑖𝑛𝑓𝑒𝑐𝑡𝑒𝑑 𝑑𝑒𝑣𝑖𝑐𝑒𝑠 𝑓𝑜𝑟 𝑂𝑐𝑒𝑎𝑛𝑖𝑎
= 2,623
𝑁𝑜. 𝑜𝑓 𝐴𝑙𝑙𝑜𝑐𝑎𝑡𝑒𝑑 /24 𝐼𝑃 𝑟𝑎𝑛𝑔𝑒𝑠 𝑓𝑜𝑟 𝑂𝑐𝑒𝑎𝑛𝑖𝑎 216,405
• ~0.012 device per /24 IP range
• ~1.21 devices per 100 C class ranges
• Average 1 vulnerable device every ~82.5 subnets
• Average 1 vulnerable device every ~21,120 IPs
• Scanning 10 IPs/sec would take ~35 minutes 12 seconds to find a device
• No. of Allocated /24 IP ranges for Oceania deduced by adding all allocated
IP ranges for each country in Oceania as of 1 December 2012

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Asia - How easy to find a device?
𝑁𝑜. 𝑜𝑓 𝑖𝑛𝑓𝑒𝑐𝑡𝑒𝑑 𝑑𝑒𝑣𝑖𝑐𝑒𝑠 𝑓𝑜𝑟 𝐴𝑠𝑖𝑎
= 1,006,634
𝑁𝑜. 𝑜𝑓 𝐴𝑙𝑙𝑜𝑐𝑎𝑡𝑒𝑑 /24 𝐼𝑃 𝑟𝑎𝑛𝑔𝑒𝑠 𝑓𝑜𝑟 𝐴𝑠𝑖𝑎 3,260,028
• ~0.309 device per /24 IP range
• ~3.09 devices per 10 C class ranges
• Average 1 vulnerable device every ~3.24 subnets
• Average 1 vulnerable device every ~829 IPs
• Scanning 10 IPs/sec would take ~1 minute 23 seconds to find a device
• No. of Allocated /24 IP ranges for Asia deduced by adding all allocated IP
ranges for each country in Asia as of 1 December 2012

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


All Continents
Infected 1 device per 1 device per Seconds to
Allocated C
Continent Name Infected Devices Allocated IPs devices per how many C how many Find a
Classes
C class classes? Ips? device

Asia 1,006,634 834,567,136 3,260,027.88 0.3088 3.24 829.07 82.91

South America 65,522 102,203,392 399,232.00 0.1641 6.09 1,559.83 155.98

Europe 167,320 757,453,664 2,958,803.38 0.0565 17.68 4,526.98 452.7

Africa 7,923 51,335,680 200,530.00 0.0395 25.31 6,479.33 647.93

Oceania 2,623 55,399,680 216,405.00 0.0121 82.5 21,121.11 2,112.11

North America 35,139 1,677,457,280 6,552,567.50 0.0054 186.48 47,739.53 4,773.95

Anonymous Proxy
and Satelite 31 - - - - - -
Provider

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Brazil - How easy to find a device?
𝑁𝑜. 𝑜𝑓 𝑖𝑛𝑓𝑒𝑐𝑡𝑒𝑑 𝑑𝑒𝑣𝑖𝑐𝑒𝑠 𝑓𝑜𝑟 𝐵𝑟𝑎𝑧𝑖𝑙
= 30,452
𝑁𝑜. 𝑜𝑓 𝐴𝑙𝑙𝑜𝑐𝑎𝑡𝑒𝑑 /24 𝐼𝑃 𝑟𝑎𝑛𝑔𝑒𝑠 𝑓𝑜𝑟 𝐵𝑟𝑎𝑧𝑖𝑙 214,278
• ~0.14 device per /24 IP range
• ~1.42 devices per 10 C class ranges
• Average 1 vulnerable device every ~7.035 subnets
• Average 1 vulnerable device every ~1,801 IPs
• Scanning 10 IPs/sec would take ~3 minutes to find a device
• No. of Allocated /24 IP ranges for Brazil deduced by adding all allocated IP
ranges for Brazil as of 1 December 2012.
• Infection Ration Rank of 42 out of 197.

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Australia - How easy to find a device?
𝑁𝑜. 𝑜𝑓 𝑖𝑛𝑓𝑒𝑐𝑡𝑒𝑑 𝑑𝑒𝑣𝑖𝑐𝑒𝑠 𝑓𝑜𝑟 𝐴𝑢𝑠𝑡𝑟𝑎𝑙𝑖𝑎
= 1,614
𝑁𝑜. 𝑜𝑓 𝐴𝑙𝑙𝑜𝑐𝑎𝑡𝑒𝑑 /24 𝐼𝑃 𝑟𝑎𝑛𝑔𝑒𝑠 𝑓𝑜𝑟 𝐴𝑢𝑡𝑟𝑎𝑙𝑖𝑎 186,620
• ~0.0086 device per /24 IP range
• ~0.86 devices per 100 C class ranges
• Average 1 vulnerable device every ~115.6 subnets
• Average 1 vulnerable device every ~29,600 IPs
• Scanning 10 IPs/sec would take ~49.3 minutes to find a device
• No. of Allocated /24 IP ranges for Australia deduced by adding all allocated
IP ranges for Australia from APNIC as of 1 December 2012.
• Infection Ration Rank of 175 out of 197.

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


India - How easy to find a device?
𝑁𝑜. 𝑜𝑓 𝑖𝑛𝑓𝑒𝑐𝑡𝑒𝑑 𝑑𝑒𝑣𝑖𝑐𝑒𝑠 𝑓𝑜𝑟 𝐼𝑛𝑑𝑖𝑎 58,766
= 135,984
𝑁𝑜. 𝑜𝑓 𝐴𝑙𝑙𝑜𝑐𝑎𝑡𝑒𝑑 /24 𝐼𝑃 𝑟𝑎𝑛𝑔𝑒𝑠 𝑓𝑜𝑟 𝐼𝑛𝑑𝑖𝑎
• ~0.4322 device per /24 IP range
• ~4.32 devices per 10 C class ranges
• Average 1 vulnerable device every ~2.31 subnets
• Average 1 vulnerable device every ~592 IPs
• Scanning 10 IPs/sec would take ~59 seconds to find a device
• No. of Allocated /24 IP ranges for India deduced by adding all allocated IP
ranges for India from APNIC as of 1 December 2012
• Infection Ration Rank of 21 out of 197.

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


China - How easy to find a device?
𝑁𝑜. 𝑜𝑓 𝑖𝑛𝑓𝑒𝑐𝑡𝑒𝑑 𝑑𝑒𝑣𝑖𝑐𝑒𝑠 𝑓𝑜𝑟 𝐶ℎ𝑖𝑛𝑎 720,141
= 1,289,054
𝑁𝑜. 𝑜𝑓 𝐴𝑙𝑙𝑜𝑐𝑎𝑡𝑒𝑑 /24 𝐼𝑃 𝑟𝑎𝑛𝑔𝑒𝑠 𝑓𝑜𝑟 𝐶ℎ𝑖𝑛𝑎
• ~0.5587 device per /24 IP range
• ~5.59 devices per 10 C class ranges
• Average 1 vulnerable device every ~1.79 subnets
• Average 1 vulnerable device every ~458 IPs
• Scanning 10 IPs/sec would take ~45 seconds to find a device
• No. of Allocated /24 IP ranges for China deduced by adding all allocated IP
ranges for China from APNIC as of 1 December 2012.
• Infection Ration Rank of 18 out of 197.
by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo
Other South American Countries and Their Rank
Countries Infected Devices Infection ratio out of 197 Seconds to Finds
Brazil 30452 41 180.14
Uruguay 13173 3 [Surprise]
Argentina 7880 49 205.39
Colombia 6454 38 158.55
Chile 2963 62 266.17
Venezuela 1593 80 366.79
Peru 1265 50 207.8
Bolivia 690 27 88.56
Curaçao 490 1 [Surprise]
Ecuador 393 91 506.53
Paraguay 126 93 526.02
Guyana 28 37 149.94
French Guiana 11 7 [Surprise]
Suriname 4 152 1,945.60
by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo
Uruguay - How easy to find a device?
𝑁𝑜. 𝑜𝑓 𝑖𝑛𝑓𝑒𝑐𝑡𝑒𝑑 𝑑𝑒𝑣𝑖𝑐𝑒𝑠 𝑓𝑜𝑟 𝑈𝑟𝑢𝑔𝑢𝑎𝑦
= 13,173
𝑁𝑜. 𝑜𝑓 𝐴𝑙𝑙𝑜𝑐𝑎𝑡𝑒𝑑 /24 𝐼𝑃 𝑟𝑎𝑛𝑔𝑒𝑠 𝑓𝑜𝑟 𝑈𝑟𝑢𝑔𝑢𝑎𝑦 4,627
• ~2.84 devices per /24 IP range
• Average 1 vulnerable device every ~0.35 subnets
• Average 1 vulnerable device every ~89.92 IPs
• Scanning 10 IPs/sec would take ~9 seconds to find a device
• No. of Allocated /24 IP ranges for Uruguay deduced by adding all
allocated IP ranges for Uruguay as of 1 December 2012.
• Infection Ration Rank of 3 out of 197.

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Curaçao - How easy to find a device?
𝑁𝑜. 𝑜𝑓 𝑖𝑛𝑓𝑒𝑐𝑡𝑒𝑑 𝑑𝑒𝑣𝑖𝑐𝑒𝑠 𝑓𝑜𝑟 𝐶𝑢𝑟𝑎ç𝑎𝑜
= 490
𝑁𝑜. 𝑜𝑓 𝐴𝑙𝑙𝑜𝑐𝑎𝑡𝑒𝑑 /24 𝐼𝑃 𝑟𝑎𝑛𝑔𝑒𝑠 𝑓𝑜𝑟 𝐶𝑢𝑟𝑎ç𝑎𝑜 4
• ~122.5 device per /24 IP range
• Average 1 vulnerable device every ~0.01 subnets
• Average 1 vulnerable device every ~2.09 IPs
• Scanning 10 IPs/sec would take ~0.21 seconds to find a device
• No. of Allocated /24 IP ranges for Curaçao deduced by adding all allocated
IP ranges for Curaçao as of 1 December 2012.
• Infection Ration Rank of 1 out of 197.
• Most likely inaccurate as it’s probably using IP ranges allocated to
neighbouring countries.
by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo
French Guiana - How easy to find a device?
𝑁𝑜. 𝑜𝑓 𝑖𝑛𝑓𝑒𝑐𝑡𝑒𝑑 𝑑𝑒𝑣𝑖𝑐𝑒𝑠 𝑓𝑜𝑟 𝐹𝑟𝑒𝑛𝑐ℎ 𝐺𝑢𝑖𝑎𝑛𝑎
= 11
𝑁𝑜. 𝑜𝑓 𝐴𝑙𝑙𝑜𝑐𝑎𝑡𝑒𝑑 /24 𝐼𝑃 𝑟𝑎𝑛𝑔𝑒𝑠 𝑓𝑜𝑟 𝐹𝑟𝑒𝑛𝑐ℎ 𝐺𝑢𝑖𝑎𝑛𝑎 8
• ~1.375 device per /24 IP range
• Average 1 vulnerable device every ~0.73 subnets
• Average 1 vulnerable device every ~186.18 IPs
• Scanning 10 IPs/sec would take ~18.62 seconds to find a device
• No. of Allocated /24 IP ranges for French Guiana deduced by adding all
allocated IP ranges for French Guiana as of 1 December 2012.
• Infection Ration Rank of 7 out of 197.
• Hard to say if this is accurate or not. Generally if No. of allocated C lasses
are too small then the infection ratio is likely to be fairly inaccurate.
by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo
Terrified now? It gets worse!
• 1308 IP ranges were found that appear in more than or equal to
260 different records.
• Same IP range in more than 260 different device records
• i.e. almost all IPs within these 1308 IP ranges likely to contain vulnerable
devices!
• This is not a ‘guarantee’ as devices compromised at different times

• If you were to find these 1308 IP ranges and “hog” them then you’d
have a botnet of: ~327 thousand
• Which countries more prominent in these records?

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Countries of IP ranges appearing in more than
259 records
Chile, 10, 1%
Hong Kong, 35, 3% Spain, 2, 0%

Uruguay, 432,
33%
China, 829, 63%

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Still worse news!
• So just probe these devices on port 23 to find them?
• NO, because a scan of some of the IP range from the data show
almost all ranges had port 23 closed?! Faulty Data?
• Carna Botnet shutdown telnet to close port 23 as soon as it had
control of the device and setup iptable rules where possible
• Primarily to avoid interference from other botnets
• Temporary only - settings lost on reboot
• Other botnets won’t be so nice

• If telnet is the only shell into the device then hardware reset is the
best chance of ensuring a clean device

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Scariest News – Light Aidra
• Open source tool ‘lightaidra’ does exactly what Carna botnet did:
• Auto searches for telnet ports with default credentials
• Allows you to upload your custom binary that can do anything!
• For routers it can sniff traffic, modify traffic! Spam the world! Anything!
• Joins IRC chat room to read latest commands
• Bad guys really don’t need to do much
• Carna detected presence of Aidra (as noted in the paper)
• So this data might not be ALL vulnerable devices
• However, Carna was a lot more cross-platform than lightaidra is by default
• Info: https://github.com/eurialo/lightaidra

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Hope

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


A Glimmer of Hope
• Most embedded devices mount their partitions as read-only. tmp
and other directories stored in RAM
• For most devices a reboot would lose the malware
• May leave port 23 closed!
• Start up scripts (if functionality exists) could’ve been modified to re-infect

• Almost all the time a hardware reset and/or firmware reflash will
resolve the problem
• If malware authors wanted they could interfere with re-flashing and
hardware reset depending on how much control telnet allowed over the
device

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


What have I done?
• Supplied relevant data CERTs from any country with more than 10
thousand compromised devices and some others on request etc.
• Adds up to about 30 countries in total
• Split Australian data by ISP and provided it to them
• Contacted IEEE to contact the worst affected manufacturers
• Reached out to manufacturers to work with us; only 1 of 23 has responded
• Presentations and Research Paper!
• Talking to people and publication of presentations and research paper
• Presented The Hackers Conference in Delhi, India; APNIC 36 in Xian, China.
Will present on the South American data at BlackHat in Sao Paulo next week.

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Research Paper
• Data wasn’t provided on a silver platter ready for analysis
• Checking for consistency both internally and externally was done
• Manufacturer field was re-derived
• Assumptions had to be made; duplicates were removed
• Efforts to check for accuracy were made
• Contains a complete list of countries, infection ratios and
manufacturers
• All of this plus more is covered in detail in the Research paper at:
http://bit.ly/carna-paper
by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo
Problem needs attention NOW
• Devices behind NAT not in the data
• Researcher did not scan internal network when a router was compromised.
• So the number of actually vulnerable devices likely to be a lot bigger

• With IPv4 to IPv6 transition happening now, this is the time to make
sure such devices are secure by default.
• Specially since NAT “protection” will not be available on IPv6 and
• Bad router firewalls might expose even more devices then visible in this data
set.

by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo


Public Awareness
• Seemingly harmless/small threat is real and big!
• Huge problem for economy like Brazil. Can have massive financial impacts
if foreign powers or malicious agents launch a coordinated attack.
• Awareness of problem is the first step
• Participation of diverse range of players from the industry required
• Awareness to be raised with public/manufacturers/ISPs-selling-the-devices
and governments on the Carna Botnet problem
• This presentation is one of the many steps required to tackle the problem
as a whole
• Please spread the word!
by Parth Shukla on 2013-11-27 @ BlackHat - Sao Paulo
I can’t do it alone. What can you do?
• It’s a long and hard battle because no ‘easy’ or ‘quick’ solutions
• Read my detailed Research Paper & Re-look at these slides online (links on next slide)
• Tell people: family, relatives, employer, friends, colleagues
• Secure your devices! Secure others’ devices
• Do you know anyone in a position who can help?
• Help influence government, companies & manufacturers into ensuring devices
used and sold by them are secure by default
• Does your ISP sell a device that’s vulnerable to this by default? Check!
• You are the passionate IT security professionals! Help me fight this battle!
• Network operators can block port 23 at the WAN and allow ‘opt-out’ for
customers who want it enabled.
• Have other ideas on tackling the problems? Contact me! (email on next slide)

by Parth Shukla on 2013-11-22 @ DeepSec - Vienna


Thank You.
Questions? Please fill out
session evaluation
Email: pparth@auscert.org.au
Twitter: http://twitter.com/pparth
Research Paper:
http://bit.ly/carna-paper
This presentation:
http://bit.ly/carna-sao-paulo

You might also like