TCP IP Document
TCP IP Document
Source: Cerf, V. & Kahn, R. (1974). A Protocol from Packet Network Intercommunication. IEEE Paper.
But Cerf is quick to say that there was no truth to the widespread
belief that the Internet, or even its predecessor ARPANET, was
impervious to nuclear attack. "That was not true, although its design
did make use of the robustness of packet switching to route around
failures and congestion."
128.0.0.0 - 191.255.0.0
Lookback 127.0.0.1 Class A 2,147,483,648 addresses
0.0.0.0 - 127.0.0.0
– 255.255.255.255
– 127.0.0.1 (Loopback Address)
– 0.0.0.0
– (These Ranges shown below are usually used in Private
Networks behind an External Facing Firewall)
– 10.x.x.x - The entire 10. Networking range [ Class A ]
– 172.16.0.0 - 172.31.0.0 (16 networks) [ Class B ]
– 192.168.0.0 - 192.168.255.0 (256 networks) [ Class C ]
TCP/IP 102 - William Favre Slater, III - Page 14
October 16, 2024
CIDR
• CIDR = Classless Inter-Domain Routing
Source: https://en.wikipedia.org/wiki/IPv6_address
ipconfig Shows the host IP address, subnet, DNS and Gateway information Both
nslookup Provides the DNS information Both
arp Address Resolution Protocol for displaying the ARP Table that maps IP addresses and the NIC Card Both
address (Ethernet)
route Displays the Route Table Both
Source: Pyles, Carrell, and Titel. (2024). Guide to TCP/IP: IPv6 amd IPv4, 5th ed. Retrieved from https://www.guidetotcpip.com/wp-
content/uploads/files/Appendices/tcpip5e_CommandLineIPUtils.pdf
• IPv4 address
• IPv6 address
• Subnet Mask
• Default Gateway to the Internet
Source: Pyles, Carrell, and Titel. (2024). Guide to TCP/IP: IPv6 amd IPv4, 5th ed. Retrieved from
https://www.guidetotcpip.com/wp-content/uploads/files/Appendices/tcpip5e_CommandLineIPUtils.pdf
TCP/IP 102 - William Favre Slater, III - Page 21
October 16, 2024
Running Angry IP Scanner
• If you want to quickly get up to speed on network device and
port scanning, read this paper, Angry IP – An IP Scanner Tool
- A Product Analysis and User Tutorial (well documented and
fun!) See link below.
• Use Tools like Angry IP Scanner to attack your own home
network.
• Versions for Windows, Mac, and Linux are available.
• Angry IP Scanner is free and available at this link:
https://angryip.org/download/
Source: http://www.billslater.com/writing/Angry_IP__Scanner_W_F_Slater_2007_0716_.pdf
22
TCP/IP 102 - William Favre Slater, III - October 16, 2024
Angry IP Scanner
• Angry IP – An IP Scanner Tool - A Product Analysis and User
Tutorial
Source: http://www.billslater.com/writing/Angry_IP__Scanner_W_F_Slater_2007_0716_.pdf
23
TCP/IP 102 - William Favre Slater, III - October 16, 2024
ICMP
Type of Service 0
Time to Live
Time to live in seconds; as this field is decremented at each machine in
which the datagram is processed, the value in this field should be at least as
great as the number of gateways which this datagram will traverse.
Protocol ICMP = 1
Header Checksum
The 16 bit one's complement of the one's complement sum of all 16 bit
words in the header. For computing the checksum, the checksum field
should be zero. This checksum may be replaced in the future.
Source Address
The address of the gateway or host that composes the ICMP message.
Unless otherwise noted, this can be any of a gateway's addresses.
Destination Address The address of the gateway or host to which the message should be sent.
Source: IETF. (1981). Internet Control Message Protocol. Retrieved from https://www.rfc-editor.org/rfc/rfc792.txt
The IPv6 loopback address is a special address that devices use to send messages to themselves. This address is ::1/128,
and it's similar to the IPv4 loopback address 127.0.0.1. However, in IPv6, this address is simplified to ::1, reflecting
IPv6's design for a more streamlined and efficient networking future. The loopback address plays a crucial role in
testing, diagnosing, and configuring network settings on a device.
Source: Brightwood, N. (2024). IPv6 Loopback Address Explained. Retrieved from https://netseccloud.com/ipv6-
loopback-address
Source: Pyles, Carrell, and Titel. (2024). Guide to TCP/IP: IPv6 amd IPv4, 5th ed. Retrieved from
https://www.guidetotcpip.com/wp-content/uploads/files/Appendices/tcpip5e_CommandLineIPUtils.pdf
TCP/IP 102 - William Favre Slater, III - Page 42
October 16, 2024
What does Ping tell us?
• Your IP Stack configuration is OK
• Target IP host is “UP”
• Layers 1 – 4 are operational
• Average network latency
• If you can Ping by Name, then DNS is
working.
– Exceeding a TTL value isn’t desirable for normal data packets, which is why a typical packet
will have a value ranging from 64 all the way to 255. But what would otherwise be a
frustrating error message is actually a key part of how traceroute works. By manipulating the
TTL field, traceroute and similar programs can trigger TTL exceeded messages from each hop
along a given path.
Source: Grimmick, R. (2023). What is Traceroute? How It Works and How to Read Results. Retrieved from
https://www.varonis.com/blog/what-is-traceroute
Source: Grimmick, R. (2023). What is Traceroute? How It Works and How to Read Results. Retrieved from
https://www.varonis.com/blog/what-is-traceroute
Source: Grimmick, R. (2023). What is Traceroute? How It Works and How to Read Results. Retrieved from
https://www.varonis.com/blog/what-is-traceroute
Source: Grimmick, R. (2023). What is Traceroute? How It Works and How to Read Results. Retrieved from
https://www.varonis.com/blog/what-is-traceroute
Source: Grinberg, S. (2024). How Hackers Use ICMP Tunneling to Own Your Network. Retrieved from
https://www.cynet.com/attack-techniques-hands-on/how-hackers-use-icmp-tunneling-to-own-your-network/
• Wireshark is
considered by many
professionals as the
best free network
packet analysis tool.
• Download it here:
https://www.wireshark
.org/download.html
This PERL code will generate every IPv4 address in the IPv4 Address Space.
TCP/IP 102 - William Favre Slater, III - Page 59
October 16, 2024
Carna BotNet IPv4 Census of 2012
• The Carna Botnet was created and executed quietly by a lone, unknown hacker with
excellent programming skills in Q3 2012.
• The intent of this individual was to take control of as many external facing IP hosts
as possible from a single desktop networked computer on the Internet. In this case,
approximately 420,000 hosts were under the command and control of the Carna
Botnet. This represents about 1% of the total available IPv4 addresses at that time.
• To this day, the author is known only by a Public PGP Key that was listed in the
professionally written, illustrated technicalreport.
• It was a lone individual, though in the paper they use first person plural pronoun,
“WE”. At the end of the paper, the author admits that “we” is actually “me”.
• It showed that host devices and the Internet as a whole is vulnerable to such
unanticipated “attacks”.
• Many found the report, the findings, and the feat itself “inspiring”, and this includes
myself.
Source: Carna Botnet Author. (2013). Internet Census 2012 Port scanning /0 using insecure embedded devices.
Retrieved from https://census2012.sourceforge.net/paper.html.
TCP/IP 102 - William Favre Slater, III - Page 60
October 16, 2024
Carna BotNet IPv4 Census of 2012
Abstract
While playing around with the Nmap Scripting Engine (NSE) we discovered
an amazing number of open embedded devices on the Internet. Many of
them are based on Linux and allow login to standard BusyBox with empty
or default credentials. We used these devices to build a distributed port
scanner to scan all IPv4 addresses. These scans include service probes for
the most common ports, ICMP ping, reverse DNS and SYN scans. We
analyzed some of the data to get an estimation of the IP address usage.
All data gathered during our research is released into the public domain for
further study.
•
Source: Carna Botnet Author. (2013). Internet Census 2012 Port scanning /0 using insecure embedded devices.
Retrieved from https://census2012.sourceforge.net/paper.html.
TCP/IP 102 - William Favre Slater, III - Page 61
October 16, 2024
Carna BotNet IPv4 Census of 2012
Proof of Concept
To further verify our sample data, we developed a small binary that could be uploaded to insecure devices.
To minimize interference with normal system operation, our binary was set to run with a watchdog and on the
lowest possible system priority. Furthermore, it was not permanently installed and stopped itself after a few
days. We also deployed a readme file containing a description of the project as well as a contact email
address.
The binary consists of two parts. The first one is a telnet scanner which tries a few different login
combinations, e.g. root:root, admin:admin and both without passwords. The second part manages the
scanner, gives it IP ranges to scan and uploads scan results to a specified IP address. We deployed our
binary on IP addresses we had gathered from our sample data and started scanning on port 23 (Telnet) on
every IPv4 address. Our telnet scanner was also started on every newly found device, so the complete scan
took only roughly one night. We stopped the automatic deployment after our binary was started on
approximately thirty thousand devices.
The completed scan proved our assumption was true. There were in fact several hundred thousand
unprotected devices on the Internet making it possible to build a super fast distributed port scanner.
Source: Carna Botnet Author. (2013). Internet Census 2012 Port scanning /0 using insecure embedded devices.
Retrieved from https://census2012.sourceforge.net/paper.html.
TCP/IP 102 - William Favre Slater, III - Page 62
October 16, 2024
Carna BotNet IPv4 Census of 2012
Numbers
The numbers below were filtered to eliminate noise and match a timeperiod from June 2012 to October 2012.
The data used for these numbers is the same that was used for the browsable Hilbert map.
420 Million IPs responded to ICMP ping requests more than once. [Map]
165 Million IPs had one or more of the top 150 ports open. 36 Million of these IPs did not respond to ICMP ping. [Map]
141 Million IPs had only closed/reset ports and did not respond to ICMP ping. Most of these were firewalled IP ranges where it
was uncertain if they had actual computers behind them. [Map]
1051 Million IPs had a reverse DNS record. [Map] 729 Million of these IPs had nothing more and did not respond to any probe.
30000 /16 networks contained IPs that responded to ICMP ping, 14000 /16 networks contained 90% of all pingable IPs.
4.3 Million /24 networks contained all 420 Million pingable IPs.
Source: Carna Botnet Author. (2013). Internet Census 2012 Port scanning /0 using insecure embedded devices.
Retrieved from https://census2012.sourceforge.net/paper.html.
TCP/IP 102 - William Favre Slater, III - Page 63
October 16, 2024
Carna BotNet IPv4 Census of 2012
Conclusion
This was a fun project and there are many more things we could have done, but this concludes
our work. The binary stops itself after some time and most of the deployed versions have
already done that by now. All of our initial goals as well as some extras like traceroute were
achieved, we have completed, to our knowledge, the largest and most comprehensive IPv4
census ever. With a growing number of IPv6 hosts on the Internet, 2012 may have been the
last time a census like this was possible.
We hope other researchers will find the data we have collected useful and that this publication
will help raise some awareness that, while everybody is talking about high class exploits and
cyberwar, four simple stupid default telnet passwords can give you access to hundreds of
thousands of consumer as well as tens of thousands of industrial devices all over the world.
Source: Carna Botnet Author. (2013). Internet Census 2012 Port scanning /0 using insecure embedded devices.
Retrieved from https://census2012.sourceforge.net/paper.html.
TCP/IP 102 - William Favre Slater, III - Page 64
October 16, 2024
Carna BotNet IPv4 Census of 2012
Who and Why
You may ask yourself who we are and why we did what we did.
In reality, we is me. I chose we as a form for this documentation because its nicer to read, and
mentioning myself a thousand times just sounded egotistical.
The why is also simple: I did not want to ask myself for the rest of my life how much fun it could
have been or if the infrastructure I imagined in my head would have worked as expected. I saw
the chance to really work on an Internet scale, command hundred thousands of devices with a
click of my mouse, portscan and map the whole Internet in a way nobody had done before,
basically have fun with computers and the Internet in a way very few people ever will. I decided
it would be worth my time.
Just in case someone else tries to take credit for my work: My PGP public key
Source: Carna Botnet Author. (2013). Internet Census 2012 Port scanning /0 using insecure embedded devices.
Retrieved from https://census2012.sourceforge.net/paper.html.
TCP/IP 102 - William Favre Slater, III - Page 65
October 16, 2024
Carna BotNet IPv4 Census of 2012
Source: Carna Botnet Author. (2013). Internet Census 2012 Port scanning /0 using insecure embedded devices.
Retrieved from https://census2012.sourceforge.net/paper.html.
TCP/IP 102 - William Favre Slater, III - Page 66
October 16, 2024
Carna BotNet IPv4 Census of 2012
Hilbert Curves
•
Source: Carna Botnet Author. (2013). Internet Census 2012 Port scanning /0 using insecure embedded devices.
Retrieved from https://census2012.sourceforge.net/paper.html.
TCP/IP 102 - William Favre Slater, III - Page 67
October 16, 2024
Carna BotNet IPv4 Census of 2012
Source: Carna Botnet Author. (2013). Internet Census 2012 Port scanning /0 using insecure embedded devices.
Retrieved from https://census2012.sourceforge.net/paper.html.
TCP/IP 102 - William Favre Slater, III - Page 68
October 16, 2024
Carna BotNet IPv4 Census of 2012
• Parth Shukla analyzed the data and the findings:
– Among the findings he culled from the botnet data: More than 2,000
different manufacturers' products were wide open to access via a Telnet
connection over the public Internet, and 28 percent of them were
Chinese vendor ZTE's products. China also made up the largest
percentage of infected and prone devices, with 56 percent of the
vulnerable devices (720,141), while Hong Kong was home to 7 percent
of infections (91,453), and Brazil had 2 percent, (30,242 devices). The
U.S., meanwhile, also accounted for some 2 percent of the prone
devices, with 24,243.
– By region, Asia accounted for 78 percent of the vulnerable equipment;
Europe, 13 percent; South America, 5 percent; North America, 3
percent; and Africa, 1 percent.
Source: Higgins, K.J. (2013). What the Carna Botnet Also Found. Published by Dark Reading. Retrieved from
https://www.darkreading.com/vulnerabilities-threats/what-the-carna-botnet-also-found .
TCP/IP 102 - William Favre Slater, III - Page 69
October 16, 2024
Carna BotNet IPv4 Census of 2012
• Important Infrastructure and Network
Manager Tip:
– For years after the Carna Botnet event, smart system
administrators from various organizations would
download the TB of host IP data from the Cara Botnet
for research and analysis to check to find out if any
devices that were hit by Carna Botnet were under their
control. If they got a match on one or more IP
addresses, they would know that they had vulnerable
devices and therefore plan for remediation.
User-mode Process
Application
(Layer 7) Network Providers
IFS Manager
Presentation File
(Layer 6) Server / Redirector
Microsoft Netware
Session Client Client
(SMB) (SMB)
(Layer 5)
Transport Protocol Stacks
Transport
TCP TCPv6 SPX
(Layer 4)
NDIS 3.0
Data Link
(Layer 2) NIC device driver
Physical NIC
(Layer 1)
(My Favorite)
➢ 312-342-2626
➢ http://billslater.com/interview