You are on page 1of 86

1.

1 INTRODUCTION
The two main issues that we address in context of such response policies are that of policy matching, and policy administration. For the policy matching problem, we propose two algorithms that efficiently search the policy database for policies that match an anomalous request. We also extend the Postgre SQL DBMS with our policy matching mechanism, and report experimental results. The experimental evaluation shows that our techniques are very efficient. The other issue that we address is that of administration of response policies to prevent malicious modifications to policy objects from legitimate users. We propose a novel Joint Threshold Administration Model (JTAM) that is based on the principle of separation of duty. The key idea in JTAM is that a policy object is jointly administered by at least k database administrator (DBAs), that is, any modification made to a policy object will be invalid unless it has been authorized by at least k DBAs. We present design details of JTAM which is based on a cryptographic threshold signature scheme, and show how JTAM prevents malicious modifications to policy objects from authorized users.

1.2 ABOUT THE PROJECT PROJECT PURPOSE
With greater data integration, aggregation and disclosure, preventing data theft, from both inside and outside organizations, has become a major challenge.StandardDatabase security mechanisms, such as access control, authentication, and encryption, are not of much help when it comes to preventing data theft from insiders [5]. Such threats have thus forced organizations to reevaluate securitystrategies for their internal databases [4]. Database to detect potential intrusions, intrusion detection (ID), is a crucial technique that has to be part of any comprehensive security solution for high-assurance database security.

PROJECT SCOPE
A response policy is required by the database security administrator to specify

appropriate response actions for different circumstances. In this paper, we proposea high-level language for the specification of such policies which makes it very easy to specify and modify them. The two main issues that we address in the context of such response policies are that of policy matching and policy administration. Policy matching is the problem of searching for policies applicable to an anomalous request.

PRODUCT FEATURE
We present a framework for specifying intrusion response policies in the context of a DBMS. We present a novel administration model called JTAM for administration of response policies. implement JTAM in the PostgreSQL DBMS, and report experimental results on the efficiency of our techniques. When an anomaly is detected, the response system must search through the policy database and find policies that match theanomaly.

1.3 EXISTING SYSTEM
 Standard database security mechanisms, such as access control, authentication, and encryption, are not of much help when it comes to preventing data theft from insiders.  The Intrusion Detection systems that are developed are not customized for a Database Management System (DBMS).

1.4 DRAWBACKS OF THE EXISTING SYSTEM
 There are three main types of response actions that we refer to, respectively, as conservative actions, fine-grained actions, and aggressive actions, the key issue to address is which response measure to take under a given situation.

2.1 PROBLEM DEFINITION
The fundamental problem in such administration model is that of conflict-of-interest. The main issue is essentially that of insider threats, that is, how to protect a response policy object from malicious modifications made by a database user that has legitimate access rights to the policy object.

2.2 PROPOSED SYSTEM
 Two main elements which is specifically customized to a DBMS is used: an anomaly detection (AD) system and an anomaly response system.  The first element is based on the construction of database access profiles of roles and users, and on the use of such profiles for the AD task.  The second element takes some actions once an anomaly is detected.

Advantages:
 Interactive response policy language is used which makes it very easy for the database administrators to specify appropriate response actions for different circumstances depending upon the nature of the anomalous request.  Two main issues are addressed: policy matching, and policy administration

2.3 SOFTWARE REQUIREMENTS
Front End Operating System : Java : Windows

2.4 HARDWARE REQUIREMENTS Process RAM Hard Disk Monitor :PENTIUM 2.6 GHz :256Mb and above :10GB :VGA and High Resolution Monitor

PURPOSE Provide an overall description of the FRD. portability. A good SRS defines how an application will interact with system hardware. Parameters such as operating speed. . footprint. Reference the system name and identifying information about the system to be implemented. its purpose. REFERENCES List references and controlling documents. The SRS fully describes what the software will do and how it will be expected to perform. BACKGROUND Describe the organization and its overall responsibilities. security and speed of recovery from adverse events are evaluated. white papers. SCOPE Discuss the scope of the document and how it accomplishes its purpose of the project. other deliverables. including: meeting summaries. A software requirements specification (SRS) is a comprehensive description of the intended purpose and environment for software under development.2. response time. availability. etc.5 FUNCTIONAL REQUIREMENTS INTRODUCTION Provide an overview of the system and some additional information to place the system in context. An SRS minimizes the time and effort required by developers to achieve desired goals and also minimizes the development cost. Describe who is producing the document and why. other programs and human users in a wide variety of real-world situations. maintainability.

legal changes and policy decisions. Preferences. As the functional requirements are decomposed. user or business. List the functional requirements that compose each user requirement. a delivery date is a constraint only if there are real business consequences that will happen as a result of not meeting the date. technical standards. Provide the type of security or other distinguishing characteristics of each set of users. the date is a constraint. USER REQUIREMENTS Provide requirements of the system. CONSTRAINTS Constraints are boundary conditions on how the system must be designed and constructed. If failing to have the subject application operational by the specified date places the organization in legal default. DOCUMENT OVERVIEW Provide a description of the document organization. system interactions. Preferences are arbitrary. a date chosen arbitrarily is a preference. strategic decisions. should be noted as such.ASSUMPTIONS AND CONSTRAINTS Provide a list of contractual or task level assumptions and/or constraints that are preconditions to preparation of the FRD. Inclusion of lower level functional requirements is not mandatory in the traceability to user requirements if the parent requirements are already traced to them. ASSUMPTIONS Examples of assumptions include: availability of a technical platform. User requirement information can be in text or process flow format for each major user class that shows what inputs will initiate the system functions. Constraints exist because of real business conditions. if included in the FRD. For example. Assumptions are future situations beyond the control of the project. Examples include: legal requirements. For example. and what . taking into account all major classes/categories of users. whose outcomes influence the success of a project. the highest level functional requirements are traced to the user requirements.

Describe data requirements by providing data entities. Give each user requirement a unique number. Typically. for the purposes of requirements management they are considered to be requirements and. These diagrams are further decomposed during design. Requirements may be labeled with a leading “U” or other label indicating user requirements. Some of the requirements may be very technical in nature so not all can be expected to be understood by non-technical people. A requirement that cannot be tested may as well not be included as a requirement. is to ensure that they are testable. those who will have to implement them and those who will have to test them should be able to understand them easily and completely.Nonfunctional requirements may be present in other documents and models where they have been . and definitions in a data dictionary. NON FUNCTIONAL REQUIREMENTS Non-Functional Requirements are not really requirements at all. The first rule of defining nonfunctional requirements. LOGICAL DATA MODEL/DATA DICTIONARY Create the initial Logical Data Model.Other guidelines should include whether they are written in a way that is unambiguous and easy to understand. as such. decomposition. Rather. therefore. The scenarios should be comprehensive. The best way to ensure that nonfunctional requirements can be tested is to think about how they might be tested when they are written. The data requirements describe the business data needed by the application system. need to be tested. DATA FLOW DIAGRAMS Decompose the context level diagrams to determine the functional requirements. Data requirements do not describe the physical database and are not at the level of identifying field names. user requirements have a numbering system that is separate from the functional requirements. However. Data flow diagrams should be decomposed down to the functional primitive level. However.outputs are expected to be generated by the system. they are constraints on implementing the functional requirements as defined in the use case documents and other documents or models. If it is not obvious then ask a test developer how they would test it. to the extent that all user types and all major functions are covered.

the business process model. These include the stakeholder needs list. . Search all relevant activities for notes relating to non-functional requirements and add them to the non-functional requirements document. add the requirements to the non-functional requirements document and reference them in the use case document. that requirements that apply across more than one use case have been included. BUSINESS PROCESS MODEL When the business process model is created notes may have been added to the processes as attachment to activities on activity diagrams regarding stakeholder requirements as they have been mentioned by the stakeholder representative or process owner. STAKEHOLDER NEEDS LIST These are single line statements of needs gather early in the project from all stakeholders. Add these to the non-functional requirements document and update the project overview with references to them. the project overview. Update the activity notes with the reference to the requirement in the non-functional requirements document.added as notes or as high-level requirements. These should normally apply specifically to the use case in question. Update the stakeholder needs list with the reference to the requirement in the non-functional requirements document. If so. USE CASE DOCUMENTS Use Case Documents have a specific section for non-functional requirements. however. Scan through the list and look for those needs that would not have been included in the use case documents. and the use case documents PROJECT OVERVIEW The chapter 1 one contain the Project Overview summary of known major technical constraints. Add them to the appropriate section of the non-functional requirements documents as single sentence statements. It may be.

RELIABILITY Reliability is notoriously difficult to test before the system goes live as it relies on continuous use and metrics. It will only be known if the system meets these requirements if proper metrics and requirements gathering are put in place. Notes to this effect should be included. Figures should be defined on the basis of the metrics available for existing systems and the expectations for improvement or relaxation of these values. Ensure that the requirements are written in such a way that the testing of them will be straightforward. Care needs to be taken to specify throughput and response times in terms of the creation and processing of major data entities with reference to specific use cases in the use case model. then say so. Some guidance here on what is realistic to expect should be sought in consultation with stakeholders. It is entirely insufficient. then write „None‟ in each section. If the system is to share infrastructure resources with other systems specify what proportion of those resources must be available if the response times are to be met. . The non-functional requirements document template breaks the section down into seven subsections and prompts for completion of each section. If there is to be no documentation at all and the system is to be learnt from the developers demonstrating it to the users. Also include any dependencies on outside systems and specify how these are expected to respond if resource and throughput targets are to be met. Be specific about the mechanism by which each aspect will be met. in the section „Learnability‟ say whether the user is expected to learn how to use the system by looking up the help or using a tutorial or whether the system can be put into a „learner mode‟ whereby it guid es a learner user through a use case by offering detailed prompts at every step. For example. If no serious attempt is to be made to do this. PERFORMANCE Performance can and should be tested early on the development as part of the architectural development phase.USABILITY Resist making statements such as “The system shall be user friendly”.

It may be useful to refer to the standards specified in section 8. worms and all kinds of malicious code attacks including denial of service. Implementation constraints. where the system runs on existing infrastructure. Specify the required capacity for each of these. the developers could use any language they like then say so. Consider. installation software and scripts. peripherals and communication links. configuration and testing in terms both of the time to achieve the goal and specific means for achieving it. If . If there is no constraint in a section. Otherwise describe just the constraint. SUPPORTABILITY Specify ease of installation. Think carefully about how each of these requirements will actually be tested. When referring to system interfaces. IMPLEMENTATION CONSTRAINTS A constraint is a requirement which leaves no design option. Trojans. encryption of data transfers both internally and across external systems such as the internet. e.g. Add important diagrams to Appendix A and refer to them in the text. or equivalent which shows all processing nodes. rather than describing what the system will do. This includes management of usernames and passwords. or. describe constraints on the design by which what it is to do will be achieved. for example. INFRASTRUCTURE REQUIREMENTS These should include description of existing or new hardware. firewalls and protection against viruses.3 under implementation constraints. legacy systems and databases refer to the design documentation for these. Also specify any external systems of services upon which this system will depend in terms of the performance that is required of these systems if this system is to meet its performance targets. use cases for configuration and automatic self-testing. the amount of capacity that needs to be available for the system to meet its performance requirements.SECURITY Security includes all steps that are to be taken to secure the system against both voluntary and involuntary corruption. software and networks on which the system is expected to run. Create a deployment diagram.

