Thursday, 7 February 2013

What is Computer Hacking


Computer hacking is a marvelous piece of art, practiced by prodigies in the field of computers. Read on to know what computer hacking is actually.

A trip to the world of computer hacking, whether ethical or unethical, can be a fascinating experience for any individual. The term is often perceived as glamorous and chic, despite its darker side. Computer hacking is basically an alteration of computer hardware or software, in order to accomplish a goal which is outside the creator's original purpose. A standalone computer is less vulnerable to hacking, as compared to a computer on a private or public network. In case of standalone computers, it is necessary to get the hands on the computer machine, whereas, in case of computers on network, unauthorized access can be gained without actually handling the machine.

Computer hacking is both an art and science, for the people who try to break into protected or unprotected networks. Art, because it involves creativity which is equivalent to the painting of a beautiful landscape, and science because of its technical aspects. People practicing unethical hacking, generally tend to steal personal information, change a corporation's financial data, break security codes to gain unauthorized network access, or conduct other destructive activities. There are two kinds of people who indulge in computer hacking, namely those who develop an interest in it out of simple intellectual curiosity, and others with less noble motives. But the common traits amongst all hackers is that they possess technological savvy, are willing to take the risks and are passionate about various programming languages.

Computer hacking invariably involves some degree of infringement on the privacy of others, breaching the network security, and thus causing damage to confidential files, web pages or software. It may also involve downloading or alteration of files through unauthorized access, and the impact resulting from such activities will vary from being simply inquisitive to being illegal. However, many big shot companies often hire a team of hackers, in order to probe into their own loopholes. These individuals use their skills to find flaws in the company's security system, and to prevent them from getting discovered by unethical hackers. In most cases, ethical hacking helps to prevent identity theft and other serious computer-related crimes.

Depending on the domain of their work, there are basically three types of hackers. A white hat hacker is the one who breaks security for non-malicious purposes. These purposes may range from testing the security system, to finding the major loopholes in the network. Such people normally follow the legitimate ways and work within the precincts of cyber laws. The second category includes the black hat hackers, who generally subvert computer security without authorization, with the help of viruses and various other hacking tools. These hackers use technology for vandalism, credit card fraud or identity theft. The third category includes grey hat hackers, whose domain of work lies mid-way between black hat and white hat hackers. They are of ambiguous ethics and work on the borderline of legality.

The best way to learn computer hacking is to master programming languages like Python, C/C++, Java, Perl, and LISP because these particular languages teach the programmer a very different approach towards problem solving and algorithms. This in turn provides a stronger hold on the machine and its components. However, it is not possible to reach the skill level of a hacker, just by accumulating various languages in the knowledge box. It is important to learn the algorithms and working of computers in general. It is also necessary to gain knowledge about the operating system and the various important files which are used by it.

Computer hacking is an interesting way to discover the myriad latent aspects of the wonderful world of computers. The more one tries to learn about it, the more one gets inquisitive about the different domains he can probe into. However, one should always try to understand and follow cyber laws, before trying out one's hand at hacking.

Monday, 4 February 2013

IP Network Numbering



IP Network Partioning

Computer networks consist of individual segments of network cable. The electrical properties of cabling limit the useful size of any given segment such that even a modestly-sized local-area network (LAN) will require several of them. Gateway devices like routers and bridges connect these segments together although not in a perfectly seamless way Besides partitioning through the use of cable, subdividing of the network can also be done at a higher level. Subnets support virtual network segments that partition traffic flowing through the cable rather than the cables themselves. The subnet configuration often matches the segment layout one-to-one, but subnets can also subdivide a given network segment.

IP Network Numbering

Even without subnetting (explained later), hosts on the Internet or any other IP network are assigned a network number. Network numbering allows a group of hosts (peers) to communicate efficiently with each other. Hosts on the same network may be computers located in the same facility or all computers used by a workgroup, for example. Multi-homed hosts, that contain multiple network adapters, can belong to multiple networks, but each adapter is assigned exactly one network number.

