Friday 6 December 2013

Enable or Disable Hibernation in Windows 7

Enable Hibernation in Windows 7 
Enabling or Disabling the “Hibernate” option in Windows 7 or Vista is not as simple as it used to be in Windows XP. For Windows 7, a different approach has to be followed to accomplish the same job.
In this post you will find the information on how to enable or disable the Hibernate option in Windows 7.
Hibernation is a power saving option which was designed primarily for laptops. Unlike the “sleep mode” which puts the open documents and files into the memory, hibernation puts all the open files and documents on to the hard disk and shuts down the computer without drawing even a small amount of power.
Thus, hibernation becomes an excellent way to save power and resume the Windows back to the state where it was left off. If you really want to use this feature on Windows 7 then you need to enable this option. This can be done as follows:
Step-1. Open the Command Prompt with “Administrator rights”. To do so, type cmd in the Start menu and then hit Ctrl+Shift+Enter.
Step-2. Now type the following command in the command prompt and hit Enter.
powercfg /hibernate on
Step-3. Type exit and hit Enter to close the Command Prompt.
Now you should see the “Hibernate” option in the Start menu. If you still do not see the “Hibernate” option, then perform the following steps:
  1. Type Power Options in the Start menu and hit Enter.
  2. In the left pane, open the link labeled “Change when the computer sleeps” and then open the link “Change advanced power settings”.
    Now a small window will pop-up as shown below:
    Enable Hibernation in Windows 7
  3. Now expand the Sleep tree and turn off Allow Hybrid Sleep as shown in the above screenshot.
  4. You should now see the “Hibernate” option appearing in the Start menu.
I hope you like this post. If you have anything to say or have difficulties following this post, please pass comments. Cheers :)

Customize Start Menu Button in Windows 7

Customize Win 7 Start Menu 
Have you ever wondered to know how to customize the start menu button in Windows 7? Are you bored of seeing the same old start menu button that is there from the time of Vista? Well, it is possible to spice up your copy of Windows 7 by giving a new look to the start menu button.
In this post, I will show you how to do that in an easy to follow step-by-step manner.

Tools that you need:

  1. Resource Hacker
  2. Custom Start Menu icons (images). It mush be of the size 54×162 with a .bmp extension. which looks something as follows: Start Menu Icon
    As shown in the above image, it must be in the following order:
    1st Image: When the button is not in use.
    2nd Image: When the mouse pointer is over the button.
    3rd Image: When the button is clicked.
I have created a few customized buttons which are ready to use. You can download them from the following link:
Start Menu Buttons Download
Once you have all those resources ready, you can start the customization process as follows:
  1. Take the ownership of the file “explorer.exe“ which is located in the Windows Folder (Most likely in C:\Windows).
  2. Open the Resource Hacker Tool.
  3. Go to File menu and click on Open. Now load the file “explorer.exe” into the Resource Hacker.
  4. Expand Bitmap branch in the left pane.
  5. Now expand 6801 option, right-click on 1033 and select Replace Resource option.
  6. A new window appears. Click on Open file with new bitmap button.
  7. Navigate to the customized (.bmp) image, open it and click on Replace button.
  8. Repeat steps 4 to 7 above for the options 6805 and 6809 as well.
  9. Customize Win 7 Start Menu Button
  10. Now click on Save option (File->Save). Resource Hacker will automatically create a backup file called explorer_original.exe so that you can restore it in the future if needed.
  11. Log Off and Log On to see the changes in effect.
The following images shows a preview of how your start menu would look like, before and after the customization process is done.

Default Start Menu Button:

Win 7 Start Menu - Default

Customized Start Menu Button:

Customized Win 7 Start Menu
Customized Win 7 Start Menu
Customized Win 7 Start Menu
NOTE: If you are running 64-bit edition of Windows 7, then you need to use Resource Hacker version 3.5.2 beta which is 64-bit compatible. It is available from the same link provided above.

UPDATE:

The above method shows you the manual way to customize the start menu button in Windows 7. Alternatively, there is a nice tool out there using which it is possible to accomplish the same job without the need to manually edit the files and follow a long list of procedures. The tool is called Windows 7 Start Button Changer. You can download it from the following link:
I hope you enjoy this trick. Pass your comments and share your experience. Try at your own risk/

SSL

Working of Secure Sockets Layer (SSL)

Know More About Secure Sockets Layer (SSL) 
Secure Sockets Layer (SSL) is the most widely used technology for providing a secure communication between the web client and the web server. Most of us are familiar with many sites such as Gmail, Yahoo etc. using https protocol in their login pages. When we see this, we may wonder what’s the difference between http and https.
In simple words, a HTTP protocol is used for standard communication between the Web server and the client. HTTPS is used for a “Secure communication”.

How Secure Sockets Layer Works?

Before we understand the concept of SSL, let us first learn what a “Secure Communication” means. Suppose there exists two communicating parties: Say A (client) and B (server).

Working of HTTP:

When A sends a message to B, the message is sent as a plain text in an unencrypted manner. This is acceptable in normal situations where the messages exchanged are not confidential. But, imagine a situation where A sends a PASSWORD to B. In this case, the password is also sent as a plain text. This has a serious security problem because, if an intruder (hacker) can gain unauthorized access to the ongoing communication between A and B , he can easily obtain the PASSWORDS, since they remain unencrypted. This scenario is illustrated using the following diagram:
Working of HTTP

Now let us see the working of HTTPS:

When A sends a PASSWORD (say “mypass“) to B, the message is sent in an encrypted format. The encrypted message is decrypted on B‘s side. So, even if the Hacker manages to gain an unauthorised access to the ongoing communication between A and B he gets only the encrypted password (“xz54p6kd“) and not the original password. This is shown below:
Working of Secure Sockets Layer

How is HTTPS implemented?

HTTPS is implemented using Secure Sockets Layer (SSL). A website can implement HTTPS by purchasing an SSL Certificate. Secure Sockets Layer (SSL) technology protects a Web site and makes it easy for the site visitors to trust it. It has the following uses:
  1. An SSL Certificate enables encryption of sensitive information during online transactions.
  2. Each SSL Certificate contains unique and authenticated information about the certificate owner.
  3. A Certificate Authority verifies the identity of the certificate owner when it is issued.

How Encryption Works?

The whole concept of Secure Sockets Layer is implemented on the basis of RSA algorithm where each SSL Certificate consists of a Public key and a Private key. The public key is used to encrypt the information and the private key is used to decrypt it. When your browser connects to a secure domain, the server sends a Public key to the browser to perform the encryption. The public key is made available to everyone but the private key(used for decryption) is kept secret. So, during a secure communication, the browser encrypts the message using the public key and sends it to the server. This message is decrypted on the server side using the Private key(Secret key).

How to Identify a Secure Connection?

In the Internet Explorer and most other browser programs like Firefox or Google Chrome, you will see a lock icon Picture of the Lock icon in the Security Status bar. The Security Status bar is located on the right side of the Address bar. You can click the lock to view the identity of the website.
In high-security browsers, the authenticated organization name is prominently displayed and the address bar turns GREEN when an Extended Validation SSL Certificate is detected. If the information does not match or the certificate has expired, the browser displays an error message or warning and the status bar may turn RED.
So, the bottom line is, whenever you perform an online transaction such as Credit card payment, Bank login or Email login always ensure that you have a secure communication. A secure communication is a must in these situations. Otherwise there are chances of a Phishing attack using a fake login page.
I Hope you like the information presented in this article. Please pass your comments.

About Message Digest 5 Hash and its Usage

What is md5 hash and how to use it 
In this post, I will discuss about one of the interesting cryptographic algorithm called MD5 in a very simple and easy to follow manner. In addition to understanding what is MD5 hash, you will also learn how to make use of this algorithm in your daily life.

What is MD5 algorithm?

