<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2613452802614549309</id><updated>2011-07-07T21:05:51.381-07:00</updated><title type='text'>hack hack reasearch facility</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://hack-heck2.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2613452802614549309/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://hack-heck2.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>azhar yusuf</name><uri>http://www.blogger.com/profile/14377885979614235458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>11</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2613452802614549309.post-6259429743680608006</id><published>2009-06-27T10:01:00.000-07:00</published><updated>2009-06-27T10:03:35.097-07:00</updated><title type='text'>Telnet Basics Guides &amp; Tutorials</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.orcsweb.com/images/articles/EmailTelnet.gif"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 453px; height: 331px;" src="http://www.orcsweb.com/images/articles/EmailTelnet.gif" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;A tutorial on telnet for beginners. Explains what telnet is and how to use it.&lt;br /&gt;&lt;br /&gt;here are sites that will allow you to play with telnet and try the things you have learned:&lt;br /&gt;&lt;br /&gt;http://www.chem.ox.ac.uk/it/telnet.html&lt;br /&gt;http://www.westwords.com/guffey/nettel.html&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;First of all what is telnet?Telnet is a protocol which is part of the TCP/IP suite. It is quite similar to the UNIX rlogin program. Telnet allows you to control a remote computer from your own one. It is terminal emulation software. In the old days harddrives were humonguous and expensive (i am talking waY back here) and there were no personal computers. To make use of existing computers you had to lease hardrive space and use terminals to operate the system. For developers this was great because computing became lots cheaper. You needed a server and many connections could be made. With telnet u can emulate this type of distributed computing and for example operate a supercomputer from a distance.&lt;br /&gt;&lt;br /&gt;TCP/IP works with ports and telnet has one also. It's nr 23. It's has several rfc's. Nr 854 dates back to 1983 and is named telnet protocol specification.&lt;br /&gt;With telnet you can do various things like send mail, log in to irc or proxy and even (though hardly anymore) view and modify websites. There are telnet services available allowing you to search through large databases using telnet. With this you use the remote computer's power so it won't presure your precious resources. Usually help or remotehelp are the commands to use to find out what you can and cannot do. If you can't see what you type in then set echo. Once you made a connection you can use the computer as if it was your own. You use command lines for this.&lt;br /&gt;Telnet knows different emulation types. VT-100 is most used. This emulation was used on the video terminals of DEC. There are still VT-100 servers running out there. Scientists use these.&lt;br /&gt;&lt;br /&gt;To use telnet you need a client. Windows has telnet built in by default (as does UNIX but that's a different story), but there are third party clients available on the net. You start a telnet session by typing in the command 'telnet server.net 23' where the port number is optional. Since Telnet was based on UNIX (as it is part of TCP/IP which also was based on UNIX) it uses UNIX commands. Basic knowledge would help you here. The port number specifies what services you will use. 23 is the default one. You can log into various services. 80 is the HTTP server for that.&lt;br /&gt;So say you wanted to modify your site from a distance on a leased line. You don't have your fav progs and hardly any time.&lt;br /&gt;/* telnet server.net 80 (leave the /*)&lt;br /&gt;/* GET http://www.server.net/YOURSITE.HTM HTTP/1.1&lt;br /&gt;You can use this method to get the output of a cgi-script as well. The simple request doesn't use the HTTP/1.1 (this is the HTTP version running on the server). If you perform a bad request you usually get some info on the server. Use this to find a the correct versions of services running.&lt;br /&gt;To put files to the server u use the PUT command. Telnet is pretty simillar to FTP which is also part of TCP/IP. There are other commands available like POST, which is used to put larger data files to the server, HEAD to get the sites header and DELETE. This one is obvious isn't it.&lt;br /&gt;You can also use telnet to send raw imails. The port to login to is 25.&lt;br /&gt;First you have to identify your self. This geos like this:&lt;br /&gt;/* telnet mail.server.net 25&lt;br /&gt;/* HELO www.you.net&lt;br /&gt;When you typed this command you'll get some feedback telling you who and what you logged on to. When you login u may get also some feedback telling you things. :`;&lt;br /&gt;After this you tell the server where the mail is from like this:&lt;br /&gt;/* MAIL FROM:you@youradress.net&lt;br /&gt;The server will give you feedback again telling you&lt;br /&gt;/* ...Sender OK&lt;br /&gt;You are accepted. Now for the receipant&lt;br /&gt;/* RCPT TO:yourroommate@hisadress.net&lt;br /&gt;again feedback&lt;br /&gt;/* ...Receptient OK&lt;br /&gt;The server stil does it's duty.....&lt;br /&gt;/* DATA&lt;br /&gt;After typing this command you'll get the instructions on the proper way to send the mail. Type your mail using the instructions. After you're done sending your mail close the connection using&lt;br /&gt;/* QUIT (or END, EXIT, LOGOFF LOGOUT)&lt;br /&gt;You can use this to receive your mail as well (if your provider allows you). The POP port is 110. Telnet to the server on this port. Once there use the following commands.&lt;br /&gt;/* USER you@THE_SERVER_GOES_HERE.net&lt;br /&gt;/* PASS ;type in your password (simple huh.).&lt;br /&gt;Once you are accepted as a valid user use the following to list your mail.&lt;br /&gt;/* LIST&lt;br /&gt;Ports can be configured so they may be different on some systems. Many admins use the default ones though.&lt;br /&gt;&lt;br /&gt;Two things come in handy when completly understanding telnet and how it works. They are a basic understanding of TCP/IP and a basic understanding of UNIX commands.&lt;br /&gt;&lt;br /&gt;You could use telnet to connect to a proxy and from there on continue your quest. Find a good proxy (use a search engine to locate one) and create an account. Now telnet to the server on the port specified on the website and hang loose. Using a proxy to use the web keeps your identity better hidden. Proxies often use port 8080 or 3128. If you use IE or Netscape you configure them to use a proxy. If you have computer friends maybe they could help you locate one nearby. To learn more about proxies read a tutorial about them. Telnet is part of TCP/IP and with this comes specific built in connection security. This basicly comes down to the three-way-handshake which i will not furtherly discuss in this tut. Terminal emulation was embraced by developers because it is a quick and secure way for remote computing.&lt;br /&gt;&lt;br /&gt;Bcause telnet is developed to be quick and reliable you could use it to connect yourself to an irc-server and chat with your buddies without a resource consuming GUI. You may even want to use a proxy to keep the (f)lamers from finding out your ip. To do this you have to know that the irc protocol has it's ports dedicated to 6666:6669. Ports can be configured so you have to know to what port you should connect. The identd runs on port 113. Better use a shell account to connect to IRC servers or a GUI client. Once you are there u can use the usual irc commands. If you have got a good shell (command.com) you can use scripts to automate procedures. To learn more about irc: Request for Comments: 1459 Internet Relay Chat Protocol. mIrc is a pretty good irc-client for nowadays high resource conputers if you want to learn this to. Since linux was built on UNIX and linux is free, you should have by now installed this operating system. OK&lt;br /&gt;U can also post to newsgroups if the server allows this. Newsgroups use nntp (rfc 977) over port 119. Use your skills. If you want to get information on a particular system you can use a technique known as port scanning. There are pretty fancy port scanners on the net but to become a guru you will have to know how hits take place. So use port surfing instead. Telnet to the server on various ports to get info on services. This is much more rewarding then using someone else's portscanner. If you want to become a good hacker learn a programming language and write your own. Because TCP/IP is not designed for a specific platform it works much the same on any. TCP/IP uses ports that have certain services.&lt;br /&gt;There are severel interresting ports for trying telnet like 7:echo. This one replies whatever you type in.&lt;br /&gt;13 daytime&lt;br /&gt;15 netstat&lt;br /&gt;37 time time&lt;br /&gt;39 rlp&lt;br /&gt;53 domain&lt;br /&gt;119 nntp&lt;br /&gt;443 https&lt;br /&gt;&lt;br /&gt;Use your commands to get the requested info. By connecting to different services you get a clear look at the system in use. If you want to exploit a system use the info and go to exploiters.net. If you come across a system you don't know read the ALT.2600.FAQ.&lt;br /&gt;There are also a lot of trojans circulating (like back orifice or netbus). If you know how to use these you can do some rad things but mostly the use if trojans is considered lame. Learn the commands and setup your private backdoor. When you want to attack a system prepare yourself for this. There has been some discussion on the legality of port-scanning/surfing. Many servers log every attempt to connect to it. Be warned.&lt;br /&gt;The expansion of free software towards the windows market gives great tools to set up your own hackerlab. For this you use your computer and one other. Set up a simple network with a server.&lt;br /&gt;Configure the server and start hacking.&lt;br /&gt;If you have a root account on a telnet server you can use this to remotely administer the server. There are many wats to get a root account. Remember that if an administrator finds a new root account on his system he will know it has been tampered with. Covering your tracks is fatal if you want to stay uncaught. Telnetting from a PDA is a pretty fancy way to read your mail or post to newsgroups from a distance. Because GSM phones can only transmit upto 9600 bps you might not want to load up the web.&lt;br /&gt;&lt;br /&gt;U can use telnet to create a shell account. This allows you to use a good shell even though u use Microsoft OS. Shell accounts vary in the services they have available. To find a good shell account search the net or try freeshell.org. Look for a shell that offers the progs you'dd like to use.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2613452802614549309-6259429743680608006?l=hack-heck2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hack-heck2.blogspot.com/feeds/6259429743680608006/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://hack-heck2.blogspot.com/2009/06/telnet-basics-guides-tutorials.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2613452802614549309/posts/default/6259429743680608006'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2613452802614549309/posts/default/6259429743680608006'/><link rel='alternate' type='text/html' href='http://hack-heck2.blogspot.com/2009/06/telnet-basics-guides-tutorials.html' title='Telnet Basics Guides &amp; Tutorials'/><author><name>hack heck team</name><uri>http://www.blogger.com/profile/14087484332483244993</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2613452802614549309.post-8476636042044164319</id><published>2009-06-21T02:31:00.001-07:00</published><updated>2009-06-21T02:34:26.934-07:00</updated><title type='text'>Developing for the Windows 7 Taskbar – Application ID</title><content type='html'>I assume that by now you are familiar with the basic functionality that Windows 7 Taskbar offers and the reasons behind the change we made from previous taskbar versions. If you are not familiar with and haven’t seen any demonstrations of the Windows 7 Taskbar, please watch the Windows 7 Taskbar Overview webcast on Channel 9. There are also great posts on the E7 blog like The Windows 7 Taskbar about some of the reasons we introduced the new Taskbar and desktop experience in Windows 7. I do encourage you to read these posts and watch the video so that you have some context for the technical material we are going to cover here.&lt;br /&gt;&lt;br /&gt;The new Taskbar is probably the most noticeable change to Windows 7 when you first log on. The Windows 7 Taskbar is an application-launching and window-switching mechanism that consolidates the functions of previous Windows Desktop mechanisms, such as Quick Launch, Recent Documents, Notification Area icons, desktop shortcuts, and running application windows. Windows 7 Taskbar offers features like Jump Lists, Preview Handler, and Overlay Icons. But before we start diving into the various Windows 7 Taskbar features, let’s lay the basic foundation to our discussion and define some Windows 7 taskbar terminology. &lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_UI2-fZnhBas/Sj3-JTQBK-I/AAAAAAAAACQ/82QynNVVR24/s1600-h/Taskbar_5F00_buttons1_5F00_thumb_5F00_2A8B5F6C.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 78px;" src="http://2.bp.blogspot.com/_UI2-fZnhBas/Sj3-JTQBK-I/AAAAAAAAACQ/82QynNVVR24/s320/Taskbar_5F00_buttons1_5F00_thumb_5F00_2A8B5F6C.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5349711368125754338" /&gt;&lt;/a&gt;&lt;br /&gt;for example, the Media Player button has no frame or border, but simply sits directly on the Taskbar. This indicates that Media Player is not running. But it is pinned to the Taskbar, and will stay on the Taskbar unless we unpin it. A transparent frame that lets most of the color of the underlying Taskbar through the Windows Explorer button. This indicates that the app is running but is not the active application. The Visual Studio icon has a more opaque rectangular frame underlying its icon indicating that the user is actively using this app. You will also notice that Word has a “stack” of icons representing that multiple instances of Word or multiple Windows are grouped under the same Taskbar button. It is very important to understand the logic that underlies the creation, assignment, and grouping of Taskbar buttons.&lt;br /&gt;&lt;br /&gt;A very large number of applications that run on Windows 7 (for example, Office Word 2007 and Visual Studio 2008), were not designed to work with the Windows 7 Taskbar, so how is it that they can play ball with the Taskbar, group multiple instances, and even take advantage of Word Jump Lists? Basically, a behind-the-scenes Application ID (AppID) is automatically computed and assigned to an application once you launch it. Every running application has an AppID assigned to it, either automatically computed for the app by Windows, or set by the app itself. Guess what? It is not a GUID; it is just a string (with a maximum of 128 characters), that either you provide or is being computed by the OS. All windows and applications, including Jump Lists, which have the same AppID are grouped under the same Taskbar button. Therefore, it is important to understand that every component (process, shortcut, window, Taskbar button, and document type – that is, registered file type handler) of your application has the AppID associated with it.&lt;br /&gt;&lt;br /&gt;You may ask, "Where do AppIDs come from?" As mentioned before, the OS generates Application IDs for your application using a very simple, yet important to understand heuristic. Since in Windows 7 you can assign AppIDs to individual windows, the OS tries to extrapolate the AppID from a window. Applications usually display at least one window that the OS can query for its AppID. However, most existing apps do not have an AppID attached to each window (or, for that matter, any AppID at all), and therefore the OS falls back to the process to which the window belongs for the AppID. Each process has several properties that the OS can check, like the executable of the process. But even then, the process may not provide a granular enough separation. Different shortcuts may provide different start up command line parameters to the same executable and launch different applications (imagine a “launcher” application) that will be grouped under the same Taskbar button. In such cases, the OS has the ability to look into the specific shortcut that launched the application, to find the executable, the command line parameters, and so on. Note that if you have a register file, this registration points to an application that gets launched once you double click that file. Again, this is another way to calculate the AppID. The following image illustrates this automatic computation process. &lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_UI2-fZnhBas/Sj3-esMbh9I/AAAAAAAAACY/QFA1-3IlRBY/s1600-h/image_5F00_thumb_5F00_21BB5720.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 195px;" src="http://1.bp.blogspot.com/_UI2-fZnhBas/Sj3-esMbh9I/AAAAAAAAACY/QFA1-3IlRBY/s320/image_5F00_thumb_5F00_21BB5720.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5349711735598843858" /&gt;&lt;/a&gt;&lt;br /&gt;While the OS can compute AppIDs for you, you may want to have greater control over the AppID for a given application or even an individual window in your application. Assume that you have an application that hosts (runs) another application (like what happens when you debug an application using Visual Studio). Or you have several different applications or processes that you wish to group under the same Taskbar button. The Taskbar API offers you ways to control the Application ID per application or per window. IN ANY CASE, if you are writing a new application that targets Windows 7, we highly recommend that you provide your own application ID, as we will describe below.&lt;br /&gt;&lt;br /&gt;OK, let’s examine the API that allows you to control the AppID associations of your application.&lt;br /&gt;&lt;br /&gt;If you want to have a separate Taskbar button for each process (including all windows owned by that process), you can set an explicit AppID for the entire process that affects all windows within the process that do not have their own explicit AppID. Setting the explicit process AppID is very easy. All it takes is a single call to the SetCurrentProcessExplicitAppUserModelID function as shown in the following code snippet:&lt;br /&gt;&lt;br /&gt;SetCurrentProcessExplicitAppUserModelID(c_rgszAppID[0]);&lt;br /&gt;&lt;br /&gt;Where c_rgszAppID[0] is a pointer to a string. You should note that according to the SDK documentation, “This method must be called during an application's initial startup routine before the application presents any user interface (UI) or makes any manipulation of its Jump Lists.”&lt;br /&gt;&lt;br /&gt;In managed code, from the latest Windows API Code Pack Library, you can use the AppID property that is part of the Taskbar object, which you can find in the Microsoft.WindowsAPICodePack.Shell.Taskbar namespace. Using that property you can set and get the application ID of a given application.&lt;br /&gt;&lt;br /&gt;Setting the AppID for a window is a bit more complicated (but only a bit). It requires calling the SHGetPropertyStoreForWindow function and then manipulating the resulting IPropertyStore object to retrieve the requested property as shown in the following code snippet:&lt;br /&gt;&lt;br /&gt;void SetAppID(HWND hWnd, int iAppID)&lt;br /&gt;{&lt;br /&gt;    IPropertyStore *pps;&lt;br /&gt;    HRESULT hr = SHGetPropertyStoreForWindow(hWnd, IID_PPV_ARGS(&amp;pps));&lt;br /&gt;    if (SUCCEEDED(hr))&lt;br /&gt;    {&lt;br /&gt;        PROPVARIANT pv;&lt;br /&gt;        if (iAppID &gt;= 0)&lt;br /&gt;        {&lt;br /&gt;            hr = InitPropVariantFromString(c_rgszAppID[iAppID], &amp;pv);&lt;br /&gt;        }&lt;br /&gt;        else&lt;br /&gt;        {&lt;br /&gt;            PropVariantInit(&amp;pv);&lt;br /&gt;        }&lt;br /&gt;        if (SUCCEEDED(hr))&lt;br /&gt;        {&lt;br /&gt;            hr = pps-&gt;SetValue(PKEY_AppUserModel_ID, pv);&lt;br /&gt;            PropVariantClear(&amp;pv);&lt;br /&gt;        }&lt;br /&gt;        pps-&gt;Release();&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Here you can see how we extract the current windows property store by calling SHGetPropertyStoreForWindow, passing hWnd as refrence to the window. Next we initiate, InitPropVariantFromString(c_rgszAppID[iAppID], &amp;pv), a property variant with a string that represents the AppID for that window. Finally, we set the value of the new property store to the window.&lt;br /&gt;&lt;br /&gt;Unfortunately, the current Windows API Code pack doesn’t support setting specific application IDs per window, although all you need to do is add the following function to the Taskbar.cs file:&lt;br /&gt;&lt;br /&gt;private static void SetWindowAppId(string appId)&lt;br /&gt;{&lt;br /&gt;    Microsoft.WindowsAPICodePack.Shell.ShellNativeMethods.SetWindowAppId&lt;br /&gt;        (OwnerHandle, "name here");&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Since the Windows API Code Pack provides the source code, you can actually check the specific implementation of SetWindowAppId function and see for yourself that it is very similar to the SetAppID example above. Note you don’t have to use the full qualified assembly name “Microsoft.WindowsAPICodePack.Shell’, but I did to help you navigate the Windows API Code Pack hierarchy.&lt;br /&gt;&lt;br /&gt;By the way, the window AppID is dynamic, so it’s entirely possible for a window to show up as part of one Taskbar button and then change its AppID so that it appears on an entirely different Taskbar button. This has interesting effects. For example, the Jump List is attached to a Taskbar button (with a specific AppID), so the same window might show a different Jump List when it is reattached to an entirely different Taskbar button. This potentially can confuse users, so the recommended practice is to set the window AppID and stick to it, using the same process for determining the AppID every time the window displays.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2613452802614549309-8476636042044164319?l=hack-heck2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hack-heck2.blogspot.com/feeds/8476636042044164319/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://hack-heck2.blogspot.com/2009/06/developing-for-windows-7-taskbar.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2613452802614549309/posts/default/8476636042044164319'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2613452802614549309/posts/default/8476636042044164319'/><link rel='alternate' type='text/html' href='http://hack-heck2.blogspot.com/2009/06/developing-for-windows-7-taskbar.html' title='Developing for the Windows 7 Taskbar – Application ID'/><author><name>hack heck team</name><uri>http://www.blogger.com/profile/14087484332483244993</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_UI2-fZnhBas/Sj3-JTQBK-I/AAAAAAAAACQ/82QynNVVR24/s72-c/Taskbar_5F00_buttons1_5F00_thumb_5F00_2A8B5F6C.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2613452802614549309.post-4476193414699827574</id><published>2009-02-06T02:38:00.000-08:00</published><updated>2009-02-06T02:40:39.586-08:00</updated><title type='text'>Data Encryption Standard or DES</title><content type='html'>Since its introduction, Base64 encoding has extremely quickly gained popularity. Besides being the default Encoding standard being used for encoding files to be sent as attachments by Multipurpose Internet Mail Extensions or MIME, it has also started being used in a number of other places.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Please note that almost all email clients use MIME to send files as attachments, this in turn means that a majority of email clients are using Base64 to encode files, before being sent across networks.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Another popular usage of Base64 encoding is in the case of Web Servers implementing HTTP Based Basic Authentication. When the server wants to restrict or control the access to certain folders, then, it can password protect them by using HTTP Based Basic Authentication.  Basic Authentication uses the Base64 Encoding standard to encode the Username and Password and store them.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;So, basically what my point is that Base64 Encoding has a number of practical usages and due to the fact that it is very easy to implement, it is being put to use for a number of purposes at a number of places by a number of parties. Get my point?&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;However, it continues to remain by far the lamest encoding standard or the poorest means of security. You see instead of the text being passed through a powerful, difficult to break algorithm and being encrypted, it is only being encoded by a relatively simple to reverse encoding standard.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Base64 uses a 65-character subset of US-ASCII, allowing 6 bits for each character. For Example, take the character ‘m’ for instance. The character ‘m’ has a Base64 value of 38. How did we get this value? Well, there is a Base64 Alphabet chart included at the end of this tutorial, which contains all the alphabets and their corresponding Base64 value. So, each time you want to get the Base64 value of an ASCII character, you need to refer to this Base64 Value chart. Anyway, getting back to our example, the character ‘m’ has a Base64 value of 38, which when represented in binary form, is 100110.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Now, let us take yet another example to see how a text is encoded by Base64 Encoding. Say, that the text to be encoded is: ‘mne’.  The text is firstly converted into its decimal value.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;The character "m" has the decimal value of 109&lt;br /&gt;&lt;br /&gt;The character "n" has the decimal value of 110&lt;br /&gt;&lt;br /&gt;The character "e" has the decimal value of 101&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;This implies that "mne" ( three 8-bit-byte text string) is 109 110 101 in decimal form. When converted to binary the string looks like this:&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;01101101   01101110   01100101&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;These three 8-bit-bytes are concatenated (linked together) to make a 24-bit stream:&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;011011010110111001100101&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;This 24-bit stream is then split up into four 6-bit sections:&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;011011 010110 111001 100101&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;We now have 4 values. These binary values, when converted into decimal form look like this:&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;27 22 57 37&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Now each character of the Base64 character set has a decimal value. We now change these decimal values into the Base64 equivalent:&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;27 = b&lt;br /&gt;&lt;br /&gt;22 = w&lt;br /&gt;&lt;br /&gt;57 = 5&lt;br /&gt;&lt;br /&gt;37 = l&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;So "mne" when encoded as Base64 reads as "bw5l". Below is a table of the Base64 character set with their decimal values:&lt;br /&gt;&lt;br /&gt;                       &lt;br /&gt;&lt;br /&gt;    Table 1: The Base64 Alphabet&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;Value Encoding&lt;br /&gt; &lt;br /&gt;Value Encoding&lt;br /&gt; &lt;br /&gt;Value Encoding&lt;br /&gt; &lt;br /&gt;Value Encoding&lt;br /&gt;0        A&lt;br /&gt; &lt;br /&gt;17         R&lt;br /&gt; &lt;br /&gt;34         i&lt;br /&gt; &lt;br /&gt;51      z&lt;br /&gt;1        B&lt;br /&gt; &lt;br /&gt;18         S&lt;br /&gt; &lt;br /&gt;35         j&lt;br /&gt; &lt;br /&gt;52      0&lt;br /&gt;2        C&lt;br /&gt; &lt;br /&gt;19         T&lt;br /&gt; &lt;br /&gt;36         k&lt;br /&gt; &lt;br /&gt;53      1&lt;br /&gt;3        D&lt;br /&gt; &lt;br /&gt;20         U&lt;br /&gt; &lt;br /&gt;37         l&lt;br /&gt; &lt;br /&gt;54      2&lt;br /&gt;4        E&lt;br /&gt; &lt;br /&gt;21         V&lt;br /&gt; &lt;br /&gt;38        m&lt;br /&gt; &lt;br /&gt;55      3&lt;br /&gt;5        F&lt;br /&gt; &lt;br /&gt;22         W&lt;br /&gt; &lt;br /&gt;39         n&lt;br /&gt; &lt;br /&gt;56     4&lt;br /&gt;6        G&lt;br /&gt; &lt;br /&gt;23         X&lt;br /&gt; &lt;br /&gt;40         o&lt;br /&gt; &lt;br /&gt; 57     5&lt;br /&gt;7        H&lt;br /&gt; &lt;br /&gt;24         Y&lt;br /&gt; &lt;br /&gt;41         p&lt;br /&gt; &lt;br /&gt;58     6&lt;br /&gt;8         I&lt;br /&gt; &lt;br /&gt;25         Z&lt;br /&gt; &lt;br /&gt;42         q&lt;br /&gt; &lt;br /&gt;59     7&lt;br /&gt;9        J&lt;br /&gt; &lt;br /&gt;26         a&lt;br /&gt; &lt;br /&gt; 43          r&lt;br /&gt; &lt;br /&gt;60     8&lt;br /&gt;10       K&lt;br /&gt; &lt;br /&gt;27         b&lt;br /&gt; &lt;br /&gt;44         s&lt;br /&gt; &lt;br /&gt;61     9&lt;br /&gt;11       L&lt;br /&gt; &lt;br /&gt;28         c&lt;br /&gt; &lt;br /&gt;45         t&lt;br /&gt; &lt;br /&gt;62     +&lt;br /&gt;12       M&lt;br /&gt; &lt;br /&gt;29         d&lt;br /&gt; &lt;br /&gt;46         u&lt;br /&gt; &lt;br /&gt;63      /&lt;br /&gt;13       N&lt;br /&gt; &lt;br /&gt;30         e&lt;br /&gt; &lt;br /&gt;47         v&lt;br /&gt; &lt;br /&gt;(pad) =&lt;br /&gt;14       O&lt;br /&gt; &lt;br /&gt;31         f&lt;br /&gt; &lt;br /&gt;48        w&lt;br /&gt; &lt;br /&gt;15       P&lt;br /&gt; &lt;br /&gt;32         g&lt;br /&gt; &lt;br /&gt;49         x&lt;br /&gt; &lt;br /&gt;16       Q&lt;br /&gt; &lt;br /&gt;33         h&lt;br /&gt; &lt;br /&gt;50         y&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;When decoding a Base64 string just do the reverse:&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;1) Convert the character to its Base64 decimal value.&lt;br /&gt;&lt;br /&gt;2) Convert this decimal value into binary.&lt;br /&gt;&lt;br /&gt;3) Squash the 6 bits of each character into one big string of binary digits.&lt;br /&gt;&lt;br /&gt;4) Split this string up into groups of 8 bits (starting from right to left).&lt;br /&gt;&lt;br /&gt;5) Convert each 8-bit binary value into a decimal number.&lt;br /&gt;&lt;br /&gt;6) Convert this decimal value into its US-ASCII equivalent.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;For those of you who do not want to use the manual method of decoding a Base64 encoded value, I have the following Perl script, which will do it for you:&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;use MIME::Base64;&lt;br /&gt;&lt;br /&gt;print decode_base64("Insert Text to be decoded here.");&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Here's the C source code for the Base 64 encoder/decoder.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;/*&lt;br /&gt;&lt;br /&gt;Dave Winer, dwiner@well.com, UserLand Software, 4/7/97&lt;br /&gt;&lt;br /&gt; */&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;#include &lt;appletdefs.h&gt;&lt;br /&gt;&lt;br /&gt;#include &lt;iac.h&gt;&lt;br /&gt;&lt;br /&gt;#include "base64.h"&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;static char encodingTable [64] = {&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;    'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P',   &lt;br /&gt;&lt;br /&gt;    'Q','R','S','T','U','V','W','X','Y','Z','a','b','c','d','e','f',   &lt;br /&gt;&lt;br /&gt;    'g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v',   &lt;br /&gt;&lt;br /&gt;    'w','x','y','z','0','1','2','3','4','5','6','7','8','9','+','/'&lt;br /&gt;&lt;br /&gt;                };&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;static unsigned long gethandlesize (Handle h) {&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;                return (GetHandleSize (h));&lt;br /&gt;&lt;br /&gt;                } /*gethandlesize*/&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt; static boolean sethandlesize (Handle h, unsigned long newsize) {&lt;br /&gt;&lt;br /&gt;                 SetHandleSize (h, newsize);&lt;br /&gt;&lt;br /&gt;                return (MemError () == noErr);&lt;br /&gt;&lt;br /&gt;                } /*sethandlesize*/&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt; static unsigned char gethandlechar (Handle h, unsigned long ix) {&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;                return ((*h) [ix]);&lt;br /&gt;&lt;br /&gt;                } /*gethandlechar*/&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt; static void sethandlechar (Handle h, unsigned long ix, unsigned char ch) {&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;                (*h) [ix] = ch;&lt;br /&gt;&lt;br /&gt;                } /*sethandlechar*/&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt; static boolean encodeHandle (Handle htext, Handle h64, short linelength) {&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;                /*&lt;br /&gt;&lt;br /&gt;                encode the handle. some funny stuff about linelength -- it only makes&lt;br /&gt;&lt;br /&gt;                sense to make it a multiple of 4. if it's not a multiple of 4, we make it&lt;br /&gt;&lt;br /&gt;                so (by only checking it every 4 characters. &lt;br /&gt;&lt;br /&gt;                further, if it's 0, we don't add any line breaks at all.&lt;br /&gt;&lt;br /&gt;                */&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;                unsigned long ixtext;&lt;br /&gt;&lt;br /&gt;                unsigned long lentext;&lt;br /&gt;&lt;br /&gt;                unsigned long origsize;&lt;br /&gt;&lt;br /&gt;                long ctremaining;&lt;br /&gt;&lt;br /&gt;                unsigned char ch;&lt;br /&gt;&lt;br /&gt;                unsigned char inbuf [3], outbuf [4];&lt;br /&gt;&lt;br /&gt;                short i;&lt;br /&gt;&lt;br /&gt;                short charsonline = 0, ctcopy;&lt;br /&gt;&lt;br /&gt;                ixtext = 0;&lt;br /&gt;&lt;br /&gt;                lentext = gethandlesize (htext);&lt;br /&gt;&lt;br /&gt;                while (true) {&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;                                ctremaining = lentext - ixtext;&lt;br /&gt;&lt;br /&gt;                                                if (ctremaining &lt;= 0)&lt;br /&gt;&lt;br /&gt;                                                break;&lt;br /&gt;&lt;br /&gt;                                                               &lt;br /&gt;&lt;br /&gt;                                for (i = 0; i &lt; 3; i++) {&lt;br /&gt;&lt;br /&gt;                                                                unsigned long ix = ixtext + i;&lt;br /&gt;&lt;br /&gt;                                                                if (ix &lt; lentext)&lt;br /&gt;&lt;br /&gt;                                                                inbuf [i] = gethandlechar (htext, ix);&lt;br /&gt;&lt;br /&gt;                                                else&lt;br /&gt;&lt;br /&gt;                                                                inbuf [i] = 0;&lt;br /&gt;&lt;br /&gt;                                                } /*for*/&lt;br /&gt;&lt;br /&gt;                               &lt;br /&gt;&lt;br /&gt;                                outbuf [0] = (inbuf [0] &amp; 0xFC) &gt;&gt; 2;&lt;br /&gt;&lt;br /&gt;                                outbuf [1] = ((inbuf [0] &amp; 0x03) &lt;&lt; 4) | ((inbuf [1] &amp; 0xF0) &gt;&gt; 4);&lt;br /&gt;&lt;br /&gt;                                outbuf [2] = ((inbuf [1] &amp; 0x0F) &lt;&lt; 2) | ((inbuf [2] &amp; 0xC0) &gt;&gt; 6);&lt;br /&gt;&lt;br /&gt;                                outbuf [3] = inbuf [2] &amp; 0x3F;&lt;br /&gt;&lt;br /&gt;                                origsize = gethandlesize (h64);&lt;br /&gt;&lt;br /&gt;               &lt;br /&gt;&lt;br /&gt;                                if (!sethandlesize (h64, origsize + 4))&lt;br /&gt;&lt;br /&gt;                                                return (false);&lt;br /&gt;&lt;br /&gt;                               &lt;br /&gt;&lt;br /&gt;                                ctcopy = 4;&lt;br /&gt;&lt;br /&gt;                                switch (ctremaining) {&lt;br /&gt;&lt;br /&gt;                                                case 1:&lt;br /&gt;&lt;br /&gt;                                                                ctcopy = 2;&lt;br /&gt;&lt;br /&gt;                                                                break;&lt;br /&gt;&lt;br /&gt;                               &lt;br /&gt;&lt;br /&gt;                                                case 2:&lt;br /&gt;&lt;br /&gt;                                                                ctcopy = 3;&lt;br /&gt;&lt;br /&gt;                                                                break;&lt;br /&gt;&lt;br /&gt;                                                } /*switch*/&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;                                for (i = 0; i &lt; ctcopy; i++)&lt;br /&gt;&lt;br /&gt;                                                sethandlechar (h64, origsize + i, encodingTable [outbuf [i]]);&lt;br /&gt;&lt;br /&gt;                                for (i = ctcopy; i &lt; 4; i++)&lt;br /&gt;&lt;br /&gt;                                                sethandlechar (h64, origsize + i, '=');&lt;br /&gt;&lt;br /&gt;                               &lt;br /&gt;&lt;br /&gt;                                ixtext += 3;&lt;br /&gt;&lt;br /&gt;                                charsonline += 4;&lt;br /&gt;&lt;br /&gt;                                if (linelength &gt; 0) { /*DW 4/8/97 -- 0 means no line breaks*/&lt;br /&gt;&lt;br /&gt;                                                                if (charsonline &gt;= linelength) {&lt;br /&gt;&lt;br /&gt;                                               &lt;br /&gt;&lt;br /&gt;                                                                charsonline = 0;&lt;br /&gt;&lt;br /&gt;                                                                origsize = gethandlesize (h64);&lt;br /&gt;&lt;br /&gt;                                               &lt;br /&gt;&lt;br /&gt;                                                                if (!sethandlesize (h64, origsize + 1))&lt;br /&gt;&lt;br /&gt;                                                                                return (false);&lt;br /&gt;&lt;br /&gt;                                                                sethandlechar (h64, origsize, '\n');&lt;br /&gt;&lt;br /&gt;                                                                }&lt;br /&gt;&lt;br /&gt;                                                }&lt;br /&gt;&lt;br /&gt;                                } /*while*/&lt;br /&gt;&lt;br /&gt;                return (true);&lt;br /&gt;&lt;br /&gt;                } /*encodeHandle*/&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt; static boolean decodeHandle (Handle h64, Handle htext) {&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;                unsigned long ixtext;&lt;br /&gt;&lt;br /&gt;                unsigned long lentext;&lt;br /&gt;&lt;br /&gt;                unsigned long origsize;&lt;br /&gt;&lt;br /&gt;                unsigned long ctremaining;&lt;br /&gt;&lt;br /&gt;                unsigned char ch;&lt;br /&gt;&lt;br /&gt;                unsigned char inbuf [3], outbuf [4];&lt;br /&gt;&lt;br /&gt;                short i, ixinbuf;&lt;br /&gt;&lt;br /&gt;                boolean flignore;&lt;br /&gt;&lt;br /&gt;                boolean flendtext = false;&lt;br /&gt;&lt;br /&gt;                ixtext = 0;&lt;br /&gt;&lt;br /&gt;                lentext = gethandlesize (h64);&lt;br /&gt;&lt;br /&gt;                ixinbuf = 0;&lt;br /&gt;&lt;br /&gt;                while (true) {&lt;br /&gt;&lt;br /&gt;               &lt;br /&gt;&lt;br /&gt;                                if (ixtext &gt;= lentext)&lt;br /&gt;&lt;br /&gt;                                                break;&lt;br /&gt;&lt;br /&gt;                               &lt;br /&gt;&lt;br /&gt;                                ch = gethandlechar (h64, ixtext++);&lt;br /&gt;&lt;br /&gt;                                flignore = false;&lt;br /&gt;&lt;br /&gt;               &lt;br /&gt;&lt;br /&gt;                                if ((ch &gt;= 'A') &amp;&amp; (ch &lt;= 'Z'))&lt;br /&gt;&lt;br /&gt;                                                ch = ch - 'A';&lt;br /&gt;&lt;br /&gt;                                else if ((ch &gt;= 'a') &amp;&amp; (ch &lt;= 'z'))&lt;br /&gt;&lt;br /&gt;                                                ch = ch - 'a' + 26;&lt;br /&gt;&lt;br /&gt;                                else if ((ch &gt;= '0') &amp;&amp; (ch &lt;= '9'))&lt;br /&gt;&lt;br /&gt;                                                ch = ch - '0' + 52;&lt;br /&gt;&lt;br /&gt;                                else if (ch == '+')&lt;br /&gt;&lt;br /&gt;                                                ch = 62;&lt;br /&gt;&lt;br /&gt;                                else if (ch == '=') /*no op -- can't ignore this one*/&lt;br /&gt;&lt;br /&gt;                                                flendtext = true;&lt;br /&gt;&lt;br /&gt;                                else if (ch == '/')&lt;br /&gt;&lt;br /&gt;                                                ch = 63;&lt;br /&gt;&lt;br /&gt;                                else&lt;br /&gt;&lt;br /&gt;                                                flignore = true;&lt;br /&gt;&lt;br /&gt;               &lt;br /&gt;&lt;br /&gt;                                if (!flignore) {&lt;br /&gt;&lt;br /&gt;               &lt;br /&gt;&lt;br /&gt;                                                short ctcharsinbuf = 3;&lt;br /&gt;&lt;br /&gt;                                                boolean flbreak = false;&lt;br /&gt;&lt;br /&gt;                                                 if (flendtext) {&lt;br /&gt;&lt;br /&gt;                                               &lt;br /&gt;&lt;br /&gt;                                                                if (ixinbuf == 0)&lt;br /&gt;&lt;br /&gt;                                                                                break;&lt;br /&gt;&lt;br /&gt;                                                                if ((ixinbuf == 1) || (ixinbuf == 2))&lt;br /&gt;&lt;br /&gt;                                                                                ctcharsinbuf = 1;&lt;br /&gt;&lt;br /&gt;                                                                else&lt;br /&gt;&lt;br /&gt;                                                                                ctcharsinbuf = 2;&lt;br /&gt;&lt;br /&gt;                                               &lt;br /&gt;&lt;br /&gt;                                                                ixinbuf = 3;&lt;br /&gt;&lt;br /&gt;                                               &lt;br /&gt;&lt;br /&gt;                                                                flbreak = true;&lt;br /&gt;&lt;br /&gt;                                                                }&lt;br /&gt;&lt;br /&gt;                                                inbuf [ixinbuf++] = ch;&lt;br /&gt;&lt;br /&gt;                                                if (ixinbuf == 4) {&lt;br /&gt;&lt;br /&gt;                                                                ixinbuf = 0;&lt;br /&gt;&lt;br /&gt;                                                                outbuf [0] = (inbuf [0] &lt;&lt; 2) | ((inbuf [1] &amp; 0x30) &gt;&gt; 4);&lt;br /&gt;&lt;br /&gt;                                                                outbuf [1] = ((inbuf [1] &amp; 0x0F) &lt;&lt; 4) | ((inbuf [2] &amp; 0x3C) &gt;&gt; 2);&lt;br /&gt;&lt;br /&gt;                                                                outbuf [2] = ((inbuf [2] &amp; 0x03) &lt;&lt; 6) | (inbuf [3] &amp; 0x3F);&lt;br /&gt;&lt;br /&gt;                                                                origsize = gethandlesize (htext);&lt;br /&gt;&lt;br /&gt;                                               &lt;br /&gt;&lt;br /&gt;                                                                if (!sethandlesize (htext, origsize + ctcharsinbuf))&lt;br /&gt;&lt;br /&gt;                                                                                return (false);&lt;br /&gt;&lt;br /&gt;                                                                for (i = 0; i &lt; ctcharsinbuf; i++)&lt;br /&gt;&lt;br /&gt;                                                                                sethandlechar (htext, origsize + i, outbuf [i]);&lt;br /&gt;&lt;br /&gt;                                                                }&lt;br /&gt;&lt;br /&gt;                                                if (flbreak)&lt;br /&gt;&lt;br /&gt;                                                                break;&lt;br /&gt;&lt;br /&gt;                                                }&lt;br /&gt;&lt;br /&gt;                                } /*while*/&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;                exit:&lt;br /&gt;&lt;br /&gt;                return (true);&lt;br /&gt;&lt;br /&gt;                } /*decodeHandle*/&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;void base64encodeVerb (void) {&lt;br /&gt;&lt;br /&gt;                Handle h64, htext;&lt;br /&gt;&lt;br /&gt;                short linelength;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;                if (!IACgettextparam ((OSType) keyDirectObject, &amp;htext))&lt;br /&gt;&lt;br /&gt;                                return;&lt;br /&gt;&lt;br /&gt;                if (!IACgetshortparam ((OSType) 'line', &amp;linelength))&lt;br /&gt;&lt;br /&gt;                                return;&lt;br /&gt;&lt;br /&gt;                h64 = NewHandle (0);&lt;br /&gt;&lt;br /&gt;                if (!encodeHandle (htext, h64, linelength))&lt;br /&gt;&lt;br /&gt;                                goto error;&lt;br /&gt;&lt;br /&gt;               &lt;br /&gt;&lt;br /&gt;                DisposHandle (htext);&lt;br /&gt;&lt;br /&gt;                IACreturntext (h64);&lt;br /&gt;&lt;br /&gt;                return;&lt;br /&gt;&lt;br /&gt;                error:&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;                IACreturnerror (1, "\perror encoding the Base 64 text");&lt;br /&gt;&lt;br /&gt;                } /*base64encodeVerb*/&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt; void base64decodeVerb (void) {&lt;br /&gt;&lt;br /&gt;                Handle h64, htext;&lt;br /&gt;&lt;br /&gt;                if (!IACgettextparam ((OSType) keyDirectObject, &amp;h64))&lt;br /&gt;&lt;br /&gt;                                return;&lt;br /&gt;&lt;br /&gt;                htext = NewHandle (0);&lt;br /&gt;&lt;br /&gt;                if (!decodeHandle (h64, htext))&lt;br /&gt;&lt;br /&gt;                                goto error;&lt;br /&gt;&lt;br /&gt;                DisposHandle (h64);&lt;br /&gt;&lt;br /&gt;                IACreturntext (htext);&lt;br /&gt;&lt;br /&gt;                return;&lt;br /&gt;&lt;br /&gt;                error:&lt;br /&gt;&lt;br /&gt;                 IACreturnerror (1, "\perror decoding the Base 64 text");&lt;br /&gt;&lt;br /&gt;                } /*base64decodeVerb*/&lt;br /&gt;&lt;br /&gt;  ------------------------------------------&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt; Well, that is all for now. Hope you liked the manual. Bye.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2613452802614549309-4476193414699827574?l=hack-heck2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hack-heck2.blogspot.com/feeds/4476193414699827574/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://hack-heck2.blogspot.com/2009/02/data-encryption-standard-or-des.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2613452802614549309/posts/default/4476193414699827574'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2613452802614549309/posts/default/4476193414699827574'/><link rel='alternate' type='text/html' href='http://hack-heck2.blogspot.com/2009/02/data-encryption-standard-or-des.html' title='Data Encryption Standard or DES'/><author><name>azhar yusuf</name><uri>http://www.blogger.com/profile/14377885979614235458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2613452802614549309.post-624951566721804913</id><published>2009-02-06T02:36:00.002-08:00</published><updated>2009-02-06T02:38:54.614-08:00</updated><title type='text'>Secure Sockets Layer or SSL</title><content type='html'>Secure Sockets Layer or SSL is a secure protocol, which is the reason why secure E-Commerce and E-Banking is possible. It has become the de facto standard for secure and safe only transactions. When Netscape first developed SSL, the main aim or motive behind it was to ensure that the client and host can communicate or transfer data and information securely.&lt;br /&gt;&lt;br /&gt;What SSL does in short would be, encrypt data at the sender’s end and decrypt data at the receiver’s end. This encrypted data cannot be picked up or hijacked in between and any tampering would not only be very difficult, it would easily be detected. Not only that, SSL also provides for two-way authentication i.e. verification of the client’s and the server’s identity.&lt;br /&gt;&lt;br /&gt;The various functions or features of SSL can be divided into three main categories-:&lt;br /&gt;&lt;br /&gt;   1. SSL Encrypted Connection-: Provides for secure and safe transaction of encrypted data between the client and the host.&lt;br /&gt;   2. SSL Client Authentication: is an optional feature, which allows for verification of the client’s identity.&lt;br /&gt;   3. SSL server Authentication: provides for verification of the server’s Certificate Authority (CA) which is nothing but a trusted safe host certificate given to the server by companies like Verisign, Cybertrust, Thawte and more.&lt;br /&gt;&lt;br /&gt;The main SSL protocol is made up of two smaller sub-protocols-:&lt;br /&gt;&lt;br /&gt;   1. The Secure Sockets Layer Record Protocol or The SSL Record Protocol.&lt;br /&gt;   2. The Secure Sockets Layer Handshake Protocol or The SSL Handshake Protocol.&lt;br /&gt;&lt;br /&gt;The SSL Record Protocol looks after the transmission and the transmission format of the encrypted data. Also it is this sub-protocol of SSL, which ensures data integrity in the transfer process. On the other hand the SSL Handshake protocol basically helps to determine the session key. To understand both these protocols better, read on.&lt;br /&gt;&lt;br /&gt;****************&lt;br /&gt;&lt;br /&gt;Hacking truth: A session key is a secret symmetrical key, which is used to encrypt data, after a SSL connection has been established between the client and the host.&lt;br /&gt;&lt;br /&gt;****************&lt;br /&gt;&lt;br /&gt;Secure Sockets Layer: The Working&lt;br /&gt;&lt;br /&gt;Now as soon as you enter a secure site, SSL comes into play. But how do you know whether the connection is secure or not? Well, there are several things, which reveal the fact that whether your connection is unsafe or safe.&lt;br /&gt;&lt;br /&gt;The most common way to check whether your connection is secure or not is to look at the status bar of your browser. If you see a closed padlock, then the connection is secure, else if you see a open padlock, then the connection is not secure. Another area to watch out for is the browser URL box. Now on an unsecured connection you will see only a http:// before the other part of the URL of the site you are visiting. On the other hand, if the connection is secure then you will see a https:// instead.&lt;br /&gt;&lt;br /&gt;Another technique to ensure that you are on a secure connection is to have a look at the Certificate Authority or CA or the server. How do I do that? Well, simply right click on the page that you suspect to be on a unsecured connection, and select Properties. A properties box pops up. Now look for the Connection field. A typical Connection field would be as follows-:&lt;br /&gt;&lt;br /&gt;SSL 3.0, DES with 40 bit Encryption [Low]; RSA with 128 bit exchange.&lt;br /&gt;&lt;br /&gt;This means that SSL 3.0 is running, DES is the crypto system being used and it has 40-bit encryption level. And RSA is the public key encryption algorithm being used and in this case it used 128 bits.&lt;br /&gt;&lt;br /&gt;Anyway, let me start from what happens, once you are already on a secure connection. Now as soon as the browser knows that a secure connection is present, The SSL Handshake Protocol jumps into action. It sends the browser’s SSL version number, Encryption settings and other crypto information to the remote host. Once the remote server receives this, it in turn sends back to the client, its SSL number and cipher settings.&lt;br /&gt;&lt;br /&gt;Also, if the server wants to, then this is the time when it verifies the client’s certificate. [This is done only if&lt;br /&gt;&lt;br /&gt;an optional SSL feature, The SSL Client Authentication feature is present.]&lt;br /&gt;&lt;br /&gt;NOTE: Client Authentication can also be done at a later stage. It basically varies from Server to server, as to when this authentication is done, or whether it is done at all.&lt;br /&gt;&lt;br /&gt;Then, the client verifies the server’s Certificate Authority. This is done to ensure that the public key received by the client is that of the correct authentic server. If the server does not have a CA certificate or if the certificate has expired, then a dialog box pops up informing the user. [Warning the user]&lt;br /&gt;&lt;br /&gt;Once the server’s identity has been authenticated, then the client creates a ‘Premaster Secret’ which is unique for each new SSL session. This ‘Premaster Secret’ is then encrypted using the server’s Public Key and this encrypted Premaster secret is then sent to the server. The important thing to note here is that the Server’s Public Key is extracted from the server’s Digital Certificate, which is nothing but a digitally signed certificate containing the owner’s public key.&lt;br /&gt;&lt;br /&gt;Now, when the server receives the encrypted premaster secret, it verifies the client’s identity. [This is optional and varies from server to server] Anyway, Once the client’s identity has been authenticated, the server uses its private key to decrypt the premaster secret, to obtain the master secret. This master secret is used to determine the session key.&lt;br /&gt;&lt;br /&gt;Note: The transfer of the premaster and master is also done for compatibility reasons.&lt;br /&gt;&lt;br /&gt;Now, everything till now is handled by The SSL Handshake Protocol. Once all this is done, The SSL Record Protocol comes into the picture. Now, once the server has determined, the symmetrical session key, it sends it to the client and further communication is done using this session key. As the key is symmetrical, it can be used for both decrypting and encrypting purposes. The SSL Record Protocol handles all data transfer&lt;br /&gt;&lt;br /&gt;A typical SSL transaction involves various encryption algorithms like RSA and DSS. Other popular ones are DES and RC4. Data integrity is ensured by using ciphers like MD5, SHA etc, which are called Message Authentication Codes or MAC. A MAC is nothing but a checksum authentication thingy which converts the data into digits. The checksum value at the receiver’s end is compared to that at the sender’s end. If any tampering If any tampering is done or in other words, if the checksums do not match, then that particular session is considered void and the entire above process if repeated i.e. data is transmitted again.&lt;br /&gt;&lt;br /&gt;However, SSL is not as secure as it seems to be. The problem lies in the fact that the encryption algorithms used along with SLL are quite lame and can easily be cracked. All versions below 3.0 have been cracked, however SSL 3.0 with 128 bits would take a very very long time to crack, if it could be cracked. So it is quite same to a certain extend.&lt;br /&gt;&lt;br /&gt;So how do you ensure that your SSL transaction is secure? Well, the best thing to do is to use 128-Bit encryption instead of 40-Bit. The former has 3 * 1026 more keys than the latter. Also install the latest version of your browsers, to ensure that you have the latest encryption standards and security patches.&lt;br /&gt;&lt;br /&gt;NOTE: 168-Bit encryption is present too, however, encryption levels over 40 bits are not allowed outside the US.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2613452802614549309-624951566721804913?l=hack-heck2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hack-heck2.blogspot.com/feeds/624951566721804913/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://hack-heck2.blogspot.com/2009/02/secure-sockets-layer-or-ssl.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2613452802614549309/posts/default/624951566721804913'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2613452802614549309/posts/default/624951566721804913'/><link rel='alternate' type='text/html' href='http://hack-heck2.blogspot.com/2009/02/secure-sockets-layer-or-ssl.html' title='Secure Sockets Layer or SSL'/><author><name>azhar yusuf</name><uri>http://www.blogger.com/profile/14377885979614235458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2613452802614549309.post-4244857260266129369</id><published>2009-02-06T02:36:00.001-08:00</published><updated>2009-02-06T02:36:55.445-08:00</updated><title type='text'>PGP Encryption for Beginners</title><content type='html'>Contents&lt;br /&gt;========&lt;br /&gt;&lt;br /&gt;Why Encrypt?&lt;br /&gt;What is PGP?&lt;br /&gt;Introduction to Cryptography.&lt;br /&gt;Main Types of Cryptography.&lt;br /&gt;How Does Cryptography Work?&lt;br /&gt;Conventional Cryptography&lt;br /&gt;Public Key Cryptography&lt;br /&gt;How Does PGP Work?&lt;br /&gt;A Few Words About The Keys...&lt;br /&gt;..And About Digital Signatures&lt;br /&gt;The Message Digest&lt;br /&gt;Digital Certificates&lt;br /&gt;Certificate Formats&lt;br /&gt;Validity and Trust&lt;br /&gt;Passwords and Passphrases&lt;br /&gt;&lt;br /&gt;Why Encrypt?&lt;br /&gt;============&lt;br /&gt;&lt;br /&gt;Why the hell would you want to encrypt your data anyway? Well, for several reasons:&lt;br /&gt;&lt;br /&gt;(1) Suppose someone breaks into your computer. Instead of being able to quickly grab all of your credit card numbers, passwords etc', if you've encrypted your data he will only get encrypted garbage, which will mean nothing to him, and will be excruciatingly hard to decipher.&lt;br /&gt;&lt;br /&gt;(2) Suppose you're not the only one using your computer. Would you risk putting your private information wide-open to strangers and maybe even malicious users? I wouldn't.&lt;br /&gt;&lt;br /&gt;I hope you get my drift. Now, let's move on.&lt;br /&gt;&lt;br /&gt;What is PGP?&lt;br /&gt;============&lt;br /&gt;&lt;br /&gt;PGP (Pretty Good Privacy) - is an encrypting technology which combines features of both conventional and public key cryptography (the keys we will discuss later in this topic) and is sometimes called a hybrid cryptosystem.&lt;br /&gt;&lt;br /&gt;Introduction to Cryptography&lt;br /&gt;============================&lt;br /&gt;&lt;br /&gt;At first, I would like to introduce you to some new words, which will be widely used in this tutorial:&lt;br /&gt;&lt;br /&gt;1. "Plain text" or "clear text" is unencrypted data, which can be read and easily understood and has not been encrypted. This tutorial is written in clear text, for example.&lt;br /&gt;2. Encryption - the process of changing plain text into ciphertext.&lt;br /&gt;3. Ciphertext - is the result of encryption - meaningless garbage at first sight. (One of the meanings is "an obsolete name for zero).&lt;br /&gt;4. Decryption - it is a method to convert readable data from Ciphertext.&lt;br /&gt;5. Cryptography - the science of encryption.&lt;br /&gt;6. Cryptanalysis - a branch of mathematics that involves breaking encrypted data mathematically or statistically.&lt;br /&gt;7. Attackers - anybody who tries to get cleartext from ciphertext without authorisation.&lt;br /&gt;8. Cryptology - synonym for cryptography&lt;br /&gt;9. Cipher - an algorithm or mathematical function that converts plaintext to ciphertext.&lt;br /&gt;10. Cryptosystem - a cipher and all the tools/algorithms associated with it&lt;br /&gt;&lt;br /&gt;Here is logical chain of all this process:&lt;br /&gt;&lt;br /&gt;PLAINTEXT --&gt; ENCRYPTION --&gt; CIPHERTEXT --&gt; DECRYPTION --&gt; PLAINTEXT&lt;br /&gt;&lt;br /&gt;                                        \&lt;br /&gt;&lt;br /&gt;                                          -&gt; SUCCESSFUL ATTACK --&gt; PLAINTEXT&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Cryptography actually is a mathematical science. It uses mathematics to encrypt / decrypt data in order to store it or to transfer it securely across an insecure network (the internet for example, but it could be any other type of network, not even the electronic type) to ensure that information is only available to authorized people.&lt;br /&gt;&lt;br /&gt;Main types of Cryptography&lt;br /&gt;==========================&lt;br /&gt;&lt;br /&gt;A cryptosystem can be weak (easy to break), or it can be strong (hard to break). The strength of a cryptosystem is measured in the time and resources you need to get make a successful attack. Modern strong cryptosystems can withstand a brute force attack using all the computers in the world - or rather, it would take an inordinately long time (currently about 10^9 times the age of the universe). But you never know - tomorrow may bring a mathematical technique to attack these cryptosystems by a method other than brute force.&lt;br /&gt;&lt;br /&gt;How does Cryptography work?&lt;br /&gt;===========================&lt;br /&gt;&lt;br /&gt;A cipher uses a key (a piece of data) coupled with an encryption algorithm to encrypt data (plain text). Different keys produce different ciphertext, of course. So the strength of encrypted data relies on two factors - the strength of cipher and the safety of the key. Therefore it is very advisable to choose the key very carefully and to keep it secure (best solution is to put it into a brain-cell, if possible:)). All those components mentioned above build a cipher. A cryptosystem (like PGP) uses a combination of various different ciphers .&lt;br /&gt;&lt;br /&gt;Conventional Cryptography&lt;br /&gt;=========================&lt;br /&gt;&lt;br /&gt;This type of encryption uses the same key to encrypt and decrypt data (plaintext). An example of a conventional cryptosystem is DES (The Data Encryption Standard) which is recommended by the Federal Government for commercial applications (despite the fact that it can be broken very easily). Conventional Cryptography has both pluses and minuses. It is very fast and suitable for data which won't be used by anyone except by the person who encrypted it. Unfortunately the secure key distribution is very difficult task to accomplish: you need to agree with a key beforehand, which is very impractical nowadays, because you cannot trust phone companies, couriers, e-mail and internet services. Here arises a question: how do you get the key to the recipient without someone intercepting it? The best way would be to have different keys for the sender and recipient.&lt;br /&gt;&lt;br /&gt;Public Key Cryptography&lt;br /&gt;=======================&lt;br /&gt;&lt;br /&gt;Which solves the secure key distribution problem. Whitefield Diffie and Martin Helman introduced the concept of Public Key Cryptography in 1975. However, there are some rumours that British Secret Intelligence Service invented it few years before, but kept in secret and did nothing with it.&lt;br /&gt;Public key cryptography is an asymmetric system and uses two keys (a pair): a public key, used for encryption and a private key, used for decryption. The public key is published worldwide and the personal is kept in secret. Anyone and everyone can encrypt data with your public key, but only you (or to be more exact the person who has your private key) can decrypt the ciphertext.&lt;br /&gt;&lt;br /&gt;How Does PGP Work?&lt;br /&gt;==================&lt;br /&gt;&lt;br /&gt;As mentioned above, PGP is mixed cryptosystem - that is, it combines both conventional and public key cryptography. PGP operates in this way:&lt;br /&gt;&lt;br /&gt;A) Encryption:&lt;br /&gt;&lt;br /&gt;1) First, PGP compresses plaintext. It is useful for several reasons: you need less space on hard disk. smaller message means saving time (and money), when sending it via internet, and increases the strength of encryption, because in compressed data there are fewer patterns than in uncompressed and pattern recognition is widely used by cryptanalists to break a cipher.&lt;br /&gt;2) PGP then generates a single-use encryption key, known as a session key. It is random number, generated from random data such as the contents of your PC's RAM, mouse movements, positions of windows on the desktop - uou get the idea. PGP uses a very fast and secure conventional cipher (CAST) and this session key to encrypt the data to produce ciphertext.&lt;br /&gt;3) After encrypting of the data, the session key is then encrypted to the recipient's public key and both the public key-encrypted session key and the ciphertext are transmitted.&lt;br /&gt;&lt;br /&gt;B) Decryption:&lt;br /&gt;&lt;br /&gt;1) PGP uses the recipient's private key to recover the session key.&lt;br /&gt;2) The session key is used to decrypt the conventionally encrypted ciphertext.&lt;br /&gt;3) The compressed data is decompressed.&lt;br /&gt;&lt;br /&gt;The combinations of conventional and public keys provide cryptography with very fast and secure encryption system. This is achieved by the speed of conventional algorithms and safety of public key.&lt;br /&gt;&lt;br /&gt;A Few Words About The Keys...&lt;br /&gt;=============================&lt;br /&gt;&lt;br /&gt;A key is a piece of data which is used by cryptographic algorithm to produce cyphertext. In fact, keys are huge prime numbers. The size of the key is measured in bits - the bigger the key, the more secure the encryption. The comparison of conventional and public key sizes is rather puzzling - conventional 128-bit key is the same strength as 3072-bit public key. The thing is, that you can't compare those types of the key, because of the specific algorithms used for each type of cryptography. (you can't compare trains and brains, can you?).&lt;br /&gt;To gain as much security as you can, always pick the biggest-size keys. This is because (given enough time and processing power) any public key can eventually be found. However, 2048-bit keys are in fact so difficult to break that it would take AT LEAST 2,000,000,000 years to break it using all the processing power to be found on the planet at the moment.&lt;br /&gt;Keys are stored in encrypted form. Typically you use two keyrings (files on hard disk) - one for public keys and other for private. Don't lose private key ring, because all information which was encrypted to keys on that ring will never be accessible (if you won't compromise the cipher, of course).&lt;br /&gt;&lt;br /&gt;..And About Digital Signatures&lt;br /&gt;==============================&lt;br /&gt;&lt;br /&gt;Just like written signatures, digital signatures provide authentication of the information's origin. Usually this feature of cryptography is much more widely used than encryption. The digital signature is 'impossible' to fake. In short - when you are dealing with this type of signature - you can mostly always be sure you are dealing with the right person (in the sense of authentication, of course).&lt;br /&gt;The digital signature works this way:&lt;br /&gt;1) The plaintext gets encrypted with your private key.&lt;br /&gt;2) If the information can be decrypted with the public key of the yours, then that information comes from you.&lt;br /&gt;&lt;br /&gt;The digital signatures are the main way to verify the validation of the public key.&lt;br /&gt;&lt;br /&gt;The Message Digest&lt;br /&gt;==================&lt;br /&gt;&lt;br /&gt;How do you make sure that no-one is able to just copy and paste your signature from your e-mail to his and claim it came from you? Well, you use a message digest.&lt;br /&gt;&lt;br /&gt;The message digest is the output of a hash function. This function takes message of any length and produces a fixed-length, 64-bit output (that's right - it's the same as the message digest hash mentioned earlier). The mathematical side of this function ensures that even if the data differs very slightly, you get entirely different output (known as a message digest). The private key and the digest are used to generate the signature, which is then transmitted along with plaintext. The hash function ensures that no one can take your signature and use it as his own because in such a case verification fails.&lt;br /&gt;&lt;br /&gt;Digital Certificates&lt;br /&gt;====================&lt;br /&gt;&lt;br /&gt;Of course, when you use public key crytposystem you want to be sure you are encrypting to the right person's key. This is the problem of the trust. Let's say someone posts a fake key with a name of the person who you are writing to. When you encrypt the data and send it to the "recipient", the data goes to the wrong person. In a public key environment, it is very important that you are sure you are using the public key of the intended recipient. One way out is to encrypt only to keys that the owner of has handed to you personally (on a floppy disk, for example). But this is very inconvenient - first, sometimes you don't even know the recipient and the second, what would you do if you need to send some data to a person who is not available physically - in a plane or anywhere else wher you can't meet them physically? Send a pigeon with a note?&lt;br /&gt;Digital certificates simplify this task of checking that you have the correct key. A digital certificate is a piece of data that you can use like a normal physical certificate. This information is included with a person's public key to provide help to verifying the validity of the key. Certificates are used to prevent people substituting one person's key for another.&lt;br /&gt;&lt;br /&gt;A digital certificate consists of:&lt;br /&gt;1) a public key&lt;br /&gt;2) certificate information (some information about the user: name, ID and so on)&lt;br /&gt;3) one or more digital signatures&lt;br /&gt;&lt;br /&gt;The digital signature on a certificate shows that some person approves the certificate information. The digital signature does not attest to the authenticity of the certificate as a whole; it vouches only that the signed identity goes along with the public key. In short - a certificate is a public key with several forms of ID attached, and approval from some other trusted individual(s). You get most of the benefits of digital certification when it is necessary to exchange public keys with someone else and it is impossible to do manually. Manual public key distribution has its advantages, but is useful only to a certain point. Sometimes it is necessary to put everything in one place - central storage, for instance, with exchange of public keys for anyone who need them. Systems that store such data are called Certificate Servers and systems that provide some additional key management features are called Public Key Infrastructures.&lt;br /&gt;Certificate Servers (aka cert. server / key server) are nothing more than databases that allow users to submit and retrieve digital certificates. Such a server can and usually does provide some administrative features. These features enable a company to maintain its security policies and so on.&lt;br /&gt;A Public Key Infrastructure contains the same the certificate storage facilities of a certificate server, but also provides certificate management facilities - the ability to issue, revoke, store, retrieve and trust certificates. PKI introduces the Certification Authority (CA), which is a person who has authorisation to issue certificates for some company's computer users. A CA creates certificates and digitally signs them, using the CA's private key. If you trust the CA, you can almost always trust the holder of their certificate.&lt;br /&gt;&lt;br /&gt;Certificate Formats&lt;br /&gt;===================&lt;br /&gt;&lt;br /&gt;A digital certificate is a collection of some identifying information imbedded together with a public key and the signatures of people who trust it's authenticity. PGP recognises two different certificate formats:&lt;br /&gt;1) PGP certificates;&lt;br /&gt;2) X.509 certificates.&lt;br /&gt;&lt;br /&gt;A PGP certificate consists of:&lt;br /&gt;1) the PGP version number, which identifies the version of PGP program which was used to create the associated key.&lt;br /&gt;2) The certificate holder's public key together with the algorithm of the key, which can be RSA or DH/DSS (recommended).&lt;br /&gt;3) The certificate validity period which indicates when the certificate will expire;&lt;br /&gt;4) The symmetric encryption algorithm for the key. This information indicates the encryption algorithm to which the certificate owner prefers to have information encrypted. These algorithms are CAST (recommended), IDEA or Triple-DES.&lt;br /&gt;&lt;br /&gt;Validity and trust&lt;br /&gt;==================&lt;br /&gt;&lt;br /&gt;Validity is confidence that something (a public key or certificate, for example) belongs to its real owner. Validity is very important in public key systems where you must know if the certificate is authentic or not.&lt;br /&gt;When you are sure that some certificate belongs to someone, you can sign the copy on your key ring to attest to the fact that you've checked the certificate and that it is an authentic one. If you export the signature to a certificate server others will know that you approved it. To believe someone who has signed approval of any certificate, you need to trust them.&lt;br /&gt;You can check validity by meeting the intended recipient and taking the key from him physically. The other way is to use fingerprints. A PGP fingerprint is a hash of the certificate (similar to a message digest). All fingerprints are unique. It can appear as hexadecimal number or a series of biometric words, which are phonetically distinct. When you have fingerprints and know the voice of the owner, you can just call him and ask him to read his. But sometimes, you don't know the voice - in such cases you need to trust some third party, like a CA.&lt;br /&gt;But don't forget that unless the owner of the key hands it to you personally you must trust some third party to tell you that this key is valid.&lt;br /&gt;&lt;br /&gt;Passwords and passphrases&lt;br /&gt;=========================&lt;br /&gt;&lt;br /&gt;Almost everyday, when you are using computers you need to enter a secret combination of characters (a password) to access some information. So you should be familiar with the concept. If not, you have been reading the wrong tutorial.&lt;br /&gt;A passphrase is a longer version of a password and is supposed to be more secure. A passphrase helps you to be more secure against dictionary attacks (compromising PGP will be covered in Part II - Compromising PGP). The best passphrases are relatively long and complex, containing non-alphabetic characters. PGP uses a passphrase to encrypt your private key on your disk using a hash of your passphrase as the secret key. You use the passphrase to decrypt and use your private key. A&lt;br /&gt;passphrase should be hard for you to forget and difficult for others to guess. It should be something already firmly embedded in your long-term memory, rather than something you make up from scratch, because without your passphrase your private key is totally useless and nothing can be done about it. At all.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2613452802614549309-4244857260266129369?l=hack-heck2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hack-heck2.blogspot.com/feeds/4244857260266129369/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://hack-heck2.blogspot.com/2009/02/pgp-encryption-for-beginners.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2613452802614549309/posts/default/4244857260266129369'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2613452802614549309/posts/default/4244857260266129369'/><link rel='alternate' type='text/html' href='http://hack-heck2.blogspot.com/2009/02/pgp-encryption-for-beginners.html' title='PGP Encryption for Beginners'/><author><name>azhar yusuf</name><uri>http://www.blogger.com/profile/14377885979614235458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2613452802614549309.post-874360790048688557</id><published>2009-02-06T02:35:00.001-08:00</published><updated>2009-02-06T02:35:57.676-08:00</updated><title type='text'>The Basics of Cryptography</title><content type='html'>This guide is for educational purposes only I do not take any responsibility about anything&lt;br /&gt;happen after reading the guide. I'm only telling you how to do this not to do it. It's your decision.&lt;br /&gt;If you want to put this text on your Site/FTP/Newsgroup or anything else you can do it but don't&lt;br /&gt;change anything without the permission of the author.&lt;br /&gt;&lt;--=--=--=--=--=--=--=--=&gt;&lt;br /&gt;A word from the author:&lt;br /&gt;&lt;br /&gt;I hope you like my texts and find them useful.&lt;br /&gt;If you have any problem or some suggestion feel free to e-mail me but please don't send mails like&lt;br /&gt;"I want to hack the US government please help me" or "Tell me how to bind a trojan into a .jpg"&lt;br /&gt;Be sure if I can help you with something I will do it.&lt;br /&gt;&lt;--=--=--=--=--=--=--=--=&gt;&lt;br /&gt;&lt;br /&gt;Table of Contents&lt;br /&gt;&lt;br /&gt;1.What is this text about?&lt;br /&gt;2.About Encryption and how it works&lt;br /&gt;3.About the Cryptography and PGP&lt;br /&gt;4.Ways of breaking the encryption&lt;br /&gt;-Bad pass phrases&lt;br /&gt;-Not deleted files&lt;br /&gt;-Viruses and trojans&lt;br /&gt;-Fake Version of PGP&lt;br /&gt;=--=--=--=--=--=--=--=--=&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1.What is this text about?&lt;br /&gt;-=-=-=-=-=-=-=-=-=-=-=-=-=&lt;br /&gt;In this text I'll explain you everything about encryption,what is it,PGP,&lt;br /&gt;ways that someone can read your encrypted files etc.Every hacker or&lt;br /&gt;paranoid should use encryption and keep the other from reading their&lt;br /&gt;files.The encryption is very important thing and I'll explain you how can&lt;br /&gt;someone break and decrypt your files.&lt;br /&gt;&lt;br /&gt;2.About Encryption and how it works&lt;br /&gt;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-&lt;br /&gt;The Encryption is very old.Even Julius Caesar used it when he was &lt;br /&gt;sending messages because he didn't trust to his messengers.You see&lt;br /&gt;encryption is everywhere,when you watch some spy film you see&lt;br /&gt;there's always a computer with encrypted files or some film about hackers&lt;br /&gt;when the feds busted the hacker and they see all of the hacker's files are&lt;br /&gt;encrypted.&lt;br /&gt;&lt;br /&gt;When you have simple .txt file that you can read this is called "plain text".&lt;br /&gt;But when you use encryption and encrypt the file it will become unreadable&lt;br /&gt;by the time you don't enter the password.This text is called cipher text.&lt;br /&gt;The process of converting a cipher text into plain text is called decryption.&lt;br /&gt;&lt;br /&gt;Here's a little example:&lt;br /&gt;&lt;br /&gt;Plain text ==&gt;Encryption==&gt;Ciphertext==&gt;Descryption==&gt;Plaintext&lt;br /&gt;&lt;br /&gt;This example shows you the way when you encrypt and decrypt a file.&lt;br /&gt;&lt;br /&gt;3.About the Cryptography and PGP&lt;br /&gt;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=&lt;br /&gt;Cryptography is science that use the mathematics to encrypt and decrypt data.This science &lt;br /&gt;let you keep your files and documents safe even on insecure networks like the Internet.&lt;br /&gt;The cryptography can be weak and strong.The best is of course the strong one.Even when you&lt;br /&gt;use all the computers in the world and they're doing billion operations in second you'll just need&lt;br /&gt;BILLIONS of years to decrypt strong encryption.&lt;br /&gt;&lt;br /&gt;PGP (Pretty Good Privacy) is maybe the best encryption program to encrypt your files and documents.&lt;br /&gt;It work in this way:&lt;br /&gt;&lt;br /&gt;When you encrypt one file with PGP,PGP first compress the file.This saves you disk space and modem&lt;br /&gt;transmition.Then it creates a session key.This session key works with a very secure and fast&lt;br /&gt;confidential encryption algorithm to encrypt the file.Then the session key is encrypted with the&lt;br /&gt;recipient's public key.&lt;br /&gt;PGP ask you for pass phrase not for password.This is more secure against the dictionary attacks&lt;br /&gt;when someone tries to use all the words in a dictionary to get your password.When you use &lt;br /&gt;pass phrase you can enter a whole phrase with upper and lowercase letters with numeric and&lt;br /&gt;punctuation characters.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;4.Ways of breaking the encryption&lt;br /&gt;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-&lt;br /&gt;PGP has been written for people that want their files encrypted for people that want privacy.&lt;br /&gt;When you send an e-mail it can be read from other people if you use PGP only the person for who&lt;br /&gt;is the message will be able to read it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now you know many things about PGP and the encryption but you may like to know can someone&lt;br /&gt;break it and read your private texts and files.In fact if you use all the computers in the world to &lt;br /&gt;decrypt a simple PGP message they'll need 12 million times the age of the universe to break it.&lt;br /&gt;You see this is the BEST the encryption is so strong noone can break it.&lt;br /&gt;The people that program it has done their work now everything depends on you.&lt;br /&gt;&lt;br /&gt;-Bad pass phrases&lt;br /&gt;*****************&lt;br /&gt;&lt;br /&gt;The algorithm is unbreakable but they're other ways to decrypt the text and read it.&lt;br /&gt;One of the biggest mistakes when someone writes his/her pass phrase is that the pass phrase is&lt;br /&gt;something like : "John" "I love you" and such lame phrases.Other one are the name of some friend&lt;br /&gt;or something like that.This is not good because this is pass phrase not password make it longer&lt;br /&gt;put numbers and other characters in it.The longer your pass phrase is the harder it will be guessed&lt;br /&gt;but put whole sentences even one that doesn't make sense just think in this way:&lt;br /&gt;Someone is brute-forcing thousands of pass phrases from a dictionary therefore my pass phrase&lt;br /&gt;should be someone that is not there in the dictionary something very stupid like:&lt;br /&gt;&lt;br /&gt;hEllowOrld33IjustwanTtoteLLtoev3ryon3thatI'maLamErandI'mahacKer666&lt;br /&gt;&lt;br /&gt;This is easy to remember because it's funny and there are only a few numbers but you may not use&lt;br /&gt;upper and lowercase characters.I hope you know will put some very good pass phrase and be sure&lt;br /&gt;noone will know it.&lt;br /&gt;&lt;br /&gt;Another mistake is that you may write the pass phase on a paper and if someone find it you'll loose&lt;br /&gt;it and he/she will be able to read your encrypted files.&lt;br /&gt;&lt;br /&gt;-Not deleted files&lt;br /&gt;******************&lt;br /&gt;&lt;br /&gt;Another big security problem is how most of the operating systems delete files.So when you encrypt&lt;br /&gt;the file you delete the plain text and of course leave the encrypted one.&lt;br /&gt;But the system doesn't actually delete the file.It just mark those blocks of the disk deleted and free.&lt;br /&gt;Someone may run a disk recovery program and still see all the files but in plaintext.Even when you're&lt;br /&gt;writing your text file with a word editor it can create some temporary copies of it.When you close it&lt;br /&gt;these files are deleted but as I told you they're still somewhere on your computer.&lt;br /&gt;PGP has tool called PGP Secure Wipe that complete removes all deleted files from your computer&lt;br /&gt;by overwriting them.In this way you'll only have the encrypted files on your computer.&lt;br /&gt;&lt;br /&gt;-Viruses and Trojans&lt;br /&gt;********************&lt;br /&gt;&lt;br /&gt;Another dangerous security problem are the viruses and the trojans.So when you infect with a&lt;br /&gt;trojan the attacker may run a key logger on your system.&lt;br /&gt;&lt;br /&gt;*Note&lt;br /&gt;A key logger is a program that captures all keystrokes pressed by you then saves them on your&lt;br /&gt;hard drive or send them to the attacker&lt;br /&gt;***************************************&lt;br /&gt;So after the attacker run it he/she will be able to see everything you have written on your computer&lt;br /&gt;and of course with your PGP pass phrase.&lt;br /&gt;There are also a viruses designed to do this.Simpy record your pass phrase and send it back to the&lt;br /&gt;attacker.&lt;br /&gt;&lt;br /&gt;-Fake Version of PGP&lt;br /&gt;********************&lt;br /&gt;&lt;br /&gt;Another security problem is the PGP source that is&lt;br /&gt;available so someone can make a fake copy of it that is recording your pass phase and&lt;br /&gt;sending it back to the attacker.The program will look real and it will work but it may also have&lt;br /&gt;functions you even don't know about.&lt;br /&gt;A way of defending of these security problems is to use a trojan and a virus scanner.You should&lt;br /&gt;also be sure your computer is clean from viruses and trojans when you install PGP and also be sure&lt;br /&gt;you get PGP from Network Associates Inc. not from some other pages.&lt;br /&gt;&lt;br /&gt;So now I hope you understand that PGP can't be braked but if you use it wisely and be sure&lt;br /&gt;your pass phrase is good one,you're not infected with viruses or trojans and you're using the&lt;br /&gt;real version of PGP you'll be secure.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2613452802614549309-874360790048688557?l=hack-heck2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hack-heck2.blogspot.com/feeds/874360790048688557/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://hack-heck2.blogspot.com/2009/02/basics-of-cryptography.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2613452802614549309/posts/default/874360790048688557'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2613452802614549309/posts/default/874360790048688557'/><link rel='alternate' type='text/html' href='http://hack-heck2.blogspot.com/2009/02/basics-of-cryptography.html' title='The Basics of Cryptography'/><author><name>azhar yusuf</name><uri>http://www.blogger.com/profile/14377885979614235458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2613452802614549309.post-5975075101840638748</id><published>2009-02-06T02:34:00.000-08:00</published><updated>2009-02-06T02:35:15.994-08:00</updated><title type='text'>ENCRYPTION AND AUTHENTICATION</title><content type='html'>CONTENTS&lt;br /&gt;=======================================&lt;br /&gt;&lt;br /&gt;1.  Introduction.&lt;br /&gt;2.  Key Systems.&lt;br /&gt;&lt;br /&gt;    2.1 Symmetric Key&lt;br /&gt;    2.2 Public Key&lt;br /&gt;&lt;br /&gt;3.  Digital Certificates.&lt;br /&gt;4.  Hash Algorithms.&lt;br /&gt;5.  Authentication.&lt;br /&gt;   &lt;br /&gt;    5.1 Usernames and Passwords&lt;br /&gt;    5.2 Passcards&lt;br /&gt;    5.3 Digital Signatures&lt;br /&gt;    5.4 Checksum&lt;br /&gt;&lt;br /&gt;6.  Biometrics.&lt;br /&gt;7.  Steganography.&lt;br /&gt;8.  Last Words.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;____________________________________________________________________________________________&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1.0 INTRODUCTION&lt;br /&gt;=======================================&lt;br /&gt;&lt;br /&gt;In recent times privacy and security has become increasingly important&lt;br /&gt;especially with newer technologies like wireless networking and the&lt;br /&gt;potential problems they represent. Encryption has always been an&lt;br /&gt;effective way to conceal information and before the digital era it was&lt;br /&gt;mostly used my governments such as the germans and americans during the&lt;br /&gt;second world war and has been seen as far back as the times of the great&lt;br /&gt;Roman Empire. There is alot of information that we would like to keep&lt;br /&gt;private like credit card and financial information and personal letters&lt;br /&gt;and conversations, encryption and the science of cryptography allows us&lt;br /&gt;to do this.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2.0 KEY SYSTEMS&lt;br /&gt;=======================================&lt;br /&gt;&lt;br /&gt;There are two different kinds of systems used to handle encryption and&lt;br /&gt;convert data these are called Symmetric and Public key encryption.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2.1 SYMMETRIC KEY&lt;br /&gt;=======================================&lt;br /&gt;&lt;br /&gt;Symmetric key encryption involves 2 computers on a network each with a&lt;br /&gt;"key" installed on it. This key allows each of the computers to decode&lt;br /&gt;the encrypted data that was sent to it. For example computer A is sending&lt;br /&gt;an encrypted packet to computer B for this example we will use a very&lt;br /&gt;simple kind of encryption, for every letter in the data we move down&lt;br /&gt;the alphabet 2 places A becomes C and B becomes D, using this information&lt;br /&gt;we can both encrypt and decrypt the information.&lt;br /&gt;&lt;br /&gt;Computer   Symmetric Key     Computer&lt;br /&gt;========   =============      ========&lt;br /&gt;   A    ---&gt;----- Shift 2 places ---&gt;----    B&lt;br /&gt;&lt;br /&gt;Using the shift 2 places key A can send the message 'Hello' to B, Hello&lt;br /&gt;will be shifted by the key and B will recieve "Jgnnq" this just looks like&lt;br /&gt;gibberish until B looks at its key and it knows to shift the letters 2&lt;br /&gt;places, doing this B can see that it says Hello, of course this is a bit&lt;br /&gt;simplified but you can see how this method can be built upon to form&lt;br /&gt;greater, more sophisticated levels of encryption.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2.2 PUBLIC KEY&lt;br /&gt;=======================================&lt;br /&gt;&lt;br /&gt;Public Key encryption relies upon 2 keys, the public key and the private key.&lt;br /&gt;The private key is held by your computer, when you want to send secure&lt;br /&gt;data between a computer and your own you give your public key to that person&lt;br /&gt;then every computer that wants to communicate with you has a copy of your&lt;br /&gt;public key. To decode any messages you send to those computers they must use&lt;br /&gt;a combination of both your public key and their own private key, this method&lt;br /&gt;of encryption is most popularly used with the encryption program pgp, you&lt;br /&gt;can get this software from www.pgp.com.&lt;br /&gt;&lt;br /&gt;Most computers use a mixture of symmetric and public key encryption because&lt;br /&gt;of the amount of processing that is required. When starting a secure connection&lt;br /&gt;the first computer uses a symmetric key and sends this to the second computer&lt;br /&gt;using public key encryption. The two computers then use symmetric encryption&lt;br /&gt;for the rest of the transaction. Once the session is completed the key is&lt;br /&gt;discarded and a new key must be created for all following sessions, this means&lt;br /&gt;that even if somehow a person gets your key, once the session has ended it wont&lt;br /&gt;matter and the key will be useless.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;3.0 DIGITAL CERTIFICATES&lt;br /&gt;=======================================&lt;br /&gt;&lt;br /&gt;Public Key encryption wouldn't be practical to use for applications such as&lt;br /&gt;web servers for online transactions, for this purpose Digital Certificates&lt;br /&gt;were developed. The digital certificate is a small file provided to each&lt;br /&gt;computer by an independent system called a certification body, this tells&lt;br /&gt;each computer that the other one is who it says it is and that it can be&lt;br /&gt;trusted, the certification body then sends the public keys of each computer&lt;br /&gt;to the other and they are free to communicate.&lt;br /&gt;&lt;br /&gt;The digital cert method is mostly used in SSL (Secure Sockets Layer). SSL&lt;br /&gt;was developed by netscape and quickly adopted for browser to web server&lt;br /&gt;communication, especially by sites dealing in e-commerce and financial trans-&lt;br /&gt;actions such as amazon.com or dabs.com.&lt;br /&gt;&lt;br /&gt;SSL is a part of larger security protocol called TLS (Transport Layer Security)&lt;br /&gt;which has a large backing from microsoft. In your web browser there is 2 tell&lt;br /&gt;tale signs that such precautions are in place, the first is the small pad-lock&lt;br /&gt;that appears in your status bar if it appears to be locked the site is secure,&lt;br /&gt;otherwise there is no security between your connection, another sign is the&lt;br /&gt;address in the bar at the top, if you had a secure transaction in place with&lt;br /&gt;blacksun's site your address bar would read https://www.bsrf.org.uk instead&lt;br /&gt;of the usual http:// beofore the address. You may also notice some Certificate&lt;br /&gt;or digitally signed alerts you recieve when you try to download certain software&lt;br /&gt;or access certain websites, this is just to tell you that the site *should*&lt;br /&gt;essentially be trustworthy altough the average web surfer wont have a clue what&lt;br /&gt;its talking about.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;4.0 HASH ALGORITHMS&lt;br /&gt;=======================================&lt;br /&gt;&lt;br /&gt;To get a public key we use a hash value, to get this value the computer uses&lt;br /&gt;an input value usually a large one like 12,537, then puts that number trough&lt;br /&gt;the hashing algorithm and we get an ouput, if we had a simple algorithm like&lt;br /&gt;multiply the input number by 124 we would end up with 1,554,588, it would be&lt;br /&gt;very hard to guess the original number was 12,537 unless you knew to divide&lt;br /&gt;the output by 124 to get the original number. Most Hash algorithms are much&lt;br /&gt;more sophisticated than this.&lt;br /&gt;&lt;br /&gt;Hash algorithms can be very long and use massive hash values, the level of&lt;br /&gt;encryption is measured by its hash value and this can go up to 128 bit numbers&lt;br /&gt;which would give us a hash value of anything between 2 to the power of 0 and&lt;br /&gt;2 to the power of 128, which in decimal terms is anywhere inbetween 0 and&lt;br /&gt;3,402,823,669,209,384,634,633,746,074,300,000,000,000,000,000,000,000,000,000,000,000,000.&lt;br /&gt;which would be a little more difficult :).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;5.0 AUTHENTICATION&lt;br /&gt;=======================================&lt;br /&gt;&lt;br /&gt;Another option in computer security which is often used hand in hand with&lt;br /&gt;encryption is authentication systems. There are several different commonly&lt;br /&gt;used authentication systems including the following.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;5.1 USERNAMES AND PASSWORDS&lt;br /&gt;=======================================&lt;br /&gt;&lt;br /&gt;This method has been used for many years to gaurd the personal information&lt;br /&gt;and privacy of different users on a computer system or network. This is&lt;br /&gt;the most popular method and is in place in one form or another on every&lt;br /&gt;operating system to varying degrees of success. The computer encrypts the&lt;br /&gt;password and compares it with an earlier encrypted version of the users&lt;br /&gt;password, if the two files match then the password is correct. A password&lt;br /&gt;cracker operates by encrypting a series of words and comparing them with&lt;br /&gt;the password file, once it finds a match it alerts the user of the cracking&lt;br /&gt;software with both username and password.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;5.2 PASS CARDS&lt;br /&gt;=======================================&lt;br /&gt;&lt;br /&gt;There are several types of pass cards mostly used in offices, these range&lt;br /&gt;from standard swipe cards, similiar to credit cards they have a magnetic&lt;br /&gt;strip holding the users information, to smart cards containg a small chip,&lt;br /&gt;this method is used most commonly on the macintosh where you place a small&lt;br /&gt;card into the keyboard on the left, some software such as Quark Express&lt;br /&gt;uses this method to ensure that a licence for the software has been purchased.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;5.3 DIGITAL SIGNATURES&lt;br /&gt;=======================================&lt;br /&gt;&lt;br /&gt;Digital signatures are a form of public key encryption. The signer of the&lt;br /&gt;document(e-mail, text file etc..) uses his private key and a four part&lt;br /&gt;public key to digitally sign the document, the algorithm used is the&lt;br /&gt;Digital Signature Algorithm (DSA) which is endorsed by the US government.&lt;br /&gt;If any changes occur to the contents of the document after it has been&lt;br /&gt;signed the signature is rendered invalid.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;5.4 CHECKSUM&lt;br /&gt;=======================================&lt;br /&gt;&lt;br /&gt;Checksum methods arent usually used for security purposes but can be used&lt;br /&gt;as such. TCP/IP uses a checksum technique, it gets the size of the packet&lt;br /&gt;and stores it in a field within the header, on arrival to the remote computer&lt;br /&gt;it checks the size of the packet and then compares it with the value of the&lt;br /&gt;field within the header, if the 2 dont match, the packet is discarded this&lt;br /&gt;is usually because of errors or loss during transport but this and similiar&lt;br /&gt;methods can be used to ensure data is not altered by a person.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;6.0 BIOMETRICS&lt;br /&gt;=======================================&lt;br /&gt;&lt;br /&gt;Biometrics operate on the fact that every person has a certain unique&lt;br /&gt;set of features about them and these features are then used as a basis&lt;br /&gt;of authentification to that person. Biometric authentication can use&lt;br /&gt;several features of the person including,&lt;br /&gt;&lt;br /&gt;Face scan   - Identifying a person based on the features of their face.&lt;br /&gt;Retina Scan  - Identified upon the patterns of the eyes retina.&lt;br /&gt;Fingerprints  - Identifies the person on their unique fingerprint.&lt;br /&gt;Voice Identification - Based upon levels and pitch of voice.&lt;br /&gt;DNS Fingerprinting  - Not very common, checks the DNA structure from biological material.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;7.0 STEGANOGRAPHY&lt;br /&gt;=======================================&lt;br /&gt;&lt;br /&gt;Steganography is the process of storing information within common everyday&lt;br /&gt;material. This method is most commonly used with images such as gif or jpeg&lt;br /&gt;files however the technology has been extended to other areas such as mp3&lt;br /&gt;files or common internet traffic within the headers. There are many programs&lt;br /&gt;available across the internet for hiding information with steganogaphy.&lt;br /&gt;As an example of steganography heres an example of storing some information&lt;br /&gt;within normal web traffic:&lt;br /&gt;&lt;br /&gt;within the ip header theres a field called the ttl or Time-To-Live, which&lt;br /&gt;holds a numeric value, by storing the numerical value of an ascii characther&lt;br /&gt;we can send short messages 1 charachter at a time, the maximum value of an&lt;br /&gt;ascii characther is 255 so this value would not seem very uncommon so far as&lt;br /&gt;ttl fields in ordinary traffic. You would have to ensure the remote computer&lt;br /&gt;was on the same network so that the hop count could be predicted, move 1&lt;br /&gt;charachter up for each hop to handle the ttl being decremented. A better&lt;br /&gt;example would be to use icmp, icmp has alot of room left within its body&lt;br /&gt;as it doesnt usually carry a payload, by storing information with the payload&lt;br /&gt;of an icmp packet you could transfer information similiarly to normal traffic&lt;br /&gt;and it is uncommon for this to be checked or logged by systems, this could be&lt;br /&gt;further improved by encrypting the payload and this method is not bound by&lt;br /&gt;prolems such as calculating the hops and has much more room to transmit data,&lt;br /&gt;despite limitations heres an example of transmitting a word in ttl fields &gt;&gt;&lt;br /&gt;&lt;br /&gt;Packet-1&lt;br /&gt;192.62.4.1-&gt;192.62.4.2, win:512, ttl:72, id:20482&lt;br /&gt;(72 = 'H')&lt;br /&gt;&lt;br /&gt;Packet-2&lt;br /&gt;192.62.4.1-&gt;192.62.4.2, win:512, ttl:69, id:21436&lt;br /&gt;(69 = 'E')&lt;br /&gt;&lt;br /&gt;Packet-3&lt;br /&gt;192.62.4.1-&gt;192.62.4.2, win:512, ttl:76, id:22132&lt;br /&gt;(76 = 'L')&lt;br /&gt;&lt;br /&gt;Packet-4&lt;br /&gt;192.62.4.1-&gt;192.62.4.2, win:512, ttl:76, id:23019&lt;br /&gt;(76 = 'L')&lt;br /&gt;&lt;br /&gt;Packet-5&lt;br /&gt;192.62.4.1-&gt;192.62.4.2, win:512, ttl:79, id:24149&lt;br /&gt;(79 = 'O')&lt;br /&gt;&lt;br /&gt;Packet-6&lt;br /&gt;192.62.4.1-&gt;192.62.4.2, win:512, ttl:10, id:25218&lt;br /&gt;(10 = '\r\n'[Carriage return or New Line])&lt;br /&gt;&lt;br /&gt;This transfers H-E-L-L-O\r\n, which is of course the&lt;br /&gt;word hello, its terminated by a carriage return to&lt;br /&gt;track the end of each word.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;8.0 LAST WORDS&lt;br /&gt;=======================================&lt;br /&gt;&lt;br /&gt;By using a mixture of these technologies it is possible to make communiceation&lt;br /&gt;and information more secure from unwelcome eyes and ears. Thanks to these&lt;br /&gt;methods digital transmissions are more secure than other kinds like mail&lt;br /&gt;or even phone calls, especially on cellular phones, altough it pays to&lt;br /&gt;remember that nothing is truely secure, especially in the way that the&lt;br /&gt;encryption algorithms were so quickly cracked and captured using radio&lt;br /&gt;antennas on wireless networks or from programs such as john the cracker.&lt;br /&gt;&lt;br /&gt;Well thats the end of this little tutorial and i hope you learnt more about&lt;br /&gt;both encryption and authentication and their processes.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2613452802614549309-5975075101840638748?l=hack-heck2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hack-heck2.blogspot.com/feeds/5975075101840638748/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://hack-heck2.blogspot.com/2009/02/encryption-and-authentication.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2613452802614549309/posts/default/5975075101840638748'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2613452802614549309/posts/default/5975075101840638748'/><link rel='alternate' type='text/html' href='http://hack-heck2.blogspot.com/2009/02/encryption-and-authentication.html' title='ENCRYPTION AND AUTHENTICATION'/><author><name>azhar yusuf</name><uri>http://www.blogger.com/profile/14377885979614235458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2613452802614549309.post-6946148805019514218</id><published>2009-02-06T02:29:00.000-08:00</published><updated>2009-02-06T02:31:02.178-08:00</updated><title type='text'>pc hardware</title><content type='html'>This isn't so much a tutorial, as it doesn't actually teach you much.. It's more a text on hardware for those of you sick of newbie tutorials, and looking for something interesting and non-dangerous. This is mainly about motherboard stuff, but I stuck something about HDs, mice and Gfx cards at the end. Hey, if people like it and tell me, I might even stretch and do al the other computer bits and bobs. ;)&lt;br /&gt;&lt;br /&gt;The BIOS.&lt;br /&gt;This contains instructions which are specific for that particular motherboard. Those programs and instructions will remain in the PC throughout its life; usually they are not altered. However, it is possible to get replacement / upgrade BIOS's. Primarily the ROM code holds start-up instructions. In fact there are several different programs inside the start-up instructions, but for most users, they are all woven together. You can differentiate between:&lt;br /&gt;&lt;br /&gt; * POST (Power On Self Test) &lt;br /&gt; * The Setup instructions, which connect with the CMOS instructions &lt;br /&gt; * BIOS instructions, which connect with the various hardware peripherals &lt;br /&gt; * The Boot instructions, which call the operating system (DOS, OS/2, or Windows)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Note: Only very old or different OS's are stored on ROM, such as OS/2. This is actually a much more efficient system.&lt;br /&gt;BIOS's are static sensitive, so take care when handling them. They can also be PWord protected... if you ever get round to doing this, don't forget the password. As you don't use the BIOS PWord often, this is easy to do. Don't. it's bloody hard getting the PWord back.&lt;br /&gt;&lt;br /&gt;Processors&lt;br /&gt;Processors work on a fetch-execute cycle. each tick of the clock, in theory, they get a bit of data... and by tick of the clock here, we don't mean a second, we mean the tick of a computer clock. Depending on the speed of your processor, this is anywhere from 233 million ticks per second for a 233, to 800 for an overclocked 600MHz Athlon chip.&lt;br /&gt;So, you can get, on your average computer, 400 - 500 bits of data per second. Well, wrong actually... because not every clock tick is taken up by getting the data. Every _fourth_ is. Well, what about every other 3? you ask.. they are taken up with _finding_ the data, _getting_ it, and putting it back. So, you say, your processor runs at a quarter of the speed that in theory it should be able to do? Well, yes. And there's no way around this, unfortunately. But, we can make the clock speed a little faster, and it is the clock speed that dictates the speed of the processor... (within reason).&lt;br /&gt;Therefore, you can set the clock ticks on your 233 to 266, and it'll run at 166 MHz. Yes. Unfortunately, the more clock ticks there are in relation to what your chip is _supposed_ to run at, the hotter it Gets. Therefore, you need to install heatsyncs/fans. In fact, the AMD Athlon 600MHz overclocked to 800MHz, the fastest PC at the time of writing has a minature fridge that cools the chip, which is its own special metal box. The tower-sized case also has a box the size of a mini-tower underneath for the cooling system. ;)&lt;br /&gt;For this increase in temperature of 200MHz, the chip is cooled to -37 degrees centigrade. that's cold. ;) (Note: AMD chips generally run a lot hotter than Intel ones). ((Not a problem unless u have no heatsync)) - see the micron section, below...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The Clock&lt;br /&gt;Now, this fabled clock looks like, in most cases, a small black box on your motherboard. The clock ticks it emitts are in the form of a wave , but a different wave: one that is sqare, and it looks like a castle ramparts. the speed of this is dictated by the MHx setting you set with the Jumpers on your motherboard. The waves look like so: (except slightly more square)&lt;br /&gt;&lt;br /&gt;  __     _    ____   _   _    ___&lt;br /&gt;_¦  ¦___¦ ¦__¦    ¦_¦ ¦_¦ ¦__¦   ¦__    and etc.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The wave, which never changes, and is always the same, is broadcast throughout your motherboard, and it synchronises all of the things that go on there. For example, when you press the left button in your game of quake, the processor assigns different bits of your computer to do whatever is neccacery to redraw what's on the screen, and tells it to have it done in 3 ticks' time. The same process occurs on the gfx card itself, where the main processor assigns a polygon to each other chip, or whatever. Infact, if you have an old enough computer, you can see it being redrawn on the screen... try it... run a gfx-intensive game on a 486... If the task isn't done in time, then it all falls apart, and the computer crashes. This is why you don't want to buy a dodgy CPU. :) (Get an AMD Athlon!).&lt;br /&gt;The signals sent run around your motherboard, through all of those copper bits, and into the chips, ISA slots, or whatever, and the task gets accomplished.&lt;br /&gt;&lt;br /&gt;This signal is sent around the motherboard in that most wonderful of things we all love, Binary. Now, Binary is what Computers communicate with, and it is a DIGITAL thing. Digital. A Much used term.&lt;br /&gt;COmputers are electronic, and therefore, all the signals in them are tiny pulses of electricity. Now, electricity can be one of two things. On... or off. And this is what makes it digital. If it could be half on as well, it would be analogue... But no. It's digital. However, the representation of it in the form of signals down wires is analogue, as a sound in a modem wire can be any of a hundred million different pitches, can't it. Yes. This digital signal is, then, a series of 0's and 1's. Binary. The counting system that we use (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11... etc... ) is Denary. It's Base ten... Binary is Base 2 (and Hexadecimal, which is used, amongst other things, is base 16). Therefore it is perfect for being what these signals are coded in. so each charactor on your screen is represented in your computers RAM by a series of Binary digits. Probably 8. if you go into Windows Calculator, and switch to scientific mode (View&gt;Scientific) you can decode this. For example, 1 in Binary is 00000001. 2 is 00000010. The way this can be decoded is thus:&lt;br /&gt;&lt;br /&gt;Each digit in binary represents a quantity of a certain number, just as denary does. In denary, there is a column for 1's, a column for 10's, and a column for 100's. And in Binary, there is a column for 1's, 2's, 4's, 8's, etc. Let me show you:&lt;br /&gt;&lt;br /&gt;Denary:&lt;br /&gt;100s  10s  1s&lt;br /&gt;1  0  0&lt;br /&gt;&lt;br /&gt;Here, there is a one in the hundreds column, and therefore, 100 + 0 + 0 (0 and 0 are the other 2 columns) makes 100. SO 1 0 0 in Denary represents 100. (of course, translating 100 --&gt; 100 doesn't work, as denary is used in both cases). In Binary, this works this:&lt;br /&gt;&lt;br /&gt;Binary (8-bit -- 8 digits)&lt;br /&gt;128  64  32  16  8  4  2  1&lt;br /&gt;1  1  1  1  1  0  1  0&lt;br /&gt;&lt;br /&gt;SO... 128 + 64 + 32 + 16 + 8 + 2 + 1 = 250.&lt;br /&gt;So the Binary number 11111010 = 250. Simple, eh?&lt;br /&gt;&lt;br /&gt;It is possible to do addition, subtraction, multiplication, in fact, EVEYTHING that is possible with denary (1--&gt; 10)... I'm not going to explain it because it is simply too complicated. ;) Use Windows Calculator... the radio buttons at the top left switch between number systems.&lt;br /&gt;&lt;br /&gt;Chipset&lt;br /&gt;We all know what assembly language is, do we not? It is the programming language that is most native to a computer. The instructions go directly to the chip (more or less). (Assembly actually lays on top of Machine code, which is the real native: Assembler is a more human-friendly version)... Each chip has their own different version of assembler/machine code, called its _chipset_. Each new type of chip comes with an upgraded chipset: for example, the Intel MMX chip incorporated the...wait for it... MMX chipset! There are also chipsets such as 3D!Now. THe most basic of commands between, say, Intel and AMD are the same: they have to be in order for the two to be compatible, but more advanced things are different. This is why Alpha chips are incompatible with windows: The chipset is completely different.&lt;br /&gt;Intel has hitherto been the leader in supplying chip sets to the Pentium motherboard. Therefore, let us just mention their chip sets, which have astronomical names. The Neptune chip set (82434NX) was introduced in June 1994. It replaced the Mercury set (82434LX). In both chip sets, there were problems with the PCI bus. In January 1995 Intel introduced the first Triton, where everything worked. This chip set supports some new features: it supports EDO RAM, and it offers bus master integrated EIDE control and NSP (Native Signal Processing - one of the many new creations, which was soon forgotten).&lt;br /&gt;The sorts of things that new chipsets are used for are varied... for example, The Intel TX Chipset, for example, supports SDRam and UltraDMA (But the TX-set cannot cache above 64 MB RAM, and that is a problem.), while AMD chips have their own special Graphics chipset, which is better for that task.&lt;br /&gt;&lt;br /&gt;Microns&lt;br /&gt;The CPUs have doubled their calculating capacity every 18 months. This is called "Moore's Law" and was predicted in 1965 by Gordon Moore. He was right for more than 30 years. The latest CPUs use internal wiring only 0.25 microns wide (1/400 of a human hair). But if Moore's Law has to be valid into the next century, more transistors have to be squeezed onto silicon layers. And now there is a new hope. IBM has for the first time succeeded in making copper conductors instead of aluminum. Copper is cheaper and faster, but the problem was to isolate it from the silicon. The problem has been solved with a new type of coating, and now chips can be designed with 0.13 micron technology. The technology is expected later to work with just 0.05 micron wiring! Texas Instruments announced on August 27th 1998 that they expect 0.07 micron CMOS processing in the year 2001. At the time of writing, AMD chips run at .27 microns (?) and Intel at .33. This explains why AMD chips are hotter, as there is less wire, and therefore more probability of the electrons that the electricity is comprised of hitting the side of the wires, and creating heat.&lt;br /&gt;&lt;br /&gt;Hard Drives&lt;br /&gt;Hard drives work in much the same way as a floppy disk does. They can, however, store a much larger capacity of data, and therefore are much more fragile, and compact . For this reason, they are hermetically sealed. NEVER OPEN ONE IF YOU WANT TO USE IT AGAIN. There is, inside, 3 or 4 goldy-brown circular plates on which the data is stored. These are much the same as the ones inside a floppy disk, except that they are not 'floppy' but hard, or stiff. The data is stored on the platters magnetically, which explains why floppy disks have a "keep magnets away from me" warning on boxes u buy them in.&lt;br /&gt;IBM introduced the first hard disk in 1957, when data usually was stored on tapes. The first 305 RAMAC (Random Access Method of Accounting and Control) consisted of 50 platters, 24 inch diameter, with a total capacity of 5 MB, a huge storage medium for its time. It cost $35,000 annually in leasing fees (IBM would not sell it outright) and was twice the size of a refrigerator.&lt;br /&gt;In the early 80s, HD's became the preferred storage medium as opposed to floppy drives (these were previously used due to increased reliability). IBM's PS/2 (one of which I have - yay) was one of the first PCs to be equipped with a Hard drive. I think.&lt;br /&gt;&lt;br /&gt;Mice&lt;br /&gt;Mice are, as we all know, Input devices, and as we also know, they tell where you are on the mousemat by moving a ball in the bottom. Which you can see. But how does it read how the ball is moving? Well, inside the mouse are 2 rollers, at 90 degrees to each other. When you move the mouse, u move the ball, and thus the rollers. THe rollers have some little discs on the end of them with slits in, and either side of the disc are light-readers, so that when you move tha ball, the mouse can tell because light flasles on and off in its light reader. There is also a 3rd non-functional roller to keep the ball rolling smoothly. Note: It is perfectly safe to turn your mouse upside down ,. take the ball out and look inside, as long as you don't prod anything too hard (twiddle the rollers by all means, just don't stick bits of paper in there). It is also a good idea to get a blunt knife or screw driver and clean the crud off the rollers every few weeks... it solidifies into little rings around the rollers, and works to the detriment of the mouse. If it isn't cleaned off, it can also, fallinto the mouse, and reak havok with the insides. :) The same sort of crud builds up in keyboards, but is harder to remove. ;)&lt;br /&gt;&lt;br /&gt;GFX Cards&lt;br /&gt;A video card is typically an adapter, a removable expansion card in the PC. Thus, it can be replaced! The video card can also be an integral part of the system board...This is the case in certain brands of PCs and is always the case in lap tops. This is not nice, as it is hard to upgrade to a better card. On a OC with a non-removable gfx or sound card, the normal procedure if you _do_ want to replace it is to disable the built-in graphics card using jumpers or dip switches... consult your motherboard manual. ;) Regardless of whether it is replaceable or integrated, it consists of three components:&lt;br /&gt;&lt;br /&gt;* A video chip of some brand (ATI, Matrox, S3, Cirrus Logic, or Tseng, to name some of the better known). The video chip creates the signals, which the screen must receive to form an image.&lt;br /&gt;* Some kind of RAM (EDO, SGRAM, or VRAM, which are all variations of the regular RAM). Memory is necessary, since the video card must be able to remember a complete screen image at any time.&lt;br /&gt;* A RAMDAC - a chip converting digital/analog signals.&lt;br /&gt;&lt;br /&gt;NOTE: Never buy an S3. Never. Ever. I've had lots, they're all useless. Remember that.&lt;br /&gt;&lt;br /&gt;All ordinary graphics cards can show 3D games. That is really no special trick. The problem is to present them smoothly and fast. If the PC’s video card is made for 2D execution only, the CPU must do the entire workload of geometric transformations etc.! And that task can cause even the fastest CPU to walk with a limp. In recent years there has been an enormous development in 3D graphics cards. Let me briefly describe those here.&lt;br /&gt;&lt;br /&gt;There are two types of graphics cards, which can be used for 3D acceleration:&lt;br /&gt;&lt;br /&gt;Combination 2D/3D cards. These are ordinary graphics cards, which have been equipped with extra 3D power.&lt;br /&gt;The pure 3D cards, which only work as accelerators. These cards require that there also is an ordinary (2D) graphics card in the PC.&lt;br /&gt;Of course the pure 3D card yields the best acceleration, but there are also good combination cards on the market.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2613452802614549309-6946148805019514218?l=hack-heck2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hack-heck2.blogspot.com/feeds/6946148805019514218/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://hack-heck2.blogspot.com/2009/02/pc-hardware.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2613452802614549309/posts/default/6946148805019514218'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2613452802614549309/posts/default/6946148805019514218'/><link rel='alternate' type='text/html' href='http://hack-heck2.blogspot.com/2009/02/pc-hardware.html' title='pc hardware'/><author><name>azhar yusuf</name><uri>http://www.blogger.com/profile/14377885979614235458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2613452802614549309.post-1273699343727601456</id><published>2009-02-05T23:16:00.000-08:00</published><updated>2009-02-05T23:20:38.537-08:00</updated><title type='text'>The History of DOS</title><content type='html'>1. Contents: Disclaimer&lt;br /&gt;   2. Introduction&lt;br /&gt;   3. History&lt;br /&gt;   4. The Memory Map&lt;br /&gt;   5. Timeline and History Chart&lt;br /&gt;   6. Future of DOS&lt;br /&gt;   7. Postscript&lt;br /&gt;   8. Bibliography &lt;br /&gt;&lt;br /&gt;Disclaimer:&lt;br /&gt;Although this document is purely informative, the author claims no responsibility for any misguided souls who find a way to twist its contents into anything harmful or overly offensive.&lt;br /&gt;&lt;br /&gt;Introduction:&lt;br /&gt;When a computer is turned on an Operating System must be loaded into the computer's memory before the user can begin using it. IBM compatible machines use an operating system called MS-DOS. MS stands for "MicroSoft" (a trade name), while DOS stands for "Disk Operating System", which tells us that it's original purpose was to provide an interface between a computer and its disk drives. Technically, DOS is a high-level interface between an application program and the computer.&lt;br /&gt;&lt;br /&gt;DOS has been extended further, allowing programs to handle the likes of simple memory management, disk operations, assorted system tasks (e.g. date/time), user input commands and managing input/output (i/o) devices (i.e. it provides operating instructions for the computer to manage both hardware and software). Versions 3.1 and up also provide basic networking functions.&lt;br /&gt;&lt;br /&gt;Beyond this, DOS provides the user with the important facility of file and disk management (often referred to as disk-housekeeping). This part of DOS is particularly crucial to the user as it was specifically designed for him or her to interact with.&lt;br /&gt;&lt;br /&gt;With the advent of installable device drivers and TSR (Terminate but Stay Resident) programs in DOS v2.0, the basic DOS functions could be extended to handle virtually any scale of operations required. This was the first instance of multiple programs being run at once in DOS. Some TSR's can however interfere with the running of programs. When a program is loaded into memory it assumes that it has exclusive use of this memory and will not take into account the fact that another program (the TSR) is also using this area. Thus a conflict can arise causing the program to hang (hang means that the screen freezes and the task being executed stops responding forcing the user to either switch off or reboot the computer).&lt;br /&gt;&lt;br /&gt;History:&lt;br /&gt;The development of MS-DOS/PC-DOS began in October 1980, when IBM began searching the market for a suitable operating system to go with their soon to be released IBM PC's (commercial Personal Computers). IBM had originally intended to use Digital Research's industry standard operating system - CP/M (Control Program/Monitor or Control Program for Microcomputer - originally written in 1973 by Gary Kildall in his PL/M language). This was never implemented due to uncertain reasons, the most likely being poor diplomatic relations between the two companies. Later, IBM approached a relatively small company called Microsoft, which specialised in language vending. Bill Gates and Paul Allen had written Microsoft BASIC and were selling it on punched tape or disk to early PC hobbyists.&lt;br /&gt;&lt;br /&gt;Earlier, in April 1980, Tim Patterson began writing an operating system for use with Seattle Computer Products' 8086-based (S100 bus micros) computer. Seattle Computer Products decided to come up with their own disk operating system, due to delays by Digital Research in releasing a CP/M-86 operating system. By August 86-DOS or QDOS v0.10 (Quick and Dirty Operating System) was shipped by Seattle Computer Products. It was a 16-bit version of CP/M. Even though it had been created in only two man-months, the DOS worked surprisingly well. A week later, the EDLIN line editor was created. EDLIN was supposed to last only six months, before being replaced, but it endured for longer.&lt;br /&gt;&lt;br /&gt;In September Tim Patterson showed Microsoft his 86-DOS, written for the 8086 chip. At this stage Microsoft had no 8086 real operating system to offer, but capitalized when, in October, Microsoft's Paul Allen contacted Patterson, asking for the rights to sell SCP's DOS to an unnamed client (IBM). Microsoft paid less than $100 000 for the rights. Patterson's DOS v1.0 was approximately 4000 lines of assembler source. This code was quickly polished up and presented to IBM for evaluation.&lt;br /&gt;&lt;br /&gt;An agreement was reached between the two companies and IBM agreed to accept 86-DOS as the main operating system for their new PC. In February 1981, 86-DOS was run for the first time on IBM's prototype microcomputer. Furthermore, Microsoft purchased all rights to 86-DOS in July 1981.&lt;br /&gt;&lt;br /&gt;In August, IBM announced the IBM 5150 PC, featuring a 4.77-MHz Intel 8088 CPU, 64KB RAM, 40KB ROM, one 5.25-inch floppy drive, and PC-DOS 1.0 (Microsoft's MS-DOS), for $3000.&lt;br /&gt;&lt;br /&gt;Thus, "IBM Personal Computer DOS v1.0" was available for the introduction of the IBM PC in October 1981. IBM heavily subjected the program to an extensive quality-assurance test and found there to be well over 300 bugs and decided to rewrite the programs. This is why PC-DOS is copyrighted to both Microsoft and IBM.&lt;br /&gt;&lt;br /&gt;Some early OEM (Original Equipment Manufacture) versions of DOS had different names such as Compaq-DOS, Z-DOS, Software Bus 86, etc. By version 2.0 Microsoft had succeeded to persuade everyone but IBM to call it MS-DOS.&lt;br /&gt;&lt;br /&gt;It is interesting to reflect on the fact that the IBM PC was not originally meant to run MS-DOS. Instead it was supposed to use a (not yet in existence) 8086 version of CP/M. On the other hand, DOS was originally written before the IBM PC was created. CP/M-86 would have been the main operating system except for two things: Digital Research wanted $495 for CP/M-86 (considering PC-DOS was basically free) and many software developers found it easier to port software from CP/M into PC-DOS than into CP/M-86.&lt;br /&gt;&lt;br /&gt;The IBM PC was first shipped without an operating system. IBM only started including DOS when the second generation AT/339 came out. A user could order one of three available operating systems: IBM PC-DOS, a version of UCSD p-System (type of integrated Pascal operating system - like the improved BASIC operating systems used by the Commodore 64,) and CP/M-86, which was officially an option even though it was unavailable until later on. Since IBM's $39.95 DOS was much cheaper than anyone else's it soon became the most popular.&lt;br /&gt;&lt;br /&gt;An upgrade from DOS v3.3 to v4.0 was solely done by IBM, it was later licenced back to Microsoft. In early 1990 IBM declared that it would be ceasing development of DOS, handing the reigns over to Microsoft from then on.&lt;br /&gt;&lt;br /&gt;Microsoft's Press' "MSDOS Encyclopaedia" illustrated an example of a late DOS v1.25 OEM brochure. Microsoft was praising future enhancement to v1.25 including XENIX-compatible pipes, process forks and multitasking, as well as "graphics and cursor positioning, kanji support, multi-user and hard disk support and networking". Despite these large aspirations, Microsoft failed to produce the forks, multitasking and multi-user support (at least in US versions of DOS).&lt;br /&gt;&lt;br /&gt;The notice claimed: "MS-DOS has no practical limit on disk size. MS-DOS uses 4-byte XENIX OS compatible pointers for a file and disk capacity of up to 4 gigabytes."&lt;br /&gt;&lt;br /&gt;For the record they actually delivered:&lt;br /&gt;&lt;br /&gt;XENIX-compatible pipes:&lt;br /&gt;             DOS 2.0  ("|" operator)&lt;br /&gt;---&lt;br /&gt;process forks, and multitasking:&lt;br /&gt;            eDOS 4.0  (not delivered in the US)&lt;br /&gt;---&lt;br /&gt;multi-user:&lt;br /&gt;            never delivered&lt;br /&gt;---&lt;br /&gt;graphics and cursor positioning:&lt;br /&gt;            DOS 2.0  (ANSI.SYS)&lt;br /&gt;---&lt;br /&gt;&lt;br /&gt;kanji support:&lt;br /&gt;            DOS 2.01, 2.25 (double-byte character set)&lt;br /&gt;---&lt;br /&gt;hard disk support:&lt;br /&gt;            DOS 2.0  (subdirectories)&lt;br /&gt;---&lt;br /&gt;networking:&lt;br /&gt;            DOS 3.1  (file locking support MS Networks)&lt;br /&gt;            DOS 6.0  (bundled Interlink in with DOS)&lt;br /&gt;---&lt;br /&gt;&lt;br /&gt;Microsoft launched an aggressive marketing campaign for MS-DOS. Early Microsoft advertisements promoted DOS' XENIX-like features and promised XENIX functionality in future releases.&lt;br /&gt;&lt;br /&gt;Microsoft had announced their intention of building a multi-user, multitasking operating system since as early as 1982. They Shipped beta versions of "DOS 4.0" in 1986/87 before v3.3 was even announced. Microsoft UK had announced that they had licenced v4.0 to Apricot Computers and the French Postal Service was supposed to be running it.&lt;br /&gt;&lt;br /&gt;MS-DOS and PC-DOS have been run on more than just the IBM-PC and clones:&lt;br /&gt;&lt;br /&gt;      Hardware PC Emulation:&lt;br /&gt;            Apple II TransPC 8088 board Apple MacIntosh AST 80286 board Atari 400/800 Co-Power 88 board Atari ST PC-Ditto II cartridge Amiga 2000 8088 or A2286D 80286 Bridge Board IBM PC/RT 80286 AT adapter Kaypro 2 Co-Power Plus board Software PC Emulation:&lt;br /&gt;            Apple MacIntosh SoftPC Atari ST PC-Ditto I IBM RS/6000 DOS emulation DOS Emulation:&lt;br /&gt;            AIX (IBM RS/6000) DOS emulation with "PCSIMulator" OS/2 1.x DOS emulation in "Compatibility Box" OS/2 2.x executes Virtual DOS Machine QNX DOS window SunOS DOS window XENIX DOS emulation with DOSMerge &lt;br /&gt;&lt;br /&gt;The Memory Map:&lt;br /&gt;About a decade ago, standard memory configurations were 256KB, 512KB or 640KB on computers. This memory was often looked at in segments of 65536 bytes or 64KB. The user is allocated 10 segments, or 640KB and the system is allocated the remaining 6, or 384KB. The original designers of the 8088, decided that no one would ever possibly need more than 1MB of memory (yeah, right!). So they built the machine so that it couldn't access above 1 MB. To access the whole MEG, 20 bits are needed. This allows a total of 220 combinations of bits, that is 1048576 (= 1024*1024 or 1 MB) different numbers, each of which represents an address of a single byte of data. The problem was that the registers only had 16 bits, and if they used two registers, that would be 32 bits, which was way too much (they thought). So they came up with a rather brilliant (not!) way to do their addressing - they would use two registers. They decided that they would not be 32bits, but the two registers would create 20 bit addressing. And thus Segments and Offsets were created.&lt;br /&gt;&lt;br /&gt;**Note: it helps to understand assembly code.&lt;br /&gt;&lt;br /&gt;OFFSET  = SEGMENT*16&lt;br /&gt;SEGMENT = OFFSET/16  - note that the lower 4 bits are lost&lt;br /&gt;                 &lt;br /&gt;SEGMENT * 16    |0010010000010000----| - range (0 to 65535)*16&lt;br /&gt; +                    &lt;br /&gt;OFFSET          |----0100100000100010| - range (0 to 65535)&lt;br /&gt; =&lt;br /&gt;20 bit address  |00101000100100100010| - range 0 to 1048575 (1 MB)&lt;br /&gt;                 \----- DS -----/&lt;br /&gt;                     \----- SI -----/&lt;br /&gt;                     \- Overlap-/&lt;br /&gt;&lt;br /&gt;This shows how DS : SI is used to construct a 20 bit address.&lt;br /&gt;&lt;br /&gt;Segment registers are: CS, DS, ES, SS. On the 386+ there are also FS &amp; GS.&lt;br /&gt;&lt;br /&gt;Offset registers are: BX, DI, SI, BP, SP, IP. In 386+ protected mode, any general register (not a segment register) can be used as an offset register (except IP, which isn't accessable).&lt;br /&gt;&lt;br /&gt;CS : IP Points to the currently executing code.&lt;br /&gt;SS : SP Points to the current stack position.&lt;br /&gt;&lt;br /&gt;If you'll notice, the value in the segment register is multiplied by 16 (or shifted left 4 bits) and then added to the offest register. Together they create a 20 bit address. Thus, there are many combinations of the segment and offset registers that will produce the same address. The standard notation for a SEGment/OFFset pair is:&lt;br /&gt;&lt;br /&gt;SEGMENT : OFFSET or A000 : 0000 (in hexadecimal).&lt;br /&gt;&lt;br /&gt;Where SEGMENT = 0A000h and OFFSET = 00000h.&lt;br /&gt;(This happens to be the address of the upper left pixel on a 320x200x256 screen.)&lt;br /&gt;You may be wondering what would happen if you were to have a segment value of 0FFFFh and an offset value of 0FFFFh.&lt;br /&gt;&lt;br /&gt;Notice how &lt;0FFFFh * 16 (or 0FFFF0h ) + 0FFFFh = 1,114,095&gt; is larger than 1,048,576 (or 1 MEG).&lt;br /&gt;&lt;br /&gt;This means that more than 1 MB of memory is actually accessible! Well, to actually use that extra bit of memory, you would have to enable something called the A20 line, which just enables the 21st bit for addressing. This little extra bit of memory is usually called "HIGH MEMORY" and is used when you load something into high memory or say DOS = HIGH in your AUTOEXEC.BAT file or DEVICEHIGH=MOUSE.SYS in your CONFIG.SYS file (HIMEM.SYS and EMS386.EXE actually manage that).&lt;br /&gt;&lt;br /&gt;Here is an illustration of a typical memory map:&lt;br /&gt;&lt;br /&gt;The IBM PC handles its address space in 64k segments, divided into 16k fractions and then further as necessary:&lt;br /&gt;&lt;br /&gt;*********************************************************************&lt;br /&gt;*start *start*end  *                                                *&lt;br /&gt;*addr. *addr.*addr.*                     usage                      *&lt;br /&gt;*(dec) *   (hex)   *                                                *&lt;br /&gt;*********************************************************************&lt;br /&gt;*   *640k RAM Area*                                                 *&lt;br /&gt;*********************************************************************&lt;br /&gt;* 0k   *         *  start of RAM, first K is interrupt vector table *&lt;br /&gt;* 16k  *0000-03FF*  PC-0 system board RAM ends                      *&lt;br /&gt;* 32k  *0400-07FF*                                                  *&lt;br /&gt;* 48k  *0800-0BFF*                                                  *&lt;br /&gt;*********************************************************************&lt;br /&gt;* 64k  *1000-13FF*  PC-1 system board RAM ends                      *&lt;br /&gt;* 80k  *1400-17FF*                                                  *&lt;br /&gt;* 96k  *1800-1BFF*                                                  *&lt;br /&gt;* 112k *1C00-1FFF*                                                  *&lt;br /&gt;*********************************************************************&lt;br /&gt;* 128k *2000-23FF*                                                  *&lt;br /&gt;* 144k *2400-27FF*                                                  *&lt;br /&gt;* 160k *2800-2BFF*                                                  *&lt;br /&gt;* 176k *2C00-2FFF*                                                  *&lt;br /&gt;*********************************************************************&lt;br /&gt;* 192k *3000-33FF*                                                  *&lt;br /&gt;* 208k *3400-37FF*                                                  *&lt;br /&gt;* 224k *3800-3BFF*                                                  *&lt;br /&gt;* 240k *3C00-3FFF*                                                  *&lt;br /&gt;*********************************************************************&lt;br /&gt;* 256k *4000-43FF*  PC-2 system board RAM ends                      *&lt;br /&gt;* 272k *4400-47FF*                                                  *&lt;br /&gt;* 288k *4800-4BFF*                                                  *&lt;br /&gt;* 304k *4C00-4FFF*                                                  *&lt;br /&gt;*********************************************************************&lt;br /&gt;* 320k *5000-53FF*                                                  *&lt;br /&gt;* 336k *5400-57FF*                                                  *&lt;br /&gt;* 352k *5800-5BFF*                                                  *&lt;br /&gt;* 368k *5C00-5FFF*                                                  *&lt;br /&gt;*********************************************************************&lt;br /&gt;* 384k *6000-63FF*                                                  *&lt;br /&gt;* 400k *6400-67FF*                                                  *&lt;br /&gt;* 416k *6800-6BFF*                                                  *&lt;br /&gt;* 432k *6C00-6FFF*                                                  *&lt;br /&gt;*********************************************************************&lt;br /&gt;* 448k *7000-73FF*                                                  *&lt;br /&gt;* 464k *7400-77FF*                                                  *&lt;br /&gt;* 480k *7800-7BFF*                                                  *&lt;br /&gt;* 496k *7C00-7FFF*                                                  *&lt;br /&gt;*********************************************************************&lt;br /&gt;* 512k *8000-83FF*                                                  *&lt;br /&gt;* 528k *8400-87FF*                                                  *&lt;br /&gt;* 544k *8800-8BFF*  the original IBM PC-1 BIOS limited memory to    *&lt;br /&gt;* 560k *8C00-8FFF*  544k                                            *&lt;br /&gt;*********************************************************************&lt;br /&gt;* 576k *9000-93FF*                                                  *&lt;br /&gt;* 592k *9400-97FF*                                                  *&lt;br /&gt;* 609k *9800-9BFF*                                                  *&lt;br /&gt;* 624k *9C00-9FFF* to 640k (top of RAM address space)               *&lt;br /&gt;* 639k *         * some RLL and SCSI hard disk adapters, some four  *&lt;br /&gt;*      *         * floppy controller cards, some AMI and PS/2 BIOS, *&lt;br /&gt;*      *         * and assorted other cards sometimes try to use the*&lt;br /&gt;*      *         * last K for storing temporary data.  This can     *&lt;br /&gt;*      *         * cause trouble with programs which assume they    *&lt;br /&gt;*      *         * have a full 640k, and will prevent backfilling   *&lt;br /&gt;*      *         *  memory with some memory managers.  Beware!      *&lt;br /&gt;*********************************************************************&lt;br /&gt;*A0000 ***** 64k ***** EGA/VGA starting address                     *&lt;br /&gt;*A0000 ***** 64k ***** Toshiba 1000 DOS ROM (MS-DOS 2.11V)          *&lt;br /&gt;*********************************************************************&lt;br /&gt;* 640k *A0000-A95B0*  MCGA 320x200 256 color video buffer           *&lt;br /&gt;*      *     -AF8C0*  MCGA 640x480 2 color video buffer             *&lt;br /&gt;*      *     -A3FFF*                                                *&lt;br /&gt;* 656k *A4000-A7FFF*                                                *&lt;br /&gt;* 672k *A8000-ABFFF*this 64k segment may be used for contiguous DOS *&lt;br /&gt;* 688k *AC000-AFFFF*RAM with appropriate hardware and software      *&lt;br /&gt;*********************************************************************&lt;br /&gt;*B0000 ***** 64k ***** mono and CGA address                         *&lt;br /&gt;*********************************************************************&lt;br /&gt;* 704k *B0000-B3FFF*4k  mono display | The PCjr and early Tandy 1000*&lt;br /&gt;* 720k *B4000-B7FFF*                 | BIOS revector direct write to*&lt;br /&gt;* 736k *B8000-BBFFF*16k CGA          | the B8 area to the Video Gate*&lt;br /&gt;* 756k *BC000-BFFFF*                 | Array and reserved system RAM*&lt;br /&gt;*********************************************************************&lt;br /&gt;*C0000 ***** 64k *************** expansion ROM                      *&lt;br /&gt;*********************************************************************&lt;br /&gt;* 768k *C0000-C3FFF*16k EGA BIOS C000:001E EGA BIOS signature       *&lt;br /&gt;*      *           *    (the letters 'IBM')                         *&lt;br /&gt;*      *C0000-C7FFF*32k VGA BIOS extension (typical)                *&lt;br /&gt;* 784k *C4000-C5FFF*                                                *&lt;br /&gt;*      *C6000-C63FF*256 bytes IBM PGC video communications area     *&lt;br /&gt;*      *C6400-C7FFF*                                                *&lt;br /&gt;* 800k *C8000-CBFFF*16k hard disk controller BIOS, drive 0 default  *&lt;br /&gt;*      *CA000      *    some 2nd floppy (HD) controller BIOSes      *&lt;br /&gt;* 816k *CC000-CDFFF* 8k IBM PC Network NETBIOS                      *&lt;br /&gt;*      *CE000-CFFFF*                                                *&lt;br /&gt;*********************************************************************&lt;br /&gt;*D0000 ***** 64k ***** expansion ROM                                *&lt;br /&gt;*********************************************************************&lt;br /&gt;* 832k *D0000-D7FFF*32k IBM Cluster Adapter  | PCjr first ROM cart. *&lt;br /&gt;*      *      DA000*voice communications     | address area.        *&lt;br /&gt;* 848k *D4000-D7FFF*                         | Common EMS board     *&lt;br /&gt;* 864k *D8000-DBFFF*                         | paging area.         *&lt;br /&gt;*      *D8000-DBFFF* IBM Token Ring default Share RAM address       *&lt;br /&gt;*      *DC000      * IBM Token Ring default BIOS/MMIO address       *&lt;br /&gt;* 880k *DC000-DFFFF*                         |                      *&lt;br /&gt;*      *DE000      *4k  TI Pro default video buffer                 *&lt;br /&gt;*********************************************************************&lt;br /&gt;*E0000 ***** 64k ***** expansion ROM                                *&lt;br /&gt;*                      wired to ROM sockets in the original IBM AT  *&lt;br /&gt;*                      used by ABIOS extensions on some PS/2 models *&lt;br /&gt;*********************************************************************&lt;br /&gt;* 896k *E0000-E3FFF*                         | PCjr second ROM cart.*&lt;br /&gt;* 912k *E4000-E7FFF*                         | address area         *&lt;br /&gt;* 928k *E8000-EBFFF*                         |                      *&lt;br /&gt;* 944k *EC000-EFFFF*                         | spare ROM sockets on *&lt;br /&gt;*      *           *                         | IBM AT (reserved in  *&lt;br /&gt;*      *           *                         | hardware)            *&lt;br /&gt;*********************************************************************&lt;br /&gt;*F0000 ***** 64k ***** system                                       *&lt;br /&gt;*********************************************************************&lt;br /&gt;* 960k *F0000-F3FFF*reserved by IBM          | cartridge address    *&lt;br /&gt;* 976k *F4000-     *                         | area (PCjr cartridge *&lt;br /&gt;*      *F6000      *ROM BASIC Begins         | BASIC)               *&lt;br /&gt;* 992k *F8000-FB000*                         |                      *&lt;br /&gt;* 1008k*FC000-FFFFF*ROM BASIC and original   |                      *&lt;br /&gt;*      *           *BIOS (Compatibility BIOS |                      *&lt;br /&gt;*      *           *in PS/2)                 |                      *&lt;br /&gt;* 1024k*      FFFFF*end of memory (1024k) for 8088 machines         *&lt;br /&gt;*********************************************************************&lt;br /&gt;* 384k *100000-15FFFF* 80286/AT extended memory area, 1Mb mbd.      *&lt;br /&gt;* 15Mb *100000-FFFFFF* 80286/AT extended memory address space       *&lt;br /&gt;* 15Mb *160000-FDFFFF* Micro Channel RAM expansion (15Mb ext. mem)  *&lt;br /&gt;* 128k *FE0000-FFFFFF* system board ROM        (PS/2 Advanced BIOS) *&lt;br /&gt;*********************************************************************&lt;br /&gt;*  64k *C0000000-C000FFFF* Weitek "Abacus" math coprocessor         *&lt;br /&gt;*      *                 * memory-mapped I/O                        *&lt;br /&gt;+*******************************************************************+&lt;br /&gt;&lt;br /&gt;Timeline:&lt;br /&gt;In May 1982, Microsoft released MS-DOS v1.1 to IBM, for the IBM PC. It supported 320KB double-sided floppy disk drives. Microsoft also released MS-DOS v1.25, similar to v1.1 but for IBM-compatible computers.&lt;br /&gt;&lt;br /&gt;In March 1983, MS-DOS v2.0 for PCs is announced. It was written from scratch, supporting 10 MB hard drives, a tree-structured file system, and 360 KB floppy disks. October saw IBM introducing PC-DOS v2.1 with the IBM PCjr.&lt;br /&gt;&lt;br /&gt;In March 1984, Microsoft released MS-DOS v2.1 for the IBM PCjr. Microsoft released MS-DOS v2.11 a short time later. It included enhancements to better allow conversion into different languages and date formats. In August, Microsoft released MS-DOS v3.0 for PCs. It added support for 1.2MB floppy disks, and bigger (than 10 MB) hard disks. In November, Microsoft released MS-DOS v3.1, adding support for Microsoft networks.&lt;br /&gt;&lt;br /&gt;In January 1986, Microsoft released MS-DOS v3.2. It added support for 3.5-inch 720 KB floppy disk drives. Microsoft released MS-DOS v3.25 as well.&lt;br /&gt;&lt;br /&gt;In April 1987, IBM announced DOS v3.3 for PCs, for $120. In August Microsoft shipped MS-DOS v3.3. In November Compaq shipped MS-DOS v3.31 with support for over 32MB drives.&lt;br /&gt;&lt;br /&gt;In 1988 Digital Research transformed CP/M into DR DOS. In June Microsoft released MS-DOS v4.0, including a graphical/mouse interface. In July IBM shipped DOS v4.0, which included a shell menu interface and support for hard disk partitions over 32 MB. In November Microsoft released MS-DOS v4.01.&lt;br /&gt;&lt;br /&gt;In April 1990, Microsoft introduced Russian MS-DOS v4.01 for the Soviet market.&lt;br /&gt;May saw Digital Research releasing DR DOS v5.0.&lt;br /&gt;&lt;br /&gt;In June 1991, Microsoft released MS-DOS v5.0. It added a full-screen editor, undelete and unformat utilities and task swapping. GW-BASIC is replaced with Qbasic, based on Microsoft's QuickBASIC. In September Digital Research Inc. releases DR DOS v6.0, for $100.&lt;br /&gt;&lt;br /&gt;In March 1993, Microsoft introduced the MS-DOS v6.0 upgrade, including DoubleSpace disk compression. 1 million copies of the new and upgraded versions were sold through retail channels within the first 40 days. In November, Microsoft released MS-DOS v6.2.&lt;br /&gt;&lt;br /&gt;In February 1994, Microsoft released MS-DOS v6.21, removing DoubleSpace disk compression. April IBM releases PC-DOS v6.3. In June Microsoft releases MS-DOS v6.22, bringing back disk compression under the name DriveSpace.&lt;br /&gt;&lt;br /&gt;In February 1995, IBM announced PC DOS v7, with integrated data compression from Stac Electronics (Stacker). In April, IBM released PC DOS v7. In August of 1995 Microsoft introduced Windows 95, it included MS DOS v7.0 but it's clear that DOS is going to remain a constant for several years to come.&lt;br /&gt;&lt;br /&gt;DOS HISTORY CHART:(system file sizes in bytes)&lt;br /&gt;DOS TYPE AND VERSION  DATE  COMMAND.COM  IO.SYS or IBMBIO.COM  MSDOS.SYS or IBMDOS.COM&lt;br /&gt;PC 1.0  8-4-81  3,231  1,920  6,400&lt;br /&gt;MS 1.0  8-4-81  3,231  1,920  6,400&lt;br /&gt;PC 1.1  5-7-82  4,959  1,920  6,400&lt;br /&gt;PC 2.0  3-8-83  17,792  4,608  17,152&lt;br /&gt;MS 2.0  3-8-83  17,792  4,608  17,152&lt;br /&gt;PC 2.1  10-20-83  17,792  4,736  17,024&lt;br /&gt;MS 2.11  11-17-83  15,957  6,836  17,176&lt;br /&gt;PC 2.11  5-30-84  18,272  5,120  17,408&lt;br /&gt;PC 3.0  8-14-84  22,042  8,964  27,920&lt;br /&gt;MS 3.0  8-14-84  22,042  8,964  27,920&lt;br /&gt;PC 3.1  3-7-85  23,210  9,564  27,760&lt;br /&gt;MS 3.1  3-7-85  23,210  9,564  27,760&lt;br /&gt;PC 3.2  12-30-85  23,791  16,369  28,477&lt;br /&gt;MS 3.2  7-7-86  23,612  16,138  28,480&lt;br /&gt;MS 3.21  5-1-87  23,948  18,501  28,480&lt;br /&gt;PC 3.3  3-17-87  25,307  22,100  30,159&lt;br /&gt;MS 3.3  7-24-87  25,276  22,357  30,128&lt;br /&gt;MS 3.3a  2-2-88  25,308  22,398  30,128&lt;br /&gt;MS 4.0  10-6-88  37,254  32,874  36,903&lt;br /&gt;MS 4.01  11-30-88  37,396  33,173  37,180&lt;br /&gt;PC 4.01  4-3-89  37,396  33,173  37,180&lt;br /&gt;MS 4.01a  4-7-89  37,557  33,337  37,376&lt;br /&gt;MS 5.0  4-9-91  33,430  37,394  47,845&lt;br /&gt;PC 5.0  5-9-91  47,987  33,430  37,378&lt;br /&gt;PC 5.001a  2-28-92  48,006  33,446  37,378&lt;br /&gt;PC 5.02  9-1-92  47,990  33,718  37,362&lt;br /&gt;MS 6.0  3-10-93  52,925  40,470  38,138&lt;br /&gt;IBM 6.1  6-29-93  52,589  40,964  38,138&lt;br /&gt;PC 6.1  9-30-93  52,797  40,964  38,138&lt;br /&gt;MS 6.2R0  9-30-93  54,619  40,566  38,138&lt;br /&gt;MS 6.22  5-31-94  54,645  40,774  38,138&lt;br /&gt;PC 6.3  12-31-93  54,654  40,758  37,174&lt;br /&gt;**Note: Microsoft had no official version of MS DOS prior to DOS 3.2. Only OEM versions were sold with the PC by the computer manufacture.&lt;br /&gt;&lt;br /&gt;Future of DOS:&lt;br /&gt;At first, many people would answer saying that DOS has no future. It has seen it's heyday and now it's up to high-resolution GUI's (Graphic User-Interfaces - e.g. Windows 95) to lead the operating system pack. But let's not be too quick to dismiss it. There are many reasons why DOS is an essential part of many of today's finest systems.&lt;br /&gt;&lt;br /&gt;Talk to mainstream computer industry "specialists" and they'd have you believe that there is no longer any place for it. Why? Because they don't understand the special speed and performance requirements unique to systems other than "supercomputers with neuro-networking". I'm talking about the many hundreds of thousands of users that depend on older systems to support their businesses. Low-tech industries rely heavily on computers with old versions of DOS installed on them. The average "business person" here doesn't need anything better than a 486SX with 8MB of RAM to run their MS-DOS based accounting program. This shouldn't be made redundant just because DOS is so-called "outdated". This is also where the highest resistance to the removal of DOS has come from.&lt;br /&gt;&lt;br /&gt;Despite this, many people believe that old DOS programs are becoming redundant because they are not Y2K compliant. But I say that DOS programs are simplistic by nature and can easily be patched to be compatible. Even that seems more sensible than installing Windows and taking up copious quantities of HD space with utilities that have a hundred times more features than you'll ever figure out, let alone use. Don't even get me started on the redundant registry entries and .dll files that remain after 'removing' shareware and evaluation software on Win95. You won't get any of that in DOS!&lt;br /&gt;&lt;br /&gt;Win95 and DOS can be compared to bank notes and coin-change respectively. Win95 caters for the multiuser/multitasking system which has convenience similar to the spending of large bank notes. DOS caters for the single-task user without the need of extraneous functions and add-ons. Like coins, DOS adds up for too many individuals not to have a large economic impact if it were removed.&lt;br /&gt;&lt;br /&gt;One of the great 'new features' of Win95 is it's Recycle Bin (thanks Mac!). But if it's so great, what does a user do if he or she wants to recover a file after having emptied the bin? Nothing? Tough luck? Nope. DOS to the rescue! The user simply needs to 'Restart in MS-DOS mode', type in and confirm the LOCK command, go to the directory where the file was stored (or 'c:\recycled') and undelete it using DOS v6.2x's old UNDELETE.EXE (remember: restart the computer or type in UNLOCK to proceed safely). Conclusion: Windows couldn't have been used to retrieve that 'permenantely' deleted file without using extraneous software (eg. Norton Utilities).&lt;br /&gt;&lt;br /&gt;Okay, so I've been heavy-handed about my support for DOS over Windows. Sue me, I like it - it's my 'oldschool'. ;) Although...&lt;br /&gt;&lt;br /&gt;Many people support DOS in that they perceive it to be a magical operating system that is just perfect for games. Well I have a challenge for them - TRY PROGRAMMING FOR IT! I'll bet money that half the reason why Interplay's relatively new game "DTUM" didn't ship with network options was simply because it is a DOS game and they would have had to do the bulk of the work themselves. Simply put: if Microsoft wants to write network code for game developers (via Direct Play) or add support to most if not all sound cards (Direct Sound), a designer would be foolish not to take advantage of it. Thus guaranteeing MS role in the games market. Even the mighty Quake(TM) released Windows/OpenGL versions (sell out? - you decide).&lt;br /&gt;&lt;br /&gt;Two factors determine the user's productivity: how long it takes to tell the computer to do something, and how long the computer takes to do it. The former is largely dependent on how you've customized your system with shortcuts, macros, and AutoLISP routines and the platform is not particularly relevant. The latter is partly dependent on your choice of platform - any kind of Windows inevitably suffers compared with DOS. Why? Because DOS remains on a lower user level compared to Win95 and thus keeps more of the system's resources free.&lt;br /&gt;&lt;br /&gt;Even Windows 98 - the most recent operating system released by Microsoft to date retains elements of DOS for users - obviously Microsoft recognises the great need for it. These elements, however, aren't pure DOS. They're part of Win95/98. A shell (pardon the pun) of its former self if you will. The question is, will Win98 be able to run without these elements? One of the intriguing questions being asked today since the discovery that Win95 works with DR-DOS 7.01, is how dependent on DOS is/was Win95? I would have called this myth until I went to fix a Win95 problem and by accident discovered that Win95 appears and runs on top of DOS.&lt;br /&gt;&lt;br /&gt;So was it, in fact, essential for Microsoft to retain DOS? Was Win95 already so intricately (/technically) dependent on DOS that the Win98 upgrade wouldn't work without it? Probably not, although speculation is widespread.&lt;br /&gt;&lt;br /&gt;I believe that DOS will remain for a few years to come at least. Sentimentality alone can't keep it around forever though and it's only a matter of time before somebody finds a way of phasing it out completely. But not without meeting resistance from individuals for which DOS provides an efficient service. As a DOS junkie, I find it's faster to type many commands or use batch files than having to click and move files around in Windows. What can I say? The mouse slows me down and I think 'user-friendliness' is a sham.&lt;br /&gt;&lt;br /&gt;Postscript:&lt;br /&gt;I know what many of you are thinking and I agree: MS OS's suck, get Linux. =)&lt;br /&gt;&lt;br /&gt;Bibliography:&lt;br /&gt;BOOKS:&lt;br /&gt;&lt;br /&gt;Author(s):  Title:  Publisher:&lt;br /&gt;Gookin, Dan  DOS for Dummies (3rd Ed)  IDG Books International&lt;br /&gt;Brown, Margaret  Learning DOS &amp; Windows  DDC Publishing&lt;br /&gt;Edstrom, Jennifer  Barbarians Led by Bill Gates  Henry Holt &amp; Company&lt;br /&gt;Erwin, Robynne  User Friendly  Wallace Bradely Printers&lt;br /&gt;Jamsa, Kris A  DOS : The Complete Reference  Osborne McGraw-Hill&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;URLS:&lt;br /&gt;http://members.xoom.com/mhoulden/dosref.htm - Complete DOS reference&lt;br /&gt;http://www.microtec.net/~dlessard/dos.htm - DOS history timeline&lt;br /&gt;http://www.a1computers.net/pcdoshis.htm - DOS history chart&lt;br /&gt;http://clarey.com/dosisdead.html - DOS is dead forum&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2613452802614549309-1273699343727601456?l=hack-heck2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hack-heck2.blogspot.com/feeds/1273699343727601456/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://hack-heck2.blogspot.com/2009/02/history-of-dos.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2613452802614549309/posts/default/1273699343727601456'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2613452802614549309/posts/default/1273699343727601456'/><link rel='alternate' type='text/html' href='http://hack-heck2.blogspot.com/2009/02/history-of-dos.html' title='The History of DOS'/><author><name>azhar yusuf</name><uri>http://www.blogger.com/profile/14377885979614235458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2613452802614549309.post-8241737949233075422</id><published>2009-02-05T23:15:00.000-08:00</published><updated>2009-02-05T23:16:37.955-08:00</updated><title type='text'>DATA LINK LAYER DESIGN AND PROTOCOLS</title><content type='html'>References:&lt;br /&gt;1. "Computer Networks", 3rd Edition, Andrew S. Tanenbaum&lt;br /&gt;2. "Computer Networks, A System Approach", 3rd Edition&lt;br /&gt;    Peterson, Davy, Kaufmann&lt;br /&gt;   &lt;br /&gt;&lt;br /&gt;1.1 Introduction&lt;br /&gt;    &lt;br /&gt;In this chapter we will discuss the services the datalink layer of the &lt;br /&gt;networking stack is required to have and the various existing layer 2 &lt;br /&gt;protocols which cater to these requirements in different ways. The job of the &lt;br /&gt;datalink layer to transfer the bits to the destination machine, which then can&lt;br /&gt;be handed over to the network layer for processing. The data link layer in &lt;br /&gt;itself receives a raw stream of bits for the physical layer, which itself could be &lt;br /&gt;built on different technologies like cable, dsl, wireless, optical fiber to name a &lt;br /&gt;few. The actual communication path between any two adjacent hosts can be shown as &lt;br /&gt;below:&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;     HOST 1    (SENDER)                         HOST 2 (RECEIVER)&lt;br /&gt;  -------------                             -------------&lt;br /&gt;  |           |                             |           |&lt;br /&gt;  |___________|                             |___________|&lt;br /&gt;  |           |   LAYER 4                   |           |   TRANSPORT (TCP/UDP)&lt;br /&gt;  |___________|                             |___________|&lt;br /&gt;  |     .     |   LAYER 3                   |     .     |   NETWORK   (IP)&lt;br /&gt;  |_____|_____|                             |_____|_____|  &lt;br /&gt;  |     |     |   LAYER 2                   |     |     |   DATALINK  (PPP)&lt;br /&gt;  |_____|_____|                             |_____|_____|  &lt;br /&gt;  |     |     |   LAYER 1                   |     |     |   PHYSICAL   &lt;br /&gt;  |_____|_____|                             |_____|_____|                   &lt;br /&gt;        |                                         |&lt;br /&gt;         \_______________________________________/&lt;br /&gt;                        &lt;br /&gt;              &lt;br /&gt;                        ACTUAL DATA PATH&lt;br /&gt;    &lt;br /&gt;      Figure 1.1 Communication channel between two adjacent hosts&lt;br /&gt;&lt;br /&gt;(NOTE: By adjacent we mean two hosts which are connected by a physical connection)&lt;br /&gt;&lt;br /&gt;Shown above are the lower 4 layers of the OSI (Open Systems Interconnection) Reference &lt;br /&gt;Model. &lt;br /&gt; &lt;br /&gt;1.2 Design Issues&lt;br /&gt;&lt;br /&gt;The datalink layer is designed to offer the following functionalities:&lt;br /&gt;&lt;br /&gt;(A) Provide a well-defined service interface to the network layer (layer 3).&lt;br /&gt;    Depending on the efficiency and error rate of the underlying physical &lt;br /&gt;    layer, the datalink layer can be designed in any of the three ways:&lt;br /&gt;    &lt;br /&gt;    (a) Unacknowledged connectionless service. This consists of the source host &lt;br /&gt;    sending independent frames to the destination host without any sort of &lt;br /&gt;    feedback/acknowledgment mechanism.There is no connection setup or release.&lt;br /&gt;    Frame recovery due to line noise is left to the network layer. This kind of&lt;br /&gt;    service is appropriate for high speed, low error communication channels &lt;br /&gt;    such as an optical fiber network.&lt;br /&gt;   &lt;br /&gt;    (b) Acknowlegded connectionless service. Communication channels which are &lt;br /&gt;    more error prone and hence require more reliable communication implement &lt;br /&gt;    a feedback mechanism for each frame sent between two hosts. This enables &lt;br /&gt;    the sender to know if the frame has arrived correctly or not. This ack &lt;br /&gt;    sending mechanism is not a requirement but an optimization, because the &lt;br /&gt;    transport layer can always send a message and wait for it to be &lt;br /&gt;    acknowledged. However a message, (a unit of data in the transport layer) &lt;br /&gt;    consists of several frames, (unit of data in the datalink layer), so the &lt;br /&gt;    re-transmission of each faulty received message would bear a lot of &lt;br /&gt;    overhead. Such a mechanism is useful on wireless channels which are &lt;br /&gt;    inherently unreliable.&lt;br /&gt;      &lt;br /&gt;    (c) Acknowledged connection-oriented service. This is the most &lt;br /&gt;    sophisticated service the datalink layer can provide to the network &lt;br /&gt;    layer. In this service the source and destination hosts establish a &lt;br /&gt;    connection before any transfer of data takes place. Each frame is &lt;br /&gt;    received in the same order it is sent in. The service also gaurantees &lt;br /&gt;    that each frame is received only once.Communication between two hosts &lt;br /&gt;    takes place in three phases. First phase is connection setup, during &lt;br /&gt;    which each side initalizes counters and variables to keep track of &lt;br /&gt;    frames. Second phase consists of actual frame transmission and the &lt;br /&gt;    third phase consists of connection release, freeing up the resources &lt;br /&gt;    and buffers when the transfer is done.&lt;br /&gt;&lt;br /&gt;(B) Framing&lt;br /&gt;    The datalink layer receives a raw bit stream from the underlying physical &lt;br /&gt;    layer. This bit stream is not gusranteed to be error free. On a noisy &lt;br /&gt;    communication channel  the received number of bits maybe less/more, and/or &lt;br /&gt;    different than the ones transmitted. In order to provide a reliable &lt;br /&gt;    transfer to the network layer the data link layer breaks the bit stream &lt;br /&gt;    into frames and computes the checksum for each frame. This checksum is &lt;br /&gt;    also transmitted along with the frame. The destination host on receiving a&lt;br /&gt;    frame, computes another checksum from its data and compares it to the one &lt;br /&gt;    transmitted. This enables the datalink layer of the destination host to &lt;br /&gt;    detect and possiblly correct frames, depending upon the method the checksum&lt;br /&gt;    is computed in. Some methods used for framing are:&lt;br /&gt;    - Character count: The number of characters in the frame are stored in a &lt;br /&gt;      field of the header attached to the frame.&lt;br /&gt;    - Starting and Ending characters with character stuffing.Each frame starts&lt;br /&gt;      with a known ASCII character sequence DLE STX and ends with the sequence &lt;br /&gt;      DLE ETX. (DLE IS Data Link Escape, STX is Start Of Text, ETX is End of &lt;br /&gt;      Text). A serious problem with this method is that the frame data itself &lt;br /&gt;      could contain any of these sequences. &lt;br /&gt;    - Starting and Ending characters with bit stuffing: This method solves the &lt;br /&gt;      above mentioned problem by stuffing an additional ASCII DLE for every DLE &lt;br /&gt;      character in the data.The data link layer of the destination host is then &lt;br /&gt;      responsible for removing these bit stuffings from the frame data before &lt;br /&gt;      assembling the frames.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;(C) Error Control, Sequencing frames and sending control frames for feedback.&lt;br /&gt;    A bad communication channel can cause a variety of strange events during &lt;br /&gt;    communication, flipping of bits, losing bits from a frame, new bits in the &lt;br /&gt;    frame, frames completely disappearing, either host going down. &lt;br /&gt;    To communicate the receiving of a correct or incorrect frame the receiver &lt;br /&gt;    host sends postive or negative acknowledgements accordingly to the sender &lt;br /&gt;    host.This would cause the sender to hang forever waiting for an ack frame.&lt;br /&gt;    The sender can have a timeout to resend the frame again if it doesn't &lt;br /&gt;    receive an ack in a given time period. To prevent the recipient data link &lt;br /&gt;    layer from passing the same frame more than once to the network layer,each&lt;br /&gt;    outgoing frame is assigned a sequence number. This whole  managing of &lt;br /&gt;    timers and frame sequencing is an integral part of data link layer design.&lt;br /&gt;&lt;br /&gt;    &lt;br /&gt;(D) Flowcontrol, control the rate of data transmission between two hosts.   &lt;br /&gt;    This is another of the important issues in the design of the data link &lt;br /&gt;    layer, how to coordinate the rate of transmission between two hosts.&lt;br /&gt;    What if the sender is sending data at a much faster rate than the receiver&lt;br /&gt;    can process/accept, causing  dropping of packets at the receiver end&lt;br /&gt;    which further causes the sender to timeout on the ack packets it is &lt;br /&gt;    expecting, causing restransmission, leading to a less efficient network.&lt;br /&gt;    The sender in such a case is usually throttled by using a feedback &lt;br /&gt;    mechanism. There are various ways in which the receiver communicates &lt;br /&gt;    to the sender using control frames about the number/rate of packets it &lt;br /&gt;    can accept  comfortably.   &lt;br /&gt; &lt;br /&gt;1.3 Elementary Data Link Protocols  &lt;br /&gt;&lt;br /&gt;1.3.1 An unrestricted simplex protocol:&lt;br /&gt;      This is a simple data link protocol which makes certain assumption&lt;br /&gt;      which are far from true in the real world, but its sole purpose is&lt;br /&gt;      to explain the working of the data link layer and then incrementally&lt;br /&gt;      taking the assumptions off.&lt;br /&gt;      Assumption 1: Data is transmitted in only one direction&lt;br /&gt;      Assumption 2: At both ends the network layers are always ready&lt;br /&gt;      Assumption 3: Infinite buffer size of the sender, receiver&lt;br /&gt;      Assumption 4: There is no error on the communication channel&lt;br /&gt;       &lt;br /&gt;      PSUDO CODE:&lt;br /&gt;      &lt;br /&gt;&lt;br /&gt;      void sender(void)&lt;br /&gt;      {&lt;br /&gt;        frame f;&lt;br /&gt; packet p;&lt;br /&gt; &lt;br /&gt; while (TRUE) &lt;br /&gt; {&lt;br /&gt;   get_packet_from_network(p);&lt;br /&gt;   packet_to_frame(p,f);&lt;br /&gt;   send_frame_to_physical_layer(f);&lt;br /&gt;         }&lt;br /&gt;      }&lt;br /&gt;  &lt;br /&gt;      void receiver(void)&lt;br /&gt;      {&lt;br /&gt; frame r;&lt;br /&gt; packet p;&lt;br /&gt; while(true) {&lt;br /&gt;   get_frame_from_physical_layer(r);&lt;br /&gt;   frame_to_packet(p,r);&lt;br /&gt;   send_packet_to_network(p);&lt;br /&gt;        }&lt;br /&gt;      }&lt;br /&gt;       &lt;br /&gt;1.3.2 A Simplex Protocol for a Noisy Channel&lt;br /&gt;      Consider Assumption 4 is no longer true, frames can be lost or&lt;br /&gt;      damaged. But damaged frames can be detected by the receiver.&lt;br /&gt;      Both these protocols suffer from a number of flaws, frames &lt;br /&gt;      submitted out of order, duplication of frames, if an ack frame&lt;br /&gt;      is lost the sender is kept waiting. &lt;br /&gt;      Protocols in which the sender waits for an acknowledgment before &lt;br /&gt;      sending the next frame are called ARQ (Automatic Repeat Request).&lt;br /&gt;      The protocols have a timeout for retransmission to deal with lost&lt;br /&gt;      frames. This still does not solve the problem of duplication which&lt;br /&gt;      requires for the frames to have sequence numbers.&lt;br /&gt;&lt;br /&gt;1.3.3 Sliding Window Protocols&lt;br /&gt;      All the previously discussed protocols could possibly be used for&lt;br /&gt;      a unidirectional data transfer, in the real world we need&lt;br /&gt;      a bidirectional communication channel. One way of doin this would&lt;br /&gt;      be to have two seperate channels one from the data ( forward) &lt;br /&gt;      channel and one for its acknowledgments (reverse), but the reverse&lt;br /&gt;      channel would almost be entirely wasted. A big improvement over &lt;br /&gt;      this is using the same channel for transmitting data and control  &lt;br /&gt;      frames. When a data frame arrives, instead of immediately sending&lt;br /&gt;      a control frame(ack), the data link layer waits for the network &lt;br /&gt;      layer to pass it a message, and the ack is sent along with the &lt;br /&gt;      data frame. This greatly reduces network traffic. This is known as&lt;br /&gt;      PIGGYBACKING.&lt;br /&gt;                  In all sliding window protocols, each outbound frame &lt;br /&gt;      contains a sequence number from 0 to 2^n -1, so the first n-bits &lt;br /&gt;      are used for the seq. numbers. Both the sender and the receiver &lt;br /&gt;     maintain their own window, which could have different sizes. Some &lt;br /&gt;     protocols require a fixed size, while some can be changed as frames&lt;br /&gt;     are sent and received. The "Stop and Wait" protocol is a particular&lt;br /&gt;     Sliding Window protocol with n=1.&lt;br /&gt;       Until now we had made the assumption that the transmission time&lt;br /&gt;     required for a frame to arrive at the receiver plus the transmission&lt;br /&gt;     time for the acknowledgment to come back is negligible. Consider a&lt;br /&gt;     60 kbps satellite channel with a 600-msec round-trip propogation &lt;br /&gt;     delay. Let the frame size be 1200 bits, at t = 0, the sender starts&lt;br /&gt;     sending the first frame, at t = 20 msec, the frame has been completely&lt;br /&gt;     sent, now at t=320 msec the frame fully arrives at the receiver, while&lt;br /&gt;     the sender gets the ack back at t= 620 msec. The sender in this case&lt;br /&gt;     was blocking for over 90% of the time. &lt;br /&gt;     To overcome this problem, there is another class of sliding window&lt;br /&gt;     protocol called "Go Back N". In this the sender is allowed to transmit&lt;br /&gt;     upto 'w' frames before blocking. With the right choice of 'w', the&lt;br /&gt;     sender is able to continously transmit frames for a time equal to the&lt;br /&gt;     round trip time without filling up the window. This technique is called&lt;br /&gt;     PIPELINING. If the receiver has a window size of 1, then on receiving&lt;br /&gt;     an erroneous frame, the receiver stops sending acks to all the frames &lt;br /&gt;     received subsequently, the sender eventually times out and &lt;br /&gt;     retransmits the remaining frames again. A better solution is when the receiver&lt;br /&gt;     has a window size &gt; 1, and it first collects all the correct frames and&lt;br /&gt;     sends acks for them to the sender, when the sender realizes it hasn't&lt;br /&gt;     received the acks for all the data frames it sent, it resends the one&lt;br /&gt;     with missing acks. This is known as "Selective Repeat".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2613452802614549309-8241737949233075422?l=hack-heck2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hack-heck2.blogspot.com/feeds/8241737949233075422/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://hack-heck2.blogspot.com/2009/02/data-link-layer-design-and-protocols.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2613452802614549309/posts/default/8241737949233075422'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2613452802614549309/posts/default/8241737949233075422'/><link rel='alternate' type='text/html' href='http://hack-heck2.blogspot.com/2009/02/data-link-layer-design-and-protocols.html' title='DATA LINK LAYER DESIGN AND PROTOCOLS'/><author><name>azhar yusuf</name><uri>http://www.blogger.com/profile/14377885979614235458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2613452802614549309.post-7483047876680616004</id><published>2009-02-05T23:07:00.000-08:00</published><updated>2009-02-05T23:08:25.849-08:00</updated><title type='text'>Remotely Password Cracking NT Systems</title><content type='html'>In this tutorial, you will learn how to crack a nt password remotely. This is only for educational services only. If you use this information to penetrate a system you don't have access to; then you are breaking the law.&lt;br /&gt;&lt;br /&gt;So how will we be doing this? We will remotely crack the nt system through SMB. In other words through the Server Message Block. The method that I will be showing you is attacking the famous file and printer sharing service. The file and printer service uses the SMB.&lt;br /&gt;&lt;br /&gt;In order for us to do this, we will be using the net use command in the command prompt. With this command we can try and log into the system. If you have ever used telnet or ssh to log into a linux box, then think of it that way. When we use the net use command with a * (asterisk) it will prompt us for the password. If you type in the correct password then you will be logged in. Just remember that file and printer sharing must be turned on. If it's not, then you will not be able to log in. So here is an example to understand how this all works.&lt;br /&gt;&lt;br /&gt;c:\&gt; net use \\192.168.1.125\IPC$ * /u:Administrator&lt;br /&gt;&lt;br /&gt;Lets say there is an account named skiddie. Then you can try this.&lt;br /&gt;&lt;br /&gt;c:\&gt; net use \\192.168.1.125\IPC$ * /u:skiddie&lt;br /&gt;&lt;br /&gt;Now you should have a good idea what needs to be done. Find all the users on the system. That is another tutorial and will not be covered here. Sometimes there are NULL passwords. What does this mean. It means there is no password at all. Just hit enter and you are in. I know what you are thinking. I am not going to sit there and keep typing passwords. For those out there that understand how to program will be thinking of writing a password cracker. I myself have done the same thing. Then one night of reading I read about a lot easier way of using a list of passwords in a file. No need to code a password cracker in c; just use the for command. Before trying this method, you should understand how to use this command and what the options mean. Make sure you read how to use the for command. Every windows hacker must read this. It has made things a lot easier for me.&lt;br /&gt;&lt;br /&gt;To understand the for command; type this in a command prompt.&lt;br /&gt;&lt;br /&gt;c: for /?&lt;br /&gt;&lt;br /&gt;We will use the for command to open a file and list all the words in the file. First make a text file named words.txt; then place these words in that file.&lt;br /&gt;&lt;br /&gt;hacker&lt;br /&gt;cracker&lt;br /&gt;whitehat&lt;br /&gt;blackhat&lt;br /&gt;mircoshaft&lt;br /&gt;linux&lt;br /&gt;freebsd&lt;br /&gt;&lt;br /&gt;Now bring up the command prompt. Go to the directory where the words.txt file is located. The for command will not work if your not in the same directory as the words.txt file. Type this comand and you will see all the words in the file.&lt;br /&gt;&lt;br /&gt;FOR /F "tokens=1" %i in (words.txt) do @echo %i&lt;br /&gt;&lt;br /&gt;That command will list all the words in the words.txt file in the command prompt window. If you have a dictionary file; then you can use it to crack an account on a nt system with file and printer sharing turned on. You will use this command for the nt system.&lt;br /&gt;&lt;br /&gt;FOR /F "tokens=1" %i in (words.txt) do net use \\192.168.1.125\IPC$ %i /u:Administrator&lt;br /&gt;&lt;br /&gt;Instead of using the echo command we use the net use command. You will notice that I used %i after IPC$ instead of a asterisk. Now the net use command will loop through all the words in your dictionary file; try them as the password for the Administrator account.&lt;br /&gt;&lt;br /&gt;That is it for the remotely password cracking a nt system. If you want to try this out; make sure file and printer sharing is turned on. Only try this on a system you have permission to do so. This tutorial was written to help out system administrators to learn how someone could penetrate a nt system. It's also good to test if users are using simple passwords.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2613452802614549309-7483047876680616004?l=hack-heck2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hack-heck2.blogspot.com/feeds/7483047876680616004/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://hack-heck2.blogspot.com/2009/02/remotely-password-cracking-nt-systems.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2613452802614549309/posts/default/7483047876680616004'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2613452802614549309/posts/default/7483047876680616004'/><link rel='alternate' type='text/html' href='http://hack-heck2.blogspot.com/2009/02/remotely-password-cracking-nt-systems.html' title='Remotely Password Cracking NT Systems'/><author><name>azhar yusuf</name><uri>http://www.blogger.com/profile/14377885979614235458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
