You are on page 1of 22

INTRUDER’S DETECTION IN FACEBOOK

1. ABSTRACT

Intruder’s attacks are nowadays familiar with cybercrime. These attacks


are now targeted with familiar social networking websites like Facebook.
Current security mechanisms detect Intruder’s threats but they are ill-suited to
monitor systems in which users function in dynamic teams. In this project the
Intruder’s detection system (IDS) is introduced in an unsupervised learning
framework of Facebook to detect Intruder’s threats based on the access logs of
Facebook access environments. In the proposed framework the Intruders of a
Facebook community is detected based on the observation that Facebook users
of the Facebook community tend to form community structures based on the
subjects of health care system they accessed on internet.

An intrusion detection system (IDS) is a device or software


application that monitors network or system activities for malicious activities or
policy violations and produces reports to a management station. Some systems
may attempt to stop an intrusion attempt but this is neither required nor expected
of a monitoring system. Intrusion detection and prevention systems (IDPS) are
primarily focused on identifying possible incidents, logging information about
them, and reporting attempts.

1
2. EXISTING SYSTEM

Access Control: Assume a user’s role (or their relationship to a group) as a


criterion for accessing the information.

Array of Access Control: Defines more relations (all possible) between related
users to overcome problems in access control.

Access control frameworks have been extended to address complex


workflows by accounting for team’s tasks and contextual cues. These
frameworks assume the system is static and can be clearly modeled, but the
dynamic nature of modern CIS makes it difficult to apply these principles in such
a setting. Additionally, collaborative systems require a much broader definition
of context, and the nature of collaboration cannot always be easily partitioned
into tasks associated with usage counts. A potential way to account for the fluid
nature of modern organizations is experience-based access management
(EBAM). The goal of EBAM is to evolve an access control configuration based
on patterns extracted from the system’s audit logs. It was recently shown that
EBAM can be applied to refine role definitions in an EHR based on differential
invocation of features such as “reason” for access and “service” provided to the
patient. Alternatively, there have been various investigations into role mining,
which automatically (re)groups users based on the similarity of their permissions
sets.

These approaches are in their infancy, however, and it is not clear how
stable they are across time periods are across time periods. Moreover, we wish
to note that access control and role engineering is complicated by the fact that
not all users are equally trustworthy. Based on this observation, there have been
some investigations into combining trust management models with access
control frameworks. These approaches assign users to roles based on their level
of trust. At the present time, there is little evidence regarding how such

2
approaches can be applied in real systems. Yet, there is concern that these models
require complex calculations and may consume more resources than available in
the context of evolving systems.

Disadvantages

 Less security for CIS domain


 It is highly risk to implement access control in a dynamic CIS
environment
 When the number of users increases the system performs low
 Less trust management

3. PROPOSED SYSTEM

In the proposed system a framework is introduced to detect anomalous


insiders from the access logs of a CIS by leveraging the relational nature of
system users as well as the Meta information of the subjects accessed. The
framework is called the community anomaly detection system, or CADS, and
builds upon the work introduced, this framework accounts for the observations
that in collaborative environments users tend to be team and goal oriented. In
this context, an arbitrary user should exhibit similar behavior to other users based
on their co access of similar subjects in the CIS. The system works based on

Methods: CADS

The CAD system is defined with the following process


 Relational patterns from access logs.
 Anomaly detection from relational patterns

3
Relational patterns from access logs: A new process is introduced to transform
the access logs of a CIS into dynamic community structures using a combination
of graph-based modeling and dimensionality reduction techniques over the
accessed subjects. The system also illustrates how Meta information, such as the
semantics associated with subjects can be readily integrated into the CADS
framework.
Anomaly detection from relational patterns: It measures the deviation of users
within a CIS from the extracted community structures.

Advantages

 Higher security for CIS domain


 Highly effective in a dynamic CIS environment
 When the number of users increases the system perform better
 Higher trust management

4
4. MODULES

This system contains 3 major modules. They are

 Administrator
 Storage Manager
 Insider

ADMINISTRATOR

 Change security
 Register Storage Manager
 Manage Storage Manager
 Create CIS Domain
 Track Insider Details
 View Storage Managers
 Track insider Attacks
 Logout

STORAGE MANAGER

 Change Password
 Authenticate Insiders
 View CIS Domain
 Upload Sensitive data to CIS domain
 View Data files
 Track insider Attacks
 Logout

5
INSIDER

 Change Password
 View CIS Domain
 View Data files
 Access Domain files
 Logout

CIS DOMAIN DETAILS

 View Domains
 View Storage Manger
 View Domain capacity
 Logout

6
5. HARDWARE & SOFTWARE REQUIREMENTS

Hardware Specification

The hardware for the system is selected considering the factors such as
CPU processing speed, memory access speed, peripheral channel speed, printer
speed; seek time & relational delay of hard disk and communication speed etc.
The hardware specifications are as follows:

Processor : Pentium 4
Monitor Size : Display Panel (1024 x768) preferably
Hard Disk Drive : 40 GB or higher
Keyboard : Standard 103/104 keyboard
RAM : 2GB
Mouse : Logitech Serial Mouse

Software Specification

To implement this system following configuration is needed. This is


possible using ASP.NET in Windows 7 environment. Development Software:

Operating System : Microsoft Windows 7 Professional


Web Development tool : ASP. NET
Coding Environment : C#.NET
Back-End Tool : Ms-SQL Server

7
6. SOURCE CODE

CODING
ADMIN LOGIN
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.IO;

public partial class ADMINLOGIN : System.Web.UI.Page


{
public static string str = @"Data
Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirectory|\Database.mdf;Integrate
d Security=True";
SqlConnection con = new SqlConnection(str);
SqlDataAdapter dap = new SqlDataAdapter();
public void Msgbox(string s)
{
RegisterStartupScript(" ", "<script language=Javascript>alert('" + s +
"')</script>");
}
protected void Page_Load(object sender, EventArgs e)
{

}
protected void Button1_Click(object sender, EventArgs e)
{

SqlCommand cmdser = new SqlCommand("select * from TBL_ADMIN where


USERNAME='" + TextBox1.Text + "'and PASSWORD='" + TextBox2.Text + "'",
con);
cmdser.CommandType = CommandType.Text;
dap.SelectCommand = cmdser;
DataTable dt = new DataTable();

try
{
dap.Fill(dt);
if (dt.Rows.Count > 0)
{
8
Response.Redirect("ADMINHOME.aspx");
}
else
{
Msgbox("Invalid");
}
}
catch (Exception ex)
{
//Response.Write(ex.Message);
}

}
}

REGISTER STORAGE MANAGER


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
using System.Data;
using System.Data.SqlClient;

public partial class ADRSM : System.Web.UI.Page


