How to hack any computer remotely using command promote

Hi friends today I teach you how to hack your friends(target) some easy step and some exploit lets start


step 1:-information gathering
      use ping command lets image it was target online/offline and information to target ip add


ster2:-port scanning
  Use to many port scanner software like nmap,superscane like this

Step3:-Os Fingerprinting
  target use opreting system use like windows ,mac os x,linux,ubuntu,redhat,
you can find out target use oprating system using some tool nmap ,net scan tool,pof sowfter tool

step4:-Banner grabbing
   Banner grabbing is an attack designed to deduce the brand and/or version of an operating system
or application. Mean after port scanning we found open port 80 (apache) and target os is Linux,
but we don’t know what is version of apache for remote hacking. Like apache 2.0, 2.2, or 2.6 .

step5:-vulnerability assessment
A vulnerability assessment is the process of identifying, quantifying, and prioritizing (or
ranking) the vulnerabilities in a system.
  step6:-search & build exploit
http://www.packetstormsecurity.org/
you can find out exploit code free and easy downlode

step7:-attack
Launch attack on remote system and get reverse shell.
















 
Share:

how to hack any account use social engineering (security)



Social engineering is a term that describes a non-technical kind of intrusion that relies heavily on human interaction and often involves tricking other people to break normal security procedures.

Social engineering is a component of many, if not most, types of exploits. Virus writers use social engineering tactics to persuade people to run malware-laden email attachments, phishers use social engineering to convince people to divulge sensitive information, and scareware  vendors use social engineering to frighten people into running software that is useless at best and dangerous at worst.


I will tell you what stands out to me from all these attacks," says Rik Ferguson, a consultant at the security company Trend Micro, who has with long experience of countermanding hacking and malware. "They may use the most sophisticated malware which attacks computers in ways that haven't been seen before, but they always start with social engineering."

That, he explains, is the computer hacker's equivalent of a con trick: making people think someone or something is safe or familiar when it is not.

Thus, many of the attacks against the 72 targets identified by McAfee, another security company, began with "spear phishing" – an email sent to a particular person inside an organisation and tailored to appear as though it had come from a contractor or government source, and so trustworthy.

Instead, such emails would contain a link which, when clicked on, would lead to malware that would in turn be downloaded on to the user's machine. From there the remote access tool – or RAT – would be employed to hunt through the computer network or even infect other people's computers.

While social engineering was always the successful spy's stock-in-trade (in the old days they were always the gregarious ones at ambassadors' parties, charming indiscretion out of their opposite numbers), the internet has transformed espionage into something that can be done from the comfort of one's home, and home country.