Network numbers look very much like IP addresses, but the two should not be confused. Consider for example the host IP address 10.0.0.1, an address commonly used on private networks. Because it is a Class A address, with no subnetting employed, its leftmost byte (eight bits) by default refer to the network address and all other bits remain set at zero. Thus, 10.0.0.0 is the network number corresponding to IP address 10.0.0.1.

The portion of the IP address that does not refer to the network refers instead to the host address - literally, the unique identifier of the host on that network. In the above example, the host address becomes '0.0.0.1' or simply '1'. Also note that a network address becomes a reserved address that should not be assigned to any actual host. Configuring a live host at 10.0.0.0 in the example above could impact communications for all hosts on that network.

The table below illustrates the default numbering scheme for Class A, B, and C networks.
Class
Host address range
Network address
Default mask
A
    0.0.0.0 - 127.255.255.255
x.0.0.0
255.0.0.0
B
128.0.0.0 - 191.255.255.255
x.x.0.0
255.255.0.0
C
192.0.0.0 - 223.255.255.255
x.x.x.0
255.255.255.0

In general, a network address uses the leftmost byte of its hosts' addressing if the hosts fall within the Class A range, the leftmost two bytes for hosts in Class B, and the leftmost three bytes for hosts in Class C. This algorithm is applied in practice through the use of a network mask. The above table shows the decimal representation of the default network masks that is commonly used by network operating systems. Note that the decimal value '255' corresponds to one byte that has all bits set to one (11111111).

Benefit of Network Addressing

Network addressing fundamentally organizes hosts into groups. This can improve security (by isolating critical nodes) and can reduce network traffic (by preventing transmissions between nodes that do not need to communicate with each other). Overall, network addressing becomes even more powerful when introducing subnetting and/or supernetting.

Introduction to the Domain Name System (DNS)



The Internet, and many larger private Internet Protocol (IP) networks, rely on the Domain Name System (DNS) to help direct traffic. The DNS maintains a distributed database of network names and addresses, and it provides methods for computers to remotely query the database. Some people call DNS the "phone book of the Internet."

DNS and the World Wide Web

All public Web sites run on servers connected to the Internet with public IP addresses. The Web servers at About.com, for example, have addresses like 207.241.148.80. Although people can type address information like http://207.241.148.80/ into their Web browser to visit sites,

The Internet utilizes DNS as a worldwide name resolution service for public Web sites. When someone types a site's name into their browser, DNS looks up the corresponding IP address for that site, the data required to make the desired network connections between Web browsers and Web servers.

DNS Servers and Name Hierarchy


DNS uses a client/server network architecture. DNS servers are the computers designated to store DNS database records (names and addresses), while clients of the DNS include PCs, phones and other devices of end users. DNS servers also interface with each other, acting as clients to each other when needed.

The DNS organizes its servers into a hierarchy. For the Internet, so-called root name servers reside at the top of the DNS hierarchy. The Internet root name servers manage DNS server information for the Web's top-level domains (TLD) (like ".com" and ".uk"), specifically the names and IP addresses of the original (called authoritative) DNS servers responsible for answering queries about each TLD individually. Servers at the next lower level of the DNS hierarchy track second-level domain names and addresses (like "about.com") , and additional levels manage Web domains (like "compnetworking.about.com").

DNS servers are installed and maintained by private businesses and Internet governing bodies around the world. For the Internet, 13 root name servers (actually redundant pools of machines around the world) support the hundreds of Internet top-level domains, while About.com provides authoritative DNS server information for the sites within its network. Organizations can similarly deploy DNS on their private networks separately, on the smaller scale.

Configuring Networks for DNS

DNS clients (called resolvers) wanting to use DNS must have it configured on their network. Resolvers query the DNS using fixed (static) IP addresses of one or more DNS servers. On a home network, DNS server addresses can be configured once on a broadband router and automatically picked up by client devices, or the addresses can be configured on each client individually. Home network administrators can get valid DNS server addresses from either their Internet service provider or third-party Internet DNS providers like Google Public DNS and OpenDNS.

