Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Introduction:
AS THE SCALE of a decentralized distributed system increases, the presence of malicious behavior (e.g., Byzantine failures) becomes the norm rather than the exception. Most designs against such malicious behavior rely on the assumption that a certain fraction of the nodes in the system are honest. For example, virtually all protocols for tolerating Byzantine failures assume that at least 2/3 of the nodes are honest. This makes these protocols vulnerable to sybil attacks [1], in which a malicious user takes on multiple identities and pretends to be multiple, distinct nodes (called sybil nodes or sybil identities) in the system. With sybil nodes comprising a large fraction (e.g., more than 1/3) of the nodes in the system, the malicious user is able to out vote the honest users, effectively breaking previous defenses against malicious behaviors. Thus, an effective defense against sybil attacks would remove a primary practical obstacle to collaborative tasks on peer-to-peer (p2p) and other decentralized systems
ABSTRACT
Peer-to-peer and other decentralized, distributed systems are known to be particularly vulnerable to sybil attacks. In a sybil attack, a malicious user obtains multiple fake identities and pretends to be multiple, distinct nodes in the system.
By controlling a large fraction of the nodes in the system, the malicious user is able to "out vote" the honest users in collaborative tasks such as Byzantine failure defenses. This paper presents SybilGuard, a novel protocol for limiting the corruptive influences of sybil attacks.
Our protocol is based on the "social network" among user identities, where an edge between two identities indicates a human-established trust relationship. Malicious users can create many identities but few trust relationships.
EXISTING SYSTEM
In existing system, hackers easily can act as source node and sends message to destination. Destination receives wrong message from hackers. Destination believes that its correct message from source. Destination receives the wrong information from hackers.
Messages are passed from sender to destination (receiver) without any security. Message header holds source node information which sends the message to receiver. Hackers can easily change that header information and sends to destination.
DISADVANTAGES
Destination gets the wrong information from hackers or malicious user. There is no any server to detect hackers. Header information may be hiding by malicious user. Source node does not get any response from destination while hackers get that source information.
PROPOSED SYSTEM
In this proposed system, hackers can not act as source, because one centralized server is maintaining to check authentication of source. This centralized server is sybilguard. It blacks unauthorized users or hackers. Sybilguard is maintaining source node information and header information of message. It checks the users using that details whether they are attackers or normal user. Hackers information has not been transferred to destination. Destination has not been receiving any attacker information.
ADVANTAGES
Sybilguard is maintained to detect the attackers who are all act as source node. It deletes that wrong information from hackers and indicates that they are attackers. Hackers information has not transferred to receiver.
Sybilguard act as the centralized server to all users. It handles the message transmission between those users. Each user has to register individually. Those user informations are stored in centralized server and find the attackers using that information.
SYSTEM REQUIREMENTS
Software Requirements
Language : Java 1.5 or more
Backend
Sql sever
Operating System
Windows Xp
Hardware Requirements
Hard disk : 80 GB
SDRAM
256 MB
Processor
P IV
Processor Speed
2.33 GHz
MODULES
1. Topology Construction 2. Node entry 3. Message transmission 4. Sybilguard
TOPOLOGY CONSTRUCTION
Topology construction is designed to construct one topology with available nodes. Register all nodes which are involved to transfer the data to some other nodes. Depends upon total nodes, topology will be constructed.
Topology construction module allows you to construct node path. If already exits, it will not allow to construct that same path. All nodes are mentioned in topology construction. User cant modify node information after construction.
NODE ENTRY
Node entry module describes node authentication. To activate node who are all involved in topology, node should be login into that topology. It does not allow unauthorized node entry. Many nodes can enter into that mentioned topology. Each node can send the messages to their destination after login.
MESSAGE TRANSMISSION
Each node (source node) can send the data to some other node(destination) which one connected with that source node. While sending message, the source node should mention the header information. Source node can send the data to destination. Destination will receive that message.
SYBLGUARD
Sybilguard is maintained in this project to detect the attacker. Sybilguard is called as centralized server. Sybilguard does not allow hackers to send the wrong data. It compares node information and header information. If matches, normal user sending
the message to destination. Otherwise sybilguard will not allow the hackers to send message. It blocks that data and it provides the attacker information to attacker.
Sybilguard gets node information from its registration. While data transmission, sybilguard will get their header information. This centralized server maintains to find out the attacker details.
Simple Object-oriented Distributed Interpreted Robust Secure Architecture-neutral Portable High-performance Multithreaded Dynamic
Java is also unusual in that each Java program is both compiled and interpreted. With a compiler, you translate a Java program into an intermediate language called Java byte codes--the platform-independent codes interpreted by the Java interpreter. With an
interpreter, each Java byte code instruction is parsed and run on the computer. Compilation happens just once; interpretation occurs each time the program is executed. This figure illustrates how this works.
Java byte codes can be considered as the machine code instructions for the Java Virtual Machine (Java VM). Every Java interpreter, whether it's a Java development tool or a Web browser that can run Java applets, is an implementation of the Java VM. The Java VM can also be implemented in hardware. Java byte codes help make "write once, run anywhere" possible. The Java program can be compiled into byte codes on any platform that has a Java compiler. The byte codes can then be run on any implementation of the Java VM. For example, the same Java program can run on Windows NT, Solaris, and Macintosh.
The Java Virtual Machine (Java VM) The Java Application Programming Interface (Java API) The Java API is a large collection of ready-made software components that
provide many useful capabilities, such as graphical user interface (GUI) widgets. The Java API is grouped into libraries (packages) of related components.
The following figure depicts a Java program, such as an application or applet, that's running on the Java platform. As the figure shows, the Java API and Virtual Machine insulates the Java program from hardware dependencies.
As a platform-independent environment, Java can be a bit slower than native code. However, smart compilers, well-tuned interpreters, and just-in-time byte code compilers can bring Java's performance close to that of native code without threatening portability.
How does the Java API support all of these kinds of programs? With
packages of software components that provide a wide range of functionality. The core API is the API included in every full implementation of the Java platform. The core API gives you the following features:
Networking: URLs, TCP and UDP sockets, and IP addresses. Internationalization: Help for writing programs that can be localized
for users worldwide. Programs can automatically adapt to specific locales and be displayed in the appropriate language.
Object
serialization:
Allows
lightweight
persistence
and
Java not only has a core API, but also standard extensions. The standard extensions define APIs for 3D, servers, collaboration, telephony, speech, animation, and more.
object orientation, its JavaBeans component architecture, and its wideranging, easily extendible API let you reuse other people's tested code and introduce fewer bugs.
Write once, run anywhere: Because 100% Pure Java programs are
compiled into machine-independent byte codes, they run consistently on any Java platform.
AWT
The AWT classes contained by the java.awt package. It is one of the largest packages. Because it is logically organized in a top-down, hierachical fashion, it is easier to understand and use than you might at first believe.AWT contains numerous classes and methods that allow you to create and manage windows. It also explains further aspects of of javas event handling mechanism. The main purpose of the AWT is to support applet windows, it can be used to create stand alone windows that run in a GUI environment such as windows.
APPLET
The applet class is contained by the java.applet package. Applet contains several methods that give you detailed control over the execution of your applet. Java.applet also defines three interfaces AppletContext, AudioClip, AppletStub. All applet must import with java.applet .applets must also import with the java.awt.
UTIL
The java.util package contains some of the most exiting enhancements added by java 2 collections .a collections is group of objects the addition of collections caused fundamental alterations in the structure and architecture of many elements of java.util.java.util contains a wide range of functionality.thease classes and interfaces are used throughout core java packages. These include classes that tokenize the string, work with dates, compute random numbers and observe events.
NET
The java.net package which provides support of networking. Java is good language for networking the classes are defined in java.net package. These networking classes encapsulate the socket paradigm pioneered by the BSD.
ZIP
The java.util.zip package provides the ability to read and write files in the popular ZIP and GZIP formats. Both ZIP and GZIP input and output streams are available. Other classes implement the ZLIB algorithms for compression and decompression.
SWING
The swing is a set of classes that provides more powerful and flexible components than are possible with the AWT. Unlike AWT components Swing
components are not implemented by platform specific code. They are written entirely in java and, therefore, are platform-independent. The term lightweight is used to describe
substancial. Swing is area that you will want to explore further on your own
The mouselistener interface Void windowActivated(WindowEvent we) Void windowActivated(WindowEvent we) This interface defines five methods.If the mouse is pressed and released at the same point,mouseClicked() is invoked.Whenthe mouse enters a component,the mouseEntered() method is called.When it leaves, mouseExited() is called. The mousePressed
andmouseRealeased() methods are invoked when the mouse is pressed andreleased, respectively. The general forms of these methods are shown here: Void mouseClicked(MouseEvent me) Void mouseEntered(MouseEvent me) Void mouseExited(MouseEvent me) Void mousePressed(MouseEvent me) Void mouseRealeased(MouseEvent me) The MouseMotionListener interface This interface defines two methods. The mouseDragged() method is called multiple times as the mouse is dragged. The mouseMoved() method multiple times as the mouse is moved. Their general forms are shown here:
deiconified, the windowDeiconified() method is called. When a window is opened or closed, the windowOpened() or windowClosed() methods are called, respectively. The windowClosing() method is called when a window is being closed. The general forms of these methods are Void windowActivated(WindowEvent we) Void windowClosed(WindowEvent we) Void windowClosing(WindowEvent we) Void windowDeactivated(WindowEvent we) Void windowDeiconified(WindowEvent we) Void windowIconified(WindowEvent we) Void windowOpened(WindowEvent we)
DataBase
e od tn ser In
s tail de
Destination
Yes
Topology creation
Nodes Login
rd i ve ce
Server
ils eta
node name
It h
s old
ra de en
nd
re
Data Transmission
No
Screen Shots
TESTING
Testing is the process of executing the program with the intent of finding errors. During testing, the program to be tested is executed with a set of test cases and the output of the program for the test cases is evaluated to determine the program is performing as it is expected. Error is the testing fundamental and is defined as the difference between the actual output of a software and a correct output i.e., difference between the actual and ideal testing is usually relied upon to detect these faults in the coding phase for this, different levels of testing are used which performs different tasks and aim to the test different aspects of the system.
Testing should be based on sound and systematic techniques so that, after testing, we may have a better understanding of the products reliability. Testing should help locate errors, not just detect their presence. The result of testing should not be viewed as simply providing a Boolean answer to the question of whether the software works properly or not.
Tests should be organized in a way that helps to isolate errors. This information can then be used in debugging. Testing should be repeatable, i.e., tests should be arranged in such a way that separating the same experiment-supplying the same input data to the same piece of code produces the same results.
Finally testing should be accurate this will increase the reliability of testing. Here we should observe that the accuracy of the testing activity depends on the level of precision and may be even formality of software specifications.
Structural Testing
It is considered with testing the implementation of the program. The intention of the structural testing is not to exercise all the different input and output conditions but to exercise the different programming and data files used in the program. This testing is also called White Box Testing.
verification of the code produced during the code phase and the goal is to test the internal logic of the module.
Integration Testing
The goal here is to see if the modules can be integrated properly, the emphasis being on testing interfaces between modules. After structural testing and functional testing we get error free modules these modules are to be integrated to get the required results of the system. After checking the module another module is tested and is integrated with the previous module. After the integration the test phases are generated and the results are tested.
System Testing
Here the entire software is tested. The reference document for this process is the requirement document and the goal is to see whether the software needs its requirements. The system was tested for various test cases with various inputs.
Acceptance Testing
It is some times performed with realistic data of the client to demonstrate that the software is working satisfactorily. Testing here focus on the external behavior of the system, the internal logic of the program is not emphasized. In acceptance test the system is tested for various inputs.
Design
Implementation
Test
Test execution
CONCLUSION
In this paper it explained about secure transmission between the two nodes using sybilguard. Sybilguard used to detect the hackers who are all act as source node. In a sybil attack, a malicious user obtains multiple fake identities and pretends to be multiple, distinct nodes in the system.
Malicious users can create many identities to act as source node but few trust relationships (like sybilguard) are find theirs and avoid them to sending wrong information to destination.
By controlling a large fraction of the nodes in the system, the malicious user is able to "out vote" the honest users in collaborative tasks such as Byzantine failure defenses.
It provides the security while transferring message from source to destination. Destination does not get wrong information from wrong user. The attacker will be detected by centralized server. Wrong information deleted from that destination.
Sample codes
import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.sql.*; import java.util.*; import java.net.*; import java.io.*; import javax.swing.border.*;
public class connectnodes extends JFrame { // Variables declaration private JLabel jLabel1; private JLabel jLabel2; private JLabel jLabel3; private JLabel jLabel4,jLabel5; private JTextField jTextField1; private JComboBox jComboBox1; private JComboBox jComboBox2; private JTextField jTextField5;
private JButton jButton1; private JButton jButton2; private JButton jButton3; private JButton jButton4,jButton5; private JPanel contentPane; private JPanel panel; public Runtime r; int n; int i=0; int portno; String nodename = "",node,des; String sysname = ""; ResultSet rs; Connection cs; Statement st; Font font = new Font("TimesRoman",Font.PLAIN,20); public Vector totalpeer = new Vector(); // End of variables declaration
initializeComponent();
this.setVisible(true); }
public void initializeComponent() { jLabel1 = new JLabel(); jLabel2 = new JLabel(); jLabel3 = new JLabel(); jLabel4 = new JLabel(); jLabel5 = new JLabel(); panel=new JPanel(); jTextField1 = new JTextField();
jTextField5 = new JTextField(); jButton1 = new JButton(); jButton2 = new JButton(); jButton3 = new JButton(); jButton4 = new JButton(); jButton5 = new JButton(); jComboBox1 = new JComboBox(totalpeer); jComboBox2 = new JComboBox(totalpeer); contentPane = (JPanel)this.getContentPane();
jLabel2.setText("Peer Name");
jLabel3.setText("Source Node");
if(i<=n)
i++; }
} });
}); jButton4.setText("Ok"); jButton4.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { try { String nodecount=jTextField5.getText(); n=Integer.parseInt(nodecount); System.out.println("n:"+n); if(n!=0) {
jTextField1.setEnabled(true);
jButton1.setEnabled(true);
jTextField5.setEnabled(false);
jButton4.setEnabled(false);
dispose(); }
});
}); // // contentPane //
contentPane.setLayout(null); panel.setLayout(null);
addComponent(panel, jLabel4, 65,200,100,25); addComponent(panel, jTextField1, 204,100,100,25); addComponent(panel, jComboBox1, 204,150,100,25); addComponent(panel,jComboBox2, 203,200,100,25); addComponent(panel, jButton1, 400,85,100,25); addComponent(panel, jButton2, 400,120,100,25); addComponent(panel, jButton3, 400,155,100,25); addComponent(panel, jButton5, 400,190,100,25); addComponent(panel, jLabel5, 65,50,100,25); addComponent(panel,jTextField5, 203,50,100,25); addComponent(panel, jButton4, 400,50,100,25); panel.setBackground(new Color(255,255,255)); Border etched=BorderFactory.createEtchedBorder(); Border border=BorderFactory.createTitledBorder(etched,"Node
Registration",TitledBorder.CENTER,TitledBorder.DEFAULT_JUSTIFICATION,font,C olor.red); panel.setBorder(border); this.setTitle("Network Construction"); this.setLocation(new Point(100, 100)); this.setSize(new Dimension(550, 400)); this.setDefaultCloseOperation(DO_NOTHING_ON_CLOSE); this.setResizable(false); }
private void addComponent(Container container,Component c,int x,int y,int width,int height) { c.setBounds(x,y,width,height); container.add(c); }
nodename = jTextField1.getText();
try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); cs=DriverManager.getConnection("jdbc:odbc:server"); st=cs.createStatement(); rs= st.executeQuery("select * from NodeInformation where NodeName LIKE '"+nodename+"' "); //OR SystemName LIKE '"+sysname+"' if(rs.next()) { JOptionPane.showMessageDialog(this,"The given Data already Exists"); i--; } else { String query = "insert into NodeInformation
} catch(Exception ee) { JOptionPane.showMessageDialog(this,"Specify the Correct PortNo"); System.out.println("Connectivity Error"); ee.printStackTrace(); i--; }
System.out.println(""+node); System.out.println(""+des);
JOptionPane.showMessageDialog(this,"Specify Neighbour"); }
Valid
else {
try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); cs=DriverManager.getConnection("jdbc:odbc:server"); st=cs.createStatement(); rs= st.executeQuery("select * from Connection where NodeName LIKE '"+node+"' AND Neighbour LIKE '"+des+"'"); '"+sysname+"' System.out.println("1"); if(rs.next()) { JOptionPane.showMessageDialog(this,"The given Data already Exists"); } else { //OR SystemName LIKE
query
"insert
into
Connection
query1=
"insert
into
Connection
st.executeUpdate(query);
st.executeUpdate(query1);
Information
} }
try {
public class dataconnect { public Connection cs; public Statement st; public ResultSet rs;
} }
import java.sql.*; import java.sql.Connection.*; import java.net.*; class limit { public Connection cs; public Statement st; public ResultSet rs,rs1,rs2; double val1,val2,result1,result2; int i,count = 0; double res1[] = new double[10]; double res2[] = new double[10]; String path[] = new String[10];
String n[] = new String[10]; public Statement connect() throws Exception { try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); cs = DriverManager.getConnection("jdbc:odbc:server"); st = cs.createStatement();
while(rs.next()) {
System.out.println("rtc path:"+path); System.out.println("\t"+val1+"\t"+val2); result1 = Math.ceil(val1); result2 = Math.ceil(val2); System.out.println("\t"+result1+"\t"+result2); res1[i]= result1; res2[i]= result2; i++; } try { rs2 = st.executeQuery("select count(*) from possiblepath"); while(rs2.next()) { count =Integer.parseInt(rs2.getString(1)); System.out.println("Count :\t"+count);
for (i=0;i<count;i++ )