{
public static string str = @"Data
Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirectory|\Database.mdf;Integrate
d Security=True";
SqlConnection con = new SqlConnection(str);
SqlDataAdapter dap = new SqlDataAdapter();
public void Msgbox(string s)
{
RegisterStartupScript(" ", "<script language=Javascript>alert('" + s +
"')</script>");
}
protected void Page_Load(object sender, EventArgs e)
{
Calendar1.Visible = false;
DataTable dt = new DataTable();
dt.Rows.Clear();
SqlCommand cmd = new SqlCommand("select NAME from
TBL_CISDOMAIN", con);
cmd.CommandType = CommandType.Text;
dap.SelectCommand = cmd;
dap.Fill(dt);
DropDownList1.Items.Add("-select-");

9
for (int i = 0; i <= dt.Rows.Count - 1; i++)
{
DropDownList1.Items.Add(dt.Rows[i][0].ToString());
}
DataTable dt1 = new DataTable();
dt.Rows.Clear();
dap.SelectCommand = new SqlCommand("select * from TBL_RSMANAGER",
con);
dap.Fill(dt);
int n = dt.Rows.Count + 1;
TextBox1.Text = "SIM#0" + n.ToString();
TextBox7.Text = DateTime.Now.ToShortDateString();
}
protected void Button1_Click(object sender, EventArgs e)
{
try
{
string che = @"(select count(*) from TBL_RSMANAGER where
LOGNAME='" + TextBox8.Text + "')";
SqlCommand cmd = new SqlCommand("insert into TBl_RSMANAGER
values('" + TextBox1.Text + "','" + TextBox2.Text + "','" + TextBox3.Text + "','" +
TextBox4.Text + "','" + DropDownList1.SelectedItem.ToString() + "','" +
TextBox5.Text + "','" + TextBox6.Text + "','" + TextBox7.Text + "','" + TextBox8.Text
+ "','" + TextBox9.Text + "','" + TextBox10.Text + "','0')", con);
con.Open();
SqlCommand cmda = new SqlCommand(che, con);
int count = (int)cmda.ExecuteScalar();
if (count > 0)
{
Msgbox("this is already exists");
}
else
{
cmd.ExecuteNonQuery();
Msgbox("registered");
}
con.Close();
}
catch (Exception ex)
{
Msgbox(ex.Message);
}
finally
{
if (con.State == ConnectionState.Open)
con.Close();
}

10
MANAGE STORAGE MANAGER
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.IO;

public partial class ASMSM : System.Web.UI.Page


{
public static string str = @"Data
Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirectory|\Database.mdf;Integrate
d Security=True";
SqlConnection con = new SqlConnection(str);
SqlDataAdapter dap = new SqlDataAdapter();

public void Msgbox(string s)


{
RegisterStartupScript(" ", "<script language=Javascript>alert('" + s +
"')</script>");
}
protected void Page_Load(object sender, EventArgs e)
{
if (DropDownList1.Items.Count == 0)
{
SqlCommand cmd = new SqlCommand("select SIMID from
TBL_RSMANAGER ", con);
cmd.CommandType = CommandType.Text;
dap.SelectCommand = cmd;
DataTable dt = new DataTable();
dap.Fill(dt);
DropDownList1.Items.Add("-select-");
for (int i = 0; i <= dt.Rows.Count - 1; i++)
{
DropDownList1.Items.Add(dt.Rows[i][0].ToString());
}
}
}
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
SqlCommand cmd = new SqlCommand("select * from TBL_RSMANAGER
where SIMID='" + DropDownList1.SelectedItem.ToString() + "'", con);
cmd.CommandType = CommandType.Text;
DataTable dt1 = new DataTable();
dap.SelectCommand = cmd;
dap.Fill(dt1);

11
if(dt1.Rows.Count>0)
{
TextBox1.Text = dt1.Rows[0][1].ToString();
TextBox2.Text = dt1.Rows[0][7].ToString();
TextBox3.Text = dt1.Rows[0][8].ToString();
TextBox4.Text = dt1.Rows[0][6].ToString();
TextBox5.Text = dt1.Rows[0][4].ToString();

}
}
protected void Button4_Click(object sender, EventArgs e)
{
SqlCommand cmd = new SqlCommand("update TBL_RSMANAGER set
STATUS='1' where SIMID='" + DropDownList1.SelectedItem.Text + "'", con);
cmd.CommandType = CommandType.Text;
DataTable dt = new DataTable();
dap.SelectCommand = cmd;
try
{
dap.Fill(dt);
Msgbox("Authorise");
}
catch (Exception ex)
{
//Response.Write(ex.Message);
}

protected void Button3_Click(object sender, EventArgs e)


{
SqlCommand cmd = new SqlCommand("update TBL_RSMANAGER set
STATUS='0' where SIMID='" + DropDownList1.SelectedItem.Text + "'", con);
cmd.CommandType = CommandType.Text;
DataTable dt = new DataTable();
dap.SelectCommand = cmd;
try
{
dap.Fill(dt);
Msgbox("Unauthorise");
}
catch (Exception ex)
{
//Response.Write(ex.Message);
}}
}

12
UPLOAD FILES

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.IO;

public partial class MUSDCIS : System.Web.UI.Page


{
public static string str = @"Data
Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirectory|\Database.mdf;Integrate
d Security=True";
SqlConnection con = new SqlConnection(str);
SqlDataAdapter dap = new SqlDataAdapter();
public void Msgbox(string s)
{
RegisterStartupScript(" ", "<script language=Javascript>alert('" + s +
"')</script>");
}
protected void Page_Load(object sender, EventArgs e)
{
Calendar1.Visible = false;
TextBox5.Text = DateTime.Now.ToShortDateString();

if (Session["NAME"] != null)
{
TextBox2.Text = Session["DOMAIN"].ToString();
TextBox3.Text = Session["NAME"].ToString();
TextBox4.Text = Session["SIMID"].ToString();

}
SqlCommand cmdser = new SqlCommand("select * from TBL_UPLOADFILES
where NAME='"+TextBox3.Text+"'", con);
dap.SelectCommand = cmdser;
DataTable dt = new DataTable();
dap.Fill(dt);
int n = dt.Rows.Count + 1;
TextBox6.Text = "" + n.ToString();

protected void Button1_Click(object sender, EventArgs e)


{
if (FileUpload1.HasFile)

13
{
string str = Path.GetExtension(FileUpload1.FileName);
if (str == ".txt" || str == ".docx")
{
FileUpload1.SaveAs(Server.MapPath("UFILES//" +
FileUpload1.FileName));
try
{
string che = @"(select count (*) from TBL_UPLOADFILES where
FILENAME='" + TextBox1.Text + "')";
SqlCommand cmdins = new SqlCommand("insert into
TBl_UPLOADFILES values('" + TextBox1.Text + "','" + TextBox2.Text + "','" +
TextBox3.Text + "','" + TextBox4.Text + "','" + "UFILES//"+FileUpload1.FileName +
"','" + TextBox5.Text + "','" + TextBox6.Text + "')", con);
con.Open();
SqlCommand cmda = new SqlCommand(che, con);
int count = (int)cmda.ExecuteScalar();
if (count > 0)
{
Msgbox("this file is already exist");
}
else
{
cmdins.ExecuteNonQuery();
Msgbox("FILE UPLOADED");
}
con.Close();
}
catch (Exception ex)
{
Msgbox(ex.Message);
}
finally
{
if (con.State == ConnectionState.Open)
con.Close();
}
}
}
}
}

14
SCREEN SHOT

Home Page

15
Admin Login

Register Storage Manager

16
Manage Storage Manager

Create CIS Domain

17
Track Insider

View Storage Manager

18
Register Insider

Storage Manager Login

19
View Files

Authenticate Insider

20
Uploading Sensitive data to CIS Domain

Update SD

21
Insider Login

Access Files

22

You might also like