Types of DNS Lookups

DNS is most commonly used by Web browsers automatically converting Internet domain names to IP addresses. Beside these forward lookups, the DNS also is used for:

    finding the correct servers to deliver Internet email
    reverse lookups that convert an IP address back to a domain name

The network requests supporting DNS lookups run over TCP and UDP, port 53 by default.


DNS Caches

To better process high volumes of requests, the DNS utilizes caching. DNS caches store local copies of recently-accessed DNS records while the originals continue to be maintained on their designated servers. Having local copies of DNS records avoids having to generate network traffic up and through the DNS server hierarchy. However, if a DNS cache becomes outdated, network connectivity issues can result. DNS caches have also been prone to attack by network hackers. Network administrators can flush a DNS cache if needed using ipconfig and similar utilities.

Dynamic DNS

Standard DNS requires all IP address information stored in the database to be fixed. This works fine for supporting typical Web sites but not for devices using dynamic IP addresses such as Internet Web cams or home Web servers. Dynamic DNS (DDNS) adds network protocol extensions to DNS to enable name resolution service for dynamic clients.

Various third-party providers offer dynamic DNS packages designed for those wanting to remotely access their home network via the Internet. Setting up an Internet DDNS environment requires signing up with the chosen provider and installing additional software on the local network. The DDNS provider remotely monitors subscribed devices and makes the required DNS name server updates.

Alternatives to DNS

The Microsoft Windows Internet Naming Service (WINS) supports name resolution similar to DNS but works only on Windows computers and using a different name space. WINS is used on some private networks of Windows PCs.

Dot-BIT is an open source project based based on BitCoin technology that is working to add support for a ".bit" top-level domain to the Internet DNS.


Internet Protocol Summary - Facts about IP



Name:

Internet Protocol - abbreviated "IP"

Description:

IP is used by many higher level network protocols, principally TCP and UDP. Many Internet software applications including Web browsers, FTP clients, and email programs, rely on Internet Protocol.

OSI Model:

Network layer (Layer 3)

Datagram Format:

A base header 20 bytes (5 "longwords") in length, with the option for expanded header options, followed by data.

Header:



Word 1 -
  • Version - 4 bits
  • Header Length (in longwords) - 4 bits
  • Type of Service / Differentiated Services Code Point (DSCP) - 8 bits
  • Datagram Length (in bytes) - 16 bits
Word 2 -
  • ID Number - 16 bits
  • Fragmentation Flags - 3 bits
  • Fragmentation Offset - 13 bits
Word 3 -
  • Time to Live - 8 bits
  • Transport Protocol - 8 bits
  • Header Checksum - 16 bits
Word 4 -
  • Source IP Address - 32 bits
Word 5 -
  • Destination IP Address - 32 bits
Variable length fields -
  • Options
  • Padding

Payload:

IP datagram payloads can be of variable length. The minimum size of an IP datagram is 28 bytes, using the minimum 20 bytes of header information, followed by the minimum of 8 bytes of data. The maximum size of an IP datagram payload is 65,535 bytes minus the header size.

Footer:

Internet Protocol does not use its own datagram footer.

Internet Protocol Tutorial



Classes of IP Addresses, IP Broadcast and IP Multicast



IPv4 Address Classes

The IPv4 address space can be subdivided into 5 classes - Class A, B, C, D and E. Each class consists of a contiguous subset of the overall IPv4 address range.

With a few special exceptions explained further below, the values of the leftmost four bits of an IPv4 address determine its class as follows:

Class
Leftmost bits
Start address
Finish address
A
0xxx
0.0.0.0
127.255.255.255
B
10xx
128.0.0.0
191.255.255.255
C
110x
192.0.0.0
223.255.255.255
D
1110
224.0.0.0
239.255.255.255
E
1111
240.0.0.0
255.255.255.255






All Class C addresses, for example, have the leftmost three bits set to '110', but each of the remaining 29 bits may be set to either '0' or '1' independently (as represented by an x in these bit positions):
110xxxxx xxxxxxxx xxxxxxxx xxxxxxxx
Converting the above to dotted decimal notation, it follows that all Class C addresses fall in the range from 192.0.0.0 through 223.255.255.255.

IP Address Class E and Limited Broadcast

The IPv4 networking standard defines Class E addresses as reserved, meaning that they should not be used on IP networks. Some research organizations use Class E addresses for experimental purposes. However, nodes that try to use these addresses on the Internet will be unable to communicate properly.
A special type of IP address is the limited broadcast address 255.255.255.255. A broadcast involves delivering a message from one sender to many recipients. Senders direct an IP broadcast to 255.255.255.255 to indicate all other nodes on the local network (LAN) should pick up that message. This broadcast is 'limited' in that it does not reach every node on the Internet, only nodes on the LAN.
Technically, IP reserves the entire range of addresses from 255.0.0.0 through 255.255.255.255 for broadcast, and this range should not be considered part of the normal Class E range.

IP Address Class D and Multicast

The IPv4 networking standard defines Class D addresses as reserved for multicast. Multicast is a mechanism for defining groups of nodes and sending IP messages to that group rather than to every node on the LAN (broadcast) or just one other node (unicast).
Multicast is mainly used on research networks. As with Class E, Class D addresses should not be used by ordinary nodes on the Internet.

IP Address Class A, Class B, and Class C

Class A, Class B, and Class C are the three classes of addresses used on IP networks in common practice, with three exceptions as explained next.

IP Loopback Address

127.0.0.1 is the loopback address in IP. Loopback is a test mechanism of network adapters. Messages sent to 127.0.0.1 do not get delivered to the network. Instead, the adapter intercepts all loopback messages and returns them to the sending application. IP applications often use this feature to test the behavior of their network interface.

http://z.about.com
As with broadcast, IP officially reserves the entire range from 127.0.0.0 through 127.255.255.255 for loopback purposes. Nodes should not use this range on the Internet, and it should not be considered part of the normal Class A range.

Zero Addresses

As with the loopback range, the address range from 0.0.0.0 through 0.255.255.255 should not be considered part of the normal Class A range. 0.x.x.x addresses serve no particular function in IP, but nodes attempting to use them will be unable to communicate properly on the Internet.

Private Addresses

The IP standard defines specific address ranges within Class A, Class B, and Class C reserved for use by private networks (intranets). The table below lists these reserved ranges of the IP address space.
IP Testing as per IEC 60529, An ISO 17025 (NABL) Accredited Lab
Class
Private start address
Private finish address
A
10.0.0.0
10.255.255.255
B
172.16.0.0
172.31.255.255
C
192.168.0.0
192.168.255.255
Nodes are effectively free to use addresses in the private ranges if they are not connected to the Internet, or if they reside behind firewalls or other gateways that use Network Address Translation (NAT).

IPv6 Address Types

IPv6 does not use classes. IPv6 supports the following three IP address types:
  • unicast
  • multicast
  • anycast
Unicast and multicast messaging in IPv6 are conceptually the same as in IPv4. IPv6 does not support broadcast, but its multicast mechanism accomplishes essentially the same effect. Multicast addresses in IPv6 start with 'FF' (255) just like IPv4 addresses.
Anycast in IPv6 is a variation on multicast. Whereas multicast delivers messages to all nodes in the multicast group, anycast delivers messages to any one node in the multicast group. Anycast is an advanced networking concept designed to support the failover and load balancing needs of applications.

IPv6 Reserved Addresses

IPv6 reserves just two special addresses: 0:0:0:0:0:0:0:0 and 0:0:0:0:0:0:0:1. IPv6 uses 0:0:0:0:0:0:0:0 internal to the protocol implementation, so nodes cannot use it for their own communication purposes. IPv6 uses 0:0:0:0:0:0:0:1 as its loopback address, equivalent to 127.0.0.1 in IPv4.