Intrusion Detection : Monitoring a database to detect potential intrusions. allow the anomalous request to go through.there is insufficient information about these external systems then mention that this information will need to be completed for the purposes of the development of this system. The two main issues that we address in context of such response policies are that of policy matching. intrusion detection (ID). Recall that a response policy is created to select a response action to be executed in the event of an anomalous request.  Intrusion Response.  Policy Matching.6 ANALYSIS MODULE SPECIFICATION  Anomalous Request  Intrusion Detection. is a crucial technique that has to be part of any comprehensive security solution for high-assurance database security. The conservative actions. whereas the aggressive actions can effectively block the anomalous request. MODULE DESCRIPTIONS: Anomalous Request : Interactive response policy language makes it very easy for the database administrators to specify appropriate response actions for different circumstances depending upon the nature of the anomalous request. 2. We present a framework for specifying intrusion response policies in the context of a DBMS. and policy administration.  Protection Data Transmission.  Policy Administration. such as sending an alert. .

Corporate organizations may seek to protect data related to proprietary interests. Individual users may be concerned with personal privacy. Our ID mechanism is a real-time intrusion detection and response system. data must be protected from unauthorized access and tampering. and wish to limit access to private data files. First. An action is the response action executed by the engine Our implementation of the response system can be configured to include/exclude other user-defined anomaly attributes. Second. update. and delete commands tomake malicious modifications to the policies. . and thus it is able to execute arbitrary SQL insert. The threat scenario that we assume is that a DBA has all the privileges in the DBMS. Protection Data Transmission : Data protection must deal with two general problems. Intrusion Response: A condition is specified on the attributes of the detected anomaly. .Policy Matching: Policy matching is the problem of searching for policies applicable to an anomalous request. This is the problem of data security.Propose an administration model referred to as the JTAM. we address is that of administration of response policies to prevent malicious modifications to policy objects from legitimate users. thus efficiency of the policy search procedure is crucial. data must be protected from errors by authorized system users. Policy Administration : The main issue in the administration of response policies is how to protect a policy from malicious modifications made by a DBA that has legitimate access rights to the policy object. Concern for data security will take different forms in different system applications. When an anomaly is detected. the response system must search through the policy database and find policies that match the anomaly.

the investment on a certain project has to be revealed. software engineers and developers should be able to: Identify the Business Value Developing a software is not just creating a good software and presenting them to the market with hopes that someone will actually use or buy it. It will also take a look at the possible competition and how will the software be different compared to other companies. . researchers will be interviewing individuals in order to get their opinion if they will use if that software is available in the market. This will be the backbone of every project. Analyze Feasibility Researchers or proponents of the software will actually show why the software is needed in the actual business sense. Before the software is even created.FEASIBILITY STUDY Objectives: In project development and feasibility studies stage of the SDLC. Aside from investment. This is even truer for companies that usually hire project based developers. Statistical data will always play a crucial role in proving why the particular software is good for public use. it should show how it can increase the productivity of the employees and its actual impact in financial sense. They will be presenting the current market situation. For one. Investment will dictate how many people will be working for the project. This objective has to be fulfilled by the company‟s researchers. project planning and feasibility studies should show how much the company will earn once the project is created. If it‟s just a tool for businesses. Most of the time. the idea will be evaluated again and again. Estimate Investment and Reward on the Project In project planning. current users need or World Wide Web that software engineers can fill. investment will dictate how much the company will spend to create certain software.

Constructing and testing the second prototype. SPIRAL MODEL was defined by Barry Boehm in his 1988 article. This model was not the first model to discuss iterative development. 3.  A first prototype of the new system is constructed from the preliminary design. the iterations were typically 6 months to 2 years long. with an eye toward the end goal of the project.  A preliminary design is created for the new system. Evaluating the first prototype in terms of its strengths. and represents an approximation of the characteristics of the final product. Any changes made to the requirements in the future will have to go through formal change approval process.3. It means for use by developers and will be the basic during testing phase. . but it was the first model to explain why the iteration models. The steps for Spiral Model can be generalized as follows:  The new system requirements are defined in as much details as possible. This is usually a scaled-down system. Planning an designing the second prototype.  A second prototype is evolved by a fourfold procedure: 1. “A spiral Model of Software Development and Enhancement. Each phase starts with a design goal and ends with a client reviewing the progress thus far. 4.1DESIGN METHDOLOGIES This document play a vital role in the development of life cycle (SDLC) as it describes the complete requirement of the system. As originally envisioned. Defining the requirements of the second prototype. Analysis and engineering efforts are applied at each phase of the project. This usually involves interviewing a number of users representing all the external or internal users and other aspects of the existing system. weakness. and risks. 2.

operating-cost miscalculation. The following diagram shows how a spiral model acts like: Fig -Spiral Model .  The final system is constructed. and if necessary. At the customer option.  The final system is thoroughly evaluated and tested. another prototype is developed from it according to the fourfold procedure outlined above. or any other factor that could. Routine maintenance is carried on a continuing basis to prevent large scale failures and to minimize down time. the entire project can be aborted if the risk is deemed too great. based on the refined prototype. in the customer‟s judgment.  The existing prototype is evaluated in the same manner as was the previous prototype. Risk factors might involved development cost overruns. result in a less-than-satisfactory final product.  The preceding steps are iterated until the customer is satisfied that the refined prototype represents the final product desired.