MD5 which stands for Message Digest algorithm 5 is a widely used cryptographic hash function that was invented by Ronald Rivest in 1991. The idea behind this algorithm is to take up a random data (text or binary) as an input and generate a fixed size “hash value” as the output. The input data can be of any size or length, but the output “hash value” size is always fixed. Here is an example of MD5 Hash function at work:
MD5-Hash Function Example
As you can see from the above example, whatever the input size you give, the algorithm generates a fixed size (32 digit hex) MD5 hash. You can even try this on your own using the MD5 hash generator tool here.

Applications of MD5 Hash:

Before I tell you about how to use MD5, I would like to share one of my recent experience which made me start using MD5 algorithm.
Recently I made some significant changes and updates to my website and as obvious, I generated a complete backup of the site on my server. I downloaded this backup onto my PC and deleted the original one on the server. But after a few days something went wrong and I wanted to restore the backup that I downloaded. When I tried to restore the backup, I was shocked! The backup file that I used to restore was corrupted.
That means, the backup file that I downloaded onto my PC wasn’t exactly the one that was on my server. The reason is that there occurred some data loss during the download process. Yes, this data loss can happen often when a file is downloaded from the Internet. The file can be corrupted due to any of the following reasons:
  • Data loss during the download process, due to instability in the Internet connection/server.
  • The file can be tampered due to virus infections or
  • Due to Hacker attacks.
So, whenever you download any valuable data from the Internet, it is completely necessary that you check the integrity of the downloaded file. That is, you need to ensure that the downloaded file is exactly the same as that of the original one. In this scenario, the MD5 hash can become handy. All you have to do is generate MD5 hash (or MD5 check-sum) for the intended file on your server.
After you download the file onto your PC, again generate MD5 hash for the downloaded file. Compare these two hashes and if they match, that means the file is downloaded perfectly without any data loss.
A MD5 hash is nothing but a 32 digit hexadecimal number which can be something as follows:
A Sample MD5 Hash
e4d909c290d0fb1ca068ffaddf22cbd0
This hash is unique for every file irrespective of its size and type. For example, two different executable files (.exe files) with the same size will not have the same MD5 hash even though they are of same type and size. So MD5 hash can be used to uniquely identify a file. The same thing applies even for messages where each message that was sent and received can be verified using the MD5 hash.

How to use MD5 Hash to check the Integrity of Files?

Suppose you have a file called backup.tar on your server. Before you download, you need to generate MD5 hash for this file on your server. To do so use the following command:
For UNIX:
md5sum backup.tar
When you hit ENTER you’ll see something as follows:
e4d909c290d0fb1ca068ffaddf22cbd0
This is the MD5 hash for the file backup.tar. After you download this file onto your PC, you can cross check its integrity by again re-generating MD5 hash for the downloaded file. If both the hash matches then it means that the file is perfect. Otherwise it means that the file is corrupt. To generate the MD5 hash for the downloaded file on your Windows PC use the following freeware tool:
I hope you like this post. For further doubts and clarifications, please pass your comments. Cheers!

Working of Windows Product Activation

How Windows Product Activation Works 
Windows Product Activation or WPA is a license validation procedure introduced by Microsoft Corporation in all versions of its Windows operating system. WPA was first introduced in Windows XP and continues to exist in Windows Server 2003, Windows Vista, Windows Server 2008 and Windows 7 as well.
WPA enforces each end user to activate his/her copy of Windows so as to prevent unauthorized usage beyond the specific period of time until it is verified as genuine by Microsoft. How WPA really works was a closely guarded secret until GmbH analyzed WPA using a copy of Windows XP RC1 and published a paper on their findings.
In this post you will find answers to some of the most frequently asked questions about Windows Product Activation.

Why activation?

Microsoft’s intention behind the activation is to limit the usage of its Windows operating system to only one machine for which the retail license is issued. Any other computer which runs on the same license must be disallowed from using the software. Hence, WPA demands for activation of the product within 30 days of its installation so as to ensure that it is genuine.

What does “Genuine Windows” means?

The copy of Windows is said to be genuine only if the product key used during the installation is genuine. It means that a given product key (retail license) must be used to install Windows only on one computer for which the license was purchased. Thus, if the same key is used for the installation on another computer, then it is said to be a pirated copy.

Exactly what information is transmitted during the activation?

When you activate your copy of Windows, you are transmitting an Installation ID code to Microsoft either by phone or Internet depending on the method you choose to activate. Based on this, the Microsoft’s licensing system can determine whether or not the installed OS is genuine. If it is said to be genuine, then the system will receive the Activation ID which completes the activation process. If the activation is done through a telephone, the Activation ID needs to be entered manually to complete the activation process.

What information does the Installation ID contain?

This Installation ID is a 50-digit number which is derived from the following two data.
1. Product ID – It is actually derived from the 25-digit product key (the alphanumeric value that is printed on the sticker over the Windows CD/DVD case) that is entered during the installation of the operating system. The Product ID is used to uniquely identify your copy of Windows.
2. Hardware ID – This value is derived based on the hardware configuration of your computer.
The WPA system checks the following 10 categories of the computer hardware to derive the Hardware ID:
  • Display Adapter
  • SCSI Adapter
  • IDE Adapter (effectively the motherboard)
  • Network Adapter (NIC) and its MAC Address
  • RAM Amount Range (i.e., 0-64mb, 64-128mb, etc.)
  • Processor Type
  • Processor Serial Number
  • Hard Drive Device
  • Hard Drive Volume Serial Number (VSN)
  • CD-ROM / CD-RW / DVD-ROM
Thus, the Installation ID which is a combination of Product ID and Hardware ID is finally derived and sent to Microsoft during the activation process.

How is the Installation ID validated?

The Installation ID needs to be validated to confirm the authenticity of the installed copy of Windows. So, after the Installation ID is received by Microsoft, it is decoded back so as to obtain the actual product key and the hardware details of the computer involved in the activation process.
The Microsoft’s system will now look to see if this is the first time the product key is being used for the activation. This happens when the user is trying to activate his Windows for the first time after purchase. If so, the Installation ID is instantly validated and the corresponding Activation ID is issued which completes the activation process.
However, Microsoft system will now associate this product key with the hardware ID of the computer and stores this information on their servers. In simple words, during the first use of the product key, it is paired together with the Hardware ID and this information is stored up on the Microsoft servers.

What if a computer running a counterfeit copy of Windows attempts to activate?

The activation fails whenever the copy of Windows installed is not said to be genuine. This usually happens when the product key used for the installation is said to have been used earlier on a different computer. This is determined during the activation process as follows:
During the validation of the Installation ID, the Microsoft’s system checks to see if the same product key was used in any of the previous activation processes. If so, then it looks to see the Hardware ID associated with it. The computer running a counterfeit copy of Windows will obviously have a different hardware configuration and hence the Hardware ID will mismatch. In this case the activation process will fail.
Therefore, for a successful activation, either of the following two cases must be satisfied:
  1. The product key must have been used for the first time. ie: The product key should not have been used for earlier activations on any other computer.
  2. If the product key is said to have been used earlier, then the Hardware ID should match. This happens only if the same computer for which the license was genuinely purchased is attempting for subsequent activation.

What about formatting the hard disk?

Each time the hard disk is reformatted and the Windows is re-installed, it needs to be re-activated. However, the activation process will be completed smoothly since the same computer is attempting for subsequent activation. In this case, both the product key and the Hardware ID will match and hence the activation becomes successful.

What if I upgrade or make changes to my hardware?

In the above mentioned 10 categories of hardware, at least 7 should be the same. Thus you are allowed to make changes to not more than 3 categories of hardware. If you make too many changes then your activation will fail. In this case, it is necessary to contact the customer service representative via phone and explain about your problem. If he is convinced he may re-issue a new product key for your computer using which you can re-activate your Windows.

Some things WPA does not do:

  • WPA does not send any personal information at all about you to Microsoft. There is still an option to register the product with Microsoft, but that is separate and entirely voluntary.
  • If you prefer to activate via phone, you are not required to give any personal information to Microsoft.
  • WPA does not provide a means for Microsoft to turn off your machine or damage your data/hardware. (Nor do they even have access to your data). This is a common myth that many people have about Microsoft products.
  • WPA is not a “lease” system requiring more payments after two years or any other period. You may use the product as licensed in perpetuity.
I have tried my best to uncover the secret behind the WPA. For further details and more technical information you can read the actual paper by Fully Licensed GmbH at http://www.licenturion.com/xp/fully-licensed-wpa.txt. I hope you like this post. Pass your comments.

Creating a CON Folder in Windows

Create CON Folder in Windows 
Have you ever tried to create a CON folder or any folder with names such as “con”, “prn”, “nul” “com1″ “com2″ “lpt1″ etc. but failed? Is it impossible to create folders with such names in windows?
Well, the answer is NO and YES!
NO because, when create a new folder and try to rename it to any one of the above specified names, you know what happens! In Windows XP the folder name automatically changes back to “New Folder” no matter you try to renaming it any number of times. Where as in case of Windows Vista and Windows 7, when you try to rename the file you get an error message saying “The specified device name is invalid”.
What is the reason behind this? Simple, these names represent the internal devices of the operating system and hence we cannot create folders with the above names.
YES because it is still possible to create these folders using some simple methods as explained below:

1. Using the Command Prompt:

Here is a step-by-step procedure to create the “con” folder using the command prompt:
  1. Go to the command prompt:
  2. Type in the command prompt (For ex. To create a folder in the E: drive by name: “CON”)
    C:\>md \\.\e:\con
    NOTE: “con” can be replaced by any other names such as “prn”, “nul” “com1″ “com2″ “lpt1″ etc.
  3. In case if you wish to delete the folder, use the following command:
    C:\>rd \\.\e:\con
NOTE: This folder can only be deleted from the command prompt. You cannot remove it by right-click delete.

2. Using ALT Key and Numeric Keypad:

You can also use the Alt key and the Numeric keypad to accomplish the same job in a much easier way. Here is how you can do it:
  1. Create a New folder (Right-click -> New -> Folder)
  2. Once the new folder is created, right-click on it and select the option “Rename”.
  3. Hold down the ALT key and type 0160 from the numeric keypad (ALT+0160) and release the ALT key.
  4. Now, the folder name should go blank so that you can type any name of your choice such as “con”, “prn” “nul” etc. and press Enter. That’s it, you’re done!

C

C Program Without a Main Function

C Program without a main function 
Have you ever wondered how to write a C program without a main function? Can a C program execute with a main function? Is it possible to do that?
Well, the answer is YES! There can be a C program without a main function. Here is the source code of the program without a main function:
#include<stdio.h> #define decode(s,t,u,m,p,e,d) m##s##u##t #define begin decode(a,n,i,m,a,t,e) int begin() { printf(” hello “); }
The above program runs perfectly fine even without a main function. But how? What’s the logic behind it? How can we have a C program working without a main function. Read on to find out the answer…
Here, we are using a preprocessor directive called #define with arguments to give an impression that the program runs without the main function. However, in reality it runs with a hidden main function in it.
NOTE: A Preprocessor is program which processes the source code before compilation.
The ‘##‘ operator is called the token pasting or token merging operator. That is, we can merge two or more characters with it. Now, look at the 2nd line of program:
#define decode(s,t,u,m,p,e,d) m##s##u##t
What is the preprocessor doing here? The macro decode(s,t,u,m,p,e,d) is being expanded as “msut” (The ## operator merges m, s, u and t into msut). The logic is, when you pass (s,t,u,m,p,e,d) as argument it merges the 4th, 1st, 3rd and the 2nd characters (tokens).
Now, look at the third line of the program:
#define begin decode(a,n,i,m,a,t,e)
Here the preprocessor replaces the macro “begin” with the expansion decode(a,n,i,m,a,t,e). According to the macro definition in the previous line, the argument must be expanded so that the 4th, 1st, 3rd and the 2nd characters must be merged. In the argument (a,n,i,m,a,t,e) 4th, 1st, 3rd and the 2nd characters are ‘m’, ‘a’, ‘i’ and ‘n’.
So the third line “int begin” is replaced by “int main” by the preprocessor before the program is passed on to the compiler. That’s it.
The bottom line is that, there can never exist a C program without a main function. Here, we are just playing a gimmick that makes us believe that the program runs without the main, but there actually exists a hidden main function in the program. Here, we are using the proprocessor directive to intelligently replace the word “begin” by “main”. In simple words: int begin = int main.

Working of Antivirus Software

How antivirus works 
Due to ever increasing threat from virus and other malicious programs, almost every computer today comes with a pre-installed antivirus software on it. In fact, an antivirus has become one of the most essential software package for every computer.
Even though every one of us have an antivirus software installed on our computers, only a few really bother to understand how it actually works! Well, if you are one among those few who would really bother to understand how antivirus works, then this article is for you.

How Antivirus Works:

An antivirus software typically uses a variety of strategies in detecting and removing viruses, worms and other malware programs. The following are the two most widely employed identification methods:

1. Signature-based dectection (Dictionary approach)

This is the most commonly employed method which involves searching for known patterns of virus within a given file. Every antivirus software will have a dictionary of sample malware codes called signatures in its database. Whenever a file is examined, the antivirus refers to the dictionary of sample codes present within its database and compares the same with the current file. If the piece of code within the file matches with the one in its dictionary then it is flagged and proper action is taken immediately so as to stop the virus from further replicating. The antivirus may choose to repair the file, quarantine or delete it permanently based on its potential risk.
As new viruses and malwares are created and released every day, this method of detection cannot defend against new malwares unless their samples are collected and signatures are released by the antivirus software company. Some companies may also encourage the users to upload new viruses or variants so that, the virus can be analyzed and the signature can be added to the dictionary.
Signature based detection can be very effective, but requires frequent updates of the virus signature dictionary. Hence, the users must update their antivirus software on a regular basis so as to defend against new threats that are released daily.

2. Heuristic-based detection (Suspicious behaviour approach)

Heuristic-based detection involves identifying suspicious behaviour from any given program which might indicate a potential risk. This approach is used by some of the sophisticated antivirus software to identify new malware and variants of known malware.
Unlike the signature based approach, here the antivirus doesn’t attempt to identify known viruses, but instead monitors the behavior of all programs.
For example, malicious behaviours like a program trying to write data to an executable program is flagged and the user is alerted about this action. This method of detection gives an additional level of security from unidentified threats.
File emulation: This is another type of heuristic-based approach where a given program is executed in a virtual environment and the actions performed by it are logged. Based on the actions logged, the antivirus software can determine if the program is malicious or not and carry out necessary actions in order to clean the infection.
Most commercial antivirus software use a combination of both signature-based and heuristic-based approaches to combat malware.

Issues of Concern:

Zero-day threats: A zero-day (zero-hour ) threat or attack is where a malware tries to exploit computer application vulnerabilities that are yet unidentified by the antivirus software companies. These attacks are used to cause damage to the computer even before they are identified. Since patches are not yet released for these kind of new threats, they can easily manage to bypass the antivirus software and carry out malicious actions. However, most of the threats are identified after a day or two of its release, but damage caused by them before identification is quite inevitable.
Daily Updates: Since new viruses and threats are released every day, it is most essential to update the antivirus software so that the virus definitions are kept up-to-date. Most software will have an auto-update feature so that, the virus definitions are updated whenever the computer is connected to the Internet.
Effectiveness: Even though an antivirus software can catch almost every malware, it is still not 100% foolproof against all kinds of threats. As explained earlier, a zero-day threat can easily bypass the protective shield of the antivirus software. Also virus authors have tried to stay a step ahead by writing “oligomorphic“, “polymorphic” and, more recently, “metamorphic” virus codes, which will encrypt parts of themselves or otherwise modify themselves as a method of disguise, so as to not match virus signatures in the dictionary.
Thus user awareness is as important as antivirus software; users must be trained to practice safe surfing habits such as downloading files only from trusted websites and not blindly executing a program that is unknown or obtained from an untrusted source. I hope this article has helped you understand the working of an antivirus software.

Working of Domain Name System (DNS)

In the world of Internet and the area of computer networks, you will often come across the term Domain Name System or Domain Name Service which is simply referred to as DNS. The working of DNS forms one of the basic concepts of computer networks whose understanding is very much essential especially if you are planning to get into the field of ethical hacking or network security.
In this post, I will try to explain how Domain Name System works in a very simple and easy to follow manner so that even the readers who do not have any prior knowledge of computer networks should be able to understand the concept.

What is a Domain Name System?

A “Domain Name System” or “Domain Name Service” is a computer network protocol whose job is to map a user friendly domain name such as “Gohacking.com” to its corresponding IP address like “173.245.61.120″.
How Domain Name System (DNS) Works
Every computer on the Internet, be it a web server, home computer or any other network device has a unique IP address allotted to it. This IP address is used to establish connections between the server and the client in order to initiate the transfer of data. Whether you are trying to access a website or sending an email, the DNS plays a very important role here.
For example, when you type “www.google.com” on your browser’s address bar, your computer will make use of the DNS server to fetch the IP address of Google’s server that is “74.125.236.37″. After obtaining the IP address, your computer will then establish a connection with the server only after which you see the Google’s home page loading on your browser. The whole process is called DNS Resolution.
With millions of websites on the Internet, it is impossible for people to remember the IP address of every website in order to access it. Therefore, the concept of domain name was introduced so that every website can be identified by its unique name which makes it easy for people to remember. However, the IP address is still used as the base for internal communication by network devices. This is where the DNS comes in to action that works by resolving the user friendly domain name to its corresponding machine friendly IP address.
In simple words, domain names are for humans while IP addresses are for network devices. The “Domain Name System” is a protocol to establish a link between the two. Hence, it is not a surprise that you can even load a website by directly typing its IP address instead of the domain name in the browser’s address bar (give it a try)!

Types of DNS Servers and their Role:

The Domain Name System (DNS) is a distributed database that resides on multiple computers on the Internet in a hierarchical manner. They include the following types:

Root Name Servers:

The root servers represent the top level of the DNS hierarchy. These are the DNS servers that contain the complete database of domain names and their corresponding IP addresses. Currently, there are 13 root servers distributed globally which are named using the letters A,B,C and so on up to M.

Local Name Servers:

Local servers represent the most lower level DNS servers that are owned and maintained by many business organizations and Internet Service providers (ISPs). These local servers are able to resolve frequently used domain names into their corresponding IP addresses by caching the recent information. This cache is updated and refreshed on a regular basis.

How DNS Server Works?

Whenever you type a URL such as “http://www.gohacking.com” on your browser’s address bar, your computer will send a request to the local name server to resolve the domain name into its corresponding IP address. This request is often referred to as a DNS query. The local name server will receive the query to find out whether it contains the matching name and IP address in its database. If found, the corresponding IP address (response) is returned. If not, the query is automatically passed on to another server that is in the next higher level of DNS hierarchy. This process continues until the query reaches the server that contains the matching name and IP address. The IP address (response) then flows back the chain in the reverse order to your computer.
In rare cases where none of the lower level DNS servers contain the record for a given domain name, the DNS query eventually reaches one of the root name server to obtain the response.

FAQs about Domain Name System:

Here is a list of some of the FAQs about DNS:

How does a “root name server” obtain the information about new domains?

Whenever a new domain name is created or an existing one is updated, it is the responsibility of the domain registrar to publish the details and register it with the root name server. Only after this, the information can move down the DNS hierarchy and get updated on the lower level DNS servers.

What is DNS propagation?

Whenever a new domain name is registered or an existing one is updated, the information about the domain must get updated on all the major DNS servers so that the domain can be reached from all parts of the globe. This is called DNS propagation and the whole process can take anywhere from 24 to 72 hours to get completed.

How often the DNS servers are updated to refresh the cache?

There is no specific rule that defines the rate at which DNS servers should be updated. It usually depends on the organization such as the ISP that maintains the server. Most DNS servers are updated on an hourly basis while some may update their databases on a daily basis.
I hope you have now understood the working of DNS in a very convincing manner. Pass your comments and share your opinion.