MP2 343
MP2 343
Submitted by
KALAISELVAN S 20P320
SANTHOSH G 20P343
ARUN PRASANTH B 21P701
THARUN KUMAR A 21P706
BACHELOR OF ENGINEERING
in
COMPUTER SCIENCE AND ENGINEERING
APRIL 2023
KARPAGAM COLLEGE OF ENGINERING
(Autonomous)
COIMBATORE – 641 032
KALAISELVAN S 20P320
SANTHOSH G 20P343
ARUN PRASANTH B 21P701
THARUN KUMAR A 21P706
BACHELOR OF ENGINEERING
APRIL 2023
Mr.S.RAMARAJ,AP/CSE Dr.T.RAVICHANDRAN
Project Guide Head of the Department
Certified that the candidate was examined in the viva-voce examination held
on ………………….
……………………..
(Internal Examiner)
ACKNOWLEDGEMENT
We express our sincere thanks to Karpagam educational and charitable trust for
providing necessary facilities to bring out the project successfully. We felt
greatness to record our thanks to the chairman Dr. R. VASANTHAKUMAR,
B.E., (Hons),D.Sc. for all his support and ray of strengthening hope extended.
A word of thanks would not be sufficient for the work of our project guide
Mr.S.RAMARAJ., ME. Department of Computer Science and Engineering,
whose efforts and inspiration lead us through every trying circumstance.
We would also like to recollect the courage and enthusiasm that was inculcated in
us by our mini project coordinator, Ms. SUBHASHREE K, M.E. Department of
Computer Science and Engineering for valuable guidance and support through the
tenure of our project.
We express our gratitude to all the members of the faculty of the Department of
Computer Science and Engineering for the encouragement which we received
throughout the semester.
TABLE OF CONTENTS
CHAPTE
TITLE PAGE NO.
RNO.
ABSTRACT I
LIST OF FIGURES II
LIST OF ABBREVIATIONS III
1 INTRODUCTION 1
1.1 DEFINITION 1
1.2 OBJECTIVE 1
2 SYSTEM OVERVIEW 2
2.1 EXISTING SYSTEM 2
2.2 PROPOSED SYSTEM 2
3 SYSTEM REQUIREMENTS 3
3.1 HARDWARE REQUIREMENTS 3
3.2 SOFTWARE REQUIREMENTS 3
4 SYSTEM DESIGN 4
4.1 SYSTEM ARCHITECTURE DESIGN 4
4.2.ER DIAGRAM-1 5
4.3 ER DIAGRAM-2 6
5 SYSTEM ANALYSIS 7
5.1 MODULE 7
5.1.1.USER INTERFACE MODULE 7
5.1.2.PACKET ANALYSIS MODULE 8
5.1.3.STATISTICS MODULE 8
6 SYSTEM IMPLEMENTATION 9
7 OUTPUT 16
8 CONCLUSION 18
9 REFERENCES 19
ABSTRACT
In recent years, Intrusion Detection System (IDS) has become one of the
hottest research areas in Computer Security. It is an important detection technology
and is used as a countermeasure to preserve data integrity and system availability
during an intrusion.
i
LIST OF FIGURES:
ii
LIST OF ABBREVIATIONS:
OS Operating System
iii
CHAPTER 1
INTRODUCTION
1.1 DEFINITION
1.2 OBJECTIVE
1
CHAPTER 2
SYSTEM OVERVIEW
2
CHAPTER 3
SYSTEM REQUIREMENTS
3
CHAPTER 4
SYSTEM DESIGN
Figure-1
4
4.2 ER DIAGRAM 1
Figure-2
5
4.3.ER DIAGRAM 2
Figure-3
6
CHAPTER 5
SYSTEM ANALYSIS
5.1 MODULE
The system after careful analysis has been identified to be presented with
the following modules and roles. The modules involved are.
7
5.1.2 PACKET ANALYSIS MODULE
8
CHAPTER 6
SYSTEM IMPLEMENTATION
import javax.swing.*;
import jpcap.*;
public InterfacesWindow() {
initComponents();
ListNetworkInterfaces();
textField1.requestFocus();
setVisible(true);
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
}
sniffer.NETWORK_INTERFACES = JpcapCaptor.getDeviceList();
jTextArea1.setText("");
for (int i = 0; i < sniffer.NETWORK_INTERFACES.length; i++) {
jTextArea1.append(
"\n\n----------------------------------------------------------------
-------Interface (" + i
+ ") ----------------------------------------------------------------
-------");
jTextArea1.append("\nInterface Number: " + i);
jTextArea1.append("\nDescription: "
+ sniffer.NETWORK_INTERFACES[i].name + "("
+ sniffer.NETWORK_INTERFACES[i].description + ")");
jTextArea1.append("\nDatalink Name: "
+ sniffer.NETWORK_INTERFACES[i].datalink_name + "("
+ sniffer.NETWORK_INTERFACES[i].datalink_description + ")");
jTextArea1.append("\nMac Address: ");
byte[] R = sniffer.NETWORK_INTERFACES[i].mac_address;
for (int A = 0; A < sniffer.NETWORK_INTERFACES.length; A++) {
jTextArea1.append(Integer.toHexString(R[A] & 0xff) + ":");
}
9
NetworkInterfaceAddress[] INT = sniffer.NETWORK_INTERFACES[i].addresses;
jTextArea1.append("\nIP Address: " + INT[0].address);
jTextArea1.append("\nSubnet Mask: " + INT[0].subnet);
jTextArea1.append("\nBroadcast Address: " + INT[0].broadcast);
sniffer.COUNTER++;
}
}
textField1.setText("");
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-
BEGIN:initComponents
private void initComponents() {
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("Interfaces List");
setName("Interfaces list"); // NOI18N
jTextArea1.setEditable(false);
jTextArea1.setColumns(20);
jTextArea1.setRows(5);
10
jScrollPane1.setViewportView(jTextArea1);
jButton1.setText("Select");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
textField1.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyPressed(java.awt.event.KeyEvent evt) {
textField1KeyPressed(evt);
}
});
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(0, 249, Short.MAX_VALUE)
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE,
224, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(textField1, javax.swing.GroupLayout.PREFERRED_SIZE,
70, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(47, 47, 47)
.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE,
75, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(jScrollPane1))
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 352,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
11
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(textField1, javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
.addComponent(jButton1, javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addContainerGap())
);
pack();
}// </editor-fold>//GEN-END:initComponents
try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(InterfacesWindow.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
12
java.util.logging.Logger.getLogger(InterfacesWindow.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(InterfacesWindow.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(InterfacesWindow.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
}
//</editor-fold>
//</editor-fold>
@Override
public void receivePacket(Packet packet) {
13
Object[] row = {sniffer.No, tcp.length, tcp.src_ip,
tcp.dst_ip, "TCP"};
}
}
}
14
THREAD = new jpcap_thread() {
try {
CAP = JpcapCaptor.openDevice(NETWORK_INTERFACES[INDEX],
65535, false, 20);
//writer = JpcapWriter.openDumpFile(CAP,
"captureddata");
if
("UDP".equals(filter_options.getSelectedItem().toString())) {
CAP.setFilter("udp", true);
} else if
("TCP".equals(filter_options.getSelectedItem().toString())) {
CAP.setFilter("tcp", true);
} else if
("ICMP".equals(filter_options.getSelectedItem().toString())) {
CAP.setFilter("icmp", true);
}
while (CaptureState) {
} catch (Exception e) {
System.out.print(e);
}
return 0;
}
THREAD.start();
15
CHAPTER 7
OUTPUT
16
PAYLOAD:
STATISTICS:
17
CHAPTER 8
CONCLUSION
18
CHAPTER 9
REFERENCES
[1]
[2]
[3]
[4]
http://www.w3schools.com/html/defualt.asp,http://www.w3schools.com/css/
default.asp,http://www.w3schools.com/js/default.asp
[5]
Java Enlightenment,Cody Lindley-First Edition, based on JavaScript1.5,
ECMA-262, Edition
19