budget. they can easily become a maintenance and security night mare The N-tier Applications provide specific advantages that are vital to the business continuity of the enterprise. . Typical features of a real life n-tier may include the following:  Security  Availability and Scalability  Manageability  Easy Maintenance  Data Abstraction The above mentioned points are some of the key design goals of a successful n-tier application that intends to provide a good Business Solution.  It is more able to cope with the changes that are software development generally entails. because important issues discoved earlier.e.) become more relistic as work progresses.ADVANTAGES  Estimates(i. schedule etc .  Software engineers can get their hands in and start woring on the core of a project earlier. While 2-tier. The N-Tier Applications provide strategic benefits to Enterprise Solutions. client-server can help us create quick and easy solutions and may be used for Rapid Prototyping. APPLICATION DEVELOPMENT N-TIER APPLICATIONS N-Tier Applications can easily implement the concepts of Distributed Application Design and Architecture.

Each layer can potentially treat the other layer as a „Block-Box‟. an n-tier application helps us distribute the overall functionality into various tiers or layers:  Presentation Layer  Business Rules Layer  Data Access Layer  Database/Data Store Each layer can be developed independently of the other provided that it adheres to the standards and communicates with the other layers as per the specifications. This is the one of the biggest advantages of the n-tier application. Fig -N-Tier Architecture . In other words.DEFINITION Simply stated. each layer does not care how other layer processes the data as long as it sends the right data in a correct format.

Oracle. 3.THE PRESENTATION LAYER Also called as the client layer comprises of components that are dedicated to presenting the data to the user. tables. If used in the right way. The rest of the Application should remain unaffected. The different application layers send the data requests to this layer and receive the response from this layer. THE DATABASE LAYER This layer comprises of the Database Components such as DB Files. etc. A lot of client-server apps failed to implement successfully as changing the business logic was a painful process. The Actual database could be created using SQL Server. edit boxes. This is because any changes in Business Rules can be easily handled in this layer. grids. etc do not affect the rest of the application because of the Data Access layer. As long as the interface between the layers remains the same. . Flat files. THE BUSINESS RULES LAYER This layer encapsulates the Business rules or the business logic of the encapsulations. Text boxes. you could change the Database Location with minimal changes to Data Access Layer. any changes to the processing logic in this layer can be made without impacting the others. For instance. etc. Tables. 1. the entire application can be implemented in such a way that it is independent of the actual Database. this layer provides a level of abstraction for the database structures. Views. For example: Windows/Web Forms and buttons. etc. To have a separate layer for business logic is of a great advantage. In an n-tier application. 2. Simply put changes made to the database. labels. THE DATA ACCESS LAYER This layer comprises of components that help in accessing the Database.

3.2 UML DIAGRAMS BROWSE FILE SEND FILE INTRUDER DETECTED SENDER SYSTEM INSERT RECORD VIEW DETECTION DETAILS UsecaseDiagram .

: SENDER : SYSTEM BROWSE BROWSING FILE DISPLAYED SEND FILE SENDING INTRUDER DETECTED INSERT FILE INSERTING VIEW PROCESSING DISPLAYS CONTENT OF THE FILE DETECTION DETAILS ANALYZING DISPLAYS ATTACKS AT EACH LAYER Sequence Diagram .

Start BROWSE A FILE SEND A FILE NO INTRUSION RESPONSE SYSTEM YES SINK End Activity Diagram .

i nt) : void Detector3() i ni ti al i zeCom ponent() : voi d j Button1_acti onPerform ed(Acti onEvent) : voi d j T abbedPane1_stateChanged(ChangeEvent) : voi d m ai n(Stri ng[]) : voi d server() : voi d JFram e JFram e Detector2 ~ ~ ~ ~ + + + + cl i ent_1: Socket cl i ent_2: Socket contentPane: JPanel di s: DataInputStream tem p: l ong addCom ponent(Contai ner. i nt. i nt. Com ponent."Prob. i nt.. i nt) : void i ni ti al i zeCom ponent() : voi d j Button1_acti onPerform ed(Acti onEvent) : voi d j T abbedPane1_stateChanged(ChangeEvent) : voi d m ai n(Stri ng[]) : voi d server() : voi d Si nk3() Class diagram Technology Description . i nt) : void i ni ti al i zeCom ponent() : voi d j Button1_acti onPerform ed(Acti onEvent) : voi d j T abbedPane1_stateChanged(ChangeEvent) : voi d m ai n(Stri ng[]) : voi d server() : voi d Si nk1() JFram e JFram e Source1 ~ ~ ~ ~ ~ + + + + + + a: Stri ng ([]) = {"Sel ect". i nt. Com ponent. contentPane: JPanel d: doubl e dest1: Stri ng desti nati on: Stri ng Detect: JButton fi l epath: JLabel j Button2_acti onPerform ed(Acti onEvent) : voi d j Button3_acti onPerform ed(Acti onEvent) : voi d j Com boBox1_acti onPerform ed(Acti onEvent) : voi d j T extFi el d1_acti onPerform ed(Acti onEvent) : voi d m ai n(Stri ng[]) : voi d pai nt(Graphi cs) : voi d sendData(Stri ng."probe. i nt. b: Stri ng ([]) = {"Graph". Com ponent. i nt.. i nt. Com ponent. i nt) : void i ni ti al i zeCom ponent() : voi d j Button1_acti onPerform ed(Acti onEvent) : voi d j T abbedPane1_stateChanged(ChangeEvent) : voi d m ai n(Stri ng[]) : voi d server() : voi d Si nk2() Si nk3() Sink2 JFram e Sink3 ~ ~ ~ + + + contentPane: JPanel desti nati on: Stri ng i : i nt = 1 j Button1: JButton j Label 1: JLabel j Panel 1: JPanel socket_1: Socket addCom ponent(Contai ner..class Class M odel JFram e Detector1 ~ ~ ~ + + + + + cl i ent_1: Socket cl i ent_2: Socket tem p: l ong Detector1() Detector2() Detector3() i ni ti al i zeCom ponent() : voi d m ai n(Stri ng[]) : voi d server() : voi d ~ ~ ~ ~ ~ ~ ~ ~ + + + Detector3 cl i ent_1: Socket cl i ent_2: Socket j T extArea1: JT extArea l ength: i nt l ength1: i nt sen: Stri ng = "" server_1: ServerSocket socket_1: Socket tem p: l ong addCom ponent(Contai ner. Com ponent. i nt. i nt) : void Detector2() i ni ti al i zeCom ponent() : voi d j Button1_acti onPerform ed(Acti onEvent) : voi d j T abbedPane1_stateChanged(ChangeEvent) : voi d m ai n(Stri ng[]) : voi d server() : voi d Si nk2() ~ ~ ~ ~ ~ ~ + + + contentPane: JPanel desti nati on: Stri ng i : i nt = 1 Reci eved1: Stri ng rr: Stri ng = "" server_1: ServerSocket socket_1: Socket transferT i m e: JLabel Sink1 JFram e addCom ponent(Contai ner.. i nt. i nt. i nt. i nt. i nt. i nt. Stri ng) : voi d setDest(Stri ng) : Stri ng Source1() vi ew_acti onperform ed(Acti onEvent) : voi d ~ ~ ~ ~ ~ ~ + + + + contentPane: JPanel desti nati on: Stri ng i : i nt = 1 j Button1: JButton j Label 1: JLabel j Panel 1: JPanel j Panel 2: JPanel j Scrol l Pane1: JScrol l Pane j Scrol l Pane2: JScrol l Pane j T abbedPane1: JT abbedPane j T extArea1: JT extArea j T extArea2: JT extArea Reci eved1: Stri ng rr: Stri ng = "" server_1: ServerSocket socket_1: Socket addCom ponent(Contai ner. i nt. i nt.

some portable. Unlike other programming systems that provide dozens of complicated ways to perform a simple task. executable code is needed. Threatening of viruses and system hackers also exists. To overcome all these fears java has safety and security as its key design principle. Java achieves this protection by confining a java program to the java execution environment and by making it inaccessible to other parts of the computer. Many types of computers and operating systems are in use throughout the world and are connected to the internet. SIMPLE AND POWERFUL Java was designed to be easy for the professional programmer to learn and use efficiently. SECURE Today everyone is worried about safety and security. Java makes itself simple by not having surprising features. Using Java Compatible Browser. Since it exposes the inner working of a machine. which are explained in the following paragraph. the programmer can perform his desired actions without fear.JAVA Java was designed to meet all the real world requirements with its key features. For downloading programs through different platforms connected to the internet. People feel that conducting commerce over the Internet is a safe as printing the credit card number on the first page of a Newspaper. Java provides a small number of clear ways to achieve a given task. the same mechanism that gives security also helps in portability. PORTABLE In java. anyone can safely download java applets without the fear of viral infection or malicious intent. Java‟s answer to these problems is its well designed architecture. We can download applets with confidence that no harm will be done and no security will be breached. .

in which small fragments of byte code may be dynamically updated on a running system. NEWLY ADDDED FEATURES IN JAVA 2  SWING is a set of user interface components that is entirely implemented in java the user can use a look and feel that is either specific to a particular operating system or uniform across operating systems. java and javadoc have been enhanced.  Various tools such as javac. Java provides several types of collection. Dynamic property of java adds strength to the applet environment. are kept as high-performance non -objects. Java team gave a clean.  Digital certificates provide a mechanism to establish the identity of a user. usable. Using this concept it is possible to dynamically link code. for our use.OBJECT-ORIENTED Java was designed to be source-code compatible with any other language. Debugger and profiler interfaces for the JVM are available. and hash tables. realistic approach to objects. Collections offer a new way to solve several common programming problems. while simple types. such as integers. which can be referred as electronic passports. The object model in java is simple and easy to extend.  Collections are a group of objects. . dynamic arrays.  Performance improvements have been made in several areas. A JUST-IN-TIME (JIT) compiler is included in the JDK. such as linked lists. and check the signature of a JAR file.  Various security tools are available that enable the user to create the user to create and store cryptographic keys ad digital certificates. sign Java Archive(JAR) files. DYNAMIC Java programs carry with them extensive amounts of run-time information that is used to verify and resolve accesses to objects at run-time.

SWINGS Swing components facilitate efficient graphical user interface (GUI) development. These components are a collection of lightweight visual components. Swing components contain a replacement for the heavyweight AWT components as well as complex user interface components such as Trees and Tables. Swing components contain a pluggable look and feel (PL & F). This allows all applications to run with the native look and feel on different platforms. PL & F allows applications to have the same behaviour on various platforms. JFC contains operating system neutral look and feel. Swing components do not contain peers. Swing components allow mixing AWT heavyweight and Swing lightweight components in an application. The major difference between lightweight and heavyweight components is that lightweight components can have transparent pixels while heavyweight components are always opaque. Lightweight components can be non-rectangular while heavyweight components are always rectangular. Swing components are JavaBean compliant. This allows components to be used easily in a Bean aware application building program. The root of the majority of the Swing hierarchy is the JComponent class. This class is an extension of the AWT Container class. Swing offers a number of advantages, which include  Wide variety of Components  Pluggable Look and Feel  MVC Architecture  Keystroke Handling  Action Objects  Nested Containers  Virtual Desktops  Compound Borders  Customized Dialogues  Standard Dialog Classes

 Structured Table and Tree Components  Powerful Text Manipulation  Generic Undo Capabilities  Accessibility Support JAVA DATABASE CONNECTIVITY (JDBC) JDBC AND ODBC IN JAVA: Most popular and widely accepted database connectivity called Open Database Connectivity (ODBC) is used to access the relational databases. It offers the ability to connect to almost all the databases on almost all platforms. Java applications can also use this ODBC to communicate with a database. Then we need JDBC why? There are several reasons: 1. ODBC API was completely written in C language and it makes an extensive use of pointers. Calls from Java to native C code have a number of drawbacks in the security, implementation, robustness and automatic portability of applications. 2. ODBC is hard to learn. It mixes simple and advanced features together, and it has complex options even for simple queries. Structured Query Language (SQL): SQL (Pronounced Sequel) is the programming language that defines and manipulates the database. SQL databases are relational databases; this means simply the data is store in a set of simple relations. A database can have one or more table. You can define and manipulate data in a table with SQL commands. You use the data definition language (DDL) commands to creating and altering databases and tables. You can update, delete or retrieve data in a table with data manipulation commands (DML). DML commands include commands to alter and fetch data. The most common SQL commands include commands is the SELECT command, which allows you to retrieve data from the database. In addition to SQL commands, the oracle server has a procedural language called PL/SQL. PL/SQL enables the programmer to program SQL statement. It allows you to control the flow of a SQL program, to use variables, and to write error-handling procedures.

3.3 CODE DESIGN

Class1: /****************************************************************/ /* Source1 */ /* */ /****************************************************************/ import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.io.*; import java.net.*; import java.sql.*; /** * Summary description for Source1 * */ public class Source1 extends JFrame { // Variables declaration String fp; Double fs; Double tt; Double rt; Long ls; JTextArea jtr; private JLabel jLabel1; private JLabel jLabel2; private JLabel jLabel3; private JLabel filesize; private JLabel jfileSize; private JLabel transferTime; private JLabel jtransferTime; private JLabel filepath; private JLabel Jfilepath; private JLabel readTime; private JLabel JreadTime; private JTextArea show; private Long los; private JComboBox graph; //private JLabel private JButton view,insert; long loss;

String str; //private JTextField JfileSize; private JTextField jTextField1; private JComboBox jComboBox1; private JTextArea jTextArea1; private JScrollPane jScrollPane1,jsp,jsp1,jsp2,jsp3; private JButton jButton1; private JButton jButton2; private JButton jButton3; private JPanel contentPane; private JButton Detect; private int lossspace; JScrollPane js; Object o; //private JComboBox graph; //private JButton Detect; String dest1; int len; double d; double time; long read; double rd; private String r=""; String msg=""; int flag=1; int flag1=1; Socket n1_client; String destination; int limit; String a[]={"Select","Probe","Dos","R2L","U2R","Normal"}; //int len; int packets; int rem; String b[]={"Graph","probe","DOS","R2L","U2R"}; //int d; FileInputStream fis=null; Image im; // End of variables declaration

public Source1() { super();

Font. JreadTime=new JLabel(). The content of this method is always regenerated * by the Windows Form Designer. try{ FileInputStream f=new FileInputStream(". filesize=new JLabel(). jComboBox1 = new JComboBox(a). . please backup this GUI file for JFrameBuilder * to retrieve your design properly in future. jTextField1 = new JTextField().setVisible(true). jtransferTime=new JLabel().read())!=-1) { r+=(char)d. retrieving design might not work properly. jTextArea1 = new JTextArea(). jButton3 = new JButton(). jLabel2 = new JLabel(). // // TODO: Add any constructor code after initializeComponent call // this. * WARNING: Do NOT modify this code. jButton1 = new JButton().15)). jLabel3 = new JLabel(). view=new JButton("View"). readTime=new JLabel(). show=new JTextArea(70.80).initializeComponent().printStackTrace(). while((d=f. jButton2 = new JButton().} } /** * This method is called from within the constructor to initialize the form. jScrollPane1 = new JScrollPane(). */ private void initializeComponent() { jLabel1 = new JLabel().txt"). before revising this method.BOLD. Jfilepath=new JLabel(). } }catch(Exception ex){ex. filepath=new JLabel(). transferTime=new JLabel().//Detector. jLabel1. jfileSize=new JLabel(). * Tip: If you must revise this method.setFont(new Font("Arial". Otherwise.

. // jLabel3 // jLabel3.255.setForeground(new Color(0. // readTime.size=\"4\">lossSpace:</font></h1></html>").graph=new JComboBox(b). // // jLabel1 // jLabel1.getContentPane().setText("<html><b><font color=\'white'. Detect=new JButton("Detection").255)).setText("<html><b><font color=\'white'. 255. js=new JScrollPane().setText("<html><font color=\'white'. insert=new JButton("Insert"). 255)). // im=Toolkit.setText("<html><b><font color=\'white'>Layers No</font></b></html>").setBackground(new Color(255.size=\"6\">SOURCE1</font><u></i></h1></html>"). // jLabel2 // jLabel2.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { jTextField1_actionPerformed(e). contentPane = (JPanel)this.png"). 102)).setText("<html><h1><b><u><font color=\'white'. filepath. filesize. // // jTextField1 // jTextField1.size=\"4\">FileSize:</font></b></html>"). 0.setText("<html><font color=\'white'.size=\"4\">TransferTime:</font></b></html>").createImage("d:/sin.setText("<html><b><font color=\'white' >Status Information</font></b></html>"). transferTime.size=\"4\">ReadTime:</font></h1></html>"). filesize. jtr=new JTextArea(). // jLabel1.getDefaultToolkit(). transferTime.setBackground(new Color(255.

} }).setBackground(new Color(255.setText("<html><b><font color=\'black' >Send</font></b></html>"). . // // jTextArea1 // // // jScrollPane1 // jScrollPane1.} }).addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { jComboBox1_actionPerformed(e). // // jButton1 // jButton1. } }). jButton1. 255)). jButton2.setBackground(new Color(255.setViewportView(jTextArea1). jButton1. // // jButton2 // jButton2.setViewportView(jtr). 255. 255)). 255. } }).setText("<html><b><font color=\'black' >Browse</font></b></html>"). js.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { Detect_actionperformed(e).addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { jButton1_actionPerformed(e). // // jComboBox1 // jComboBox1. Detect.

insert. graph.30). .105. 0.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { view_actionperformed(e).setText("Exit"). view.jButton2. 255). } }).setBackground(new Color(92. // // jButton3 // // Color colr = new Color(0.setLayout(null).addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { insert_actionperformed(e).238)). } }).addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { jButton3_actionPerformed(e).addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { graph_actionPerformed(ae). } }). //jButton3. } }). } }). jButton3. Color colr = new Color(210. jButton3.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { jButton2_actionPerformed(e). // // contentPane // contentPane.172.

60. addComponent(contentPane.setSize(new Dimension(783.int x.150.600.int height) { c. jButton1.jtr.setTitle("Source1 . 158. 48)).149.136.600. 60.28).252.100. this. 317.350.28).136.550. addComponent(contentPane. addComponent(contentPane.22).red).add(c).500.14. 100.200.28).//contentPane.550.30.500.transferTime. } // // TODO: Add any appropriate code in the following Event Handling Methods .int width.295. addComponent(contentPane.600.view.136.filepath. 165.Component c.200).400.246).550. jLabel2. addComponent(contentPane. jLabel3.setVisible(false). addComponent(contentPane.136.graph. addComponent(contentPane. contentPane.28).83.28).jtransferTime. addComponent(contentPane. jLabel1.setForeground(colr).136.80.18).60. 635)). 317. jButton3.136.28).300.setBackground(colr).280.setLocation(new Point(66.500.136. addComponent(contentPane. jtr.28). 180.140.147.y.180. jTextField1.28).setBackground(new Color(0.136.28).int y. this.600. 255)).250. addComponent(contentPane.118.23).28).setBackground(Color. addComponent(contentPane.Detect.width.setBounds(x.28). // jLabel1.28). jLabel1. addComponent(contentPane. addComponent(contentPane.extends JFrame"). 0. addComponent(contentPane. addComponent(contentPane.500. addComponent(contentPane. jButton2.350.83. container.height). } /** Add Component Without a Layout Manager (Absolute Positioning) */ private void addComponent(Container container.20).103. addComponent(contentPane.28).310.180. addComponent(contentPane.60.80.readTime.78. 317. // // Source1 // this.310.390.136.550.JreadTime.jfileSize.100.147.28).28). addComponent(contentPane. jComboBox1.filesize. addComponent(contentPane. jScrollPane1.insert.Jfilepath.450.28).390. addComponent(contentPane. addComponent(contentPane.83. 41.

loss=size1-freespace. destination=""+o.FileDialog. o = jComboBox1.println("\njButton1_actionPerformed(ActionEvent e) called. File f=new File(str).println("\njTextField1_actionPerformed(ActionEvent e) called.getFreeSpace().out. long length=f.out.append("Reading First::"+n+"\n\n"). . FileInputStream fos=new FileInputStream(str).getPath(). msg="". long freespace=f1. // File le=new File(fos). } private void jButton1_actionPerformed(ActionEvent e) { System.getTotalSpace()."). JFileChooser jf=new JFileChooser().println("\njComboBox1_actionPerformed(ActionEvent e) called.out. Long l=0L.getFile()).showOpenDialog(null). //FileInputStream fos=new FileInputStream(fd. FileDialog fd=new FileDialog(this. long size1=f1. int sizedata=fos. //fd.length(). File f1=jf."Open".getSelectedItem().LOAD).").getDirectory()+fd.show(). // jTextArea1."). int n=sizedata/4.// private void jTextField1_actionPerformed(ActionEvent e) { System. // TODO: Add any handling code here try { int b.getSelectedFile(). // File f=new File(fd). int s=jf.available(). str=f1. // TODO: Add any handling code here } private void jComboBox1_actionPerformed(ActionEvent e) { System. flag=0. // lossspace=(int)freespace.

append(). l+=b. fos.getSize()).setText(""+loss).getDirectory()+fd. //jTextArea1.getFile()). flag1=0.setText(""+fd. .setText(fd.close(). fos.available()/2. // jtransferTime. String source=jTextField1.read())!=-1) { msg+=(char)b. // jTextArea1.//String str=fd. jTextArea1.currentTimeMillis()).setText(""+d+"Kb").setText("<html><img src='str' width='100' height='100'></img></html>"). time=d/60.toString(loss). // los=Long.append("Currnt Time"+time).getDirectory(). //jTextField1.available()]. while((b=fos. Jfilepath. len=msg. String sbyte=new String(by).append("Total Freespace::"+freespace+"bytes"+"\n\n"). jfileSize. jTextField1. jTextArea1.append("Byte to kb"+d+"Kbytes"). //jTextArea1. // jTextArea1.append("\n\nSource1 Address::"+source+"\n\n"). jTextArea1.append("Selected File Path "+"<b>"+fd.append("Total space::"+size1+"bytes"+"\n\n").getDirectory()+fd.getFile()+"</b>"+"\n\n").getText(). rd=read/60. jTextArea1.setText(""+rd+"Sec").println(""+System. JreadTime. System. } byte by[]=new byte[fos. read=l/1024. // n=fos.setText(str).out. jTextArea1.read(by). //FileInputStream fos=new FileInputStream(str).setText("Size"). jTextArea1.setText(""+time+"sec").append("Reading Files:"+l+"bytes"+"\n\n"). d=len/1024. jTextArea1.append("Total Size::"+len+"bytes"+"\n\n"). // jTextField1.length().

fileSize."intursion ")."+rd+")".printStackTrace(). String ss="insert into sour1(layerports.58).time).driver."+d+".jdbc."Record Inserted").out. Connection con=DriverManager.createStatement(). // String ss="insert into sour2(filePath.append("Size".forName("oracle."+d+".executeUpdate(ss).show.println("retrieved************").236. try { System. catch (Exception ex) { ex. try { Class. JOptionPane.lossSpace)values('"+jComboBox1.'"+str+"'.getS electedItem()+"'."+rd+".transferTime. Class."+time+".OracleDriver"). }} public void insert_actionperformed(ActionEvent e) { // if(e.out. stm.jdbc. //System.readTime)values('"+str+"'.280.printStackTrace().driver.transferTime. Statement stm=con. .getSource()=="view") // { // chart c=new chart(rd.} //jTextArea1.600.getSource()=="view") // { // chart c=new chart(rd. System.showMessageDialog(null.forName("oracle.readTime.println("record inserted").getConnection("jdbc:oracle:thin:@localhost:1521:xe". } catch(Exception ex) { ex."+time+".OracleDriver").println(str+d+time+rd+loss). // if(e.out.time)."intursion".filePath.fileSize. }} public void view_actionperformed(ActionEvent e) { addComponent(contentPane."+loss+")".

getConnection("jdbc:oracle:thin:@localhost:1521:xe". stab[i][1]=rs.getString(2).getDouble(3)). // stab[i][6]=rs. String tb[]={"Layers". // show. } catch(Exception ex) { } } ."TransferTime".out. String stab[][]=new String[50][50].toString(rs.getString(6).executeUpdate(). //ps.println(str+d+time+rd+loss). // show. System. //System. JScrollPane jsp=new JScrollPane(jt. stab[i][3]=Double."Record Inserted").436.toString(rs.i++) { stab[i][0]=rs.toString(rs."intursion". stab[i][4]=Double.println("record inserted")."intursion ").toString(rs.append("FilePath"+"\t"+"FileSize"+"\t"+"TransferTime"+"\t"+"ReadTime"+"\t"+"LossSpa ce"+"\n")."FilePath".getDouble(5)). Statement stm=con.out. int h=ScrollPaneConstants.jsp. stab[i][5]=Double. // int i=0.HORIZONTAL_SCROLLBAR_AS_NEEDED.tb).executeQuery("select * from sour1").VERTICAL_SCROLLBAR_AS_NEEDED.v.append("========================================================== ======================="+"\n"). addComponent(contentPane.h).showMessageDialog(null. ResultSet rs=stm. //String ss=Double.append(fp+"\t\t"+fs+"\t\t"+tt+"\t\t"+rt+"\t\t"+ls+"\t\t").rs.getDouble(4)). } JTable jt=new JTable(stab.500.Connection con=DriverManager."LossSpace"}.getString(1)."ReadTime".158)."FileSize".toString(rs.getDouble(6)). // show. for(int i=0. // JOptionPane. stab[i][2]=Double.next().createStatement().450. int v=ScrollPaneConstants.getDouble(4)).

if(dest1.setVisible(false)."FileSize"."TransferTime".toString(rs. ResultSet rs=stm."LossSpace"}."ReadTime". jsp3. jsp2.setLocation(200. // for(int i=0.VERTICAL_SCROLLBAR_AS_NEEDED. addComponent(contentPane. stab[i][4]=Double.h). String stab[][]=new String[50][50].OracleDriver"). demo.setVisible(false).executeQuery(str).pack().createStatement().) Object o1=graph. // RefineryUtilities.driver.getString(2)."intursion".200).rs. jsp=new JScrollPane(p.250.println("a[3]="+a[3]+"a[4]="+a[4]).setVisible(false).158).i++) { stab[i][0]=rs.500. stab[i][5]=Double.getDouble(6)). System.getString(1). String str="select* from sour1 where layerports='"+a[1]+"'".jsp. for(int i=0. int v=ScrollPaneConstants.getDouble(3)).equalsIgnoreCase(a[1])) { final probe1chart demo = new probe1chart("Probe1 Layer"). stab[i][3]=Double.436.i++) . stab[i][2]=Double."FilePath".v. Statement stm=con. dest1=""+o1.getConnection("jdbc:oracle:thin:@localhost:1521:xe".rs. stab[i][1]=rs.getDouble(5)). } JTable p=new JTable(stab.centerFrameOnScreen(demo)."intursion ").public void graph_actionPerformed(ActionEvent ae) { //if(a[1]. demo.toString(rs.getSelectedItem().jdbc.next(). try { Class.getDouble(4)). String tb[]={"Layers".next().toString(rs.out.forName("oracle.toString(rs. jsp1.tb). Connection con=DriverManager.setVisible(true). demo. int h=ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED.

"FileSize".getDouble(3)).pack(). int v=ScrollPaneConstants.pack().toString(rs. Connection con=DriverManager. int h=ScrollPaneConstants.getString(1).200).rs.OracleDriver").setLocation(200."U2R" // final probechart demo = new probechart("probe1").driver.getConnection("jdbc:oracle:thin:@localhost:1521:xe".toString(rs. for(int i=0. ResultSet rs=stm.forName("oracle.i++) { stab[i][0]=rs. demo. //demo. // RefineryUtilities. try { Class.equalsIgnoreCase(a[2])) { final Doschart1 demo = new Doschart1("Dos1 Layer").getDouble(6)).tb). stab[i][5]=Double. String tb[]={"Layers".getDouble(5)). demo. // } } catch(Exception ex) { } else if(dest1. Statement stm=con.setVisible(true)."LossSpace"}.jdbc.setLocation(200.// {probe1". demo."TransferTime".toString(rs. } JTable p=new JTable(stab.getDouble(4)). stab[i][1]=rs. String stab[][]=new String[50][50]."intursion ").executeQuery(str). stab[i][2]=Double.VERTICAL_SCROLLBAR_AS_NEEDED.HORIZONTAL_SCROLLBAR_AS_NEEDED. String str="select* from sour1 where layerports='"+a[2]+"'".centerFrameOnScreen(demo).200). //demo.centerFrameOnScreen(demo). .createStatement()."intursion".setVisible(true).toString(rs."DOS". stab[i][3]=Double.getString(2). stab[i][4]=Double."R2L". // RefineryUtilities.next()."ReadTime"."FilePath". //demo.

200). addComponent(contentPane.h). demo. Connection con=DriverManager.setVisible(false). try { Class.equalsIgnoreCase(a[3])) { final R2Lchart1 demo = new R2Lchart1("R2L Layer").pack().getDouble(3)).rs. demo. String tb[]={"Layers". jsp.executeQuery(str)."ReadTime"."U2R" // final probechart demo = new probechart("probe1").setVisible(false).getString(2). Statement stm=con.setVisible(true).pack(). stab[i][2]=Double. String stab[][]=new String[50][50].setLocation(200.setVisible(false)."DOS".i++) { stab[i][0]=rs. // RefineryUtilities.i++) // {probe1".jsp1.500."FileSize".436. //demo. for(int i=0.250. .toString(rs. //demo.next()."TransferTime".getString(1). stab[i][1]=rs.forName("oracle. String str="select* from sour1 where layerports='"+a[3]+"'". // RefineryUtilities.200).centerFrameOnScreen(demo).rs.createStatement().jsp1=new JScrollPane(p. ResultSet rs=stm.driver.setVisible(true).jdbc.v. //demo.OracleDriver")."LossSpace"}. // }} catch(Exception ex) { }} else if(dest1.getConnection("jdbc:oracle:thin:@localhost:1521:xe". jsp3.158). // for(int i=0."R2L". jsp2."FilePath". demo."intursion ")."intursion".setLocation(200.next().centerFrameOnScreen(demo).

jsp2.pack().createStatement().jdbc.getDouble(4)).pack(). //demo.centerFrameOnScreen(demo).200).forName("oracle. jsp3.500.equalsIgnoreCase(a[4])) { System.200). //demo. ResultSet rs=stm.getDouble(5)).toString(rs. jsp. stab[i][4]=Double.centerFrameOnScreen(demo). demo. addComponent(contentPane.out.HORIZONTAL_SCROLLBAR_AS_NEEDED.setVisible(false). // } } catch(Exception ex) { }} else if(dest1.stab[i][3]=Double. try { Class.setVisible(true).v."intursion".driver. final U2Rchart1 demo = new U2Rchart1("U2R Layer"). jsp2=new JScrollPane(p."U2R" // final probechart demo = new probechart("probe1"). demo. Connection con=DriverManager.setVisible(true).next().setLocation(200. String str="select* from sour1 where layerports='"+a[4]+"'". ."intursion ").250.tb).toString(rs.rs. //demo. int v=ScrollPaneConstants.158).toString(rs.setLocation(200.i++) // {probe1".setVisible(false). int h=ScrollPaneConstants.setVisible(false).h). Statement stm=con.println("U2RChart**************").VERTICAL_SCROLLBAR_AS_NEEDED. jsp1. } JTable p=new JTable(stab."DOS"."R2L". // for(int i=0.getConnection("jdbc:oracle:thin:@localhost:1521:xe".executeQuery(str). // RefineryUtilities.OracleDriver"). demo. stab[i][5]=Double.436.getDouble(6)). // RefineryUtilities.

for(int i=0.OracleDriver"). and other things. } private void Detect_actionperformed(ActionEvent ae) { try { Class.drawImage(im."TransferTime".v. jsp1."FilePath".toString(rs. 0.setVisible(false). // Draw sprites.158). g.HORIZONTAL_SCROLLBAR_AS_NEEDED.setVisible(false). stab[i][4]=Double.jsp3.String tb[]={"Layers"..h).500."LossSpace"}.setVisible(false).getDouble(5)). jsp3=new JScrollPane(p. addComponent(contentPane.next(). stab[i][3]=Double.436. stab[i][5]=Double.jdbc. .rs.forName("oracle.VERTICAL_SCROLLBAR_AS_NEEDED. int h=ScrollPaneConstants.250..getDouble(4)).getDouble(3)).toString(rs.toString(rs. jsp."ReadTime". jsp2. stab[i][2]=Double.getDouble(6)). int v=ScrollPaneConstants.getString(2). stab[i][1]=rs.. String stab[][]=new String[50][50].toString(rs. } catch(Exception ex) { } } } public void paint(Graphics g) { // Draw the previously loaded image to Component.i++) { stab[i][0]=rs.getString(1). } JTable p=new JTable(stab."FileSize". null).tb).driver. // . 0.

close().getDouble(4).s9=0."intursion".out. String sa2="select * from sour1 where layerports='"+a[2]+"'". //rs.createStatement(). String s2=rs. j++. } double s7=s6/i. while(rs. double st=0. i++.executeQuery(sa2).out."intursion ").getDouble(6). s6=rs. // double r=rs. // double r=rs. sr=rs.getString(2).s8=0. .getString(1). System.println("pobe transferTime="+s7+"\t"+"ReadTime"+s9).getString(2).sr=0. double s4=rs. int i=1. double s3=rs.Connection con=DriverManager. String sa4="select * from sour1 where layerports='"+a[4]+"'".ar. while(rs.next()) { String s1=rs.next()) { String s1=rs.getDouble(5)+s8.getConnection("jdbc:oracle:thin:@localhost:1521:xe".getDouble(3).getDouble(5)+sr.getDouble(4)+st. System. Statement stm=con. int j=1. double s3=rs.at.executeQuery(sa1). double s6=0.println("TransferTime"+r). s8=rs. st=rs. s9=s8/i. String s2=rs.getDouble(4).getString(1). String sa1="select * from sour1 where layerports='"+a[1]+"'".getDouble(4)+s6. double s4=rs. //Probe ResultSet rs=stm. String sa3="select * from sour1 where layerports='"+a[3]+"'". //Dos rs=stm.getDouble(3).getDouble(6).

getString(2).next()) { String s1=rs. sr1=rs.getDouble(3). int k=1. // System. double s4=rs.out. double s3=rs.at2.getDouble(4).sr1=0.ar1.getDouble(6).println("TransferTime"+r).println("Dos transferTime="+at+"\t"+"ReadTime"+ar).next()) { String s1=rs. // double r=rs.getDouble(6).getDouble(5)+sr1. l++. double st1=0. double st2=0. while(rs. //rs2. k++. //System.out. . double s4=rs. sr2=rs. System. //R2L rs=stm. } at1=st1/k. ar=sr/j.out. //U2R rs=stm.sr2=0.// System. st2=rs.executeQuery(sa4).out.getDouble(3).println("s6"+s6+"ddddd"+s7).getString(2). rs. String s2=rs. int l=1. // double r=rs.ar2.getString(1).out.getDouble(4). } at=st/j. double s3=rs.executeQuery(sa3). System.getString(1). ar1=sr1/k. while(rs.close().close().getDouble(4)+st1.println("TransferTime"+r). String s2=rs.getDouble(4)+st2.println("R2L transferTime="+at1+"\t"+"ReadTime"+ar1).getDouble(5)+sr2.at1. st1=rs.

300).println("TransferTime"+r). jtransferTime. //rs3. } at2=st2/l.v. ld. ar2=sr2/l. jtr.ar.append("U2R"+"\t"+Math. jtr.append("============================================================ =======================\n"). } catch(Exception ex) { ex.abs(ar2)+"\n"). // int h=ScrollPaneConstants.showMessageDialog(null. if(flag==0) { if(destination.println("U2R transferTime="+at2+"\t"+"ReadTime"+ar2).ar1. ld.equalsIgnoreCase(a[0])) { JOptionPane.s7.append("Dos"+"\t"+Math.setVisible(true)."Select the Destination!.ar2).append("Probe"+"\t"+(Math.").at1. jtr.out.abs(s9)+"\n").abs(at1)+"\t"+""+Math.println("\njButton2_actionPerformed(ActionEvent e) called. // JScrollPane jsp1=new JScrollPane(jtr. } else if(destination.VERTICAL_SCROLLBAR_AS_NEEDED.close().abs(at2)+"\t"+""+Math.setSize(300. //int v=ScrollPaneConstants.// System.HORIZONTAL_SCROLLBAR_AS_NEEDED. System.at2.setText(""+time).printStackTrace().append("Name"+"\tAvgTransferTime"+"\t"+"AvgReadTime"+"\n"). } } private void jButton2_actionPerformed(ActionEvent e) { System.append("R2L"+"\t"+Math.equalsIgnoreCase(a[1])) { //dba1 code .").abs(ar)+"\n"). // TODO: Add any handling code here String dest. LineChartDemo6 ld=new LineChartDemo6("Detection".abs(s7))+"\t"+""+Math.out. jtr. jtr.h). jtr.abs(at)+"\t"+""+Math.abs(ar1)+"\n")..setVisible(true).s9.at. jtr.out.

equals("")){ ."JTAM : Since DBA 1 not conformed signature this transaction is failed. if(dba3sign!=null&&!dba3sign.exit(0).showMessageDialog(null.out.equals("")){ int dba2conform= JOptionPane.out.showInputDialog("JTAM : Enter Threshold Signature of DBA 2 "). if(dba1sign!=null&&!dba1sign. Response Action : ShutDown").out.showMessageDialog(null. if(dba1conform!=0){ JOptionPane.equals("")){ int dba1conform= JOptionPane."DBA 2: Is it Conformed?"). System."This Is From PROBE Layer : This transaction need authentication from 4 DBAs"). if(dba2sign!=null&&!dba2sign.showMessageDialog(null.println("dba1sign : "+dba1sign). String dba1sign=JOptionPane. String dba3sign=JOptionPane. Response Action : ShutDown"). System.exit(0).showConfirmDialog(null.showMessageDialog(null.exit(0).showConfirmDialog(null. Response Action : ShutDown").showMessageDialog(null. } //dba2code //dba3code // JOptionPane."This Is From PROBE Layer : This transaction need authentication from 4 DBAs"). System. } }else{ JOptionPane.println("dba1conform : "+dba1conform).JOptionPane. String dba2sign=JOptionPane.out. } //dba2code // JOptionPane. System.exit(0).println("dba3sign : "+dba3sign).showMessageDialog(null. if(dba2conform!=0){ JOptionPane."JTAM : Since DBA 1 not accepted / not entered signature this transaction is failed. System. System.showInputDialog("JTAM : Enter Threshold Signature of DBA 3 ").showMessageDialog(null."DBA 1: Is it Conformed?"). System. System. Response Action : ShutDown")."JTAM : Since DBA 2 not accepted / not entered signature this transaction is failed. System.showInputDialog("JTAM : Enter Threshold Signature of DBA 1 ").println("dba2conform : "+dba2conform).println("dba2sign : "+dba2sign). } }else{ JOptionPane."This Is From PROBE Layer : This transaction need authentication from 4 DBAs").out."JTAM : Since DBA 2 not conformed signature this transaction is failed.

"DBA 3: Is it Conformed?"). } else if(destination.equalsIgnoreCase(a[2])) { JOptionPane.exit(0)."This Is From PROBE Layer : This transaction need authentication from 4 DBAs"). System."Now you can insert details of a file into Database ")."JTAM : Since DBA 4 not conformed signature this t ransaction is failed.println("dba3conform : "+dba3conform)."DBA 4: Is it Conformed?"). sendData(r. Response Action : ShutDown"). dest=setDest(a[1]).exit(0)."JTAM : Since DBA 3 not accepted / not entered signature this transaction is failed.showConfirmDialog(null. Response Action : ShutDown"). if(dba4sign!=null&&!dba4sign.dest).111.exit(0). dest=setDest(a[2]). } }else{ JOptionPane. if(dba4conform JOptionPane.showMessageDialog(null.showMessageDialog(null.showMessageDialog(null.showInputDialog("JTAM : Enter q Threshold Signature of DBA 4 ").out."This Is From Dos Layer")."JTAM : Since DBA 4 not accepted / not entered signature this transaction is failed.println("dba4conform : "+dba4conform). if(dba3conform!=0){ JOptionPane.showMessageDialog(null.println("dba4sign : "+dba4sign).111.out.showMessageDialog(null.showMessageDialog(null. } JOptionPane. Response Action : ShutDown").equals("")){ int dba4conform= JOptionPane. System. System. } }else{ JOptionPane.showMessageDialog(null. } //dba4code // JOptionPane. Response Action : ShutDown"). int a. System. . System. System.showConfirmDialog(null. System.exit(0). sendData(r.out.int dba3conform= JOptionPane.dest)."JTAM : Since DBA 3 not conformed signature this transaction is failed. String dba4sign=JOptionPane.

exit(0).showMessageDialog(null."JTAM : Since DBA 1 not conformed signature this transaction is failed. Response Action : ShutDown").showInputDialog("JTAM : Enter Threshold Signature of DBA 2 ").} else if(destination. System.showMessageDialog(null. System.showMessageDialog(null. Response Action : ShutDown"). String dba1sign=JOptionPane.out."JTAM : Since DBA 2 not accepted / not entered signature this transaction is failed.exit(0). Response Action : ShutDown"). System.showMessageDialog(null."DBA 1: Is it Conformed?")."This Is From R2L layer"). if(dba2conform!=0){ JOptionPane. if(dba1conform!=0){ JOptionPane. } //dba2code // JOptionPane.showConfirmDialog(null.equals("")){ int dba2conform= JOptionPane.out. if(dba1sign!=null&&!dba1sign. String dba2sign=JOptionPane. System.showMessageDialog(null. .equals("")){ int dba1conform= JOptionPane. Response Action : ShutDown").showMessageDialog(null.println("dba2conform : "+dba2conform).out.showInputDialog("JTAM : Enter Threshold Signature of DBA 1 ")."This Is From PROBE Layer : This transaction need authentication from 4 DBAs")."This Is From PROBE Layer : This transaction need authentication from 4 DBAs").println("dba1conform : "+dba1conform)."JTAM : Since DBA 1 not accepted / not entered signature this transaction is failed. } }else{ JOptionPane.exit(0).println("dba1sign : "+dba1sign).println("dba2sign : "+dba2sign).showMessageDialog(null.out. //dba1 code JOptionPane. System. System. System.exit(0). } }else{ JOptionPane. if(dba2sign!=null&&!dba2sign."DBA 2: Is it Conformed?").showConfirmDialog(null."JTAM : Since DBA 2 not conformed signature this transaction is failed. System.equalsIgnoreCase(a[3])) { JOptionPane.

} }else{ JOptionPane.out. if(dba4sign!=null&&!dba4sign.showMessageDialog(null. } .exit(0). Response Action : ShutDown"). if(dba3sign!=null&&!dba3sign.println("dba3sign : "+dba3sign).showMessageDialog(null.out."JTAM : Since DBA 3 not conformed signature this transaction is failed.showInputDialog("JTAM : Enter Threshold Signature of DBA 3 "). if(dba4conform!=0){ JOptionPane."DBA 3: Is it Conformed?")."JTAM : Since DBA 3 not accepted / not entered signature this transaction is failed.exit(0).out.showInputDialog("JTAM : Enter Threshold Signature of DBA 4 "). System.showConfirmDialog(null.} //dba2code //dba3code // JOptionPane. } }else{ JOptionPane.exit(0)."JTAM : Since DBA 4 not accepted / not entered signature this transaction is failed.showMessageDialog(null.equals("")){ int dba3conform= JOptionPane. String dba3sign=JOptionPane."JTAM : Since DBA 4 not conformed signature this transaction is failed. Response Action : ShutDown").equals("")){ int dba4conform= JOptionPane.println("dba4sign : "+dba4sign)."This Is From PROBE Layer : This transaction need authentication from 4 DBAs").showConfirmDialog(null.exit(0). } //dba4code // JOptionPane.showMessageDialog(null.out. if(dba3conform!=0){ JOptionPane."This Is From PROBE Layer : This transaction need authentication from 4 DBAs"). System.println("dba3conform : "+dba3conform). Response Action : ShutDown"). System.println("dba4conform : "+dba4conform). String dba4sign=JOptionPane.showMessageDialog(null. System. System."DBA 4: Is it Conformed?").showMessageDialog(null. Response Action : ShutDown"). System. System. System.

System. if(dba2sign!=null&&!dba2sign.out.out.JOptionPane. sendData(r. } }else{ JOptionPane.println("dba2sign : "+dba2sign)."JTAM : Since DBA 1 not accepted / not entered signature this transaction is failed. System.equals("")){ int dba2conform= JOptionPane. System. System.showMessageDialog(null."This Is From PROBE Layer : This transaction need authentication from 4 DBAs").showMessageDialog(null."This Is From U2R Layer").showConfirmDialog(null. //dba1 code JOptionPane. System.showMessageDialog(null. if(dba2conform!=0){ ."This Is From PROBE Layer : This transaction need authentication from 4 DBAs"). } else if(destination. dest=setDest(a[3]).showMessageDialog(null. Response Action : ShutDown").out.exit(0). String dba1sign=JOptionPane.exit(0).println("dba2conform : "+dba2conform)."JTAM : Since DBA 1 not conformed signature this transaction is failed.showMessageDialog(null.showInputDialog("JTAM : Enter Threshold Signature of DBA 1 ").println("dba1conform : "+dba1conform).222.showConfirmDialog(null.showInputDialog("JTAM : Enter Threshold Signature of DBA 2 ").showMessageDialog(null.equalsIgnoreCase(a[4])) { JOptionPane."Now you can insert details of a file into Database ")."DBA 1: Is it Conformed?"). Response Action : ShutDown"). if(dba1conform!=0){ JOptionPane.out.println("dba1sign : "+dba1sign)."DBA 2: Is it Conformed?").equals("")){ int dba1conform= JOptionPane. if(dba1sign!=null&&!dba1sign. String dba2sign=JOptionPane. System. } //dba2code // JOptionPane.dest).

out.exit(0). String dba3sign=JOptionPane.JOptionPane.showMessageDialog(null. System."This Is From PROBE Layer : This transaction need authentication from 4 DBAs"). System.showMessageDialog(null.exit(0).showMessageDialog(null.exit(0).showMessageDialog(null.showInputDialog("JTAM : Enter Threshold Signature of DBA 4 "). } //dba2code //dba3code // JOptionPane. if(dba4sign!=null&&!dba4sign.showMessageDialog(null.showConfirmDialog(null.println("dba4conform : "+dba4conform). String dba4sign=JOptionPane. Response Action : ShutDown"). if(dba3conform!=0){ JOptionPane.showMessageDialog(null. System. } //dba4code // JOptionPane.equals("")){ int dba3conform= JOptionPane."JTAM : Since DBA 3 not accepted / not entered signature this transaction is failed. System.showInputDialog("JTAM : Enter Threshold Signature of DBA 3 "). if(dba4conform!=0){ JOptionPane. System. Response Action : ShutDown")."JTAM : Since DBA 3 not conformed signature this transaction is failed.out. Response Action : ShutDown"). System. System."DBA 3: Is it Conformed?")."JTAM : Since DBA 2 not accepted / not entered signature this transaction is failed."JTAM : Since DBA 4 not conformed signature this transaction is failed. if(dba3sign!=null&&!dba3sign.showConfirmDialog(null.equals("")){ int dba4conform= JOptionPane.exit(0). Response Action : ShutDown"). } .println("dba3conform : "+dba3conform).exit(0)."This Is From PROBE Layer : This transaction need authentication from 4 DBAs")."DBA 4: Is it Conformed?"). Response Action : ShutDown")."JTAM : Since DBA 2 not conformed signature this transaction is failed.println("dba4sign : "+dba4sign).out.showMessageDialog(null. System.println("dba3sign : "+dba3sign).out. } }else{ JOptionPane. System. } }else{ JOptionPane.

showMessageDialog(null. System."Now you can insert details of a file into Database ").equalsIgnoreCase(a[5])) { JOptionPane.getOutputStream())."). // TODO: Add any handling code here } // // TODO: Add any method code to meet your needs in the following area // public void sendData(String name.String dest) { try { n1_client=new Socket(name.exit(0). } else if(destination. } } else JOptionPane.dest). DataOutputStream out=new DataOutputStream(n1_client. sendData(r."This Is From Normal").flush()..port). if(out!=null) { out. } JOptionPane.out."JTAM : Since DBA 4 not accepted / not entered signature this transaction is failed."). sendData(r.showMessageDialog(null. Response Action : ShutDown").println("\njButton3_actionPerformed(ActionEvent e) called.int port.222. dest=setDest(a[5]). } private void jButton3_actionPerformed(ActionEvent e) { System. } .showMessageDialog(null.dest)."Load the File OR Select the Destination!.222.showMessageDialog(null.}else{ JOptionPane. dest=setDest(a[4]).

writeUTF(dest+msg. int len1=len.length%48. out. int st=0. } else { System.end)+"\n").append("Packet: "+"\t"+(++outgoing)+"\t"+msg.writeUTF(dest+msg). if(len<=48) { System.out.length. String finalst="".len)).end)).append("Packet Length:"+len+"\n").len)+"\n").substring(st. String prefinal="". jTextArea1. int end=48. } out. int tlength=buffer.writeUTF(dest+msg. int len=buffer. jTextArea1. while(len1>48) { len1-=48.append("packet\t"+(++outgoing)+"\t"+msg+"\n").substring(st. if(len1<=48) { System.writeUTF(destination).append("Packet: "+"\t"+(++outgoing)+"\t"+msg. if(length11!=0) { tlength++. out.out.out.substring(end.getBytes().println("greateer than 48").println("smaller than 48"). out. jTextArea1. finalst=prefinal+msg+"\n"+"null".int outgoing=0.substring(end. out. byte buffer[]=msg. jTextArea1. .println("else than 48").writeInt(tlength). int length11=buffer.length/48.

} else if (Destname.equalsIgnoreCase(a[4])) { Destinationname="Source1-->D4". } } public String setDest(String Destname) { String Destinationname="".println("else than 48").sp)). } else if(Destname.out. } else if(Destname.equalsIgnoreCase(a[2])) { Destinationname="Source1-->D2".sp)+"\n"). int sp=end+48.equalsIgnoreCase(a[1])) { Destinationname="Source1-->D1".writeUTF(dest+msg.} else { System. out. } } } } catch (Exception exp) { exp. } . jTextArea1.equalsIgnoreCase(a[5])) { Destinationname="Source1-->D5".printStackTrace(). } else if (Destname.append("Packet: "+"\t"+(++outgoing)+"\t"+msg. end=sp.substring(end. if(Destname.equalsIgnoreCase(a[3])) { Destinationname="Source1-->D3".substring(end.

event. .you may simply delete it.*.net.=// //= After testing.*. =// //==================================================================== ==// public static void main(String[] args) { new Source1().awt.awt.io. private JPanel contentPane.event. } //= End of Testing = } Class2: /****************************************************************/ /* Sink1 */ /* */ /****************************************************************/ import java.swing.*.return Destinationname. import java. import javax. private JTabbedPane jTabbedPane1. import javax. } //============================= Testing ================================// //= =// //= The following main method is just for testing this class you built.*. import java. //----private JTextArea jTextArea1.swing.*. private JButton jButton1. import java.*. private JScrollPane jScrollPane1. /** * Summary description for Sink1 * */ public class Sink1 extends JFrame { // Variables declaration private JLabel jLabel1.

printStackTrace(). } /** * This method is called from within the constructor to initialize the form.setVisible(true). private JScrollPane jScrollPane2. try { server_1=new ServerSocket(101). retrieving design might not work properly. initializeComponent(). int i=1. //----// End of variables declaration public Sink1() { super(). String rr="". Otherwise. //----private JTextArea jTextArea2. //----String Recieved1. private JLabel JtransferTime. private JLabel transferTime. * WARNING: Do NOT modify this code. ServerSocket server_1. The content of this method is always regenerated * by the Windows Form Designer. private JPanel jPanel2. } catch (Exception exp) { exp. String destination. . } // // TODO: Add any constructor code after initializeComponent call // this.private JPanel jPanel1. Socket socket_1.

setForeground(Color.addTab("Dest2".setText("TransferTime").addTab("Dest1".setFont(new Font("Serief".setForeground(Color.setText("\t**********THIS IS FROM PORT DoS1**************\n\n"). */ private void initializeComponent() { jLabel1=new JLabel(). //----jTextArea1 = new JTextArea().16)).setForeground(new Color(210. jPanel2). jTextArea1.105. please backup this GUI file for JFrameBuilder * to retrieve your design properly in future. transferTime=new JLabel(). jTabbedPane1.Font.getContentPane(). contentPane = (JPanel)this.setText("\t**********THIS IS FROM PORT PROBE*************\n\n"). jScrollPane2 = new JScrollPane(). //----jLabel1.30)).white). jTabbedPane1. before revising this method. jButton1 = new JButton().* Tip: If you must revise this method. transferTime. jPanel1 = new JPanel(). jTabbedPane1. // jTabbedPane1 // jTabbedPane1. jTabbedPane1. //----jTextArea2 = new JTextArea().addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent e) { jTabbedPane1_stateChanged(e). jLabel1. JtransferTime=new JLabel(). jPanel2 = new JPanel(). jPanel1). jScrollPane1 = new JScrollPane(). jTabbedPane1 = new JTabbedPane(). // .BOLD.white). //----// jTextArea2. } }).

473.38). jLabel1.418. // // jTextArea1 // // // jScrollPane1 // jScrollPane1. jScrollPane1.19. addComponent(contentPane.374).9.193.88.38). // // jTextArea2 // // // jScrollPane2 // jScrollPane2. jButton1. addComponent(contentPane.setViewportView(jTextArea2). // .425.setText("Exit").setLayout(null).setBackground(new Color(210. 23. 228.30)).193.JtransferTime. // // jButton1 // jButton1. addComponent(jPanel1. jButton1.setViewportView(jTextArea1).addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { jButton1_actionPerformed(e). contentPane.301).50. } }).105. 232. addComponent(contentPane.setText("Sink1").100.193.// // jLabel1 // jLabel1.setLayout(null).transferTime.38).44. 21. addComponent(contentPane. jTabbedPane1.500. addComponent(contentPane.500. // // contentPane // contentPane. // // jPanel1 // jPanel1.32).

// // jTextArea3 // // // jScrollPane3 // //jScrollPane3. jScrollPane3.302). this. this. // // Sink1 // this. jScrollPane2.416. 30.println("\njTabbedPane1_stateChanged(ChangeEvent e) called.setBounds(x. //addComponent(jPanel3. 22. addComponent(jPanel2.setViewportView(jTextArea3). 0)).width.setLocation(new Point(0. // // jPanel3 // //jPanel3.add(c).y.println("\njButton1_actionPerformed(ActionEvent e) called.414.int height) { c.out.setTitle("Sink1 .setLayout(null).305). 494)).").setSize(new Dimension(544.int y. // TODO: Add any handling code here .int width.").extends JFrame").int x.18.setLayout(null).out. container. } // // TODO: Add any appropriate code in the following Event Handling Methods // private void jTabbedPane1_stateChanged(ChangeEvent e) { System.19.Component c.height). // TODO: Add any handling code here } private void jButton1_actionPerformed(ActionEvent e) { System.// jPanel2 // jPanel2. } /** Add Component Without a Layout Manager (Absolute Positioning) */ private void addComponent(Container container.

} else if (destination. length--.accept(). socket_1=server_1. int length=dis.equalsIgnoreCase("probe")) { jTextArea1.readUTF().\n"). ..append("Packet "+i+"\t"+rr+" Recieved. if(destination. } i=1. DataInputStream dis=new DataInputStream(socket_1.readInt().\n").} // // TODO: Add any method code to meet your needs in the following area // public void server() { try { String rr="".. i++.equalsIgnoreCase("Dos1")) { jTextArea2. while(length>0) { rr=dis.append("Packet "+i+"\t"+rr+" Recieved.readUTF().. } else JOptionPane."No Packets Received").showMessageDialog(null. } catch (Exception exp) { . String destination=dis..getInputStream()).

=// //==================================================================== ==// public static void main(String[] args) { Sink1 s1=new Sink1().*. while(true) { s1.awt. import java. import javax.io. } } //= End of Testing = } Class3: /****************************************************************/ /* Detector1 */ /* */ /****************************************************************/ import java. import java.event.you may simply delete it. import java. import java. } } //============================= Testing ================================// //= =// //= The following main method is just for testing this class you built.server().printStackTrace().=// //= After testing.exp.*.awt.*.net.lang. /** * Summary description for Detector1 * */ public class Detector1 extends JFrame { .*.*.swing.*.

initializeComponent().read())!=-1) { sen+=(char)length1. private JPanel contentPane. } // // TODO: Add any constructor code after initializeComponent call // . ServerSocket server_1. Socket socket_1. DataOutputStream dis2.printStackTrace(). try { server_1=new ServerSocket(111). this.txt"). int length1.//Sink. private JScrollPane jScrollPane1.// Variables declaration private JLabel jLabel1. long temp.println(sen). private JButton jButton1. while((length1=f. // End of variables declaration public Detector1() { super(). int i=1. DataInputStream dis. private JTextArea jTextArea1. Socket client_2. } catch (Exception exp) { exp.out. } System. FileInputStream f=new FileInputStream(". Socket client_1. int length.setVisible(true). DataOutputStream dis1. String sen="".

contentPane = (JPanel)this.setText("Exit").setVisible(true). } }). please backup this GUI file for JFrameBuilder * to retrieve your design properly in future. * Tip: If you must revise this method. jScrollPane1 = new JScrollPane(). 255. Otherwise. jTextArea1 = new JTextArea(). */ private void initializeComponent() { jLabel1 = new JLabel(). before revising this method. jButton1 = new JButton().addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { jButton1_actionPerformed(e). 255)).setForeground(Color. retrieving design might not work properly.getContentPane().setText("INTRUSION DETECTOR1"). * WARNING: Do NOT modify this code. // // contentPane . // // jButton1 // jButton1. jButton1.this. // // jTextArea1 // // // jScrollPane1 // jScrollPane1. // // jLabel1 // jLabel1.setBackground(new Color(255.white). jButton1. The content of this method is always regenerated * by the Windows Form Designer. jLabel1. } /** * This method is called from within the constructor to initialize the form.setViewportView(jTextArea1).

int width. 462)).38). 204. contentPane. addComponent(contentPane.30)).getInputStream()). } /** Add Component Without a Layout Manager (Absolute Positioning) */ private void addComponent(Container container. jScrollPane1.83. // TODO: Add any handling code here } // // TODO: Add any method code to meet your needs in the following area // public void server() { try { String rr="". jLabel1.setLocation(new Point(0.setLayout(null).Component c. 26.setTitle("Detector1 .height).add(c).int height) { c. addComponent(contentPane.out.390.133. this. 172.// contentPane.readInt().").105.341). // // Detector1 // this.extends JFrame"). addComponent(contentPane. container.int x.setBackground(new Color(210. socket_1=server_1. this.37.441.y.setBounds(x.9.accept().width.int y. dis=new DataInputStream(socket_1.setSize(new Dimension(505. jButton1. . 0)). } // // TODO: Add any appropriate code in the following Event Handling Methods // private void jButton1_actionPerformed(ActionEvent e) { System. int length=dis.println("\njButton1_actionPerformed(ActionEvent e) called.28).

\n"). jTextArea1. jTextArea1.append("\t**********************************\n"). dis1.readUTF(). sb.equalsIgnoreCase("probe")) { jTextArea1. length--. } else if (destination.equalsIgnoreCase("Dos")) { jTextArea1. jTextArea1.readUTF().Toolkit. //milliseconds Timer t=new Timer(delay.writeInt(length). if(destination.101).\n"). Public void actionPerformed(ActionEvent evt) { if(count<=10) { java.getDefaultToolkit().writeUTF(destination).append("\tTHIS IS FROM PORT U2R\n").15)+" Recieved. jTextArea1.String destination=dis. } i=1. i++. int delay = 100. jTextArea1. while(length>0) { rr=dis.getOutputStream()).append("\tTHIS IS FROM PORT Probe \n"). new ActionListener() { int count=1.getOutputStream()). dis1.append("\t**********************************\n").. while(length>0) { rr=dis.append("\t\tPacket "+i+"\t"+rr.append("Packet "+i+"\t"+rr+" Recieved. i++.append("\t**********************************\n").writeUTF(rr). dis1.append("\t**********************************\n").delete(7.10).awt. length--. StringBuffer sb=new StringBuffer(rr). } i=1. Client_1=new Socket(sen.substring(4..beep().. dis1=new DataOutputStream(client_1. dis1=new DataOutputStream(client_1..readUTF(). count++ } else . jTextArea1.

"Detector1:Intursion Response System : Taken Aggresive action i.101).Shutdown !!!!!!"). jOptionPane. dis1.append("Packet "+i+"\t"+rr+" Recieved.showMessageDialog(null. } } public static void main(String[] args) { Detector1 r1=new Detector1(). } }). } i=1. JOptionPane.writeUTF(rr). jTextArea1.writeInt(length).readUTF(). t.getOutputStream()). while (true) { r1. TextArea1. i++.start(). } } .append("\t**********************************\n").writeUTF(destination).showMessageDialog(null.\n"). dis1=new DataOutputStream(client_1."Detector1:From Policy Administration : Intursion Response System : This request should get authentication from k authorised users ").server()."Detector1:From Policy Matching : This is an Anomalous Request :This modification to policy object is invalid"). }else if (destination. while(length>0){ rr=dis. dis1=new DataOutputStream(client_1.getOutputStream()). length--.showMessageDialog(null. dis1.append("\tTHIS IS FROM PORT Dos1\n").return.e. jTextArea1..printStackTrace(). client_1=new Socket(sen. System..append("\t**********************************\n"). dis1. }} catch (Exception exp) { exp. JOptionPane.exit(0).equalsIgnoreCase("DoS1")) { jTextArea1.

which meets the requirements of the end user and presents the information clearly. . The goal of designing input is to make data entry easier and to be free from errors. It is the most important and direct source information to the user.INPUT DESIGN The input design is the link between the information system and the user. Thus the objective of input design is to create an input layout that is easy to follow. Efficient and intelligent output design improves the system‟s relationship to help user decision-making. Data can be entered with the help of screens. The design of input focuses on controlling the amount of input required. In output design it is determined how the information is to be displaced for immediate need and also the hard copy output. It comprises the developing specification and procedures for data preparation and those steps are necessary to put transaction data in to a usable form for processing can be achieved by inspecting the computer to read data from a written or printed document or it can occur by having people keying the data directly into the system.Input Design is the process of converting a user-oriented description of the input into a computer-based system. It is achieved by creating user-friendly screens for the data entry to handle large volume of data. The data entry screen is designed in such a way that all the data manipulates can be performed. Methods for preparing input validations and steps to follow when error occur. In any system results of processing are communicated to the users and to other system through outputs. Appropriate messages are provided as when needed so that the user will not be in maize of instant.When the data is entered it will check for its validity. OBJECTIVES 1. This design is important to avoid errors in the data input process and show the correct direction to the management for getting correct information from the computerized system. Input Design considered the following things:     What data should be given as input? How the data should be arranged or coded? The dialog to guide the operating personnel in providing input. 2. It also provides record viewing facilities. controlling the errors. 3. OUTPUT DESIGN A quality output is one. The input is designed in such a way so that it provides security and ease of use with retaining the privacy. avoiding extra steps and keeping the process simple. avoiding delay.

report. Signal important events. 3. or other formats that contain information produced by the system. 2.Create document. Confirm an action. well thought out manner. Trigger an action. . they should Identify the specific output that is needed to meet the requirements.Select methods for presenting information. or warnings. The output form of an information system should accomplish one or more of the following objectives.1. problems. Designing computer output should proceed in an organized. opportunities. current status or projections of the Future.      Convey information about past activities. When analysis design computer output. the right output must be developed while ensuring that each output element is designed so that people will find the system can use easily and effectively.

3.4 SCREEN DESIGNS Process Specification(Techniques And Algorithm Used)  Policy Matching  Policy Administration File Sending .

Open the project and run it .

File Running .

Sending Data .

Providing DBA Name .

Conformation of DBA .

Intrusion Detection .

Data Receiving in Sink1 .

Request Rejecter .

Data Receiving by the DBA .

Result of the request .

and all visible code must also be readable. A software testing technique whereby the internal workings of the item being tested are not known by the tester. Unit testing Unit testing is a software development process in which the smallest testable parts of an application. white box testing uses specific knowledge of programming code to examine outputs. clear box and open box testing. White box testing White box testing also known as glass box. The tester does not ever examine the programming code and does not need any further knowledge of the program other than its specifications. Testers usually try to "break the system" by entering data that may cause . called units. in a black box test on a software design the tester only knows the inputs and what the expected outcomes should be and not how the program arrives at those outputs. White box testing does not account for errors caused by omission. Unlike black box testing. are individually and independently scrutinized for proper operation. These procedures tell the tester how the system should perform and where common mistakes may be found. System testing System testing is the process of performing a variety of tests on a system to explore functionality or to identify problems. System testing is usually required before and after a system is put in place. A series of systematic procedures are referred to while testing is being performed.4.1 SYSTEM TESTING Black Box testing Black Box testing is also known as functional testing. For example. This encourages developers to modify the source code without immediate concerns about how such changes might affect the functioning of other units or the program as a whole. larger components of the program can be evaluated by means of integration testing. structural. He or she can then see if the program diverges from its intended goal. A software testing technique whereby explicit knowledge of the internal workings of the item being tested are used to select the test data. The test is accurate only if the tester knows what the program is supposed to do. Once all of the units in a program have been found to be working in the most efficient and error-free manner possible. Unit testing is often automated but it can also be done manually.Unit testing involves only those characteristics that are vital to the performance of the unit under test.

For example. Integration testing Integration testing is also known as integration and testing. Bottom-up integration testing begins with unit testing. In top-down integration testing. the highest-level modules are tested first and progressively lower-level modules are tested after that. followed by tests of progressively higher-level combinations of units called modules or builds. called the bottom-up method and the top-down method. Integration testing can expose problems with the interfaces among program components before trouble occurs in real-world program execution. is a software development process which program units are combined and tested as groups in multiple ways. to see how the system will respond to the incorrect input.There are two major ways of carrying out an integration test. a tester may put in a city in a search engine designed to only accept states.the system to malfunction or return incorrect information. . In this context. a unit is defined as the smallest testable part of an application.

2.6. 6. Select image from file menu which we want to send to the receiver.1 HOW TO OPERATE THE PACKAGE Steps in the execution of a EEVCS Application: 1.5. Then a window appears which provides user interface to interact with the application. First of all we need to install the software java jdk 1. . Place the EEVCS application in Net Beans 4. Next install Net Beans ide for executing this application 3. Open project in Net Beans and run it. 5.

6. SCOPE FOR FURTHER DEVELOPMENT .

For the policy matching procedure.7. An interactive Event-Condition-Action type response policy language is presented that makes it very easy for the database security administrator to specify appropriate response actions for different circumstances depending upon the nature of the anomalous request. and policy administration. The two main issues that is addressed in the context of such response policies are policy matching. an algorithm is described to efficiently search the policy database for policies matching an anomalous request assessment. The response component is responsible for issuing a suitable response to an anomalous user request. The other issue that is addressed is the administration of response policies to prevent malicious modifications to policy objects from legitimate users. CONCLUSION The response component of intrusion detection system for a DBMS is described. .

5. 2007). Numerical Analysis: Mathematics of Scientific Computing. 20. Conry-Murray. July 2008.org/.com/showArticle.org/rfc/ rfc4880. pp. 2010. and L. Krawczyk. vol.B. Digital Press. “Detecting Anomalous Access Patterns in Relational Databases. Computer Security Applications Conf. 3. [7] A. [3] M. S.1).gartner. Martin. E. “The Cyber Enemy within Countering the Threat from Malicious Insiders. 2005). 2010. 2004. Mogull.” http://www. Springer. T. Wheatman. pp. Gartner Research (July 2006). Theory and Application of Cryptographic Techniques (EUROCRYPT). (ACSAC). pp.8. “Practical Threshold Signatures. [5] D. 2008.” Proc.220. [4] R. rfc 4800. Bertino.” http:// download. Brooks Cole. 2001. Ann. [8] A. [15] “Openpgp Message Format. Bertino. 50.com. Kamra. Network Computing (Aug. Int‟l Conf. Nicolett and J. pp. 2009. 1995. Gartner Research (Nov. “The Threat from within.66. Morgan Kaufmann. 207. “Dam Technology Provides Monitoring and Analytics with Less Overhead. Active Database Systems: Triggers and Rules for Advanced Database Processing. “Design and Implementation of SAACS: A State-Aware Access Control System.gartner. vol. E. no.postgresql. Gennaro.” http://www. and H.111/b28318/ datadict. Cryptology. Cheney. pp. [9] “Postgresql 8.” http://www. Shoup. Ceri.com. Ott. [12] V. Rabin. and R. “Top Five Steps to Prevent Data Loss and Information Leaks.” Secure Data Management. Very Large DataBases (VLDB). (ACSAC).” J.” Proc. Bertino. “Robust and Efficient Sharing of RSA Functions. Jarecki. July 2009. [13] R. July 2009. Kamra and E.htm.oracle. 2000. Nehme. Computer Security Applications Conf. Implementing Database Security and Auditing. 2007. jhtml?articleID=166400792.txt.” Proc. Terzi. Natan. [14] D. [11] “Oracle Database Concepts 11g Release 1 (11. Widom and S. “Responding to Anomalous Database Requests.V.3.” J.BIBLIOGRAPHY [1] A. [6] A. 1063-1077. Kamra. and E. A. 17. Brackney. The Postgresql Global Development Group.com/docs/cd/B28359_01/server. Goan. 2008. Ann. 2005.” http://www.” http://www. Kincaid and W. [10] J.networkcomputing. [2] R.ietf. July 2009. 393-400. . 346-347. no. T.