As long as you can be sure that your target will be sitting in front of a computer somewhere, you have a good chance of getting some useful information out of them, ideally without their knowledge. The modern internet is in fact a blizzard of operation and counter-operation at every level: governments attack others (so the US and Israel almost certainly cooperated to build the Stuxnet worm which put Iran's nuclear ambitions two years behind schedule – much cleaner than a bombing raid), commercial hacker groups wage war with each other to control giant botnets of malware-infected PCs, while at the ground floor factions inside collectives, such as Anonymous, bait and taunt each other while defacing sites. If you think the internet is peaceful or safe, you are looking in the wrong direction.

But are we generally at risk from these attacks by the biggest players? Yes, says Dmitri Alperovitch, McAfee's vice-president of threat research, who collated the data about Shady RAT: "Having investigated intrusions such as Operation Aurora and Night Dragon (systemic long-term compromise of western oil and gas industries), as well as numerous others that have not been disclosed publicly, I am convinced that every company in every conceivable industry with significant size and valuable intellectual property and trade secrets has been compromised (or will be shortly), with the great majority of the victims rarely discovering the intrusion or its impact. In fact, I divide the entire set of Fortune Global 2000 firms into two categories: those that know they've been compromised and those that don't yet know."

Security experts propose that as our culture becomes more dependent on information, social engineering will remain the greatest threat to any security system. Prevention includes educating people about the value of information, training them to protect it, and increasing people's awareness of how social engineers operate.

 Security experts propose that as our culture becomes more dependent on information, social engineering will remain the greatest threat to any security system. Prevention includes educating people about the value of information, training them to protect it, and increasing people's awareness of how social engineers operate.

 
Share:

Network Hacking command full description


ping command:-Helps in determining TCP/IP Networks IP address as well as determine issues with the network and assists in resolving them. See the ping definition for a full description.

ping command syntax is :-

ping[-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS]

[-r count] [-s count] [[-j host-list] | [-k host-list]]

[-w timeout] destination-list
Now we describe briefly one by one:-


-t Pings the specified host until stopped.
To see statistics and continue - type Control-Break;
To stop - press Ctrl + C.
-aResolve addresses to hostnames.
-n countNumber of echo requests to send.
-l sizeSend buffer size.
-fSet Don't Fragment flag in packet.
-i TTL Time To Live.
-v TOSType Of Service.
-r count   Record route for count hops.
-s countTimestamp for count hops.
-j host-listLoose source route along host-list.
-k host-list Strict source route along host-list.
-w timeoutTimeout in milliseconds to wait for each reply.                


Netstat command:-It display all the network connection and Protocol statistics(ex. local address,remote address,port etc).some useful applications for the average PC user are considered, including checking for malware connections.

Netstat command syntax is :-
netstat [-a] [-b] [-e] [-f] [-n] [-o] [-p proto] [-r] [-s] [-t] [-v] [interval].

Now we describe briefly one by one:-
 -a => Displays all connections and listening ports.
 -b => Displays the executable involved in creating each connection or listening port.
 -e => Displays Ethernet statistics.

 -f => Displays Fully Qualified Domain Names for foreign addresses (Windows Vista/7).
 -n => Displays addresses and port numbers in numerical form.
 -o => Displays the owning process ID associated with each connection.
-p proto => Shows connections for the protocol specified by proto; proto may be any of: TCP, UDP, TCPv6, or UDPv6.
-r => Displays the routing table.
-s => Displays per-protocol statistics.
-t => Displays the current connection offload state (Windows Vista/7).
-v => When used in conjunction with -b, will display sequence of components 

Telnet command:-
Enables a user  to another computer from the command prompt.
The availability of this command has only been listed as Windows 2000 and Windows XP because these are the only two versions of Microsoft Windows that support the telnet command from the command prompt (with additional switches). Additional information and help about using telnet from any version of Windows can be found on our 
Telnet command  syntax :-

telnet [host [port]]
host specifies the hostname or IP address of the remote
computer to connect to.
portSpecifies the port number or service name.

Now we describe briefly one by one:-
closeclose current connection
displaydisplay operating parameters
openconnect to a site
quitexit telnet
setset options (type 'set ?' for a list)
NTLMTurn ON NTLM Authentication.
LOCAL_ECHOTurn ON LOCAL_ECHO.
TERM x(where x is ANSI, VT100, VT52, or VTNT)
CRLFSend both CR and LF
statusprint status information
unsetunset options (type 'unset ?' for a list)

NTLMTurn OFF NTLM Authentication.
LOCAL_ECHOTurn OFF LOCAL_ECHO.
CRLFSend only CR (no LF is sent)
?/helpprint help information
Tracert command :-
The tracert command is used to visually see a network packet being sent and received and the amount of hops required for that packet to get to its destination.
Users with Microsoft Windows 2000 and Windows XP who need additional information network latency and network loss should also consider using the 


Tracert command syntax is :-
tracert[-d] [-h maximum_hops] [-j host-list] [-w timeout] target_name

Now we describe briefly one by one:-
-dDo not resolve addresses to hostnames.
-h maximum_hopsMaximum number of hops to search for target.
-j host-listLoose source route along host-list.
-w timeoutWait timeout milliseconds for each reply.


 
Share:

Hardware Keylogger

f you can Physically access victims PC, then this could be the ideal keylogger. it is a device which can be quickly inserted in between the keyboard and the PC to capture all the data(keystrokes) entered by the victim. Keystrokes are collected in a temporary file and is stored in the flash memory of the keylogger.
hardware keylogger
The hacker behind it can now easily pick up the device containing all the information(passwords,credit card details) of victim anytime. Therefore, if desired, the keylogger can be moved to another computer to retrieve the data. Amazed?.. yes it is possible, check your keyboard slot now! Beware of this

Best USB Keylogger

 

New Keycobra USB Keyloggers are the world’s smallest & smartest USB keylogger that can store over a billion keystrokes and organizes everything into an advanced flash FAT file system. Switching into Flash Drive mode allows for super fast data retrieval and download. There is no software or drivers rerquired and is completely transparent from computer operation. KeyCobra USB keylogger works on USB keyboards for PC and MAC computers.

New WiFi Keylogger

 

KeyCobra Provides world’s smallest and smartest Wifi hardware keylogger! This wireless wifi keylogger is packed with state-of-the-art electronics: two powerful processors, a full TCP/IP stack, a WLAN transceiver, and 2 Gigabytes of memory. It features remote access over the Internet. This wireless keylogger will connect to a local Wi-Fi Access Point, and send E-mails containing recorded keystroke data. You can also connect to the keylogger at any time over TCP/IP and view the captured log. All this is a device less than 2 inches (5 cm) long and Supports All Types of Keyboards.

FOR MORE DETAILS VISITE  THIS SITE 


http://www.keycobra.com/usb-keylogger.html

http://www.refog.com/hardware-keylogger.html

http://www.wirelesskeylogger.com/

http://www.keydemon.com/

Share:

āŠ“āŠŠāŠ°ેāŠŸિંāŠ— āŠļિāŠļ્āŠŸāŠŪો āŠĩિāŠ•ાāŠļ - āŠŠāŠ°િāŠšāŠŊ translet engilsh to gujrati chapter -1

āŠ† āŠķું āŠ›ે?

Operating systems can be a very complex topic. āŠ“āŠŠāŠ°ેāŠŸિંāŠ— āŠļિāŠļ્āŠŸāŠŪો āŠ–ૂāŠŽ āŠœāŠŸિāŠē āŠĩિāŠ·āŠŊ āŠđોāŠˆ āŠķāŠ•ે āŠ›ે. Learning how operating systems work can be a great learning experience. āŠķીāŠ–āŠĩી āŠ•ેāŠĩી āŠ°ીāŠĪે āŠ“āŠŠāŠ°ેāŠŸિંāŠ— āŠļિāŠļ્āŠŸāŠŪો āŠ•ાāŠŪ āŠŪāŠđાāŠĻ āŠķિāŠ•્āŠ·āŠĢ āŠ…āŠĻુāŠ­āŠĩ āŠ•āŠ°ી āŠķāŠ•ાāŠŊ āŠ›ે.
The purpose of this series is to teach the black art of Operating System (OS) Development, from the ground up. āŠ† āŠķ્āŠ°ેāŠĢી āŠđેāŠĪુ āŠ“āŠŠāŠ°ેāŠŸીંāŠ— āŠļિāŠļ્āŠŸāŠŪ āŠĻી āŠ•ાāŠģા āŠ•āŠēા (OS) āŠĩિāŠ•ાāŠļ āŠœāŠŪીāŠĻ āŠ›ે, āŠķીāŠ–āŠĩે āŠ›ે. Whether you want to make your own OS, or simply to learn how they work, this series is for you. āŠ•્āŠŊાં āŠĪો āŠĪāŠŪે āŠĪāŠŪાāŠ°ી āŠŠોāŠĪાāŠĻી OS āŠŽāŠĻાāŠĩāŠĩા āŠŪાāŠŸે, āŠ…āŠĨāŠĩા āŠŪાāŠĪ્āŠ° āŠķીāŠ–āŠĩા āŠŪાāŠŸે āŠĪેāŠ“ āŠ•ેāŠĩી āŠ°ીāŠĪે āŠ•ાāŠŪ āŠ•āŠ°ે āŠ›ે āŠ•āŠ°āŠĩા āŠŪાંāŠ—ો āŠ›ો, āŠĪો āŠ† āŠķ્āŠ°ેāŠĢી āŠŪાāŠŸે āŠ›ે.

What is an Operating System? āŠ“āŠŠāŠ°ેāŠŸિંāŠ— āŠļિāŠļ્āŠŸāŠŪ āŠ āŠķું āŠ›ે?

An Operating System provides the basic functionality, look, and feel, for a computer. āŠ“āŠŠāŠ°ેāŠŸિંāŠ— āŠļિāŠļ્āŠŸāŠŪ āŠŪૂāŠģāŠ­ૂāŠĪ āŠĩિāŠ§ેāŠŊ āŠŠૂāŠ°ી āŠŠાāŠĄે āŠ›ે, āŠœુāŠ“, āŠ…āŠĻે āŠ•āŠŪ્āŠŠ્āŠŊૂāŠŸāŠ° āŠŪાāŠŸે, āŠēાāŠ—ે āŠ›ે. The primary purpose is to create a workable Operating Environment for the user. āŠŠ્āŠ°ાāŠĨāŠŪિāŠ• āŠđેāŠĪુ āŠĩāŠŠāŠ°ાāŠķāŠ•āŠ°્āŠĪા āŠŪાāŠŸે āŠāŠ• āŠĩāŠđેāŠĩાāŠ°ુ āŠļંāŠšાāŠēāŠĻ āŠŠāŠ°્āŠŊાāŠĩāŠ°āŠĢ āŠŽāŠĻાāŠĩે āŠ›ે.
An example of an Operating System is Windows, Linux, and Macintosh. āŠ“āŠŠāŠ°ેāŠŸિંāŠ— āŠļિāŠļ્āŠŸāŠŪ āŠ‰āŠĶાāŠđāŠ°āŠĢ Windows āŠŪાāŠŸે, Linux, āŠ…āŠĻે āŠŪેāŠ•િāŠĻ્āŠŸોāŠķ āŠ›ે.

If you have never programmed before āŠœો āŠĪāŠŪે āŠŠāŠđેāŠēાં āŠ•્āŠŊાāŠ°ેāŠŊ āŠŠ્āŠ°ોāŠ—્āŠ°ાāŠŪ āŠ›ે

Computer programming is designing and writing software, or programs, for the computer to load and execute. āŠ•ોāŠŪ્āŠŠ્āŠŊુāŠŸāŠ° āŠŠ્āŠ°ોāŠ—્āŠ°ાāŠŪિંāŠ— āŠ°āŠšāŠĻા āŠ›ે āŠ…āŠĻે āŠēેāŠ–āŠĻ āŠļોāŠŦ્āŠŸāŠĩેāŠ°, āŠ…āŠĨāŠĩા āŠ•ાāŠ°્āŠŊāŠ•્āŠ°āŠŪો, āŠ•āŠŪ્āŠŠ્āŠŊુāŠŸāŠ° āŠŪાāŠŸે āŠēાāŠĩāŠĩા āŠŪાāŠŸે āŠ…āŠĻે āŠšāŠēાāŠĩો. However, the Operating System needs to be designed with this functionality. āŠœો āŠ•ે, āŠ“āŠŠāŠ°ેāŠŸિંāŠ— āŠļિāŠļ્āŠŸāŠŪ āŠŪાāŠŸે āŠ† āŠĩિāŠ§ેāŠŊ āŠļાāŠĨે āŠ°āŠšાāŠŊેāŠē āŠœāŠ°ૂāŠ° āŠ›ે.
An Operating System is not a single program, but a collection of software that work and communicate with each other. āŠ“āŠŠāŠ°ેāŠŸિંāŠ— āŠļિāŠļ્āŠŸāŠŪ āŠāŠ• āŠ•ાāŠ°્āŠŊāŠ•્āŠ°āŠŪ āŠĻāŠĨી, āŠŠāŠ°ંāŠĪુ āŠļોāŠŦ્āŠŸāŠĩેāŠ° āŠļંāŠ—્āŠ°āŠđ āŠ›ે āŠ•ે āŠœે āŠāŠ•āŠŽીāŠœા āŠļાāŠĨે āŠ•ાāŠŪ āŠĩાāŠĪāŠšીāŠĪ. This is what I mean by "Operating Environment". āŠ† āŠđું āŠķું "āŠļંāŠšાāŠēāŠĻ āŠŠāŠ°્āŠŊાāŠĩāŠ°āŠĢ" āŠĶ્āŠĩાāŠ°ા āŠĨાāŠŊ āŠ›ે.
Because Operating Systems are a collection of software, in order to develop an Operating System, one must know how to develop software. āŠ•ાāŠ°āŠĢ āŠ•ે āŠ“āŠŠāŠ°ેāŠŸિંāŠ— āŠļિāŠļ્āŠŸāŠŪો āŠļોāŠŦ્āŠŸāŠĩેāŠ° āŠļંāŠ—્āŠ°āŠđ āŠ›ે, āŠ•્āŠ°āŠŪāŠŪાં āŠ“āŠŠāŠ°ેāŠŸિંāŠ— āŠļિāŠļ્āŠŸāŠŪ āŠĩિāŠ•āŠļાāŠĩāŠĩા āŠŪાāŠŸે, āŠāŠ• āŠ–āŠŽāŠ° āŠœ āŠœોāŠˆāŠ āŠ•ેāŠĩી āŠ°ીāŠĪે āŠļોāŠŦ્āŠŸāŠĩેāŠ° āŠĩિāŠ•āŠļાāŠĩી āŠ›ે. That is, one must know computer programming. āŠāŠŸāŠēે āŠ•ે, āŠāŠ• āŠ•ોāŠŪ્āŠŠ્āŠŊુāŠŸāŠ° āŠŠ્āŠ°ોāŠ—્āŠ°ાāŠŪિંāŠ— āŠ–āŠŽāŠ° āŠœ āŠœોāŠˆāŠ.
If you have never programmed before, take a look at the Requirements section below, and look no further. āŠœો āŠĪāŠŪે āŠŠāŠđેāŠēાં āŠ•્āŠŊાāŠ°ેāŠŊ āŠŠ્āŠ°ોāŠ—્āŠ°ાāŠŪ āŠ›ે, āŠœāŠ°ૂāŠ°ીāŠŊાāŠĪો āŠĩિāŠ­ાāŠ— āŠĻીāŠšે āŠāŠ• āŠœુāŠ“, āŠ…āŠĻે āŠĩāŠ§ુ āŠœુāŠ“. This section will have links to good tutorials and articles that could help you to learn computer programming with C++ and 80x86 Assembly Language. āŠ† āŠĩિāŠ­ાāŠ— āŠļાāŠ°ી āŠŸ્āŠŊુāŠŸોāŠ°િāŠŊāŠē્āŠļ āŠ…āŠĻે āŠēેāŠ–ો āŠ›ે āŠ•ે āŠœે āŠĪāŠŪે C + + āŠ…āŠĻે 80x86 āŠāŠļેāŠŪ્āŠŽāŠēી āŠ­ાāŠ·ા āŠļાāŠĨે āŠ•ોāŠŪ્āŠŠ્āŠŊુāŠŸāŠ° āŠŠ્āŠ°ોāŠ—્āŠ°ાāŠŪિંāŠ— āŠķીāŠ–āŠĩા āŠŪાāŠŸે āŠŪāŠĶāŠĶ āŠ•āŠ°ી āŠķāŠ•ે āŠ•āŠĄીāŠ“ āŠđોāŠŊ āŠ›ે.

Requirements āŠœāŠ°ૂāŠ°ીāŠŊાāŠĪો

Knowledge of the C Programming Language āŠļી āŠŠ્āŠ°ોāŠ—્āŠ°ાāŠŪિંāŠ— āŠ­ાāŠ·ા āŠœ્āŠžાāŠĻ

Using a high level language, such as C, can make OS development much easier. āŠļી āŠœેāŠĩી āŠđાāŠ‡ āŠēેāŠĩāŠē āŠ­ાāŠ·ા, āŠŪāŠĶāŠĶāŠĨી āŠ“āŠāŠļ āŠĩિāŠ•ાāŠļ āŠĩāŠ§ુ āŠļāŠ°āŠģ āŠŽāŠĻાāŠĩી āŠķāŠ•ે āŠ›ે. The most common languages that are used in OS development are C, C++, and Perl. āŠļૌāŠĨી āŠļાāŠŪાāŠĻ્āŠŊ āŠ­ાāŠ·ાāŠ“ āŠĪે OS āŠĩિāŠ•ાāŠļ āŠ‰āŠŠāŠŊોāŠ—āŠŪાં āŠ›ે C, C + +, āŠ…āŠĻે āŠŠāŠ°્āŠē. Do not think these are the only languages that may be used; It is possible in other languages. āŠēાāŠ—ે āŠ›ે āŠ•ે āŠ† āŠŪાāŠĪ્āŠ° āŠ­ાāŠ·ાāŠ“ āŠ‰āŠŠāŠŊોāŠ— āŠ•āŠ°ી āŠķāŠ•ાāŠŊ āŠ›ે āŠĻāŠđિં; āŠĪે āŠ…āŠĻ્āŠŊ āŠ­ાāŠ·ાāŠ“āŠŪાં āŠķāŠ•્āŠŊ āŠ›ે. I have even seen one with FreeBASIC! āŠđું āŠŠāŠĢ āŠāŠ• āŠŦ્āŠ°ીāŠŽેāŠિāŠ• Language āŠœોāŠ‡ āŠ›ે! Getting higher level languages to work properly can also make it harder to work within the long run, however. āŠ‰āŠš્āŠš āŠ•āŠ•્āŠ·ાāŠĻી āŠ­ાāŠ·ાāŠ“ āŠŊોāŠ—્āŠŊ āŠ°ીāŠĪે āŠ•ાāŠŪ āŠ•āŠ°āŠĩા āŠŪાāŠŸે āŠŪેāŠģāŠĩāŠĩી āŠŠāŠĢ āŠēાંāŠŽા āŠ—ાāŠģે āŠ…ંāŠĶāŠ° āŠŪુāŠķ્āŠ•ેāŠē āŠ•ાāŠŪ āŠ•āŠ°āŠĩા āŠŪાāŠŸે, āŠœોāŠ•ે āŠ•āŠ°ી āŠķāŠ•ો āŠ›ો.
C and C++ are the most common, with C being the most used. C āŠ…āŠĻે C + + āŠļૌāŠĨી āŠļાāŠŪાāŠĻ્āŠŊ āŠļી āŠļૌāŠĨી āŠĩāŠ§ુ āŠ‰āŠŠāŠŊોāŠ— āŠĨાāŠŊ āŠ›ે, āŠ†āŠĩે āŠ›ે. C, as being a middle level language, provides high level constructs while still providing low level details that are closer to assembly language, and hence, the system. C, A āŠŪāŠ§્āŠŊāŠŪ āŠļ્āŠĪāŠ°āŠĻી āŠ­ાāŠ·ા āŠ›ે, āŠŠંāŠšા āŠļ્āŠĪāŠ° āŠ°āŠšāŠĻા āŠŠૂāŠ°ી āŠŠાāŠĄે āŠ›ે āŠœ્āŠŊાāŠ°ે āŠđāŠœુ āŠŠāŠĢ āŠĻીāŠšા āŠļ્āŠĪāŠ° āŠĩિāŠ—āŠĪો āŠ•ે āŠœે āŠāŠļેāŠŪ્āŠŽāŠēી āŠ­ાāŠ·ા āŠĻāŠœીāŠ• āŠ›ે, āŠ…āŠĻે āŠĪેāŠĨી, āŠļિāŠļ્āŠŸāŠŪ āŠŠૂāŠ°ી āŠŠાāŠĄે āŠ›ે. Because of this, using C is fairly easy in OS development. āŠ† āŠ•ાāŠ°āŠĢે, āŠļી āŠŪāŠĶāŠĶāŠĨી āŠ“āŠāŠļ āŠĩિāŠ•ાāŠļ āŠāŠ•āŠĶāŠŪ āŠļāŠ°āŠģ āŠ›ે. This is one of the primary reasons why it is the most commonly used: Because the C programming language was originally designed for system level and embedded software development. āŠ† āŠāŠ• āŠŠ્āŠ°ાāŠĨāŠŪિāŠ• āŠ•ાāŠ°āŠĢો āŠĪે āŠļૌāŠĨી āŠĩāŠ§ુ āŠļાāŠŪાāŠĻ્āŠŊ āŠ°ીāŠĪે āŠĩāŠŠāŠ°ાāŠŊ āŠ›ે āŠ›ે: āŠ•ાāŠ°āŠĢ āŠ•ે āŠļી āŠŠ્āŠ°ોāŠ—્āŠ°ાāŠŪીંāŠ— āŠ­ાāŠ·ા āŠŪૂāŠģāŠ­ૂāŠĪ āŠļિāŠļ્āŠŸāŠŪ āŠļ્āŠĪāŠ° āŠŪાāŠŸે āŠ°āŠšāŠĻા āŠ•āŠ°āŠĩાāŠŪાં āŠ†āŠĩી āŠđāŠĪી āŠ…āŠĻે āŠļોāŠŦ્āŠŸāŠĩેāŠ° āŠĄેāŠĩāŠēāŠŠāŠŪેāŠĻ્āŠŸ āŠœāŠĄિāŠĪ.
Because of this, we are going to be using C for most of the OS. āŠ† āŠ•ાāŠ°āŠĢે, āŠ…āŠŪે OS āŠĻી āŠļૌāŠĨી āŠŪાāŠŸે āŠļી āŠŪāŠĶāŠĶāŠĨી āŠķāŠ•ાāŠŊ āŠœāŠĪાં āŠđોāŠŊ āŠ›ે.
C is a complex programming language, that can take a book to cover. āŠļી āŠœāŠŸિāŠē āŠŠ્āŠ°ોāŠ—્āŠ°ાāŠŪીંāŠ— āŠ­ાāŠ·ા āŠ›ે, āŠ•ે āŠœે āŠāŠ• āŠ•āŠĩāŠ° āŠŠુāŠļ્āŠĪāŠ• āŠēāŠˆ āŠķāŠ•ે āŠ›ે. If you do not know C, the following may help: āŠœો āŠĪāŠŪે C āŠ–āŠŽāŠ° āŠĻāŠđિં āŠđોāŠŊ, āŠĪો āŠĻીāŠšેāŠĻા āŠŪāŠĶāŠĶ āŠ•āŠ°ી āŠķāŠ•ો āŠ›ો:
I personally learned from the original "The C++ Programming language", which is now obsolete, though. āŠđું āŠĩ્āŠŊāŠ•્āŠĪિāŠ—āŠĪ āŠŪૂāŠģ "āŠ† C + + āŠŠ્āŠ°ોāŠ—્āŠ°ાāŠŪીંāŠ— āŠ­ાāŠ·ા +" āŠ›ે, āŠ•ે āŠœે āŠđāŠĩે āŠ•ાāŠēāŠ—્āŠ°āŠļ્āŠĪ āŠŪાંāŠĨી āŠ›āŠĪાં āŠķીāŠ–ી.

Knowledge of x86 Assembly Language X86 āŠāŠļેāŠŪ્āŠŽāŠēી āŠ­ાāŠ·ા āŠœ્āŠžાāŠĻ

80x86 Assembly Language is a low level programming language. 80x86 āŠāŠļેāŠŪ્āŠŽāŠēી āŠ­ાāŠ·ા āŠ“āŠ›ી āŠēેāŠĩāŠē āŠŠ્āŠ°ોāŠ—્āŠ°ાāŠŪીંāŠ— āŠ­ાāŠ·ા āŠ›ે. Assembly Language provides a direct one to one relation with the processor machine instructions, which make assembly language suitable for hardware programming. āŠāŠļેāŠŪ્āŠŽāŠēી āŠ­ાāŠ·ા āŠŠ્āŠ°ોāŠļેāŠļāŠ° āŠŪāŠķીāŠĻ āŠļૂāŠšāŠĻો āŠ›ે, āŠ•ે āŠœે āŠāŠļેāŠŪ્āŠŽāŠēી āŠ­ાāŠ·ા āŠđાāŠ°્āŠĄāŠĩેāŠ° āŠŠ્āŠ°ોāŠ—્āŠ°ાāŠŪિંāŠ— āŠŪાāŠŸે āŠŊોāŠ—્āŠŊ āŠŽāŠĻાāŠĩે āŠ›ે āŠļાāŠĨે āŠļીāŠ§ો āŠāŠ• āŠāŠ• āŠļંāŠŽંāŠ§ āŠŠૂāŠ°ો āŠŠાāŠĄે āŠ›ે.
Assembly Language, as being low level, tend to be more complex and harder to develop in, then high level languages like C. Because of this, and to aid in simplicity, We are only going to use assembly language when required, and no more. āŠāŠļેāŠŪ્āŠŽāŠēી āŠ­ાāŠ·ા, āŠ“āŠ›ી āŠļ્āŠĪāŠ° āŠ›ે, āŠĩāŠ§ુ āŠœāŠŸિāŠē āŠ…āŠĻે āŠŪુāŠķ્āŠ•ેāŠē āŠĩિāŠ•ાāŠļ āŠ•āŠ°āŠĩા āŠŪાāŠŸે, āŠŠāŠ›ી āŠđાāŠ‡ āŠēેāŠĩāŠē āŠ­ાāŠ·ાāŠ“ āŠ† āŠ•ાāŠ°āŠĢે āŠļી āŠœેāŠĩી āŠķāŠ•ાāŠŊ āŠĩāŠēāŠĢ āŠ§āŠ°ાāŠĩે āŠ›ે, āŠ…āŠĻે āŠļāŠ°āŠģāŠĪા āŠļāŠđાāŠŊ, āŠ…āŠŪે āŠŪાāŠĪ્āŠ° āŠāŠļેāŠŪ્āŠŽāŠēી āŠ­ાāŠ·ા āŠĩાāŠŠāŠ°ો āŠœ્āŠŊાāŠ°ે āŠœāŠ°ૂāŠ°ી āŠœāŠĪાં āŠđોāŠŊ āŠ›ે, āŠ…āŠĻે āŠ•ોāŠˆ āŠĩāŠ§ુ .
Assembly Language is another complex language that can take a book to fill. āŠāŠļેāŠŪ્āŠŽāŠēી āŠ­ાāŠ·ા āŠ…āŠĻ્āŠŊ āŠœāŠŸિāŠē āŠ­ાāŠ·ા āŠ•ે āŠ­āŠ°āŠĩા āŠŪાāŠŸે āŠŠુāŠļ્āŠĪāŠ• āŠēāŠˆ āŠķāŠ•ે āŠ›ે. If you do not know x86 Assembly Language, the following may help: āŠœો āŠĪāŠŪે x86 āŠāŠļેāŠŪ્āŠŽāŠēી āŠ­ાāŠ·ા āŠ–āŠŽāŠ° āŠĻāŠđિં āŠđોāŠŊ, āŠĪો āŠĻીāŠšેāŠĻા āŠŪāŠĶāŠĶ āŠ•āŠ°ી āŠķāŠ•ો āŠ›ો:
I personally learned from Assembly Language Step by Step (Excellent beginning book) and the Art of Assembly Language. āŠđું āŠĩ્āŠŊāŠ•્āŠĪિāŠ—āŠĪ (āŠķ્āŠ°ેāŠ·્āŠ  āŠķāŠ°ૂāŠ†āŠĪ āŠŠુāŠļ્āŠĪāŠ•) āŠŠāŠ—āŠēાં āŠ…āŠĻે āŠĩિāŠ§ાāŠĻāŠļāŠ­ા āŠ­ાāŠ·ા āŠ“āŠŦ āŠ†āŠ°્āŠŸ āŠĶ્āŠĩાāŠ°ા āŠāŠļેāŠŪ્āŠŽāŠēી āŠ­ાāŠ·ા āŠŠāŠ—āŠēાં āŠŠાāŠļેāŠĨી āŠķીāŠ–ે āŠ›ે. Both are very great books. āŠŽંāŠĻે āŠ–ૂāŠŽ āŠŪāŠđાāŠĻ āŠŠુāŠļ્āŠĪāŠ•ો āŠđોāŠŊ āŠ›ે.

Getting ready āŠĪૈāŠŊાāŠ° āŠŪેāŠģāŠĩāŠĩી

That is all you need to know--Everything else I'll teach along the way. āŠŽાāŠ•ીāŠĻું āŠŽāŠ§ું āŠđું āŠ°ીāŠĪે āŠļાāŠĨે āŠķીāŠ–āŠĩે āŠŠāŠĄāŠķે - āŠĪે āŠŽāŠ§ા āŠŪાāŠŸે āŠœાāŠĢāŠĩાāŠĻી āŠœāŠ°ૂāŠ° āŠ›ે. Be forewarned: From here on out, I will not be explaining C or x86 Assembly Language concepts. Forewarned āŠ›ે: āŠ…āŠđીં āŠŽāŠđાāŠ° āŠŠ્āŠ°āŠĪિ, āŠđું C āŠ…āŠĨāŠĩા X86 āŠāŠļેāŠŪ્āŠŽāŠēી āŠ­ાāŠ·ા āŠ–્āŠŊાāŠē āŠ†āŠĩāŠķે āŠĻāŠđીં āŠļāŠŪāŠœાāŠĩāŠĪી āŠ›ે. I will still explain new instructions that you may not be familiar with, such as lgdt , and the use of sti, cli, bt, cpuid and some others, however. āŠđું āŠđāŠœુ āŠŠāŠĢ āŠĻāŠĩી āŠļૂāŠšāŠĻાāŠ“ āŠ•ે āŠĪāŠŪાāŠ°ી āŠļાāŠĨે āŠ›ે, āŠœેāŠŪ āŠ•ે lgdt āŠĪāŠ°ીāŠ•ે āŠŠāŠ°િāŠšિāŠĪ āŠđોāŠˆ āŠķāŠ•ે āŠĻāŠđિં, āŠ…āŠĻે āŠāŠļāŠŸીāŠ†āŠ‡, CLI, BT, cpuid āŠ…āŠĻે āŠ•ેāŠŸāŠēાāŠ• āŠ…āŠĻ્āŠŊ āŠĩાāŠŠāŠ°āŠĩા āŠŪાāŠŸે, āŠœોāŠ•ે āŠļāŠŪāŠœાāŠĩāŠķે.

Tools of the trade āŠ† āŠĩેāŠŠાāŠ° āŠļાāŠ§āŠĻો

In developing low level code, we will need specialized low level software to help us out. āŠĻીāŠšા āŠļ્āŠĪāŠ° āŠ•ોāŠĄ āŠĩિāŠ•ાāŠļ, āŠ…āŠŪે āŠ–ાāŠļ āŠĻીāŠšા āŠļ્āŠĪāŠ° āŠļોāŠŦ્āŠŸāŠĩેāŠ° āŠœāŠ°ૂāŠ° āŠ…āŠŪāŠĻે āŠŪāŠĶāŠĶ āŠŽāŠđાāŠ° āŠ†āŠĩāŠķે. Some of these tools are not needed, however, they are highly recommended as they can significantly aid in development. āŠ† āŠļાāŠ§āŠĻો āŠ•ેāŠŸāŠēાāŠ• āŠœāŠ°ૂāŠ°ી āŠĻāŠĨી, āŠ†āŠŪ āŠ›āŠĪાં, āŠĪેāŠ“ āŠ–ૂāŠŽ āŠ•ાāŠ°āŠĢ āŠ•ે āŠĪેāŠ“ āŠĻોંāŠ§āŠŠાāŠĪ્āŠ° āŠ°ીāŠĪે āŠĩિāŠ•ાāŠļ āŠļāŠđાāŠŊ āŠ•āŠ°ી āŠķāŠ•ો āŠ›ો āŠ†āŠ—્āŠ°āŠđāŠĢીāŠŊ āŠ›ે.

NASM - The Assembler āŠ† āŠāŠļેāŠŪ્āŠŽāŠēāŠ° - NASM

The Netwide Assembler (NASM) can generate flat binary 16bit programs, while most other assemblers (Turbo Assembler (TASM), Microsoft's Macro Assembler (MASM)) cannot. āŠ† Netwide āŠāŠļેāŠŪ્āŠŽāŠēāŠ° (NASM) āŠļāŠŠાāŠŸ āŠŽાāŠˆāŠĻāŠ°ી 16bit āŠ•ાāŠ°્āŠŊāŠ•્āŠ°āŠŪો āŠŠેāŠĶા āŠ•āŠ°ે āŠ›ે, āŠœ્āŠŊાāŠ°ે āŠŪોāŠŸા āŠ­ાāŠ—āŠĻા āŠ…āŠĻ્āŠŊ assemblers (āŠŸāŠ°્āŠŽો (TASM) āŠāŠļેāŠŪ્āŠŽāŠēāŠ° āŠ›ે, āŠŪાāŠ‡āŠ•્āŠ°ોāŠļોāŠŦ્āŠŸ āŠŪેāŠ•્āŠ°ો āŠāŠļેāŠŪ્āŠŽāŠēāŠ° (MASM)) āŠ•āŠ°ી āŠķāŠ•āŠĪું āŠĻāŠĨી.
During the development of the OS, some programs must be pure binary executables. OS āŠĻી āŠĩિāŠ•ાāŠļ āŠĶāŠ°āŠŪ્āŠŊાāŠĻ, āŠ•ેāŠŸāŠēાāŠ• āŠ•ાāŠ°્āŠŊāŠ•્āŠ°āŠŪો āŠķુāŠĶ્āŠ§ āŠŽાāŠˆāŠĻāŠ°ી āŠšāŠēાāŠĩી āŠđોāŠĩા āŠœ āŠœોāŠˆāŠ. Because of this, NASM is a great choice to use. āŠ† āŠ•ાāŠ°āŠĢે, NASM āŠŪāŠđાāŠĻ āŠ‰āŠŠāŠŊોāŠ— āŠŠāŠļંāŠĶāŠ—ી āŠ›ે.
You can download NASM from here . āŠĪāŠŪે NASM āŠĄાāŠ‰āŠĻāŠēોāŠĄ āŠ•āŠ°ી āŠķāŠ•ો āŠ›ો āŠ…āŠđીં .

Microsoft Visual C++ 2005 or 2008 āŠŪાāŠ‡āŠ•્āŠ°ોāŠļોāŠŦ્āŠŸ āŠĩિāŠ્āŠŊુāŠ…āŠē C + + āŠ…āŠĨāŠĩા 2005 2008

Because portability is a concern, most of the code for our operating system will be developed in C. āŠ•ાāŠ°āŠĢ āŠ•ે āŠŠોāŠ°્āŠŸેāŠŽીāŠēીāŠŸી āŠāŠ• āŠšિંāŠĪા āŠ›ે, āŠ…āŠŪાāŠ°ા āŠ“āŠŠāŠ°ેāŠŸિંāŠ— āŠļિāŠļ્āŠŸāŠŪ āŠŪાāŠŸે āŠ•ોāŠĄ āŠŪોāŠŸા āŠ­ાāŠ—āŠĻા āŠļી āŠĩિāŠ•āŠļાāŠĩāŠĩાāŠŪાં āŠ†āŠĩāŠķે During OS Development, there are some things that we must have control over that not all compilers may support, however. āŠ“āŠāŠļ āŠĩિāŠ•ાāŠļ āŠĶāŠ°āŠŪ્āŠŊાāŠĻ, āŠĪ્āŠŊાં āŠ…āŠŪુāŠ• āŠĩāŠļ્āŠĪુāŠ“ āŠ›ે āŠ•ે āŠœે āŠ…āŠŪે āŠ•āŠŪ્āŠŠાāŠ‡āŠēāŠ°ોāŠĻો āŠŽāŠ§ા āŠ†āŠ§ાāŠ° āŠĻāŠđિં āŠ†āŠŠે āŠŠāŠ° āŠĻિāŠŊંāŠĪ્āŠ°āŠĢ āŠđોāŠŊ āŠ›ે, āŠœોāŠ•ે āŠœ āŠœોāŠˆāŠ āŠ›ે. For example, say good bye to all runtime compiler support (templates, exceptions) and the good old standard library! āŠ‰āŠĶાāŠđāŠ°āŠĢ āŠĪāŠ°ીāŠ•ે, āŠŽāŠ§ી āŠ°āŠĻāŠŸાāŠˆāŠŪ āŠ•āŠŪ્āŠŠાāŠˆāŠēāŠ° (āŠŸેāŠŪ્āŠŠāŠēેāŠŸો, āŠ…āŠŠāŠĩાāŠĶો) āŠ†āŠ§ાāŠ° āŠ…āŠĻે āŠļાāŠ°ા āŠœૂāŠĻા āŠļ્āŠŸાāŠĻ્āŠĄāŠ°્āŠĄ āŠēાāŠ‡āŠŽ્āŠ°ેāŠ°ી āŠļાāŠ°ી āŠŽાāŠŊ āŠ•āŠđી! Depending on the design of your system, you may also need to support or change more detailed properties: Such as loading at a specific address, adding your own internal sections in your programs' binary, etc..) The basic idea is that not all compilers out there are capable of developing operating system code. āŠĪāŠŪાāŠ°ી āŠļિāŠļ્āŠŸāŠŪāŠĻી āŠĄિāŠાāŠ‡āŠĻ āŠŠāŠ° āŠ†āŠ§ાāŠ° āŠ°ાāŠ–ીāŠĻે, āŠĪāŠŪāŠĻે āŠŠāŠĢ āŠ†āŠ§ાāŠ° āŠ…āŠĨāŠĩા āŠĩāŠ§ુ āŠĩિāŠ—āŠĪāŠĩાāŠ° āŠ—ુāŠĢāŠ§āŠ°્āŠŪો āŠŽāŠĶāŠēāŠĩા āŠŪાāŠŸે āŠœāŠ°ૂāŠ° āŠŠāŠĄી āŠķāŠ•ે āŠ›ે. āŠšોāŠ•્āŠ•āŠļ āŠļāŠ°āŠĻાāŠŪે āŠēોāŠĄ āŠœેāŠĩા āŠĪāŠŪાāŠ°ા āŠ•ાāŠ°્āŠŊāŠ•્āŠ°āŠŪો āŠŽાāŠˆāŠĻāŠ°ી, āŠĩāŠ—ેāŠ°ે āŠĪāŠŪાāŠ°ા āŠŠોāŠĪાāŠĻા āŠ†ંāŠĪāŠ°િāŠ• āŠĩિāŠ­ાāŠ—ો āŠ‰āŠŪેāŠ°ીāŠĻે) āŠŪૂāŠģāŠ­ૂāŠĪ āŠĩિāŠšાāŠ° āŠ›ે āŠ•ે āŠœે āŠŽāŠ§ા āŠĪ્āŠŊાં āŠŽāŠđાāŠ° āŠ•āŠŪ્āŠŠાāŠ‡āŠēāŠ°ોāŠĻો āŠ“āŠŠāŠ°ેāŠŸિંāŠ— āŠļિāŠļ્āŠŸāŠŪ āŠ•ોāŠĄ āŠĩિāŠ•āŠļાāŠĩāŠĩા āŠŪાāŠŸે āŠļāŠ•્āŠ·āŠŪ āŠđોāŠŊ āŠ›ે.
I will be using Microsoft Visual C++ for developing the system. āŠđું C + + āŠļિāŠļ્āŠŸāŠŪ āŠĩિāŠ•ાāŠļ āŠŪાāŠŸે + āŠŪાāŠ‡āŠ•્āŠ°ોāŠļોāŠŦ્āŠŸ āŠĩિāŠ્āŠŊુāŠ…āŠē āŠ‰āŠŠāŠŊોāŠ— āŠ•āŠ°ીāŠĻે āŠ•āŠ°āŠķે. However, it is also possible to develop in other compilers such as DJGPP, GCC or even Cygwin. āŠœોāŠ•ે, āŠĪે āŠŠāŠĢ āŠķāŠ•્āŠŊ āŠ›ે DJGPP, GCC āŠ āŠ•ે Cygwin āŠœેāŠĩા āŠ…āŠĻ્āŠŊ āŠ•āŠŪ્āŠŠાāŠ‡āŠēāŠ°ોāŠĻો āŠŪાં āŠ›ે. Cygwin is a command shell program that is designed to emulate Linux command shell. Cygwin āŠ†āŠĶેāŠķ āŠķેāŠē āŠ•ાāŠ°્āŠŊāŠ•્āŠ°āŠŪ āŠ›ે āŠ•ે āŠœે Linux āŠ†āŠĶેāŠķ āŠķેāŠē āŠ…āŠĻુāŠ•āŠ°āŠĢ āŠ•āŠ°āŠĩા āŠŪાāŠŸે āŠ°āŠšાāŠŊેāŠē āŠ›ે. There is a GCC port for Cygwin. āŠĪ્āŠŊાં Cygwin āŠŪાāŠŸે GCC āŠĻે āŠŠોāŠ°્āŠŸ āŠ›ે.
You can get Visual C++ 2008 from here āŠĪāŠŪે āŠĩિāŠ્āŠŊુāŠ…āŠē C + + āŠĨી 2008 āŠŪેāŠģāŠĩી āŠķāŠ•ો āŠ›ો āŠ…āŠđીં
You can also still get Visual C++ 2005 from here . āŠŠāŠĢ āŠĪāŠŪે āŠđāŠœુ āŠŠāŠĢ āŠŪેāŠģāŠĩી āŠķāŠ•ો āŠ›ો āŠĩિāŠ્āŠŊુāŠ…āŠē C + + 2005 āŠ…āŠđીં .

Support for other compilers āŠ…āŠĻ્āŠŊ āŠ•āŠŪ્āŠŠાāŠ‡āŠēāŠ°ોāŠĻો āŠŪાāŠŸે āŠ†āŠ§ાāŠ°

As previously stated, it is possible to develop an operating system using other compilers. āŠœેāŠŪ āŠ…āŠ—ાāŠ‰ āŠœāŠĢાāŠĩ્āŠŊું āŠđāŠĪું āŠ•ે, āŠĪે āŠķāŠ•્āŠŊ āŠ›ે āŠ“āŠŠāŠ°ેāŠŸિંāŠ— āŠ…āŠĻ્āŠŊ āŠ•āŠŪ્āŠŠાāŠ‡āŠēāŠ°ોāŠĻો āŠŪāŠĶāŠĶāŠĨી āŠļિāŠļ્āŠŸāŠŪ āŠ›ે. While my primary compiler of use will be Visual C++, I will explain on how to setup the working environments so that you will be able to use your favorite compiler. āŠœ્āŠŊાāŠ°ે āŠŪાāŠ°ી āŠ‰āŠŠāŠŊોāŠ— āŠŠ્āŠ°ાāŠĨāŠŪિāŠ• āŠ•āŠŪ્āŠŠાāŠˆāŠēāŠ° āŠĩિāŠ્āŠŊુāŠ…āŠē āŠ†āŠĩāŠķે C + +, āŠđું āŠ•ેāŠĩી āŠ°ીāŠĪે āŠ•ાāŠŪ āŠŠāŠ°્āŠŊાāŠĩāŠ°āŠĢોāŠŪાં āŠļુāŠŊોāŠœāŠĻ āŠŪાāŠŸે āŠ•ે āŠœેāŠĨી āŠĪāŠŪે āŠĪāŠŪાāŠ°ા āŠŪāŠĻāŠ—āŠŪāŠĪા āŠ•āŠŪ્āŠŠાāŠˆāŠēāŠ° āŠĩાāŠŠāŠ°āŠĩા āŠŪાāŠŸે āŠļāŠŪāŠ°્āŠĨ āŠđāŠķો āŠŠāŠ° āŠļāŠŪāŠœાāŠĩāŠķે.
Currently, I plan on describing on setting up the environments for: āŠđાāŠēāŠŪાં, āŠđું āŠļુāŠŊોāŠœિāŠĪ āŠŪાāŠŸે āŠŠāŠ°્āŠŊાāŠĩāŠ°āŠĢોāŠŪાં āŠŠāŠ° āŠĩāŠ°્āŠĢāŠĻ āŠŊોāŠœāŠĻા:
  • DJGPP DJGPP
  • Microsoft Visual Studio 2005 āŠŪાāŠ‡āŠ•્āŠ°ોāŠļોāŠŦ્āŠŸ āŠĩિāŠ્āŠŊુāŠ…āŠē āŠļ્āŠŸુāŠĄિāŠŊો 2005
  • GCC GCC
  • I will also try to support the following compilers, if possible: āŠđું āŠŠāŠĢ āŠĻીāŠšેāŠĻા āŠ•āŠŪ્āŠŠાāŠ‡āŠēāŠ°ોāŠĻો āŠ†āŠ§ાāŠ° āŠŠ્āŠ°āŠŊાāŠļ āŠ•āŠ°āŠķે, āŠœો āŠķāŠ•્āŠŊ āŠđોāŠŊ:
  • Mingw Mingw
  • Pelles C Pelles āŠļી
If you would like to add more to this list, please contact me . āŠœો āŠĪāŠŪે āŠ† āŠŊાāŠĶીāŠŪાં āŠĩāŠ§ુ āŠ‰āŠŪેāŠ°āŠĩા āŠŪાંāŠ—ો āŠ›ો, āŠĪો āŠ•ૃāŠŠા āŠ•āŠ°ીāŠĻે āŠŪāŠĻે āŠļંāŠŠāŠ°્āŠ• .

Copying the Boot Loader āŠŽુāŠŸ āŠēોāŠĄāŠ° āŠ•ૉāŠŠિ

The bootloader is a pure binary program that is stored in a single 512 byte sector. āŠŽુāŠŸāŠēોāŠĄāŠ° āŠķુāŠĶ્āŠ§ āŠŽાāŠˆāŠĻāŠ°ી āŠ•ાāŠ°્āŠŊāŠ•્āŠ°āŠŪ āŠ›ે āŠ•ે āŠœે āŠāŠ• 512 āŠŽાāŠˆāŠŸ āŠ•્āŠ·ેāŠĪ્āŠ°āŠŪાં āŠļંāŠ—્āŠ°āŠđ āŠ›ે. It is a very important program as it is impossible to create an OS without it. āŠĪે āŠ–ૂāŠŽ āŠŪāŠđāŠĪ્āŠĩāŠĻું āŠ•ાāŠ°્āŠŊāŠ•્āŠ°āŠŪ āŠ›ે, āŠ•ાāŠ°āŠĢ āŠ•ે āŠĪે āŠ…āŠķāŠ•્āŠŊ āŠ›ે āŠĪે āŠĩāŠ—āŠ° āŠ“āŠāŠļ āŠŽāŠĻાāŠĩો. It is the very first program of your OS that is loaded directly by the BIOS, and executed directly by the processor. āŠĪે āŠĪāŠŪાāŠ°ા āŠ“āŠāŠļ āŠ–ૂāŠŽ āŠœ āŠŠ્āŠ°āŠĨāŠŪ āŠ•ાāŠ°્āŠŊāŠ•્āŠ°āŠŪ āŠ›ે āŠ•ે āŠœે āŠļીāŠ§ા BIOS āŠĶ્āŠĩાāŠ°ા āŠēાāŠĩāŠĩાāŠŪાં āŠ†āŠĩે āŠ›ે, āŠ…āŠĻે āŠŠ્āŠ°ોāŠļેāŠļāŠ° āŠĶ્āŠĩાāŠ°ા āŠļીāŠ§ી āŠšāŠēાāŠĩāŠĩાāŠŪાં āŠ†āŠĩે āŠ›ે. We can use NASM to assemble the program, but how do we get it on a floppy disk? āŠ…āŠŪે NASM āŠĩાāŠŠāŠ°āŠĩા āŠŪાāŠŸે āŠ•ાāŠ°્āŠŊāŠ•્āŠ°āŠŪ assemble āŠ•āŠ°ી āŠķāŠ•ો āŠ›ો, āŠŠāŠ°ંāŠĪુ āŠ…āŠŪે āŠŦ્āŠēોāŠŠી āŠĄિāŠļ્āŠ• āŠŠāŠ° āŠ•ેāŠĩી āŠ°ીāŠĪે āŠ•āŠ°āŠĩું āŠĪે āŠŪāŠģી āŠķāŠ•ે? We cannot just copy the file. āŠ…āŠŪે āŠđāŠŪāŠĢાં āŠœ āŠŦાāŠˆāŠē āŠĻāŠĨી āŠĻāŠ•āŠē āŠ•āŠ°ી āŠķāŠ•ો āŠ›ો. Instead, we have to overwrite the boot record that Windows places (after formatting the disk) with our bootloader. āŠĪેāŠĻા āŠŽāŠĶāŠēે, āŠ…āŠŪે āŠŽુāŠŸ āŠ°ેāŠ•ોāŠ°્āŠĄ āŠŠāŠ° āŠŦāŠ°ીāŠĨી āŠēāŠ–ી āŠ›ે āŠ•ે āŠ…āŠŪાāŠ°ા āŠŽુāŠŸāŠēોāŠĄāŠ° āŠļાāŠĨે Windows āŠļ્āŠĨāŠģોāŠ (āŠĄિāŠļ્āŠ• āŠŽંāŠ§ાāŠ°āŠĢ āŠŠāŠ›ી). Why do we need to do this? āŠ…āŠŪે āŠ† āŠĻāŠĨી āŠœāŠ°ૂāŠ° āŠķા āŠŪાāŠŸે āŠ›ે? Remember that the BIOS only looks at the bootsector when finding a bootable disk. āŠŊાāŠĶ āŠ°ાāŠ–ો āŠ•ે āŠœે BIOS āŠ āŠŪાāŠĪ્āŠ° bootsector āŠŠāŠ° āŠĶેāŠ–ાāŠŊ āŠ›ે āŠœ્āŠŊાāŠ°ે āŠŽુāŠŸ āŠ•āŠ°ી āŠķāŠ•ાāŠŊ āŠĪેāŠĩી āŠĄિāŠļ્āŠ• āŠķોāŠ§āŠĩાāŠŪાં. The bootsector, and the "boot record" are both in the same sector! āŠ† bootsector, āŠ…āŠĻે "āŠŽુāŠŸ āŠ°ેāŠ•ોāŠ°્āŠĄ" āŠāŠ• āŠœ āŠ•્āŠ·ેāŠĪ્āŠ°āŠŪાં āŠŽંāŠĻે āŠđોāŠŊ āŠ›ે! Hence, we have to overwrite it. āŠĪેāŠĨી, āŠ…āŠŪે āŠĪેāŠĻે āŠŦāŠ°ીāŠĨી āŠēāŠ–ી āŠ›ે.
There are alot of ways we can do this. āŠĪ્āŠŊાં āŠ°ીāŠĪે āŠ…āŠŪે āŠ† āŠ•āŠ°ી āŠķāŠ•ો āŠ›ો āŠ˜āŠĢા āŠ›ે. Here, I will present two. āŠ…āŠđીં, āŠđું āŠŽે āŠ°āŠœૂ āŠ•āŠ°āŠķે. If you are unable to get one method working on your system, our readers may try the other method. āŠœો āŠĪāŠŪે āŠĪāŠŪાāŠ°ી āŠļિāŠļ્āŠŸāŠŪ āŠŠāŠ° āŠ•ાāŠŪ āŠŠāŠĶ્āŠ§āŠĪિ āŠŪāŠģી āŠ…āŠļāŠŪāŠ°્āŠĨ āŠđોāŠŊ āŠ›ે, āŠ…āŠŪાāŠ°ા āŠĩાāŠšāŠ•ોāŠĻે āŠ…āŠĻ્āŠŊ āŠŠāŠĶ્āŠ§āŠĪિ āŠŠ્āŠ°āŠŊાāŠļ āŠ•āŠ°ી āŠķāŠ•ે āŠ›ે.
Warning: Do Not attempt to play with the following software until I explain how to use it. āŠšેāŠĪāŠĩāŠĢી: āŠĻીāŠšેāŠĻા āŠļોāŠŦ્āŠŸāŠĩેāŠ° āŠļાāŠĨે āŠ°āŠŪāŠĩા āŠĪ્āŠŊાં āŠļુāŠ§ી āŠđું āŠ•ેāŠĩી āŠ°ીāŠĪે āŠĪેāŠĻો āŠ‰āŠŠāŠŊોāŠ— āŠ•āŠ°āŠĩાāŠĻો āŠŠ્āŠ°āŠŊાāŠļ āŠ•āŠ°āŠķો āŠĻāŠđિં. Using this oftware incorrectly can corrupt the data on your disk or make your PC unable to boot. āŠ† oftware āŠŪāŠĶāŠĶāŠĨી āŠ…āŠŊોāŠ—્āŠŊ āŠ°ીāŠĪે āŠĪāŠŪાāŠ°ા āŠĄિāŠļ્āŠ• āŠŠāŠ° āŠŪાāŠđિāŠĪી āŠ­્āŠ°āŠ·્āŠŸ āŠ…āŠĨāŠĩા āŠĪāŠŪાāŠ°ા āŠŠીāŠļી āŠŽુāŠŸ āŠ•āŠ°āŠĩા āŠŪાāŠŸે āŠ…āŠļāŠŪāŠ°્āŠĨ āŠŽāŠĻાāŠĩી āŠķāŠ•ે āŠ›ે.

PartCopy - Low Level Disk Copier āŠĻિāŠŪ્āŠĻ āŠļ્āŠĪāŠ° āŠĄિāŠļ્āŠ• āŠĻāŠ•āŠē āŠŽāŠĻાāŠĩāŠĻાāŠ° - PartCopy

PartCopy allows the copying of sectors from one drive to another. PartCopy āŠāŠ• āŠĄ્āŠ°ાāŠˆāŠĩ āŠŽીāŠœી āŠ•્āŠ·ેāŠĪ્āŠ°ોāŠŪાં āŠĨāŠŊેāŠēા āŠĻāŠ•āŠē āŠŠāŠ°āŠĩાāŠĻāŠ—ી āŠ†āŠŠે āŠ›ે. PartCopy stands for "Partial copy". PartCopy "āŠ†ંāŠķિāŠ• āŠĻāŠ•āŠē" āŠŪાāŠŸે āŠ°āŠđે āŠ›ે. Its function is to copy a certain number of sectors from one location to another, to and from a specific address. āŠĪેāŠĻી āŠ•ાāŠŪ āŠ•āŠ°āŠĩા āŠŪાāŠŸે āŠāŠ• āŠļ્āŠĨાāŠĻ āŠŽીāŠœી āŠ•્āŠ·ેāŠĪ્āŠ°ોāŠŪાં āŠšોāŠ•્āŠ•āŠļ āŠĻંāŠŽāŠ°, āŠ…āŠĻે āŠšોāŠ•્āŠ•āŠļ āŠļāŠ°āŠĻાāŠŪું āŠŪાંāŠĨી āŠĻāŠ•āŠē āŠđોāŠŊ āŠ›ે.
You can download it from here . āŠĪāŠŪે āŠĪે āŠĄાāŠ‰āŠĻāŠēોāŠĄ āŠ•āŠ°ી āŠķāŠ•ો āŠ›ો āŠ…āŠđીં .

Windows DEBUG Command Windows āŠĄિāŠŽāŠ— āŠ†āŠĶેāŠķ

Windows provides a small command line debugger that may be used through the command line. Windows āŠĻાāŠĻા āŠ†āŠĶેāŠķ āŠĩાāŠ•્āŠŊ āŠĄીāŠŽāŠ—āŠ° āŠ•ે āŠ†āŠĶેāŠķ āŠĩાāŠ•્āŠŊ āŠŪાāŠ°āŠŦāŠĪે āŠĩાāŠŠāŠ°ી āŠķāŠ•ાāŠķે āŠŠૂāŠ°ી āŠŠાāŠĄે āŠ›ે. There are quite a bit of different things that we can do with this software, but all we need it to do is copy our boot loader to the first 512 bytes on disk. āŠĪ્āŠŊાં āŠĪāŠĶ્āŠĶāŠĻ āŠ…āŠēāŠ— āŠĩāŠļ્āŠĪુāŠ“ āŠ›ે āŠ•ે āŠœે āŠ†āŠŠāŠĢે āŠ† āŠļોāŠŦ્āŠŸāŠĩેāŠ° āŠļાāŠĨે āŠ•āŠ°ી āŠķāŠ•ો āŠ›ો āŠāŠ• āŠŽીāŠŸ āŠđોāŠŊ āŠ›ે, āŠŠāŠ°ંāŠĪુ āŠŽāŠ§ા āŠ…āŠŪે āŠĪેāŠĻે āŠœāŠ°ૂāŠ° āŠ›ે āŠĄિāŠļ્āŠ• āŠŠāŠ° āŠŠ્āŠ°āŠĨāŠŪ 512 āŠŽાāŠ‡āŠŸ્āŠļ āŠ…āŠŪાāŠ°ા āŠŽુāŠŸ āŠēોāŠĄāŠ° āŠĻāŠ•āŠē āŠ•āŠ°ો. Go to the command prompt, and type debug . āŠŠ્āŠ°ોāŠŪ્āŠŠ્āŠŸ āŠ†āŠĶેāŠķ āŠŠāŠ° āŠœાāŠ“, āŠ…āŠĻે āŠŠ્āŠ°āŠ•ાāŠ° āŠĄિāŠŽāŠ—. You will be greeted by a little prompt (-): (-) āŠĪāŠŪે āŠĨોāŠĄી āŠŠ્āŠ°ોāŠŪ્āŠŠ્āŠŸ āŠĶ્āŠĩાāŠ°ા āŠ…āŠ­િāŠĩાāŠĶāŠĻ āŠ•āŠ°āŠĩાāŠŪાં āŠ†āŠĩāŠķે:
C:\Documents and Settings\Michael>debug C: āŠĶāŠļ્āŠĪાāŠĩેāŠœો \ āŠ…āŠĻે āŠļેāŠŸિંāŠ—્āŠļ \ āŠŪાāŠˆāŠ•āŠē> āŠĄિāŠŽāŠ—
- - 
Here is where you enter your commands. h is the help command, q is the quit command. āŠ…ંāŠđિ āŠ›ે āŠ•ે āŠœ્āŠŊાં āŠĪāŠŪે āŠĪāŠŪાāŠ°ા āŠ†āŠĶેāŠķો āŠĶાāŠ–āŠē āŠ•āŠ°ો h. āŠŪāŠĶāŠĶ āŠ†āŠĶેāŠķ, q āŠ›ોāŠĄો āŠ†āŠĶેāŠķ āŠ›ે. The w (write) command is the most important for us. āŠ† āŠĩાāŠ‡āŠĄ āŠ†āŠĶેāŠķ (āŠēāŠ–āŠĩા) āŠ āŠļૌāŠĨી āŠ…āŠŪાāŠ°ા āŠŪાāŠŸે āŠŪāŠđāŠĪ્āŠĩāŠĻી āŠ›ે. You can have debug load a file into memory such as, say, our boot loader: āŠĪāŠŪે āŠœેāŠŪ āŠ•āŠđે āŠ›ે, āŠ…āŠŪાāŠ°ા āŠŽુāŠŸ āŠēોāŠĄāŠ° āŠĪāŠ°ીāŠ•ે āŠŪેāŠŪāŠ°ીāŠŪાં āŠŦાāŠˆāŠē āŠēોāŠĄ āŠĄિāŠŽāŠ— āŠ•āŠ°ી āŠķāŠ•ાāŠŊ āŠ›ે:
C:\Documents and Settings\Michael>debug boot_loader.bin C: āŠĶāŠļ્āŠĪાāŠĩેāŠœો \ āŠ…āŠĻે āŠļેāŠŸિંāŠ—્āŠļ \ āŠŪાāŠˆāŠ•āŠē> āŠĄિāŠŽāŠ— boot_loader.bin
- - 
This allows us to perform operations on it. āŠ† āŠ…āŠŪāŠĻે āŠĪેāŠĻી āŠŠāŠ° āŠ•ાāŠŪāŠ—ીāŠ°ી āŠ•āŠ°āŠĩા āŠŪાāŠŸે āŠŠāŠ°āŠĩાāŠĻāŠ—ી āŠ†āŠŠે āŠ›ે. (We can also use debugs L (Load) command to load the file is we wanted to). (āŠ…āŠŪે āŠŠāŠĢ debugs (āŠēોāŠĄ) āŠāŠē āŠ†āŠĶેāŠķ āŠĩાāŠŠāŠ°ો āŠŦાāŠˆāŠē āŠēોāŠĄ āŠ•āŠ°ી āŠķāŠ•ો āŠ›ો āŠ…āŠŪે āŠ‡āŠš્āŠ›āŠĪા āŠđોāŠŊ āŠ›ે). In the above example, boot_loader.bin will be loaded at address 0x100. āŠ‰āŠŠāŠ°āŠĻા āŠ‰āŠĶાāŠđāŠ°āŠĢāŠŪાં, boot_loader.bin āŠļāŠ°āŠĻાāŠŪું 0x100 āŠŠāŠ° āŠēોāŠĄ āŠ•āŠ°āŠĩાāŠŪાં āŠ†āŠĩāŠķે. To write the file to the first sector of our disk, we need to use the W (Write) command which takes the following form: āŠ…āŠŪાāŠ°ી āŠĄિāŠļ્āŠ• āŠŠ્āŠ°āŠĨāŠŪ āŠļેāŠ•્āŠŸāŠ° āŠŪાāŠŸે āŠŦાāŠˆāŠē āŠēāŠ–ો, āŠ…āŠŪે āŠĄāŠŽāŠē્āŠŊુ (āŠēāŠ–ો) āŠ†āŠĶેāŠķ āŠ•ે āŠœે āŠĻીāŠšેāŠĻો āŠŦોāŠ°્āŠŪ āŠēે āŠ‰āŠŠāŠŊોāŠ— āŠœāŠ°ૂāŠ° āŠŠāŠĄāŠķે:
W [address] [drive] [firstsector] [number] āŠĄāŠŽāŠē્āŠŊુ āŠļāŠ°āŠĻાāŠŪું [] [āŠĄ્āŠ°ાāŠˆāŠĩ] [firstsector] [āŠĻંāŠŽāŠ°] 
Okay... āŠ ીāŠ• āŠ›ે ... so let's see: The file is at address 0x100. āŠšાāŠēો āŠœુāŠ“: āŠŦાāŠˆāŠē āŠļāŠ°āŠĻાāŠŪું 0x100 āŠ›ે. We want the floppy drive (Drive 0). āŠ…āŠŪે āŠŦ્āŠēોāŠŠી āŠĄ્āŠ°ાāŠˆāŠĩ (0 āŠĄ્āŠ°ાāŠˆāŠĩ) āŠ•āŠ°āŠĩા āŠŪાંāŠ—ો āŠ›ો. The first sector is the first sector on the disk (sector 0) and the number of sectors is ehm... āŠŠ્āŠ°āŠĨāŠŪ āŠļેāŠ•્āŠŸāŠ° āŠĄિāŠļ્āŠ• āŠŠāŠ° āŠŠ્āŠ°āŠĨāŠŪ āŠļેāŠ•્āŠŸāŠ° (0 āŠļેāŠ•્āŠŸāŠ°) āŠ›ે āŠ…āŠĻે āŠļેāŠ•્āŠŸāŠ°ોāŠĻી āŠļંāŠ–્āŠŊા ehm āŠ›ે ... 1. 1. Putting this together, this is our command to write boot_loader.bin to the boot sector of a floppy: āŠ† āŠļાāŠĨે āŠŠુāŠŸિંāŠ—, āŠ† āŠ…āŠŪાāŠ°ી āŠŦ્āŠēોāŠŠી, āŠŽુāŠŸ āŠļેāŠ•્āŠŸāŠ° āŠŪાāŠŸે boot_loader.bin āŠēāŠ–āŠĩા āŠ†āŠĶેāŠķ āŠ›ે:
C:\Documents and Settings\Michael>debug boot_loader.bin C: āŠĶāŠļ્āŠĪાāŠĩેāŠœો \ āŠ…āŠĻે āŠļેāŠŸિંāŠ—્āŠļ \ āŠŪાāŠˆāŠ•āŠē> āŠĄિāŠŽāŠ— boot_loader.bin
-w 100 0 0 1 100 0 1 0-āŠĩાāŠ‡āŠĄ
-q -Q 
If you would like to learn more about this command, take a look at this tutorial . āŠœો āŠĪāŠŪે āŠ† āŠ†āŠĶેāŠķ āŠĩિāŠķે āŠĩāŠ§ુ āŠœાāŠĢāŠĩા āŠˆāŠš્āŠ›ો, āŠĪો āŠāŠ• āŠœુāŠ“ āŠ† āŠŸ્āŠŊુāŠŸોāŠ°ીāŠŊāŠē .

VFD - Virtual Floppy Drive āŠĩāŠ°્āŠš્āŠŊુāŠ…āŠē āŠŦ્āŠēોāŠŠી āŠĄ્āŠ°ાāŠ‡āŠĩ - VFD

Weather you have a floppy drive or not, this program is very useful. āŠđāŠĩાāŠŪાāŠĻ āŠĪāŠŪે āŠŦ્āŠēોāŠŠી āŠĄ્āŠ°ાāŠ‡āŠĩ āŠ…āŠĨāŠĩા āŠĻāŠđિં āŠđોāŠŊ, āŠĪો āŠ† āŠ•ાāŠ°્āŠŊāŠ•્āŠ°āŠŪ āŠ–ૂāŠŽ āŠ‰āŠŠāŠŊોāŠ—ી āŠ›ે. It can simulate a real floppy drive from a stored floppy image, or even in RAM. āŠĪે āŠļંāŠ—્āŠ°āŠđાāŠŊેāŠē āŠŦ્āŠēોāŠŠી āŠ‡āŠŪેāŠœ āŠŪાંāŠĨી, āŠ…āŠĨāŠĩા RAM āŠ āŠĩાāŠļ્āŠĪāŠĩિāŠ• āŠŦ્āŠēોāŠŠી āŠĄ્āŠ°ાāŠ‡āŠĩ āŠŽāŠĻાāŠĩāŠŸી āŠ•āŠ°ી āŠķāŠ•ો āŠ›ો. This program creates a virtual floppy image, allows formatting, and copying files (Such as, your kernel perhaps?) directly using Windows Explorer. āŠ† āŠ•ાāŠ°્āŠŊāŠ•્āŠ°āŠŪ āŠĩāŠ°્āŠš્āŠŊુāŠ…āŠē āŠŦ્āŠēોāŠŠી āŠˆāŠŪેāŠœ āŠŽāŠĻાāŠĩે āŠ›ે, āŠŽંāŠ§ાāŠ°āŠĢ āŠŪાāŠŸે āŠŠāŠ°āŠĩાāŠĻāŠ—ી āŠ†āŠŠે āŠ›ે, āŠ…āŠĻે āŠĪેāŠĻી āŠĻāŠ•āŠē āŠ•āŠ°āŠĩાāŠĻું (āŠœેāŠŪ āŠ•ે, āŠĪāŠŪાāŠ°ી āŠ•āŠ°્āŠĻāŠē āŠ•āŠĶાāŠš?) āŠŦાāŠˆāŠēો āŠļીāŠ§ી Windows Explorer āŠĩાāŠŠāŠ°ી āŠ°āŠđ્āŠŊા āŠ›ે.
You can download it from here . āŠĪāŠŪે āŠĪે āŠĄાāŠ‰āŠĻāŠēોāŠĄ āŠ•āŠ°ી āŠķāŠ•ો āŠ›ો āŠ…āŠđીં .

Bochs Emulator - PC Emulator and Debugger Bochs āŠˆāŠŪ્āŠŊુāŠēેāŠŸāŠ° - āŠŠીāŠļી āŠˆāŠŪ્āŠŊુāŠēેāŠŸāŠ° āŠ…āŠĻે āŠĄિāŠŽāŠ—āŠ°

You pop in a floppy disk into a computer, in hopes that it works. āŠĪāŠŪે āŠ•ોāŠŪ્āŠŠ્āŠŊુāŠŸāŠ° āŠāŠ• āŠŦ્āŠēોāŠŠી āŠĄિāŠļ્āŠ• āŠŪાં āŠ†āŠķા āŠ›ે āŠ•ે āŠĪે āŠ•ાāŠŪ āŠ•āŠ°ે āŠ›ે, āŠŠૉāŠŠ. You boot your computer and look in aw at your greatest creation! āŠĪāŠŪે āŠĪāŠŪાāŠ°ા āŠ•āŠŪ્āŠŠ્āŠŊુāŠŸāŠ° āŠŽુāŠŸ āŠ•āŠ°ો āŠ…āŠĻે āŠĪāŠŪાāŠ°ી āŠļૌāŠĨી āŠĩāŠ§ુ āŠŽāŠĻાāŠĩāŠŸ āŠŠāŠ° āŠ•ંāŠ‡āŠ• āŠ­ુāŠē āŠĨāŠ‡ āŠœુāŠ“! ...Until your floppy motor dies out because you forgot to send the command to the controller in your bootloader. ... āŠĪ્āŠŊાં āŠļુāŠ§ી āŠĪāŠŪાāŠ°ા āŠŦ્āŠēોāŠŠી āŠŪોāŠŸāŠ° āŠ†āŠ‰āŠŸ āŠŪૃāŠĪ્āŠŊુ āŠŠાāŠŪે āŠ›ે āŠ•ાāŠ°āŠĢ āŠ•ે āŠĪāŠŪે āŠĪāŠŪાāŠ°ા āŠŽુāŠŸāŠēોāŠĄāŠ° āŠŪાં āŠĻિāŠŊંāŠĪ્āŠ°āŠ• āŠ†āŠĶેāŠķ āŠŪોāŠ•āŠēāŠĩા āŠ­ૂāŠēી āŠ—āŠŊા āŠ›ો.
When working with low level code, it is possible to destroy hardware if you are not careful. āŠœ્āŠŊાāŠ°ે āŠ“āŠ›ી āŠļ્āŠĪāŠ° āŠ•ોāŠĄ āŠļાāŠĨે āŠ•ાāŠŪ āŠ•āŠ°āŠĩાāŠĻું āŠķāŠ•્āŠŊ āŠ›ે āŠđાāŠ°્āŠĄāŠĩેāŠ° āŠĻાāŠķ āŠœો āŠĪāŠŪે āŠ•ાāŠģāŠœી āŠĻāŠĨી. Also, to test your OS, you will need to reboot your computers hundreds of times during development. āŠ‰āŠŠāŠ°ાંāŠĪ, āŠĪāŠŪાāŠ°ી OS āŠŠāŠ°ીāŠ•્āŠ·āŠĢ, āŠĪો āŠĪāŠŪે āŠĩિāŠ•ાāŠļ āŠĶāŠ°āŠŪ્āŠŊાāŠĻ āŠĪāŠŪાāŠ°ા āŠĩāŠ–āŠĪ āŠ•āŠŪ્āŠŠ્āŠŊુāŠŸāŠ° āŠļેંāŠ•āŠĄો āŠ°ીāŠŽુāŠŸ āŠ•āŠ°āŠĩાāŠĻી āŠœāŠ°ૂāŠ° āŠ°āŠđેāŠķે.
Also, what do you do if the computer just reboots? āŠ‰āŠŠāŠ°ાંāŠĪ, āŠĪāŠŪે āŠķું āŠ•āŠŪ્āŠŠ્āŠŊૂāŠŸāŠ° āŠŪાāŠĪ્āŠ° āŠ°િāŠŽુāŠŸ āŠœો āŠ•āŠ°āŠĩું? What do you do if your Kernel crashes? āŠĪāŠŪે āŠķું āŠĪāŠŪાāŠ°ી āŠ•āŠ°્āŠĻāŠē āŠ•્āŠ°ેāŠķ āŠĪો āŠķું āŠ•āŠ°āŠĩું? Because there is no debugger for your OS, it is virtually impossible to debug. āŠ•ાāŠ°āŠĢ āŠ•ે āŠĪ્āŠŊાં āŠĪāŠŪાāŠ°ા OS āŠŪાāŠŸે āŠ•ોāŠˆ āŠĄીāŠŽāŠ—āŠ° āŠ›ે, āŠĪે āŠĩāŠ°્āŠš્āŠŊુāŠ…āŠē āŠ…āŠķāŠ•્āŠŊ āŠ›ે āŠĄિāŠŽāŠ—.
The solution? āŠ‰āŠ•ેāŠē? A PC Emulator. āŠāŠ• āŠŠીāŠļી āŠ…āŠĻુāŠ•āŠ°āŠĢ. There are plenty available, two of them being VMWare and Bochs Emulator. āŠĪ્āŠŊાં āŠŠુāŠ·્āŠ•āŠģ āŠ‰āŠŠāŠēāŠŽ્āŠ§ āŠ›ે, āŠŽે āŠĪેāŠŪāŠĻે VMware āŠ…āŠĻે Bochs āŠˆāŠŪ્āŠŊુāŠēેāŠŸāŠ° āŠ°āŠđી āŠ›ે. I will be using Bochs and Microsoft Virtual PC for testing. āŠđું āŠšāŠ•ાāŠļāŠĢી āŠŪાāŠŸે Bochs āŠ…āŠĻે Microsoft āŠĩāŠ°્āŠš્āŠŊુāŠ…āŠē āŠŠીāŠļી āŠ‰āŠŠāŠŊોāŠ— āŠ•āŠ°ીāŠĻે āŠ•āŠ°āŠķે.
You can download Bochs from here . āŠĪāŠŪે Bochs āŠĄાāŠ‰āŠĻāŠēોāŠĄ āŠ•āŠ°ી āŠķāŠ•ો āŠ›ો āŠ…āŠđીં .

Thats all, fokes āŠŽāŠ§ા fokes, Thats

You do not need to know how to use the software I listed. āŠĪāŠŪે āŠœાāŠĢāŠĩા āŠļોāŠŦ્āŠŸāŠĩેāŠ° āŠđું āŠŊાāŠĶી āŠĩાāŠŠāŠ°āŠĩા āŠŪાāŠŸે āŠœāŠ°ૂāŠ° āŠĻāŠĨી. I will explain how to use them as we start using them. āŠđું āŠļāŠŪāŠœાāŠĩāŠķે āŠ•ેāŠĩી āŠ°ીāŠĪે āŠĪેāŠĻે āŠĩાāŠŠāŠ°āŠĩું āŠĪે āŠ†āŠŠāŠĢે āŠĪેāŠ“āŠĻી āŠŪāŠĶāŠĶāŠĨી āŠķāŠ°ૂ āŠ•āŠ°ો.
If you would like to run your system on a real computer that does not have a floppy drive, it is still possible to boot from CD even though it is a floppy image. āŠœો āŠĪāŠŪે āŠĩાāŠļ્āŠĪāŠĩિāŠ• āŠ•ોāŠŪ્āŠŠ્āŠŊુāŠŸāŠ° āŠ•ે āŠœે āŠŦ્āŠēોāŠŠી āŠĄ્āŠ°ાāŠ‡āŠĩ āŠĻāŠĨી āŠŠāŠ° āŠĪāŠŪાāŠ°ી āŠļિāŠļ્āŠŸāŠŪ āŠšāŠēાāŠĩāŠĩા āŠˆāŠš્āŠ›ો, āŠĪે āŠđāŠœુ āŠŠāŠĢ āŠķāŠ•્āŠŊ āŠ›ે CD āŠŪાંāŠĨી āŠŽુāŠŸ āŠ­āŠēે āŠĪે āŠŦ્āŠēોāŠŠી āŠ›āŠŽી āŠđોāŠŊ āŠ›ે. This is done through Floppy Emulation that which most of BIOSs support. āŠ† āŠŦ્āŠēોāŠŠી āŠˆāŠŪ્āŠŊુāŠēેāŠķāŠĻ āŠŪાāŠ°āŠŦāŠĪે āŠĨાāŠŊ āŠ›ે āŠ•ે āŠœે BIOSs āŠ†āŠ§ાāŠ° āŠŪોāŠŸા āŠ­ાāŠ—āŠĻા.
Simply get a CD burning software (I personally use MagicISO) that can create a bootable ISO from a floppy image. āŠ–ાāŠēી āŠāŠ• CD āŠŽāŠĻાāŠĩāŠĻાāŠ° (āŠđું āŠĩ્āŠŊāŠ•્āŠĪિāŠ—āŠĪ MagicISO āŠĩાāŠŠāŠ°ો) āŠļોāŠŦ્āŠŸāŠĩેāŠ° āŠ•ે āŠœે āŠŦ્āŠēોāŠŠી āŠ‡āŠŪેāŠœ āŠŪાંāŠĨી āŠŽુāŠŸ āŠ•āŠ°ી āŠķāŠ•ાāŠŊ āŠĪેāŠĩી ISO āŠŽāŠĻાāŠĩી āŠķāŠ•ો āŠ›ો. Then, simply burn the ISO image to a CD and it should work. āŠŠāŠ›ી, āŠ–ાāŠēી CD āŠŪાāŠŸે ISO āŠ‡āŠŪેāŠœ āŠŽāŠ°્āŠĻ āŠ…āŠĻે āŠĪે āŠ•ાāŠŪ āŠ•āŠ°āŠĩુ āŠœોāŠ‡āŠ.

The Build Process āŠŽિāŠē્āŠĄ āŠŠ્āŠ°āŠ•્āŠ°િāŠŊા

There are a lot of tools listed above. āŠĪ્āŠŊાં āŠ‰āŠŠāŠ° āŠŊાāŠĶી āŠĨāŠŊેāŠē āŠļાāŠ§āŠĻો āŠ˜āŠĢું āŠ›ે. To better understand how they can be useful, we should take a look at the entire build process of the OS. āŠĩāŠ§ુ āŠļાāŠ°ી āŠ°ીāŠĪે āŠļāŠŪāŠœી āŠĪેāŠ“ āŠ•ેāŠĩી āŠ°ીāŠĪે āŠ‰āŠŠāŠŊોāŠ—ી āŠĨāŠ‡ āŠķāŠ•ે āŠ›ે, āŠ…āŠŪે OS āŠĻી āŠļāŠŪāŠ—્āŠ° āŠŠ્āŠ°āŠ•્āŠ°િāŠŊા āŠŽિāŠē્āŠĄ āŠŠāŠ° āŠœોāŠĩા āŠēેāŠĩી āŠœોāŠˆāŠ.
  • Setting everything up āŠŽāŠ§ું āŠļુāŠŊોāŠœિāŠĪ āŠ•āŠ°ી āŠ°āŠđ્āŠŊા āŠ›ે āŠ‰āŠŠāŠ°
    1. Use VFD to create and format a virtual floppy image to use. āŠ‰āŠŠāŠŊોāŠ— āŠ•āŠ°āŠĩા āŠ…āŠĻે āŠŽāŠĻાāŠĩāŠĩા āŠŪાāŠŸે āŠĩāŠ°્āŠš્āŠŊુāŠ…āŠē āŠŦ્āŠēોāŠŠી āŠ‰āŠŠāŠŊોāŠ— image āŠŽંāŠ§ાāŠ°āŠĢ VFD.
    2. Set up Bochs Emulator to boot from the floppy image. āŠ…āŠŠ Bochs āŠˆāŠŪ્āŠŊુāŠēેāŠŸāŠ° āŠļેāŠŸ āŠ•āŠ°āŠĩા āŠŪાāŠŸે āŠŦ્āŠēોāŠŠી āŠ‡āŠŪેāŠœ āŠŪાંāŠĨી āŠŽુāŠŸ āŠ•āŠ°ો.
  • The bootloader āŠŽુāŠŸāŠēોāŠĄāŠ°
    1. Assemble the bootloader with NASM to create a flat binary program. NASM āŠļાāŠĨે āŠŽુāŠŸāŠēોāŠĄāŠ° Assemble āŠŪાāŠŸે āŠŦ્āŠēેāŠŸ āŠŽાāŠˆāŠĻāŠ°ી āŠ•ાāŠ°્āŠŊāŠ•્āŠ°āŠŪ āŠŽāŠĻાāŠĩો.
    2. Use PartCopy or the DEBUG command to copy the bootloader to the bootsector of the virtual floppy image. PartCopy āŠ…āŠĨāŠĩા āŠĄિāŠŽāŠ— āŠ†āŠĶેāŠķ āŠĩાāŠŠāŠ°ો āŠĩāŠ°્āŠš્āŠŊુāŠ…āŠē āŠŦ્āŠēોāŠŠી āŠ‡āŠŪેāŠœ bootsector āŠŪાāŠŸે āŠŽુāŠŸāŠēોāŠĄāŠ° āŠĻāŠ•āŠē āŠ•āŠ°ો.
  • The Kernel (And basically all other programs) āŠ† āŠ•āŠ°્āŠĻāŠē (āŠ…āŠĻે āŠŪૂāŠģāŠ­ૂāŠĪ āŠ…āŠĻ્āŠŊ āŠŽāŠ§ી āŠ•ાāŠ°્āŠŊāŠ•્āŠ°āŠŪો)
    1. Assembly and/or compile all sources into an object format (Such as ELF or PE) that can be loaded and executed by the boot loader. āŠĩિāŠ§ાāŠĻāŠļāŠ­ા āŠ…āŠĻે / āŠ…āŠĨāŠĩા āŠ“āŠŽ્āŠœેāŠ•્āŠŸ (āŠ† āŠŠ્āŠ°āŠ•ાāŠ°āŠĻા āŠŠિāŠķાāŠš āŠ…āŠĨāŠĩા āŠŠીāŠˆ āŠĪāŠ°ીāŠ•ે) āŠŽંāŠ§ાāŠ°āŠĢāŠŪાં āŠ›ે āŠ•ે āŠœે āŠēોāŠĄ āŠ•āŠ°ી āŠķāŠ•ાāŠŊ āŠŽુāŠŸ āŠēોāŠĄāŠ° āŠĶ્āŠĩાāŠ°ા āŠšāŠēાāŠĩāŠĩાāŠŪાં āŠŪાં āŠĪāŠŪાāŠŪ āŠļ્āŠ°ોāŠĪો āŠ•āŠŪ્āŠŠાāŠ‡āŠē āŠĨાāŠŊ āŠ›ે.
    2. Copy kernel into floppy disk using Windows Explorer. āŠŦ્āŠēોāŠŠી Windows Explorer āŠĻો āŠ‰āŠŠāŠŊોāŠ— āŠ•āŠ°ીāŠĻે āŠĄિāŠļ્āŠ• āŠŪાં āŠĻāŠ•āŠē āŠ•āŠ°ો āŠ•āŠ°્āŠĻāŠē.
  • Test it! āŠĪે āŠŸેāŠļ્āŠŸ!
    1. Using Bochs emulator and debugger, using a real floppy disk, or by using MagicISO to create a bootable CD. Bochs āŠˆāŠŪ્āŠŊુāŠēેāŠŸāŠ° āŠ…āŠĻે āŠĄિāŠŽāŠ—āŠ° āŠŪāŠĶāŠĶāŠĨી, āŠĩાāŠļ્āŠĪāŠĩિāŠ• āŠŦ્āŠēોāŠŠી āŠĄિāŠļ્āŠ• āŠĩાāŠŠāŠ°ી āŠ°āŠđ્āŠŊા āŠđોāŠŊ, āŠ…āŠĨāŠĩા MagicISO āŠŪāŠĶāŠĶāŠĨી āŠŽુāŠŸ āŠ•āŠ°ી āŠķāŠ•ાāŠŊ āŠĪેāŠĩી CD āŠŽāŠĻાāŠĩāŠĩા āŠ›ે.

Until next time āŠ†āŠ—āŠģāŠĻા āŠļāŠŪāŠŊે āŠļુāŠ§ી

Some of the terms and concepts listed here may be new to you. āŠĻિāŠŊāŠŪો āŠ…āŠĻે āŠĩિāŠ­ાāŠĩāŠĻાāŠ“ āŠ…ંāŠđિ āŠŊાāŠĶી āŠĨāŠŊેāŠē āŠ•ેāŠŸāŠēાāŠ• āŠĪāŠŪે āŠĻāŠĩી āŠđોāŠˆ āŠķāŠ•ે āŠ›ે. Do not worry--everything will be explained in the next few articles. āŠšિંāŠĪા āŠĻ āŠ•āŠ°ો - āŠŽāŠ§ું āŠ†āŠ—ાāŠŪી āŠĨોāŠĄા āŠēેāŠ–ો āŠļāŠŪāŠœાāŠĩી āŠķāŠ•ાāŠŊ āŠ›ે.
The purpose of this tutorial is to create a stepping stone for the rest of the series. āŠ† āŠŸ્āŠŊુāŠŸોāŠ°ીāŠŊāŠē āŠđેāŠĪુ āŠŪાāŠŸે āŠ† āŠķ્āŠ°ેāŠĢી āŠŽાāŠ•ીāŠĻા āŠŪાāŠŸે stepping āŠŠāŠĨ્āŠĨāŠ° āŠŽāŠĻાāŠĩી āŠ›ે. It provides a basic introduction, and a listing of the tools we will be using. āŠ† āŠŪૂāŠģāŠ­ૂāŠĪ āŠŠāŠ°િāŠšāŠŊ, āŠ…āŠĻે āŠļાāŠ§āŠĻો āŠ…āŠŪે āŠŪāŠĶāŠĶāŠĨી āŠ†āŠĩāŠķે āŠŊાāŠĶી āŠŠૂāŠ°ી āŠŠાāŠĄે āŠ›ે. I will explain how to use these programs as we need to, so you do not need a tutorial on anything listed here besides what has been listed in the Requirements section. āŠđું āŠ•ેāŠĩી āŠ°ીāŠĪે āŠ† āŠ•ાāŠ°્āŠŊāŠ•્āŠ°āŠŪો āŠĩાāŠŠāŠ°āŠĩા āŠŪાāŠŸે āŠ†āŠŠāŠĢે āŠœāŠ°ૂāŠ° āŠļāŠŪāŠœાāŠĩે āŠ›ે, āŠĪેāŠĨી āŠĪāŠŪે āŠ•ાંāŠ‡ āŠŠāŠ° āŠŸ્āŠŊુāŠŸોāŠ°ીāŠŊāŠē āŠķું āŠœāŠ°ૂāŠ°િāŠŊાāŠĪો āŠĩિāŠ­ાāŠ—āŠŪાં āŠ•āŠ°āŠĩાāŠŪાં āŠ†āŠĩી āŠŊાāŠĶી āŠĨāŠŊેāŠē āŠ›ે āŠ‰āŠŠāŠ°ાંāŠĪ āŠ…ંāŠđિ āŠŊાāŠĶી āŠĨāŠŊેāŠē āŠ•āŠ°āŠĩાāŠĻી āŠœāŠ°ૂāŠ° āŠĻāŠĨી.
We also have taken a look at the building process for developing an operating system. āŠ…āŠŪે āŠŠāŠĢ āŠ“āŠŠāŠ°ેāŠŸિંāŠ— āŠļિāŠļ્āŠŸāŠŪ āŠĩિāŠ•āŠļાāŠĩāŠĩા āŠŪાāŠŸે āŠŽિāŠē્āŠĄિંāŠ— āŠŠ્āŠ°āŠ•્āŠ°િāŠŊા āŠŠāŠ° āŠœોāŠĩા āŠēીāŠ§ો āŠ›ે. For the most part, its fairly simple, however it provides a way to see when the programs listed will be used. āŠļૌāŠĨી āŠĩāŠ§ુ āŠ­ાāŠ— āŠŪાāŠŸે, āŠĪેāŠĻા āŠāŠ•āŠĶāŠŪ āŠļāŠ°āŠģ āŠ›ે, āŠœોāŠ•ે āŠĪે āŠœોāŠĩા āŠŪાāŠŸે āŠœ્āŠŊાāŠ°ે āŠŊાāŠĶી āŠĨāŠŊેāŠē āŠ•ાāŠ°્āŠŊāŠ•્āŠ°āŠŪો āŠŪાāŠŸે āŠĩાāŠŠāŠ°āŠĩાāŠŪાં āŠ†āŠĩāŠķે, āŠŪાāŠ°્āŠ— āŠŠૂāŠ°ો āŠŠાāŠĄે āŠ›ે.
In the next tutorial we are going to go back in time from the first Disk Operating System (DOS) and take a little tour through history. āŠ†āŠ—ાāŠŪી āŠŸ્āŠŊુāŠŸોāŠ°ીāŠŊāŠē āŠ…āŠŪે āŠļāŠŪāŠŊ āŠŠાāŠ›ા āŠŠ્āŠ°āŠĨāŠŪ āŠĄિāŠļ્āŠ• āŠ“āŠŠāŠ°ેāŠŸીંāŠ— āŠļિāŠļ્āŠŸāŠŪ (DOS) āŠ…āŠĻે āŠœાāŠ“ āŠ‡āŠĪિāŠđાāŠļ āŠŪાāŠ°āŠŦāŠĪે āŠ“āŠ›ી āŠŠ્āŠ°āŠĩાāŠļ āŠēāŠ‡ āŠœāŠĩા āŠ›ે. We will also look at some basic OS concepts. āŠ…āŠŪે āŠŠāŠĢ āŠ•ેāŠŸāŠēીāŠ• āŠŪૂāŠģāŠ­ૂāŠĪ āŠ“āŠāŠļ āŠ–્āŠŊાāŠē āŠĪāŠŠાāŠļ āŠ•āŠ°āŠķે.
We will not be using any of the tools listed above just yet, so you do not need to download them just yet. āŠ…āŠŪે āŠŪાāŠĪ્āŠ° āŠđāŠœુ āŠļુāŠ§ી āŠ‰āŠŠāŠ° āŠŊાāŠĶી āŠĨāŠŊેāŠē āŠļાāŠ§āŠĻો āŠ•ોāŠˆāŠŠāŠĢ āŠķāŠ•ાāŠĪી āŠĻāŠĨી āŠĩાāŠŠāŠ°ી āŠ°āŠđ્āŠŊા āŠđોāŠŊ, āŠĪેāŠĨી āŠĪāŠŪે āŠĪેāŠŪāŠĻે āŠŪાāŠĪ્āŠ° āŠđāŠœુ āŠļુāŠ§ી āŠĄાāŠ‰āŠĻāŠēોāŠĄ āŠ•āŠ°āŠĩાāŠĻી āŠœāŠ°ૂāŠ° āŠĻāŠĨી.
Until next time, āŠ†āŠ—āŠģāŠĻા āŠļāŠŪāŠŊે āŠļુāŠ§ી,
~Mike ~ āŠŪાāŠ‡āŠ•
BrokenThorn Entertainment. BrokenThorn āŠŪāŠĻોāŠ°ંāŠœāŠĻ. Currently developing DoE and the Neptune Operating System āŠđાāŠēāŠŪાં āŠĄો āŠ…āŠĻે āŠĩિāŠ•ાāŠļ āŠĻેāŠŠ્āŠš્āŠŊુāŠĻ āŠļંāŠšાāŠēāŠĻ āŠļિāŠļ્āŠŸāŠŪ

Questions or comments? āŠŠ્āŠ°āŠķ્āŠĻો āŠ…āŠĨāŠĩા āŠŸિāŠŠ્āŠŠāŠĢીāŠ“? Feel free to Contact me . āŠŪāŠŦāŠĪ āŠēાāŠ—ે āŠŪāŠĻે āŠļંāŠŠāŠ°્āŠ• .

Would you like to contribute and help improve the articles? āŠĪāŠŪે āŠŦાāŠģો āŠ…āŠĻે āŠēેāŠ–ો āŠļુāŠ§ાāŠ°āŠĩા āŠŪāŠĶāŠĶ āŠŪાંāŠ—ો āŠ›ો? If so, please let me know! āŠœો āŠ†āŠŪ āŠđોāŠŊ, āŠĪો āŠŪāŠđેāŠ°āŠŽાāŠĻી āŠ•āŠ°ીāŠĻે āŠŪāŠĻે āŠ–āŠŽāŠ°!

 
Share:

How Computer Viruses Work




Computer viruses tend to grab our attention. On the one hand, viruses show us how vulnerable we are. A properly engineered virus can have an amazing effect on the worldwide Internet. On the other hand, they show how sophisticated and interconnected human beings have become.

For example, experts estimate that the Mydoom worm infected approximately a quarter-million computers in a single day in January 2004. (Times Online). Back in March 1999, the Melissa virus was so powerful that it forced Microsoft and a number of other very large companies to completely turn off their e-mail systems until the virus could be contained. The ILOVEYOU virus in 2000 had a similarly devastating effect. That's pretty impressive when you consider that the Melissa and ILOVEYOU viruses are incredibly simple.

In this article, we will discuss viruses -- both "traditional" viruses and the newer e-mail viruses -- so that you can learn how they work and also understand how to protect yourself. Viruses in general are on the wane, but occasionally a person finds a new way to create one, and that's when they make the news.

Types of Infection
When you listen to the news, you hear about many different forms of electronic infection. The most common are:

* Viruses - A virus is a small piece of software that piggybacks on real programs. For example, a virus might attach itself to a program such as a spreadsheet program. Each time the spreadsheet program runs, the virus runs, too, and it has the chance to reproduce (by attaching to other programs) or wreak havoc.

* E-mail viruses - An e-mail virus moves around in e-mail messages, and usually replicates itself by automatically mailing itself to dozens of people in the victim's e-mail address book.

* Worms - A worm is a small piece of software that uses computer networks and security holes to replicate itself. A copy of the worm scans the network for another machine that has a specific security hole. It copies itself to the new machine using the security hole, and then starts replicating from there, as well.

* Trojan horses - A Trojan horse is simply a computer program. The program claims to do one thing (it may claim to be a game) but instead does damage when you run it (it may erase your hard disk). Trojan horses have no way to replicate automatically.

What's a "Virus"?
Computer viruses are called viruses because they share some of the traits of biological viruses. A computer virus passes from computer to computer like a biological virus passes from person to person.

There are similarities at a deeper level, as well. A biological virus is not a living thing. A virus is a fragment of DNA inside a protective jacket. Unlike a cell, a virus has no way to do anything or to reproduce by itself -- it is not alive. Instead, a biological virus must inject its DNA into a cell. The viral DNA then uses the cell's existing machinery to reproduce itself. In some cases, the cell fills with new viral particles until it bursts, releasing the virus. In other cases, the new virus particles bud off the cell one at a time, and the cell remains alive.

A computer virus shares some of these traits. A computer virus must piggyback on top of some other program or document in order to get executed. Once it is running, it is then able to infect other programs or documents. Obviously, the analogy between computer and biological viruses stretches things a bit, but there are enough similarities that the name sticks.

What's a "Worm"?
A worm is a computer program that has the ability to copy itself from machine to machine. Worms normally move around and infect other machines through computer networks. Using a network, a worm can expand from a single copy incredibly quickly. For example, the Code Red worm replicated itself over 250,000 times in approximately nine hours on July 19, 2001.

A worm usually exploits some sort of security hole in a piece of software or the operating system. For example, the Slammer worm (which caused mayhem in January 2003) exploited a hole in Microsoft's SQL server. This article offers a fascinating look inside Slammer's tiny (376 byte) program.

Code Red
Worms use up computer time and network bandwidth when they are replicating, and they often have some sort of evil intent. A worm called Code Red made huge headlines in 2001. Experts predicted that this worm could clog the Internet so effectively that things would completely grind to a halt.

The Code Red worm slowed down Internet traffic when it began to replicate itself, but not nearly as badly as predicted. Each copy of the worm scanned the Internet for Windows NT or Windows 2000 servers that do not have the Microsoft security patch installed. Each time it found an unsecured server, the worm copied itself to that server. The new copy then scanned for other servers to infect. Depending on the number of unsecured servers, a worm could conceivably create hundreds of thousands of copies.

The Code Red worm was designed to do three things:

* Replicate itself for the first 20 days of each month
* Replace Web pages on infected servers with a page that declares "Hacked by Chinese"
* Launch a concerted attack on the White House Web server in an attempt to overwhelm it

The most common version of Code Red is a variation, typically referred to as a mutated strain, of the original Ida Code Red that replicated itself on July 19, 2001. According to the National Infrastructure Protection Center:

The Ida Code Red Worm, which was first reported by eEye Digital Security, is taking advantage of known vulnerabilities in the Microsoft IIS Internet Server Application Program Interface (ISAPI) service. Un-patched systems are susceptible to a "buffer overflow" in the Idq.dll, which permits the attacker to run embedded code on the affected system. This memory resident worm, once active on a system, first attempts to spread itself by creating a sequence of random IP addresses to infect unprotected web servers. Each worm thread will then inspect the infected computer's time clock. The NIPC has determined that the trigger time for the DOS execution of the Ida Code Red Worm is at 0:00 hours, GMT on July 20, 2001. This is 8:00 PM, EST.

Upon successful infection, the worm would wait for the appointed hour and connect to the www.whitehouse.gov domain. This attack would consist of the infected systems simultaneously sending 100 connections to port 80 of www.whitehouse.gov (198.137.240.91).

The U.S. government changed the IP address of www.whitehouse.gov to circumvent that particular threat from the worm and issued a general warning about the worm, advising users of Windows NT or Windows 2000 Web servers to make sure they have installed the security patch.

Early Cases: Executable Viruses
Early viruses were pieces of code attached to a common program like a popular game or a popular word processor. A person might download an infected game from a bulletin board and run it. A virus like this is a small piece of code embedded in a larger, legitimate program. Any virus is designed to run first when the legitimate program gets executed. The virus loads itself into memory and looks around to see if it can find any other programs on the disk. If it can find one, it modifies it to add the virus's code to the unsuspecting program. Then the virus launches the "real program." The user really has no way to know that the virus ever ran. Unfortunately, the virus has now reproduced itself, so two programs are infected. The next time either of those programs gets executed, they infect other programs, and the cycle continues.

If one of the infected programs is given to another person on a floppy disk, or if it is uploaded to a bulletin board, then other programs get infected. This is how the virus spreads.

The spreading part is the infection phase of the virus. Viruses wouldn't be so violently despised if all they did was replicate themselves. Unfortunately, most viruses also have some sort of destructive attack phase where they do some damage. Some sort of trigger will activate the attack phase, and the virus will then "do something" -- anything from printing a silly message on the screen to erasing all of your data. The trigger might be a specific date, or the number of times the virus has been replicated, or something similar.

Boot Sector Viruses
As virus creators got more sophisticated, they learned new tricks. One important trick was the ability to load viruses into memory so they could keep running in the background as long as the computer remained on. This gave viruses a much more effective way to replicate themselves. Another trick was the ability to infect the boot sector on floppy disks and hard disks. The boot sector is a small program that is the first part of the operating system that the computer loads. The boot sector contains a tiny program that tells the computer how to load the rest of the operating system. By putting its code in the boot sector, a virus can guarantee it gets executed. It can load itself into memory immediately, and it is able to run whenever the computer is on. Boot sector viruses can infect the boot sector of any floppy disk inserted in the machine, and on college campuses where lots of people share machines they spread like wildfire.

In general, both executable and boot sector viruses are not very threatening any more. The first reason for the decline has been the huge size of today's programs. Nearly every program you buy today comes on a compact disc. Compact discs cannot be modified, and that makes viral infection of a CD impossible. The programs are so big that the only easy way to move them around is to buy the CD. People certainly can't carry applications around on a floppy disk like they did in the 1980s, when floppies full of programs were traded like baseball cards. Boot sector viruses have also declined because operating systems now protect the boot sector
 
Both boot sector viruses and executable viruses are still possible, but they are a lot harder now and they don't spread nearly as quickly as they once could. Call it "shrinking habitat," if you want to use a biological analogy. The environment of floppy disks, small programs and weak operating systems made these viruses possible in the 1980s, but that environmental niche has been largely eliminated by huge executables, unchangeable CDs and better operating system safeguards.

E-mail Viruses
The latest thing in the world of computer viruses is the e-mail virus, and the Melissa virus in March 1999 was spectacular. Melissa spread in Microsoft Word documents sent via e-mail, and it worked like this:

Someone created the virus as a Word document uploaded to an Internet newsgroup. Anyone who downloaded the document and opened it would trigger the virus. The virus would then send the document (and therefore itself) in an e-mail message to the first 50 people in the person's address book. The e-mail message contained a friendly note that included the person's name, so the recipient would open the document thinking it was harmless. The virus would then create 50 new messages from the recipient's machine. As a result, the Melissa virus was the fastest-spreading virus ever seen! As mentioned earlier, it forced a number of large companies to shut down their e-mail systems.

The ILOVEYOU virus, which appeared on May 4, 2000, was even simpler. It contained a piece of code as an attachment. People who double clicked on the attachment allowed the code to execute. The code sent copies of itself to everyone in the victim's address book and then started corrupting files on the victim's machine. This is as simple as a virus can get. It is really more of a Trojan horse distributed by e-mail than it is a virus.

The Melissa virus took advantage of the programming language built into Microsoft Word called VBA, or Visual Basic for Applications. It is a complete programming language and it can be programmed to do things like modify files and send e-mail messages. It also has a useful but dangerous auto-execute feature. A programmer can insert a program into a document that runs instantly whenever the document is opened. This is how the Melissa virus was programmed. Anyone who opened a document infected with Melissa would immediately activate the virus. It would send the 50 e-mails, and then infect a central file called NORMAL.DOT so that any file saved later would also contain the virus! It created a huge mess.

Microsoft applications have a feature called Macro Virus Protection built into them to prevent this sort of thing. With Macro Virus Protection turned on (the default option is ON), the auto-execute feature is disabled. So when a document tries to auto-execute viral code, a dialog pops up warning the user. Unfortunately, many people don't know what macros or macro viruses are, and when they see the dialog they ignore it, so the virus runs anyway. Many other people turn off the protection mechanism. So the Melissa virus spread despite the safeguards in place to prevent it.

In the case of the ILOVEYOU virus, the whole thing was human-powered. If a person double-clicked on the program that came as an attachment, then the program ran and did its thing. What fueled this virus was the human willingness to double-click on the executable.

An Ounce of Prevention
You can protect yourself against viruses with a few simple steps:

* If you are truly worried about traditional (as opposed to e-mail) viruses, you should be running a more secure operating system like UNIX. You never hear about viruses on these operating systems because the security features keep viruses (and unwanted human visitors) away from your hard disk.

* If you are using an unsecured operating system, then buying virus protection software is a nice safeguard.

* If you simply avoid programs from unknown sources (like the Internet), and instead stick with commercial software purchased on CDs, you eliminate almost all of the risk from traditional viruses. In addition, you should disable floppy disk booting -- most computers now allow you to do this, and that will eliminate the risk of a boot sector virus coming in from a floppy disk accidentally left in the drive.

* You should make sure that Macro Virus Protection is enabled in all Microsoft applications, and you should NEVER run macros in a document unless you know what they do. There is seldom a good reason to add macros to a document, so avoiding all macros is a great policy.


Open the Options dialog from the Tools menu in Microsoft Word and make sure that Macro Virus Protection is enabled, as shown.

* You should never double-click on an attachment that contains an executable that arrives as an e-mail attachment. Attachments that come in as Word files (.DOC), spreadsheets (.XLS), images (.GIF and .JPG), etc., are data files and they can do no damage (noting the macro virus problem in Word and Excel documents mentioned above). A file with an extension like EXE, COM or VBS is an executable, and an executable can do any sort of damage it wants. Once you run it, you have given it permission to do anything on your machine. The only defense is to never run executables that arrive via e-mail.

By following those simple steps, you can remain virus free.

Origins
People create viruses. A person has to write the code, test it to make sure it spreads properly and then release the virus. A person also designs the virus's attack phase, whether it's a silly message or destruction of a hard disk. So why do people do it?

There are at least three reasons. The first is the same psychology that drives vandals and arsonists. Why would someone want to bust the window on someone else's car, or spray-paint signs on buildings or burn down a beautiful forest? For some people that seems to be a thrill. If that sort of person happens to know computer programming, then he or she may funnel energy into the creation of destructive viruses.

The second reason has to do with the thrill of watching things blow up. Many people have a fascination with things like explosions and car wrecks. When you were growing up, there was probably a kid in your neighborhood who learned how to make gunpowder and then built bigger and bigger bombs until he either got bored or did some serious damage to himself. Creating a virus that spreads quickly is a little like that -- it creates a bomb inside a computer, and the more computers that get infected the more "fun" the explosion.

The third reason probably involves bragging rights, or the thrill of doing it. Sort of like Mount Everest. The mountain is there, so someone is compelled to climb it. If you are a certain type of programmer and you see a security hole that could be exploited, you might simply be compelled to exploit the hole yourself before someone else beats you to it. "Sure, I could TELL someone about the hole. But wouldn't it be better to SHOW them the hole???" That sort of logic leads to many viruses.

Of course, most virus creators seem to miss the point that they cause real damage to real people with their creations. Destroying everything on a person's hard disk is real damage. Forcing the people inside a large company to waste thousands of hours cleaning up after a virus is real damage. Even a silly message is real damage because a person then has to waste time getting rid of it. For this reason, the legal system is getting much harsher in punishing the people who create viruses.

History
Traditional computer viruses were first widely seen in the late 1980s, and they came about because of several factors. The first factor was the spread of personal computers (PCs). Prior to the 1980s, home computers were nearly non-existent or they were toys. Real computers were rare, and they were locked away for use by "experts." During the 1980s, real computers started to spread to businesses and homes because of the popularity of the IBM PC (released in 1982) and the Apple Macintosh (released in 1984). By the late 1980s, PCs were widespread in businesses, homes and college campuses.

The second factor was the use of computer bulletin boards. People could dial up a bulletin board with a modem and download programs of all types. Games were extremely popular, and so were simple word processors, spreadsheets, etc. Bulletin boards led to the precursor of the virus known as the Trojan horse. A Trojan horse is a program that sounds really cool when you read about it. So you download it. When you run the program, however, it does something uncool like erasing your disk. So you think you are getting a neat game but it wipes out your system. Trojan horses only hit a small number of people because they are discovered quickly. Either the bulletin board owner would erase the file from the system or people would send out messages to warn one another.

The third factor that led to the creation of viruses was the floppy disk. In the 1980s, programs were small, and you could fit the operating system, a word processor (plus several other programs) and some documents onto a floppy disk or two. Many computers did not have hard disks, so you would turn on your machine and it would load the operating system and everything else off of the floppy disk.

Viruses took advantage of these three facts to create the first self-replicating programs.
.
Share: