You are on page 1of 42

Page no:

Aim : Working with sniffers for monitoring network communication. Using Tool
Ethereal.
Ethereal is a GUI network protocol analyzer. It lets us interactively brows a packet data from
a live network or from previously saved capture files.
WORKING WITH ETHEREAL :

 Click on Ethereal Icon and open

 In the “The Ethereal Network Analyzer ” window

 In file menu click on ‘capture’


 And then click on ‘Interfaces’...

 The following window will appear

LAKI REDDY BALI REDDY COLLEGE OF ENGINEERING


Page no:

 Click on ‘capture’ in the real talk.

 Then (Micro soft’s packet scheduler) Window will open.

Observation :

 In this window we can observe what the protocols we captured are and their usage
into percentage.

 We can observe.

 And then click on stop

 Then After processing A ‘3-pane window’ Will open.

LAKI REDDY BALI REDDY COLLEGE OF ENGINEERING


Page no:

FIRST PANE :
In the first pane we can view the
i) At what time which pr4otocal is used
ii) And along with their source IP, Destination IP, time, protocol and some Information
about that protocol
EX:

OBSERVATIONS:
1) In the first Address resolution protocol the source broadcast an IP address responds by
telling its Ethernet address to the source.
2) Second one is an up protocol the source is communicating with the destination using
some port numbers.
3) Third on is NetBIOS protocol the source is trying to share ESET from destination
We can ales Observe the same protocol uses some color code.
SECOND PANE :

 In this second pane we can know more of the protocols which we selected in the first
pane.

 Here detailed information about packet we captured we can know except data.

LAKI REDDY BALI REDDY COLLEGE OF ENGINEERING


Page no:

 Like for UDP into second Example in first pane.

THIRD PANE :
In the third pane represents the encrypted from o each and every Instruction.

FILTERING :

 Start Ethereal

LAKI REDDY BALI REDDY COLLEGE OF ENGINEERING


Page no:

 And then type specified protocol in fileter4 text box.


Or

 Click on ‘Expression ‘ button

 Select the protocol which you like

 And also select Relation

 And then click OK

 Then click on the ‘capture’.

 Interfaces and in the ‘Ethereal: capture Interface dialog box.

 Click capture

 And then click stop

 And protocols are displayed according to the Relation you specified.


OR

 We can also view live protocols.

 Using ‘options’.

 Click on ‘Option ‘ in ‘capture’


 Select the protocol in ‘capture filter ‘ box.

 And click save ----> OK.

Mark in the Update list of packets in real time

 Click start
The lice specified capture will be showed in third pain window.

CONVERSATION:

This is optio0n will open new window that displays a list of conversation between two
end points.

LAKI REDDY BALI REDDY COLLEGE OF ENGINEERING


Page no:

In this conversation window we can view Addresses of A&B and packets and Bytes.
And some more information about bytes and packets transferred from a  B and
B A.

End Points:

Static  end points list  protocol

 It shows the different hosts address and no of hosts.

 It also displays the no of packets, Bytes transferred to that respective hosts all
this information showed here.

Decode As :
If you have a packet selected present a dialog allowing you to change which dissector
are used to decode this packet.
Click on ‘Analyzer’ after selecting any protocol and click on DecodeAS. Then
‘Ethereal: Decode As ‘window will displayed.

Decode  Select the protocol and Apply and then click OK.

AIM : Write a conventional data Encryption algorithm using C Language.

DESCRIPTION :
Explanation:

 DES is widely used encryption algorithm


 We may take different key.

LAKI REDDY BALI REDDY COLLEGE OF ENGINEERING


Page no:

 We have to convert it in to binary form first and do as shown in the below flow chart.

 All the tables are predefined.


PROCEDURE OF FINDING CIPHER TEXT

KEY GENERATION

LAKI REDDY BALI REDDY COLLEGE OF ENGINEERING


Page no:

HOW TO FIND S-BOX VALUES:


We know that in put to each s-box is 6 bits let us take

11 is equals to 3
0 1 0 1 is equals to 4
That means in the sbox table take the value of 3rd row and 4th column

PROGRAM :
int
key[64]={0,0,0,1,0,0,1,1,0,0,1,1,0,1,0,0,0,1,0,1,0,1,1,1,0,1,1,1,1,0,0,1,1,0,0,1,1,0,1,1,1,0,1,1,1
,1,0,0,1,1,0,1,1,1,1,1,1,1,1,1,0,0,0,1};
int
msg[64]={0,0,0,0,0,0,0,1,0,0,1,0,0,0,1,1,0,1,0,0,0,1,0,1,0,1,1,0,0,1,1,1,1,0,0,0,1,0,0,1,1,0,1,0,
1,0,1,1,1,1,0,0,1,1,0,1,1,1,1,0,1,1,1,1};
int ext[48]={ 32, 1, 2, 3, 4, 5,4, 5, 6, 7, 8, 9,8,
9,10,11,12,13,12,13,14,15,16,17,16,17,18,19,20,21,20,21,22,23,24,25,24,25,26,27,28,29,28,2
9,30,31,32, 1},exto[48];

LAKI REDDY BALI REDDY COLLEGE OF ENGINEERING


Page no:

int pf[32]={16,7,20,21,29,12,28,17,1,15,23,26, 5,18,31,10,2, 8,24,14,32,27, 3, 9,19,13,30,


6,22,11, 4,25},pfr[32];
int s1[4][16]={14,4,13,1,2,15,11,8,3,10,6,12,5,9,0,7,
0,15,7,4,14,2,13,1,10,6,12,11,9,5,3,8,
4,1,14,8,13,6,2,11,15,12,9,7,3,10,5,0,
15,12,8,2,4,9,1,7,5,11,3,14,10,0,6,13} ,
s2[4][16]={15,1,8,14,6,11,3,4,9,7,2,13,12,0,5,10,
3,13,4,7,15,2,8,14,12,0,1,10,6,9,11,5,
0,14,7,11,10,4,13,1,5,8,12,6,9,3,2,15,
13,8,10,1,3,15,4,2,11,6,7,12,0,5,14,9},
s3[4][16]={10,0,9,14,6,3,15,5,1,13,12,7,11,4,2,8,
13,7,0,9,3,4,6,10,2,8,5,14,12,11,15,1,
13,6,4,9,8,15,3,0,11,1,2,12,5,10,14,7,
1,10,13,0,6,9,8,7,4,15,14,3,11,5,2,12},
s4[4][16]={7,13,14,3,0,6,9,10,1,2,8,5,11,12,4,15,
13,8,11,5,6,15,0,3,4,7,2,12,1,10,14,9 ,
10,6,9,0,12,11,7,13,15,1,3,14,5,2,8,4,
3,15,0,6,10,1,13,8,9,4,5,11,12,7,2,14},
s5[4][16]={2,12,4,1,7,10,11,6,8,5,3,15,13,0,14,9,
14,11,2,12,4,7,13,1,5,0,15,10,3,9,8,6,
4,2,1,11,10,13,7,8,15,9,12,5,6,3,0,14,
11,8,12,7,1,14,2,13,6,15,0,9,10,4,5,3},
s6[4][16]={12,1,10,15,9,2,6,8,0,13,3,4,14,7,5,11,
10,15,4,2,7,12,9,5,6,1,13,14,0,11,3,8,
9,14,15,5,2,8,12,3,7,0,4,10,1,13,11,6,
4,3,2,12,9,5,15,10,11,14,1,7,6,0,8,13},
s7[4][16]={4,11,2,14,15,0,8,13,3,12,9,7,5,10,6,1,
13,0,11,7,4,9,1,10,14,3,5,12,2,15,8,6,
1,4,11,13,12,3,7,14,10,15,6,8,0,5,9,2,
6,11,13,8,1,4,10,7,9,5,0,15,14,2,3,12},

LAKI REDDY BALI REDDY COLLEGE OF ENGINEERING


Page no:

s8[4][16]={13,2,8,4,6,15,11,1,10,9,3,14,5,0,12,7,
1,15,13,8,10,3,7,4,12,5,6,11,0,14,9,2,
7,11,4,1,9,12,14,2,0,6,10,13,15,3,5,8,
2,1,14,7,4,10,8,13,15,12,9,0,3,5,6,11},sboxo[6],sbop[32];
cls[]={1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1};
int r=0;
int temp1[3],temp2[3];
int ip[64]={58,50,42,34,26,18,10,2,60,52,44,36,28,20,12, 4,62,54,46,38,30,22,14,
6,64,56,48,40,32,24,16, 8,57,49,41,33,25,17, 9, 1,59,51,43,35,27,19,11,
3,61,53,45,37,29,21,13, 5,63,55,47,39,31,23,15, 7},ipo1[32],ipo2[32],ipo[64];
int iip[64]={40, 8,48,16,56,24,64,32,39, 7,47,15,55,23,63,31,38, 6,46,14,54,22,62,30,37,
5,45,13,53,21,61,29,36, 4,44,12,52,20,60,28,35, 3,43,11,51,19,59,27,34,
2,42,10,50,18,58,26,33, 1,41, 9,49,17,57,25},iipo[64];
int pc1[56]={57, 49, 41, 33, 25, 17, 9,1 , 58 ,50 ,42 ,34 ,26 ,18,10, 2 ,59 ,51 ,43 ,35 ,27,19,
11 , 3 ,60 ,52 ,44 ,36,63, 55, 47 ,39, 31 ,23, 15,7 , 62 ,54 ,46, 38, 30, 22,14, 6 ,61 ,53 ,45 ,37 ,
29,21, 13 ,5 ,28 ,20 ,12 ,4 };
int pc2[48]={14,17,11,24,1 , 5, 3,28,15, 6,21,10,23,19,12, 4,26, 8,16, 7,27,20,13,
2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32};
int pc1o1[28],pc1o2[28];
int pc1o[56],pc2o[48];
int xorr[48],sboxr[32],xorr1[32];
void main()
{
void key1();
int i,j,k,n,l,r1,c,d,j2,j1;
clrscr();
/*INITIAL PERMITATION VALUES*/
j=0;
for(i=0;i<64;i++)
{ if(i<32)
{
ipo1[i]=msg[ip[i]-1];
/*printf("%d",ipo1[i]);*/

LAKI REDDY BALI REDDY COLLEGE OF ENGINEERING


Page no:

}
else
{
ipo2[j++]=msg[ip[i]-1];
}
}
for(r=0;r<16;r++)
{

/*EXTENDED PERMITATION TABLES


for(i=0;i<48;i++)
{ exto[i]=ipo2[ext[i]-1];
}
key1();
/*XOR OPERATION*/
for(i=0;i<48;i++)
{
if(exto[i]==pc2o[i])
xorr[i]=0;
else
xorr[i]=1;
}
/*printf("\n xor\n");
for(i=0;i<48;i++)
printf("%d",xorr[i]);*/
l=0;
i=0;
k=0;
for(i=0;i<8;i++)
{

LAKI REDDY BALI REDDY COLLEGE OF ENGINEERING


Page no:

j2=0;
for(j=i*6;j<((i*6)+6);j++)
sboxo[j2++]=xorr[(j)];
r1=sboxo[0]*2+sboxo[5]*1;
c=sboxo[1]*8+sboxo[2]*4+sboxo[3]*2+sboxo[4]*1;
if(i==0)
d=s1[r1][c];
else if(i==1)
d=s2[r1][c];
else if(i==2)
d=s3[r1][c];
else if(i==3)
d=s4[r1][c];
else if(i==4)
d=s5[r1][c];
else if(i==5)
d=s6[r1][c];
else if(i==6)
d=s7[r1][c];
else if(i==7)
d=s8[r1][c];
/*BINARY CONVERTION*/
for(l=0;d>0;l++)
{
n=d%2;
d=d/2;
sboxo[l]=n;
}
if(l<4)
for(;l<4;l++)

LAKI REDDY BALI REDDY COLLEGE OF ENGINEERING


Page no:

sboxo[l]=0;
for(j2=3;j2>=0;j2--,k++)
{
sboxr[k]=sboxo[j2];
}
}

for(i=0;i<32;i++)
{
pfr[i]=sboxr[pf[i]-1];
}
printf("\n");
for(i=0;i<32;i++)
{
if(pfr[i]==ipo1[i])
xorr1[i]=0;
else
xorr1[i]=1;
}
for(i=0;i<32;i++)
{
ipo1[i]=ipo2[i];
ipo2[i]=xorr1[i];
}
j=0;

scanf("%d",&i);
}
printf("\n final output\n");
j=0;

LAKI REDDY BALI REDDY COLLEGE OF ENGINEERING


Page no:

for(i=0;i<64;i++)
{
if(i<32)
ipo[i]=ipo2[i];
else
ipo[i]=ipo1[j++];
}
printf("\n");
for(i=0;i<64;i++)
{
iipo[i]=ipo[iip[i]-1];
printf("%d",iipo[i]);
}
}
void key1()
{
int i=0,j=0,k=0,l=0;

if(r==0)
{
for(i=0;i<56;i++)
{
pc1o[i]=key[pc1[i]-1];
if(i<28)
{
pc1o1[i]=key[pc1[i]-1];
}
else
{

LAKI REDDY BALI REDDY COLLEGE OF ENGINEERING


Page no:

pc1o2[j]=key[pc1[i]-1];
j++;
}}}
for(i=0;i<cls[r];i++)
temp1[i]=pc1o1[i];
for(i=0;i<28-cls[r];i++)
pc1o1[i]=pc1o1[i+cls[r]];
for(j=0;j<cls[r];j++,i++)
pc1o1[i]=temp1[j];
for(i=0;i<cls[r];i++)
temp2[i]=pc1o2[i];
for(i=0;i<28-cls[r];i++)
pc1o2[i]=pc1o2[i+cls[r]];
for(j=0;j<cls[r];j++,i++)
pc1o2[i]=temp2[j];
j=0;
for(i=0;i<56;i++)
{
if(i<28)
pc1o[i]=pc1o1[i];
else
pc1o[i]=pc1o2[j++];
}
printf("\n key : %d\n",r+1);
for(i=0;i<48;i++)
{
pc2o[i]=pc1o[pc2[i]-1];
printf("%d",pc2o[i]);
}}

LAKI REDDY BALI REDDY COLLEGE OF ENGINEERING


Page no:

Output:

Key1:0001101100000010111011111111100111000001110010

Key2:011110011010111011011001110110111100100100111100101

Key3:010101011111110010001010010000101100111110011001

Key4:011100101010110111010110110110110011010100011101

Key5:011111001110110000000111101011010100111010100

Key6:011000111010010100111110010100000111101100101111

Key7:111011001000010010110111111110110000110001011110

Key8:11110111100010100011101011000001001111011111111011

Key9:111000001101101111101011110110111001111000000

Key10:1011000111110011010001111011110111010010001100100111

Key11:001000001010111111101001111011110110100111000010

Key12:01110101011100011111010110010100011001111110100

Key13:1001011111000101111010001111110101011101001000001

Key14:0101111101000001110110111111100101110011100111010

Key15:101111111001000110001101001111010011111100001010

Key16:110010110011110110001011000011100001011111110101

Cipher text after 16 rounds:

1000010111101000000100110101010000001111000010101011010000000101

LAKI REDDY BALI REDDY COLLEGE OF ENGINEERING


Page no:

AIM: Using GNU PGP sign the created document and transmit over network, verify the
signature and decrypted the received data .
Procedure:

 Initially we have to create key.

 For creating key, we use .GPA software open GPA, go to “Keys” and selected “new
key”.

LAKI REDDY BALI REDDY COLLEGE OF ENGINEERING


Page no:

 Now we have to enter our name and click Forward

 Now it will ask for email id enter it and click forward.

LAKI REDDY BALI REDDY COLLEGE OF ENGINEERING


Page no:

 And then give the secured key details

 After giving the details

LAKI REDDY BALI REDDY COLLEGE OF ENGINEERING


Page no:

 Key contains both public part and private part. Public key is mailed and private key is
pass phrase.

 Then this key is send to another user.

 The user whom we want to communicate also sends his this public key.

LAKI REDDY BALI REDDY COLLEGE OF ENGINEERING


Page no:

LAKI REDDY BALI REDDY COLLEGE OF ENGINEERING


Page no:

 Both parties download the keys send by each other.

 Now if party ‘n’ first generates his message in text format, now he signs the message
and then encrypt the message with party b’ has downloaded through interned.

 Then the encrypted message in text. asc gpg format is sent to part B through inter w.

 Now, party ‘b’ receives the file through interned and imports the file into the GUN
software by click is open file, select required path click import.

 Now part ‘b’ decrypts the message by using his private key then he will get original
file

LAKI REDDY BALI REDDY COLLEGE OF ENGINEERING


Page no:

 You can verify the signature is valid or not.

Before encryption:-
Hai
How are you
After Encryption

LAKI REDDY BALI REDDY COLLEGE OF ENGINEERING


Page no:

…..BEGIN PGP SIGNED MESSAGE


HASS: SHAZ
Hai
How are you
….BEGIN PGP SIGNATURE….
Version gnopavi47 (mingw32)
IDSDBGE+F+CUZEMILCC Y UN8 RAMWAA
LCCTWUH U91 UAEMNZ DHEE IS 707 NES
M 8M G C F R J H W
Y I B 6 U F P UP 2 U C M N K N + 2 E 9 R Y-………J 2 U
……ENS PGP SIGNATURE……

 While we generate two keys we need to encrypt file & it will be sat to second keys
owner

 New, the receiver will den to encrypted msg and perform decryption to original file.

 Like this we can provide authentication, confidentiality to the data that transfers
through the network.

AIM: Configure the ports using nmap (network mapper)


Procedure:-

LAKI REDDY BALI REDDY COLLEGE OF ENGINEERING


Page no:

This N map is used to configure the ports in the network.

 Click on ‘NAMAPZEMAP GUI’ icon.

 Then Zen map window will open.

 Then enter the IP address of the host which you want to scan.

 And then click scan.

 Then the system scans the network for the host and display the details like.
What ports are in use, what is state of the ports, what service is going on and version.

 And the MAC address

Device type
OS details and so on.

 There are different buttons like.

LAKI REDDY BALI REDDY COLLEGE OF ENGINEERING


Page no:

PORTS/HOSTS:
This option displays only the ports information.

TOPLOGY:-
It display the arrangements of hosts in the networks

 In view fisheye if the bubbles color in green then the corresponding hosts is said to be
secure.

 If the bubbles are in yellow color indicates that the host is partially secure.

 The size of the bubble depends on the no of the ports open in that host

LAKI REDDY BALI REDDY COLLEGE OF ENGINEERING


Page no:

Scans:-
In this it display what are the command are use and what is their status.

LAKI REDDY BALI REDDY COLLEGE OF ENGINEERING


Page no:

Host details:-
It shows the details about the particular host like.

AIM: Client Server web browser Communication using open SSL

Procedure

 Generate a certificate signing request (CSR)

In order to get SSL certificate and key

LAKI REDDY BALI REDDY COLLEGE OF ENGINEERING


Page no:

Reason

This is for use by NTTP server you must create a certificate signing request

-new: it generates a new CSR

-new key rsa:1024 : generates a new private key of type rsa of length 1024 bytes

-keyout hostkey.pem : write out the newly generated private key to file host key.pem

You will want to save this file since you needed it while getting SSL certificate

-nodes: it is an optional parameter not to encrypt the private key this is useful when your server starts
automatically

-outhostcsr.pem : write out CSR to the file hostcsr.pem this is useful when creating a self signed
certificate

 Creating a self signed certificate from CSR

LAKI REDDY BALI REDDY COLLEGE OF ENGINEERING


Page no:

A self signed certificate doesn’t give the security provided by a certificate a commercial LA but it will
allow to provide a secure HTTP connection to your website

-x.509 : it out puts a self signed certificate rather than a CSL

-days 365 : make the self signed certificate valid for one year

-in hostcsr.pem : read private key from host key.pem

-out hostcert.pem : write out the self signed certificate to the file hostcert.pem

Creating a common certificate from a self signed certificate

this is only exchanged between client and server during communication

Run a test server

Open SSL has a command that implements a generic SSL or TSL server which listens for
connection on a given port. This is useful if you have a client you want to test with SSl

To run the test server you need a host certificate and corresponding private key

When you run the test server you must specify a port to listen for connection

Note: disable firewall while doing this as the port will be in closed state when firewall is enable.

LAKI REDDY BALI REDDY COLLEGE OF ENGINEERING


Page no:

Run a test client:

If you have a server which accepts SSL connection, open SSL has a command that implements
generic SSL or TCL client which connects to a remote host (server). When you run the client you will
see the response from the server ,typically the results of SSL handshake .it is useful diagnostic utility
when you do want to use a full featured client to test the SSL connection.

AIM: Under standing buffer overflow

Buffer:-

A ‘buffer’ is loosely to refer to any area of memory where more than one piece of data
is stored

What is buffer overflow:-

When extra character string to fill buffer space after it is full. That type of situation is
called buffer overflow

LAKI REDDY BALI REDDY COLLEGE OF ENGINEERING


Page no:

Why It happens:-

Careless programming

Lack of awareness of the magnitude of effects of making the buffer overflow


mistakes

Poor choice of language and tools

Failure of consumer appreciation of the cost of this preventable mistake

Why it is security problem:-

An integer where ‘o’ means that you can’t access a particular file but an ‘I’ means you
can

In this case, a hacker would overwrite the ‘o’ with a ‘I’ in order to access the file

Characters like root (a highly privileged user)

The computer OS programmer should check the size of the buffer first before trying to put all
data into it.

Popular languages like c/c++ don’t automatically check the bounds of the

Buffer, programmers are responsible for those things.

A computer buffer overflow:-

A computer allocates a buffer of memory to store ten integers

An attacker gives the computer 11 integer as input

Result: What ever was in the memory location rights after the buffer is over written with the
11th integer.

PROGRAM:

#include<stdio.h>
void main( )
{
sub1( );
}

LAKI REDDY BALI REDDY COLLEGE OF ENGINEERING


Page no:

sub1( )
{
sub2( );
}
sub2( )
{
}
sub2( )

sub1( )

main( )

Attacks:

Denial of service:-

Sometime if a program is needed by multiple users and an attacker crashes it on one


else can accept.

Types of buffer overflow Attacks :

Stack smashing or heap-based attacks the attacker can hijack execution of the
program, and if the program was running with elevated privileges, the attack now has those
privileges.

This is the way many worms spared by tracking a network services into running the a
program the attacker wrote

Data corruption:-

An attacker can change their privilege or other security- related data by overwriting it
in memory.

Program crash:-

LAKI REDDY BALI REDDY COLLEGE OF ENGINEERING


Page no:

A program crash can lead to denial-of-service because the service that program was
providing will not be there until the program is restarted

When can cause buffer overflow?

• Careless use of buffer without bounds checking.


• Formatting and logical errors.
• Unsafe library function calls.
• Off-by-one errors.
• Old code used for new purpose (like UNICODE INTERNATIONAL
CHARACTERS).
• All sorts of other for fetched but deadly-serious things you should think about
Buffer overflow demos:-

It example the how the program executes and how the step by step buffer overflow is
explained.

The following example explains about stack overflow written in ‘c’ language.

Spock:-

Demonstrate what is commonly called variable attacks buffer overflow, where the
target is data.

Smashes: demos treats a stack attack “none commonly referred to as “stack smashiy”

Stack guard: - this demo shows how the stack guard compiler can help protect “stack
attacks”.

Bo demo:-

This is a mock attack on a Linux system demonstrate how an attack can get the root
shell.

It s u demo:-

Show the output of it’s, a static analyzer on two different ‘c’, program.

Jumps: - shows how stacks are used to keep track of subroutine calls.

AIM: Configure S/MIMIE to transmit message securely.


S/MIME: stands for Secure/ Multipurpose Internet Mail Extensions

LAKI REDDY BALI REDDY COLLEGE OF ENGINEERING


Page no:

S/MIME is similarly to PGP functionally digital signature, confidentiality and


integrity services are provided by both algorithms.

These two offers the ability to sign and / or encrypt the given message.

To get the SSL certificate you need to configure your outlook according to your
email.

• In the Microsoft office click on Micro soft outlook


• Click ok on Tools -> Email accounts.
• Click on “View or change existing E-mail accounts “.
• Click on Add a new E-mail account.
• Select any one of the two
• And click next
• Then select POP3 server type.

• Fill your details in the E-mail Accounts window.

LAKI REDDY BALI REDDY COLLEGE OF ENGINEERING


Page no:

After filling click on More Settings.

In ADVANCED

Incoming server (pop3) : 995

• Select -> this server require an encrypted


• Out going server [SMTP] : 465

In out going server

 Select -> use same setting as my incoming mail server .

 And then click next.

 And finish.

LAKI REDDY BALI REDDY COLLEGE OF ENGINEERING


Page no:

• Now download the certificate and install it.

• Now in outlook click on new mail.


• In that click on options button.
• In message options window click on security setting.

LAKI REDDY BALI REDDY COLLEGE OF ENGINEERING


Page no:

• In the security properties click on change settings .

• In the change settings window.


• Click on close in signing certificate.

• Select the certificate ok.

LAKI REDDY BALI REDDY COLLEGE OF ENGINEERING


Page no:

• And then click ok


• Close.
• Type the content and click on send.
• Then the mail is transferred with certificate.
Like that we can provide authentication and confidentiality to the data.

AIM : configure the OS using IPtables.

Ip table is a program that comes with Linux distribution that allows administrators to
configure the OS.

so that it allows applications and clients through network and stop unwanted applications
and clients communicating from the net work or specified system.

Generally Ip Linux and the corresponding configuration data available lets/sys condign/ip
table

Ip table acts as afire walls for the Linux operating system

To view the existing rule of an operating system then


# ip table -L

There are three different places during the process of sending and receiving the packets
that these rules can be applied these three different places are called chains

INPUT

OUTPUT

FORWARD

LAKI REDDY BALI REDDY COLLEGE OF ENGINEERING


Page no:

INPUT: this chain applies rules to packets being received from the network.

OUTPUT: this chain applies to packets being sent from your computer

FORWARD: this chain applies rules to packets that your machine is forwarding to other
on the network.

EFFECTS: Rules can also have 3 different effects they are

ACCEPT: This option accepts a allow a packet an allows it to pass either in or out.

DENY: this option doesn`t allow a packet to pass but sends an error message back to its
sender.

DROP: this option completely ignore the packets with out sending any error message to
its sender each chain also has a default ploy i.e. is ACCEPT.

NOTE: if you create a set of rules in ip tables during one session and the reboot your
computer all the rules that you are applies will be lost.

SYNTAX FOR CREATING A RULE:

# ip table –A change name -S source ip address –J <effect>

To remove the rules from ip tables

# ip table –D RULENUM1

EXAMPLE:

1). Block only telnet packets coming to your computer.

#ip table –A INPUT -S 200.200.200.1 –j DROP -P tcp –destination –port telnet.

2). Block all in coming telnet connections to your computer.

#ip table –A INPUT –J DROP –P tcp –destination –port telnet.

3). Block any incoming tcp packet on out ether net connection.

#ip table –A INPUT –J DROP –P tcp -I eth`.

4). suppose a new incoming tcp packet bound for port 80 arrives,ip table will see the
accept rules and admit the packet before all encompassing deny rules take effete.

#input table –A INPUT –J ACCEPT –P tcp –destination –port 80

#input tables -INPUT –J DENY –P tcp –destination –port 80.

Ip tables can be used to block rowdy use from accessing your net work.

LAKI REDDY BALI REDDY COLLEGE OF ENGINEERING


Page no:

5).Block the rowdy user based on their Mac address.

To Block Mc address

--Mac –source <Mac address>

#ip table –A INPUT –Mac –source 01:2D:5F:35 –j DROP

Iptables Rules:

1) Allow local host access to everything

Iptables -A INPUT -s 127.0.0.1 -j ACCEPT


iptables -A OUTPUT -s 127.0.0.1 -j ACCEPT

2) Allow all related and established tcp connections to my machine.

iptables -A INPUT -p tcp -m state


--state ESTABLISHED,RELATED
-j ACCEPT

3) Allow all outgoing connections from my machine.

iptables -A OUTPUT -j ACCEPT

4) Deny all new tcp connections from remote machines.

iptables -A INPUT -p tcp -m state --state NEW -j DROP

5) Block the apache port on my machine.

iptables -A INPUT -p tcp -s 0/0 --dport 80 -j DROP

6) Block ssh to my machine.

LAKI REDDY BALI REDDY COLLEGE OF ENGINEERING


Page no:

iptables -A INPUT -p tcp -s 0/0 --dport 22 -j DROP

7) Finally deny everything else.

iptables -A INPUT -j DROP


iptables -A FORWARD -j DROP

Note: - Now execute the script to load the rules into kernel space. That is it. Now we
have got a robust firewall in place. You can check the results by re-running the nmap
command .

LAKI REDDY BALI REDDY COLLEGE OF ENGINEERING

You might also like