DESIGN AND IMPLIMENTATION OF ONLINE FORM VALIDATION USING CAPTCHA
![]() |
DESIGN AND IMPLIMENTATION OF ONLINE FORM VALIDATION USING CAPTCHA |
ACKNOWLEDGEMENT
All Praise is to almighty Allah the creator of the universe, for making this project work a success. May his peace and blessings be upon to his messenger Muhammad (S.A.W.), his household, companions and all those whom remain on the right path till the last day.
My thanks and sincere gratitude goes to my parents Mal. Musa Haruna Jada, Haj. Rakkiya Musa, Dr. Jafar Muhammad Augie, Alh. Sanusi Muhammad Augie, Nafisa Musa Augie, Fatima Muhammad Bashar, Atika Muhammad Bashar for their moral and financial support for my success. I pray that the lord shall continue to guide and protect you in all your undertakings, Amin.
My special gratitude goes to my able and humble project supervisor in person of Mr. Abdulhakim Bakare for pointing me in the right direction and guiding me through each and every step of the process with knowledge and support despite his numerous commitments.
I wish to thank and appreciate the head of department Dr. Ibrahim Sulaiman, and the entire lecturers of computer science and information technology department for their moral and technical support in the area of computing.
I will also like to acknowledge the advice and encouragement given to me by course mates and friends, more especially Uwaisu Abbakar, Zayyad Shehu, Salman Yahaya, Shamsu Abbakar, Ahmad Kasim, Shamsu Muhammad Gandu, Idris Labaran Jega, Yahaya Usman, Shamsu Shehu, Adamu Sulaiman Bawa, Sani Aminu, Basher S/Fawa, Ibrahim Wake, Mustapha Garba, Abbkar Sadik, Musa Aliyu, Bashar Sani, and Abdulmalik Isyaka, may Allah increase our relationship and help us all in our undertakings (Amin). To all of you, mentioned and not mentioned, am very grateful.
Finally, I would like to dedicate this project to my best friend Yahaya Usman for his caring, encouragement and help throughout the project.
ABSTRACT
Registration forms on Web sites often use CAPTCHAs. For example, free Web-based e-mail services like Hotmail, yahoo mail or gmail allow people to create an e-mail account free of charge. Usually, users must provide some personal information when creating an account, but the services typically don’t verify this information. They use CAPTCHAs to try to prevent spammers from using bots to generate hundreds of spam mail accounts.
Technique used by computer to tell if it is interacting with human or another computer. Because computing is becoming pervasive, and computerized tasks and services are common place, the need for increased levels of security has led to the development of this way for computers to ensure that they are dealing with humans in situations where human interaction is essential to security. Activities such as online commerce transactions, search engine submissions, Web polls, Web registrations, free e-mail service registration and other automated services are subject to software programs, or bots, that mimic the behavior of humans in order to skew the results of the automated task or perform malicious activities, such as gathering e-mail addresses for spamming or ordering hundreds of tickets to a concert.
In order to validate the digital transaction, using the CAPTCHA system the user is presented with a distorted word typically placed on top of a distorted background. The user must type the word into a field in order to complete the process. Computers have a difficult time decoding the distorted words while humans can easily decipher the text.
TABLE OF CONTENT
Title page……………………………………………………………………… i
Cover page……………………………………………………………………… ii
Declaration…………………………………………………………………….. iii
Certification…………………………………………………………………… iv
Dedication…………………………………………………………………….. v
Acknowledgement……………………………………………………………. vi
Abstract……………………………………………………………………….. vii
Table of content……………………………………………………………….. viii
CHAPTER ONE: Introduction
1.0 Introduction…………………………………………………..……………1
1.1 Statement of the Problem…………………………………….………… 2
1.2 Aims and Objectives of the Study ..…………………………………….2
1.3 Scope and Limitation of the Study .……………………………………3
1.4 Research Methodology…………………………………………………3
1.5 Significance of the Study ………….……………………………….…….4
1.6 Definition of Terms………..………………………………………….……4
CHAPTER TWO: Literature Review
2.0 Introduction……………………………………………………….. …..7
2.1 Project Background…….……….………………………………………..7
2.2 CAPTCHAs and the Turing Test……….………….…………….……..8
2.3 Types of CAPTCHA…………………………………………………….9
2.4 Usability issues with text based CAPTCHAs………………………..14
CHAPTER THREE: System Analysis and Model
3.0 System Analysis ………………………………………………………16
3.1 Analysis of the Existing System………………………………………16
3.2 New System Proposal.…………………………………………………16
3.3 Requirement Analysis.………………………………………………..17
New Input Analysis..…………………………………………….……..18
3.5 New Output Analysis …………………………………………………… 18
Why Use CAPTCHAS ……………………………………………….18
3.7 Features of Text Based CAPTCHA.…………………………………..20
CHAPTER FOUR: Design, Implementation and Testing of the New System
Design of the New System……………………………………….……… 21
4.1 New System Design………………………………………….………….21
4.2 New Input Requirement ………….………………………………….. .21
4.3 New Output Requirement ………………………………….…………..22
4.4 Hardware and Software Requirement………………….………………22
4.5 Database Design …………………………………………………….….…..…..23
User Interface Design ……………………………………………………..24
4.7 Hosting the Portal ………………………………………………………….26
4.8 Steps Followed In Implementing the Portal…….…………………………….27
4.9 Loading the Portal…………………………………………………………………..28
4.10 Implementation……………………………………………………………………….28
4.11 Guidelines for CAPTCHA Implementation………………………………..29
4.12 Documentation……………………………………………………………………….30
4.13 Software Testing and Integration………………………………………………30
CHAPTER FIVE: Summary, Conclusion and Recommendations
5.0 Summary……………………………………………………………32
5.1 Conclusion……………………………………… ………………….32
5.2 Recommendation…………………………… ……………………..33
Reference…………………………………………………………………………………………34
Appendix A: Screenshots…………………………………………………..28
Appendix B: Source Codes…………………………………………………………………36
Table of Figures
Figure 2.4 Usability issues in text based CAPTCHAs………………………………..15
Figure 3.6 Data Flow Diagram: ………..……………….……………………….19
Figure 4.1 Overview of the Website………………………………….………..23
CHAPTER ONE:
Introduction
Nowadays Spammers crawl the Web in search of email addresses posted in clear text and other online forms, this project is aimed at designing and implementing online form validation using text based CAPTCHA
A CAPTCHA is a program that protects websites against bots by generating and grading tests that humans can pass but current computer programs cannot pass the test. For example, humans can read distorted text but current computer programs cannot. The term CAPTCHA (for Completely Automated Public Turing Test To Tell Computers and Humans Apart) was coined in by (Luis von Ahn, et al, 2000) of Carnegie Mellon University.
You are trying to sign up for a free email service offered by Gmail or Yahoo. Before you can submit your application, you first have to pass a test. It is not a hard test in fact, that is the point. For you, the test should be simple and straightforward. But for a computer, the test should be almost impossible to solve. This sort of test is a CAPTCHA. They are also known as a type of Human Interaction Proof (HIP). You have probably seen CAPTCHA tests on lots of Web sites. The most common form of CAPTCHA is an image of several distorted letters. It is your job to type the correct series of letters into a form. If your letters match the ones in the distorted image, you pass the test. They are challenge-response tests to ensure that the users are indeed human. The purpose of a CAPTCHA is to block form submissions from spam bots automated scripts that harvest email addresses from publicly available web forms. A common kind of CAPTCHA used on most websites requires the users to enter the string of characters that appear in a distorted form on the screen.
CAPTCHAs are used because of the fact that it is difficult for the computers to extract the text from such a distorted image, whereas it is relatively easy for a human to understand the text hidden behind the distortions. Therefore, the correct response to a CAPTCHA challenge is assumed to come from a human and the user is permitted into the website. Why would anyone need to create a test that can tell humans and computers apart? It is because of people trying to game the system they want to exploit weaknesses in the computers running the sites. While these individuals probably make up a minority of all the people on the Internet, their actions can affect millions of users and Web sites. For example, a free e-mail service might find itself bombarded by account requests from an automated program. That automated program could be part of a larger attempt to send out spam mail to millions of people. The CAPTCHA test helps identify which users are real human beings and which ones are computer programs. Spammers are constantly trying to build algorithms that read the distorted text correctly. So strong CAPTCHAs have to be designed and built so that the efforts of the spammers are thwarted.
Statement of the problem
Nowadays the spammers make more and more trouble for site administrators as they submit spams to forums, guestbooks, and registration forms and so on. To protect ourselves against spam robots, it is a good solution to extend our forms with a CAPTCHA. This contains a security code which is only readable for humans and not for robots. This project will show how you can generate such CAPTCHA on the fly with PHP and how to integrate it into your own form
Aim and objectives
The main aim of this research work is to design and implement online form validation using text based CAPTCHA
Objectives are:-
Protecting Website Registration. Several companies (Yahoo!, Microsoft, etc.) offer free email services.
Protecting Email Addresses from Scrapers. Spammers crawl the Web in search of email addresses posted in clear text.
Preventing Dictionary Attacks. CAPTCHAs can also be used to prevent dictionary attacks in password systems.
Search Engine Bots. It is sometimes desirable to keep webpages unindexed to prevent others from finding them easily
Worms and Spam. CAPTCHAs also offer a plausible solution against email worms and spam.
Scope and limitation
This research has its limitation due to time constrains, financial problems, insufficient materials and resources to enable this research to be carried out at a wider range. That is the reason why this research analyses procedures of design and implementation of online form validation using text based CAPTCHA as its case study.
Research methodology
1.4.1 Requirement: The resources to be used during the system development process include:
Hardware tools are:
Computers: for transferring manual documents to automated documents.
Printers: for transferring soft copy to hard copy.
Flash disk: for storing information for future reference and modification.
Software tools are:
Microsoft access: for creating database.
Microsoft Visual basic Studio 2008: Integrated development environment for coding.
Microsoft word: for creating and editing documents.
Other resources:
Lecturers: for consultation, awarding marks and supervising project progress.
System users: to define the limitations of the current system and their expectations of the new system.
1.5 Significance of the study
Primarily the purpose of any research study is to come out with something that will add to the store of existing knowledge. This research/study is of extreme important in validating form online using text based CAPTCHA. This research will also be very useful to other future researches in similar areas.
1.6 Defination of terms:
Database: Database is a collection of tables which is mostly described as the backend of any application, it is where the registered users profile are contained and processed.
Internet: internet can simply be seen as a network of networks that throughout the globe that connects millions of computer networks. It can also be also seen as interconnection of large and small networks around the globe. It enables companies, organizations, government and individuals to share information across the globe.
World Wide Web: abbreviated as www or w3 is one of the services provided by the internet which is based on common set of protocols, which allowed a particular configured server computer to distribute documents across the internet in standard way. It is a system of interlinked hypertext documents accessed via the Internet. With a web browser, one can view web pages that may contain text, images, videos, and other multimedia and navigate between them via hyperlinks.
Web applications: any application that makes use of the technologies such as JAVASCRIPT, HTML, CSS, PHP and is executed in a web browser, is called a web application. The application can be run directly from a web site. Developers release their application as web applications because of the larger flexibility of the format. Web storage can be downloaded and installed locally for offline use.
Web page: a web page is a single HTML document which might include text, graphics, sound files, and hypertext links.
Web browser: this is a piece of software that runs on our personal computers and enables us to view web pages example internet explorer, flock, and opera.
Web site: a web site is a collection of web pages under the control of a person or a group or organization. A web site offers a certain amount of organization of its internal information
Web server: this is a computer running special software that enables you to host one or more web sites. The web server is always connected to the internet.
Hypertext markup language: html is files with extension markup language which makes use of “TAGS” to mark contents for a particular form of display. Html is written using text editors like Notepads, WordPad and Text pad.
JavaScript: Related to java only through similar syntax, used in web programming (client side) to create dynamic HTML documents. This is an object oriented language design to give web pages more interactivity that can be achieved using html. Unlike java, which can run on its own as mini application, JAVASCRIPT are built into web browsers and cannot stand on its own.
PHP: Hypertext preprocessor is a language used for web applications (server side) which produces HTML documents as output. (Brooks, 2007).
![]() |
DESIGN AND IMPLIMENTATION OF ONLINE FORM VALIDATION USING CAPTCHA |
![]() |
DESIGN AND IMPLIMENTATION OF ONLINE FORM VALIDATION USING CAPTCHA |
CHAPTER TWO
Literature review
2.0 Introduction
CAPTCHA is a great way to fight and combat spammers by determining if the sign up process is done by actual human or a robot. Most of the websites use the technique of CAPTCHA for validation / verification purpose whenever someone tries accomplish membership or want to submit a piece of information. The generation of CAPTCHA can be done in various ways. We can use server side scripting or even we can use client side scripting. In most of the cases sometimes it happens that we need to have some additional resources to be registered on the hosting server in order to implement the CAPTCHA basically this happens in case of server side scripting.
2.1 Project Background
The need for CAPTCHAs rose to keep out the website/search engine abuse by bots. In 1997, AltaVista sought ways to block and discourage the automatic submissions of URLs into their search engines. Andrei Broder, Chief Scientist of AltaVista, and his colleagues developed a filter. Their method was to generate a printed text randomly that only humans could read and not machine readers. Their approach was so effective that in a year, “spam-add-ons’” were reduced by 95% and a patent was issued in 2001.
In 2000, Yahoo’s popular Messenger chat service was hit by bots which pointed advertising links to annoying human users of chat rooms. Yahoo, along with Carnegie Mellon University, developed a CAPTCHA called EZ-GIMPY, which chose a dictionary word randomly and distorted it with a wide variety of image occlusions and asked the user to input the distorted word.
In November 1999, slashdot.com released a poll to vote for the best CS College in the US. Students from the Carnegie Mellon University and the Massachusetts Institute of Technology created bots that repeatedly voted for their respective colleges. This incident created the urge to use CAPTCHAs for such online polls to ensure that only human users are able to take part in the polls.
2.2 CAPTCHAs and the Turing Test
CAPTCHA technology has its foundation in an experiment called the Turing Test. Alan Turing, sometimes called the father of modern computing, proposed the test as a way to examine whether or not machines can think — or appear to think — like humans. The classic test is a game of imitation. In this game, an interrogator asks two participants a series of questions. One of the participants is a machine and the other is a human. The interrogator cannot see or hear the participants and has no way of knowing which is which. If the interrogator is unable to figure out which participant is a machine based on the responses, the machine passes the Turing Test. Of course, with a CAPTCHA, the goal is to create a test that humans can pass easily but machines cannot.
It is also important that the CAPTCHA application is able to present different CAPTCHAs to different users. If a visual CAPTCHA presented a static image that was the same for every user, it wouldn’t take long before a spammer spotted the form, deciphered the letters, and programmed an application to type in the correct answer automatically.
Most, but not all, CAPTCHAs rely on a visual test. Computers lack the sophistication that human beings have when it comes to processing visual data. We can look at an image and pick out patterns more easily than a computer. The human mind sometimes perceives patterns even when none exist, a quirk we call pareidolia. Ever see a shape in the clouds or a face on the moon? That is your brain trying to associate random information into patterns and shapes.
But not all CAPTCHAs rely on visual patterns. In fact, it is important to have an alternative to a visual CAPTCHA. Otherwise, the Web site administrator runs the risk of disenfranchising any Web user who has a visual impairment. One alternative to a visual test is an audible one. An audio CAPTCHA usually presents the user with a series of spoken letters or numbers. It’s not unusual for the program to distort the speaker’s voice, and it’s also common for the program to include background noise in the recording. This helps thwart voice recognition programs.
Another option is to create a CAPTCHA that asks the reader to interpret a short passage of text. A contextual CAPTCHA quizzes the reader and tests comprehension skills. While computer programs can pick out key words in text passages, they aren’t very good at understanding what those words actually mean.
2.3 Types of CAPTCHAs
CAPTCHAs are classified based on what is distorted and presented as a challenge to the user. They are:
2.3.1 Text based CAPTCHAs
These are simple to implement. The simplest yet novel approach is to present the user with some questions which only a human user can solve. Examples of such questions are:
What are twenty minus three?
What is the third letter in UNIVERSITY?
Which of Yellow, Thursday and Richard is a colour?
If yesterday was a Sunday, what is today?
Such questions are very easy for a human user to solve, but it is very difficult to program a computer to solve them. These are also friendly to people with visual disability – such as those with colour blindness.
Other text CAPTCHAs involves text distortions and the user is asked to identify the text hidden. The various implementations are:
2.3.1.0 Gimpy:
Gimpy is a very reliable text CAPTCHA built by CMU in collaboration with Yahoo for their Messenger service. Gimpy is based on the human ability to read extremely distorted text and the inability of computer programs to do the same. Gimpy works by choosing ten words randomly from a dictionary, and displaying them in a distorted and overlapped manner. Gimpy then asks the users to enter a subset of the words in the image. The human user is capable of identifying the words correctly, whereas a computer program cannot.
Fig 2.3.1.0 Gimpy CAPTCHA
2.3.1.1 Ez – Gimpy:
This is a simplified version of the Gimpy CAPTCHA, adopted by Yahoo in their signup page. Ez – Gimpy randomly picks a single word from a dictionary and applies distortion to the text. The user is then asked to identify the text correctly.
Fig 2.3.1.1 Yahoo’s Ez – Gimpy CAPTCHA
2.3.1.2 Baffle Text:
This was developed by Henry Baird at University of California at Berkeley. This is a variation of the Gimpy. This doesn’t contain dictionary words, but it picks up random alphabets to create a nonsense but pronounceable text. Distortions are then added to this text and the user is challenged to guess the right word.
This technique overcomes the drawback of Gimpy CAPTCHA because, Gimpy uses dictionary words and hence, clever bots could be designed to check the dictionary for the matching word by brute-force.
finans
ourses
Fig 2.3.1.2 Baffle Text examples
2.3.1.3 MSN Captcha:
Microsoft uses a different CAPTCHA for services provided under MSN umbrella. These are popularly called MSN Passport CAPTCHAs. They use eight characters (upper case) and digits. Foreground is dark blue, and background is grey. Warping is used to distort the characters, to produce a ripple effect, which makes computer recognition very difficult.
XTNM5YRE
L9D28229B
Fig 2.3.1.3 MSN Passport CAPTCHA
2.3.2 Graphic based CAPTCHAs:
Graphic CAPTCHAs are challenges that involve pictures or objects that have some sort of similarity that the users have to guess. They are visual puzzles, similar to Mensa tests. Computer generates the puzzles and grades the answers, but is itself unable to solve it.
2.3.2.0 Bongo:
Bongo. Another example of a CAPTCHA is the program we call BONGO. BONGO is named after M.M. Bongard, who published a book of pattern recognition problems in the 1970s. BONGO asks the user to solve a visual pattern recognition problem. It displays two series of blocks, the left and the right. The blocks in the left series differ from those in the right, and the user must find the characteristic that sets them apart. A possible left and right series is shown in Figure 2.3.2.0
Fig 2.3.2.0 Bongo CAPTCHA
These two sets are different because everything on the left is drawn with thick lines and those on the right are in thin lines. After seeing the two blocks, the user is presented with a set of four single blocks and is asked to determine to which group the each block belongs to. The user passes the test if she/he determines correctly to which set the blocks belong to. We have to be careful to see that the user is not confused by a large number of choices.
2.3.2.1 PIX:
PIX is a program that has a large database of labeled images. All of these images are pictures of concrete objects (a horse, a table, a house, a flower). The program picks an object at random, finds six images of that object from its database, presents them to the user and then asks the question “what are these pictures of?” Current computer programs should not be able to answer this question, so PIX should be a CAPTCHA. However, PIX, as stated, is not a CAPTCHA: it is very easy to write a program that can answer the question “what are these pictures of?” Remember that all the code and data of a CAPTCHA should be publicly available; in particular, the image database that PIX uses should be public. Hence, writing a program that can answer the question “what are these pictures of?” is easy: search the database for the images presented and find their label. Fortunately, this can be fixed. One way for PIX to become a CAPTCHA is to randomly distort the images before presenting them to the user, so that computer programs cannot easily search the database for the undistorted image.
2.3.3 Audio based CAPTCHAs:
The final example we offer is based on sound. The program picks a word or a sequence of numbers at random, renders the word or the numbers into a sound clip and distorts the sound clip; it then presents the distorted sound clip to the user and asks users to enter its contents. This CAPTCHA is based on the difference in ability between humans and computers in recognizing spoken language. Nancy Chan of the City University in Hong Kong was the first to implement a sound-based system of this type. The idea is that a human is able to efficiently disregard the distortion and interpret the characters being read out while software would struggle with the distortion being applied, and need to be effective at speech to text translation in order to be successful. This is a crude way to filter humans and it is not so popular because the user has to understand the language and the accent in which the sound clip is recorded.
2.4 Usability issues with text based CAPTCHAs:
Are text CAPTCHAs like Gimpy, user–friendly? Sometimes the text is distorted to such an extent, that even humans have difficulty in understanding it. Some of the issues are listed in table 2.4
Fig 2.4 Usability issues in text based CAPTCHAs
Distortion becomes a problem when it is done in a very haphazard way. Some characters like‘d’ can be confused for ‘cl’ or ‘m’ with ‘rn’. It should also be easily understandable to those who are unfamiliar with the language.
Content is an issue when the string length becomes too long or when the string is not a dictionary word. Care should be taken not to include offensive words.
Presentation should be in such a way as to not confuse the users. The font and colour chosen should be user friendly.
CHAPTER THREE
System Analysis and Model
3.0 System Analysis
System analysis is the process of defining goals, objectives, functions, features, constraints and conditions of a system. Analysis should cover all the aspects especially on how the web site is going to join the existing system. The first important thing is finding the targeted audience. Then, all the present hardware, software, people and data should be considered during the time of analysis. Analysis is done using standard tools to produce a baseline of the requirements. Along with meeting the need of all the actors of the system, the analyst must meet with end users to understand what the user’s needs are and to learn about problems that affect the current system in order to assist with designing a new and more efficient system.
3.1 Analysis of the Existing System
The existing system used by many websites to protect their web site against spammers in the current world of computer are facing big challenge since the early days of the Internet, users have wanted to make text illegible to computers, The first such people were hackers, posting about sensitive topics to online forums they thought were being automatically monitored for keywords. To circumvent such filters, they would replace a word with look-alike characters
3.2 New System Proposal
Due to the difficulties faced by the existing system from spammers there is need to have a security that can identify weather the user is a human or bots and that new system is text based CAPTCHA
3.2.1 Advantages of the new system proposed
Distinguishes between a human and a machine.
Makes online polls more genuine.
Reduces spam and viruses
Makes online shopping safer.
Diminishes abuse of free email account services.
3.2.2 Disadvantages of the new system proposed
Sometimes very difficult to read.
Are not compatible with users with disabilities.
Time-consuming to decipher.
Technical difficulties with certain internet browsers.
May greatly enhance Artificial Intelligence.
3.3 Requirement Analysis
Before the implementation of any design, the tools and features required for the achievement of the effective design must be considered. To find out the tools required for the implementation of the design is to consider what functionalities wish to achieve with the new system. For effective usability, the text based CAPTCHA will enable the following functionalities to the forms:
Concrete security to the online forms.
Effective protection against bots.
Better service.
Proper control
Ensure data accuracy
To be able to achieve the above functionalities, the following technologies are considered:
A Web Server
A Design/Scripting Language
An Operating System Platform
3.4 New Input Analysis
The requirements for the new inputs involved in the course of this project are making the online forms vary secure with a good security against spammers, putting it so difficult to the current computer programs and also making it understandable to the users when trying to pass the test.
3.5 New Output Analysis
The requirement of the new output of the new system is a designed and implementation of online form validation using text based CAPTCHA that will provide a security to the online forms in the presence world of computers and it will also protect website against bots.
3.6 Why use CAPTCHAS
The proliferation of the publicly available services on the Web is a boon for the community at large. But unfortunately it has invited new and novel abuses. Programs (bots and spiders) are being created to steal services and to conduct fraudulent transactions. Some examples:
Free online accounts are being registered automatically many times and are being used to distribute stolen or copyrighted material.
Recommendation systems are vulnerable to artificial inflation or deflation of rankings. For example, EBay, a famous auction website allows users to rate a product. Abusers can easily create bots that could increase or decrease the rating of a specific product, possibly changing people’s perception towards the product.
Spammers register themselves with free email accounts such as those provided by Gmail or Hotmail and use their bots to send unsolicited mails to other users of that email service.
Online polls are attacked by bots and are susceptible to ballot stuffing. This gives Unfair mileage to those that benefit from it.
In light of the above listed abuses and much more, a need was felt for a facility that checks users and allows access to services to only human users. It was in this direction that such a tool like CAPTCHA was created.
Proceed to next page
If
Solve CAPTCHA
Launch the site
Incorrect Input Correct Input
Figure 3.6 Data Flow Diagram
3.7 Features of Text Based CAPTCHA
It will stop spammers from registering on online forms because spammers and bots cannot tell what letters and numbers are there in a CAPTCHA, therefore stopping them.
Text based CAPTCHA can be a great help in downsizing or diminishing form spamming.
Prevent people from using bots to assist with massive downloading of content from multimedia websites. They are used in online message boards and blog comments to prevent bots from posting spam links as a comment or message.
Text based CAPTCHAs are designed to be unreadable by machines, common assistive technology tools such as screen readers cannot interpret them.
CHAPTER FOUR
Design, Implementation and Testing of the New System
4.0 Design of the New System
The goal of the new system is to solve the major problems associated with the old system as has been mentioned earlier. When designing an application of such, one is bound to encounter some problems, obstacles and technical challenges. However, a variety of considerations and guidelines can aid the researchers in the numerous decisions with which they will face.
4.1 New System Design
In order to design online form validation using text based CAPTCHA, the relational database must be designed first. Conceptual design can be divided into two parts: The data model and the process model. The data model focuses on what data should be stored in the database while the process model deals with how the data is processed
4.2 New Input Requirement
It is any data that can be put into a system in order to perform operation on it and yield result. It is expected that one should consider the output design first before the input design, but this is quite not the case here since there is need to know what is expected for the system is to produce. It is obvious that, for generating valid output data, there must be valid input data. Data will be entered in to it using the key board and mouse. Here, we consider the new input design that would be used by the new system; a system that is user friendly.
4.3 New Output Requirement
It is the most important stages of every system design. It deals with the creation of output reports that makes the system useful. So this system is concerned with the output that forms are well secure against spammers.
4.4 Hardware and Software Requirement
The resources required for the design and implementation of a shopping website involved in this project includes both the hardware and software.
The hardware resources required includes but are not limited to:
Processor (Intel Core Duo 2.0 GHz or more),
RAM (1 GB or More),
Hard disk (80GB or more),
Monitor (CRT, or LCD monitor),
Keyboard (Normal or Multimedia),
Mouse (Compatible mouse).
While the software resources required includes but are not limited to text editor,
Windows operating system (windows XP, window 7), or Vista,
Web browser (Internet Explorer 6 or above, Opera, Mozilla Firefox),
WampServer (which consist of PHP, Apache, and MySQL)
Home
Fig4.1: Overview of the Website
The above diagram shows the overview of the website. Where a user can register a form and at the end he will be ask to write the captcha at the end, if the information insert in the form he will be prompt to the next page displaying him that his account has succefully been created and you can login your username and password if you login the password and username you will be prompted to next page telling you that you have login your account and if you wish you can logout.
4.5 Database Design
The data is stored in tables and characterized by fields, each group of information is a record. Database design has nothing to do with using computer; it has to do with research and planning. The design process is completely independent of software choices.
The database screenshot showing different table names and the database name
4.6 User Interface Design
Appendix A: Screenshots
Figure A.1: Home Page showing various navigations
Figure A.2: Registration Page
Figure A.3: Login Page
Figure A.4: Login Successful Page
Figure A.5: Contact Us Form
4.7 Hosting the Portal
The host used to implement this project is a local host known as WAMP server. This is due to the cost of internet facilities and inefficiency of the available facilities.
WAMP is an acronym formed from the initials of operating system Microsoft windows and principal components of the package: Apache, MySQL and one of PHP, Perl or python (WIKIPEDIA; 2012). This project however, made use of WAMP combination of Apache, MySQL and PHP.
Apache is web server software notable for playing a key role in the initial growth of the World Wide Web (WIKIPEDIA; 2012).
MySQL is the world most used open source relational database management system (RDBMS) (WIKIPEDIA; 2012).
PHP is an open source general – purpose server side scripting language originally designed for web development to produce dynamic web pages (WIKIPEDIA; 2012)
4.8 Steps Followed In Implementing the Portal
A host (WAMP server) was installed in the computer system and a ‘WAMP’ folder was automatically in the local disk (C drive).
The ‘CAPTCHA VALIDATION’ folder was copied into the ‘wamp’ folder.
The wamp application was then loaded to make changes to the computer making the computer system look like a server.
A web browser (mozila firefox) was loaded.
The address: 127.0.0.1 was entered in the address box and loaded. The wamp server homepage came up.
Php myadmin was clicked to configure the MySQL database for the portal. A ‘create new database table’ came up.
On the ‘create new database’ field, student was entered and create was clicked. A ‘create new table on database student’ came up.
On the ‘name’ field, ‘login’ was entered. On the ‘number of fields’ field, two (2) was entered and ‘go’ was clicked. The login table design pops up.
In the first field, ‘username’ was entered and the data type was defined ‘text’. In the second field, ‘password’ was entered and the data type was defined ‘text’. Save was finally clicked and the portal became ready for use.
4.9 Loading the Portal
The portal can be loaded or accessed in two ways on the system.
From the wamp server homepage
The following are steps to be followed when using the wamp server homepage:
Load a web browser.
Enter ‘localhost’ or ‘127.0.0.1’ in the address box and click ‘go’.
Click on the ‘CAPTCHA VALIDATION’ link. The portal comes up.
From a web browser address box
The following are steps to be followed when using the wamp server homepage:
Load a web browser.
Enter 127.0.0.1/CAPTCHA VALIDATION/index.php and click ‘go’. The portal loads automatically.
4.10 Implementation
The process of implementation follows immediately after a successful design. The implementation is to put the design into practice. The implementation applied in this work is the parallel change over. The approach involves the operation of both old system and the new system simultaneously for some period of time to monitor the reliability of the new system before a direct changeover will be applied.
The object of implementation here includes putting the program into the expected operation. It involves the actual interaction between the computer hardware and software system to produce the expected result.
The programming language used in this work is PHP MYSQL which runs on a web server.
4.11 Guidelines For CAPTCHA Implementation:
If your website needs protection from abuse, it is recommended that you use a CAPTCHA. There are many CAPTCHA implementations, some better than others. The following guidelines are strongly recommended for any CAPTCHA code:
Accessibility: CAPTCHAs must be accessible. CAPTCHAs based solely on reading text— or other visual-perception tasks — prevent visually impaired users from accessing the protected resource. Such CAPTCHAs may make a site incompatible with disability access rules in most countries. Any implementation of a CAPTCHA should allow blind users to get around the barrier, for example, by permitting users to opt for an audio or sound CAPTCHA.
Image Security: CAPTCHA images of text should be distorted randomly before being presented to the user. Many implementations of CAPTCHAs use undistorted text, or text with only minor distortions. These implementations are vulnerable to simple automated attacks.
Script Security: Building a secure CAPTCHA code is not easy. In addition to making the images unreadable by computers, the system should ensure that there are no easy ways around it at the script level. Common examples of insecurities in this respect include:
1. Systems that pass the answer to the CAPTCHA in plain text as part of the web form.
2. Systems where a solution to the same CAPTCHA can be used multiple times (this makes the CAPTCHA vulnerable to so-called “replay attacks”). Most CAPTCHA scripts found freely on the Web are vulnerable to these types of attacks.
Security Even After Wide-Spread Adoption: There are various “CAPTCHAs” that would be insecure if a significant number of sites started using them. An example of such a puzzle is asking text-based questions, such as a mathematical question (“what is 1+1”). Since a parser could easily be written that would allow bots to bypass this test, such “CAPTCHAs” rely on the fact that few sites use them, and thus that a bot author has no incentive to program their bot to solve that challenge. True CAPTCHAs should be secure even after a significant number of websites adopt them.
4.12 Documentation
Documentation is giving detailed report of all the information necessary to produce the user with the understanding of the purpose and how to use the designed application for the system as to achieve its objectives. This helps in carrying out further research and improvement in the system. Also comprehensive information about the new system and its working procedure are outlined so that modification can be done on the system without studying the entire system
4.13 Software Testing and Integration
In the course of this design, the development was done in modules. Each module was implemented separately and tested. Every stage entails debugging, which was done and all error fixed. The entire system was integrated by joining each module to work with the main system. At the end of the integration, the entire system was tested and confirmed Ok.
4.13.1 The Test Plan
The test activities were carried out in stages. Each module was tested after and during Design.
4.13.2 System Testing
The modules tested include the module discussed earlier. Each of these modules was tested with some data testing tools. After each debugging stage, the module would be integrated into the main system.
4.13.3 Database Testing
Database testing was tested basically for connectivity and storage. The test started with the design stage, where efforts were ensured that the correct data representation was made.
CHAPTER FIVE
Summary, Conclusion and Recommendations
5.0 Summary
This project work was carried out in order to validate online forms using CAPTCHA and decrease the problems face by online forms from bots. The existing system has problem or disadvantage which include; insecurity to online forms etc. The need to improve on the existing system leads to the aim of this project work which is to design and implement online form validation using CAPTCHA. The newly designed CAPTCHA will contribute immensely towards the process of protecting the websites and online forms against bots and spammers.
Conclusion
In conclusion, browsing internet is not for the normal users only. The special needs user need the internet like the normal user or may be more. The websites are provided to help users, give them more information or make their work easier, but CAPTCHA makes reaching the websites services more complicated. At last, we need some way to tell CAPTCHA that special needs users are human not bots. Sites with attractive resources and millions of users will always need access control systems that limit the bad using of them. At that level, it is reasonable to employ many concurrent approaches, including audio and visual CAPTCHA, to do so. However, it must be noted that users with disabilities can interact with a given resource in a reasonable amount of time. CAPTCHAS are any software that distinguishes human and machine, research in CAPTCHAS implies advancement in AI making computers understand how human thinks and Different methods of CAPTCHAS are being studied but new ideas like ReCAPTCHA using human time on internet is amazing.
5.2 Recommendation
Having implemented, tested and observed that the software application provide a great deal of improvement over the existing system. We therefore, confidently recommend it to any company, organizations or establishments that require an effective and efficient security to their online forms
We strongly recommend a parallel change over implementation approach which involves the operation of both the old system and the new system simultaneously for some period of time to monitor the reliability of the new system before a direct change over will be applied.
Finally, for proper implementation and usage of this software package, proper attention must be given to the following areas;
System evaluation; This enable one to know how the system is working and how well it is meeting the original requirements, goals, specification, schedule and so on. From such evaluation comes adjustment that will improve the system.
System Maintenances; the system should always be maintained.
REFERENCE
Ahn, Luis von; Blum, Manuel; Hopper, Nicholas J.; Langford, John (2002). “CAPTCHA: Using Hard AI Problems for Security”. Advances in Cryptology — EUROCRYPT 2003. Lecture Notes in Computer Science 2656. pp. 294–311. doi:10.1007/3-540-39200-9_18. ISBN 978-3-540-14039-9.
Chellapilla, Kumar; Larson, Kevin; Simard, Patrice; Czerwinski, Mary. “Designing Human Friendly Human Interaction Proofs (HIPs)”. Microsoft Research.
Greg Mori and Jitendra Malik. “Breaking a Visual CAPTCHA.”, Unpublished Manuscript, 2002.
H. Sameti, H. Shirali – Shahreza,? How Good Are Humans at Solving CAPTCHAs. A Large Scale Evaluation?, Security and Privacy (SP), IEEE, pp1.
Luis von Ahn, Manuel Blum and John Langford. Telling Humans and Computers Apart (Automatically) or How Lazy Cryptographers do AI. To appear in Communications of the ACM.
Luis von Ahn, Manuel Blum, Nicholas J. Hopper and John Langford. The CAPTCHA Web Page: http://www.captcha.net. 2000.
Mihir Bellare, Russell Impagliazzo and Moni Naor. Does Parallel Repetition Lower the Error in Computationally Sound Protocols? In 38th IEEE Symposium on Foundations of Computer Science (FOCS’ 97), pages 374-383. IEEE Computer Society, 1997.
Moni Naor. Verification of a human in the loop or identification via the turing test. Available electronically: http://www.wisdom.weizmann.ac.il/~naor/ PAPERS/human.ps, 1997.
Nicholas J. Hopper, John Langford and Luis von Ahn. Provably Secure Steganography. In Advances in Cryptology, CRYPTO’ 02, volume 2442 of Lecture Notes in Computer Science, pages 77-92. Santa Barbara, CA, 2002.
P. Desai, Patadia .A, ?A Better Approach to CAPTCHA?, IND ICON, IEEE,pp.1
U.S. Patent 6,195,698. Method for selectively restricting access to computer systems. Filed on Apr 13, 1998 and granted on Feb 27, 2001. Available at http://www.google.com/patents/US6195698.
Von Ahn, L., Blum, M., Hopper, N. and Langford, J. „CAPTCHA: Using Hard AI Problems for Security”.
www.phpcaptcha.org
www.captcha.net
www.wikipedia.com
APPENDIX A SCREENSHOTS
APPENDIX B: SOURCE CODE
Captcha validation/index.html
<html>
<head>
<title>Welcome to Kebbi State University of Science and Technology</title>
<style type=”text/css”>
<!–
#kdje {
text-align: center;
font-family: “Courier New”, Courier, monospace;
}
body {
background-color: #40BE4B;
text-align: center;
color: #000;
font-weight: bold;
}
a {
font-size: 18px;
}
a:link {
color: #393;
text-decoration: none;
}
a:hover {
color: #00F;
text-align: center;
text-decoration: underline;
}
#wev {
text-align: center;
font-family: “MS Serif”, “New York”, serif;
font-size: 12px;
}
#fkjds {
text-align: center;
}
#fkjds td {
color: #393;
font-weight: bold;
}
#des {
font-weight: bold;
}
#dsw {
text-align: center;
}
#fd {
text-align: center;
}
a:visited {
text-decoration: none;
}
a:active {
text-decoration: none;
font-weight: bold;
}
#kdje p strong marquee {
font-weight: bold;
}
#hyu { text-align: center;
}
#sdf {
text-align: justify;
}
#kjhgh {
font-family: “Palatino Linotype”, “Book Antiqua”, Palatino, serif;
text-align: justify;
}
#pouu {
font-size: 22px;
}
.asdfg {
text-align: justify;
font-family: “Palatino Linotype”, “Book Antiqua”, Palatino, serif;
}
.s {
text-align: justify;
}
–>
</style>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″></head>
<body>
<table width=”879″ align=”center”>
<tr>
<td width=”871″ bgcolor=”#66FF33″><table width=”100%” align=”center”>
<tr>
<td colspan=”2″><img name=”bnner” src=”images/img01.png” width=”864″ height=”80″ alt=”bnner”></td>
</tr>
<tr>
<td colspan=”2″ bgcolor=”#D6FCBE” id=”kdje”><p><strong>
<marquee>
Welcome To Kebbi State University of Science and Technology
</marquee>
</strong></p></td>
</tr>
<tr>
<td width=”180″ valign=”top” bgcolor=”#FFFFFF”><table width=”100%” border=”0″ align=”center” cellpadding=”4″ cellspacing=”4″>
<tr>
<td width=”19%” valign=”top” bgcolor=”#FFFFFF” style=”text-align: left”><a href=”index.html”><img src=”images/blue_dot.gif” alt=”wed” width=”14″ height=”14″ align=”right”></a></td>
<td width=”81%” valign=”top” bgcolor=”#FFFFFF” style=”font-size: 14px”>Home</td>
</tr>
<tr>
<td valign=”top” bgcolor=”#FFFFFF” style=”text-align: left”><a href=”index.html”><img src=”images/blue_dot.gif” alt=”wed” width=”14″ height=”14″ align=”right”></a><a href=”department.html”></a></td>
<td valign=”top” bgcolor=”#FFFFFF” style=”font-size: 14px”><a href=”register.php” style=”font-family: ‘Palatino Linotype’, ‘Book Antiqua’, Palatino, serif; font-size: 14px; font-weight: bold;”>Registration</a></td>
</tr>
<tr>
<td valign=”top” bgcolor=”#FFFFFF” style=”text-align: left”><a href=”index.html”><img src=”images/blue_dot.gif” alt=”wed” width=”14″ height=”14″ align=”right”></a><a href=”login.php”></a></td>
<td valign=”top” bgcolor=”#FFFFFF” style=”font-size: 14px”><a href=”login.php” style=”font-family: ‘Palatino Linotype’, ‘Book Antiqua’, Palatino, serif; font-size: 14px; font-weight: bold;”>Login</a></td>
</tr>
<tr>
</tr>
<tr>
<td valign=”top” bgcolor=”#FFFFFF” style=”text-align: left”><a href=”index.html”><img src=”images/blue_dot.gif” alt=”wed” width=”14″ height=”14″ align=”right”></a><a href=”contactus.html”></a></td>
<td valign=”top” bgcolor=”#FFFFFF” style=”font-size: 14px”><a href=”contactus.php” style=”font-size: 14px; font-family: ‘Palatino Linotype’, ‘Book Antiqua’, Palatino, serif; font-weight: bold;”>Contact Us</a></td>
</tr>
<tr>
<td colspan=”2″ id=”fd4″> </td>
</tr>
<tr>
<td colspan=”2″ bgcolor=”#D6FCBE” id=”fd”>News Update</td>
</tr>
<tr>
<td colspan=”2″><p style=”font-family: ‘Palatino Linotype’, ‘Book Antiqua’, Palatino, serif; font-weight: normal; font-size: 14px; text-align: left;”><marquee direction=”up” scrollamount=”2″ onMouseOver=”this.stop();” onMouseOut=”this.start();”>
> <a href=”#” style=”font-size: 14px”>Merit Award 2014</a><br>
<br>
> <a href=”#” style=”font-size: 14px”>Admision List Realesed </a><br>
<br>
> <a href=”#” style=”font-size: 14px”>Remedial Programme</a><br>
<br>
> <a href=”#” style=”font-size: 14px”>NUC Accreditation</a>
</marquee>
</p></td>
</tr>
</table></td>
<td width=”680″ valign=”top” bgcolor=”#FFFFFF”><u><span id=”pouu” style=”font-family: ‘Palatino Linotype’, ‘Book Antiqua’, Palatino, serif; font-weight: bold; font-size: 15px;”>Home >></span></u>
<table width=”97%” align=”center” cellpadding=”0″ cellspacing=”0″>
<tr>
<td width=”44%” height=”194″ valign=”top”><p><img src=”images/homep.gif” alt=”home” name=”home” width=”273″ height=”175″ align=”left”></p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p></td>
<td width=”56%” valign=”top”><blockquote>
<p class=”s”><span style=”font-family: ‘Palatino Linotype’, ‘Book Antiqua’, Palatino, serif”>Kebbi State University of Science and Technology is one modern university located in Aliero local government of Kebbi state. Established in 2006 as the 79th university in the country by Kebbi government to educate and train Nigerians particularly the indigence of the state. The university currently has two facilities, faculty of science and faculty of agriculture with several departments. </span> <a href=”#” style=”font-style: italic; font-size: 12px;”>Read more….</a><br>
</p>
</blockquote>
<p></p>
<p></p></td>
</tr>
<tr>
<td height=”71″ valign=”top”> <blockquote>
<div style=”font-family: Verdana, Geneva, sans-serif; font-size: 16px; font-style: italic; color: #030; background-color:#D6FCBE”>Vision Statement</div>
<p><span style=”font-size: 14px; font-family: Verdana, Geneva, sans-serif; text-align: justify;”>The uinversity aspires to be one of the best universities in Nigeria with an established reputation for high quality teaching and research and innovative learning delivery techniques.</span></p>
</blockquote></td>
<td width=”56%” valign=”top”><blockquote>
<div style=”font-family: Verdana, Geneva, sans-serif; font-size: 16px; font-style: italic; color: #030; background-color:#D6FCBE”>Mission Statement</div>
<p><span style=”text-align: justify; font-family: Verdana, Geneva, sans-serif; font-size: 14px;”>The mission of the Kebbi University is to produce well-grounded, sound, God-fearing and entrepreneurially-minded graduates, equipped with problem-solving and other skills attuned to the demands of the 21st century environment.</span></p>
</blockquote></td>
</tr>
<tr>
<td height=”21″ valign=”top”> </td>
<td width=”56%” valign=”top”> </td>
</tr>
</table></td>
</tr>
<tr>
<td colspan=”2″ bgcolor=”#FFFFFF” id=”wev”>Allright Reserved KSUSTA 2014</td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
Captcha.php
<?php
/* captcha.php file*/
session_start();
header(“Expires: Tue, 01 Jan 2013 00:00:00 GMT”);
header(“Last-Modified: ” . gmdate(“D, d M Y H:i:s”) . ” GMT”);
header(“Cache-Control: no-store, no-cache, must-revalidate”);
header(“Cache-Control: post-check=0, pre-check=0”, false);
header(“Pragma: no-cache”);
$chars = ‘023456789abcdefghijklmnopqrstuvwxyzABCDEFGHJKLMNOPQRSTUVWXYZ’;
$randomString = ”;
for ($i = 0; $i < 5; $i++)
{
$randomString .= $chars[rand(0, strlen($chars)-1)];
}
$_SESSION[‘captcha’] = strtolower( $randomString );
$im = @imagecreatefrompng(“captcha_bg.png”);
imagettftext($im, 30, 0, 10, 38, imagecolorallocate ($im, 0, 0, 0), ‘MAGNETOB.TTF’, $randomString);
header (‘Content-type: image/png’);
imagepng($im, NULL, 0);
imagedestroy($im);
?>
Captchachar.php
<?php
/* captcha.php file*/
session_start();
header(“Expires: Tue, 01 Jan 2013 00:00:00 GMT”);
header(“Last-Modified: ” . gmdate(“D, d M Y H:i:s”) . ” GMT”);
header(“Cache-Control: no-store, no-cache, must-revalidate”);
header(“Cache-Control: post-check=0, pre-check=0”, false);
header(“Pragma: no-cache”);
$chars = ‘abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ’;
$randomString = ”;
for ($i = 0; $i < 5; $i++)
{
$randomString .= $chars[rand(0, strlen($chars)-1)];
}
$_SESSION[‘captcha’] = strtolower( $randomString );
$im = @imagecreatefrompng(“captcha_bg.png”);
imagettftext($im, 30, 0, 10, 38, imagecolorallocate ($im, 0, 0, 0), ‘MAGNETOB.TTF’, $randomString);
header (‘Content-type: image/png’);
imagepng($im, NULL, 0);
imagedestroy($im);
?>
Captchanum.php
<?php
/* captcha.php file*/
session_start();
header(“Expires: Tue, 01 Jan 2013 00:00:00 GMT”);
header(“Last-Modified: ” . gmdate(“D, d M Y H:i:s”) . ” GMT”);
header(“Cache-Control: no-store, no-cache, must-revalidate”);
header(“Cache-Control: post-check=0, pre-check=0”, false);
header(“Pragma: no-cache”);
$chars = ‘0123456789’;
$randomString = ”;
for ($i = 0; $i < 5; $i++)
{
$randomString .= $chars[rand(0, strlen($chars)-1)];
}
$_SESSION[‘captcha’] = strtolower( $randomString );
$im = @imagecreatefrompng(“captcha_bg.png”);
imagettftext($im, 30, 0, 10, 38, imagecolorallocate ($im, 0, 0, 0), ‘MAGNETOB.TTF’, $randomString);
header (‘Content-type: image/png’);
imagepng($im, NULL, 0);
imagedestroy($im);
?>