0% found this document useful (0 votes)
1 views

Lab Guide line for instalation VM and ubuntu

The document provides a comprehensive guide for installing Virtual Machine (VM) and Ubuntu, including step-by-step instructions and common commands for Ubuntu. It also covers encryption and decryption methods using OpenSSL, detailing symmetric and asymmetric key generation and management. Additionally, it explains file permissions and the creation of cryptographic keys, emphasizing the importance of security in information assurance.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views

Lab Guide line for instalation VM and ubuntu

The document provides a comprehensive guide for installing Virtual Machine (VM) and Ubuntu, including step-by-step instructions and common commands for Ubuntu. It also covers encryption and decryption methods using OpenSSL, detailing symmetric and asymmetric key generation and management. Additionally, it explains file permissions and the creation of cryptographic keys, emphasizing the importance of security in information assurance.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

Information Assurance and Security

Lab Guide line for VM and Ubuntu Installation


Lab session out line
 How to install VM and Ubuntu in window(other type of operating system)

 Introducing the IDE of Ubuntu if you are not familiar with.

 Select encryption and decryption Algorithm's

 Demonstrate encryption and decryption using symmetric and asymmetric key

 Create certificate and digest message by selecting one organization


How to install VM and Ubuntu step by step
Step1:down load virtual box6.0 and above from their official website http://virtualbox.org by
selection for you operating system type and install on window on your machine.

Step2: download any type of Ubuntu version from Ubuntu official website .

Step3: open the virtual box and click on New button and write the name of Ubuntu
you want to install on the name text box. And click Next if you want you can add and
minimizing the memory size then click Next.
Cont…
cont...
Then after by default it is selected the radio button of create virtual hard disk now(if not
selected select it)

Then click on create ->


cont…

But both are good option however on behalf of me I recommended the selected one
cont…
And then, click on create button

Step4:

Go to setting ->Storage ->Empty-> go to optical drive ->choose disk file and goto file
location of the Ubuntu ->ok button
cont…
Cont…
 If after you select this may be appear problem of setting then go
to system information of your machine and fix by enabling
Hyper –v virtualization enable( make it YES)

 Click on start button-> select Ubuntu operating system file( you


want to import to VM) .
Cont…
Cont…
cont…
Cont…

 After that write your name and password respectively and wait till all
features are downloaded
To maximize the window size of the Ubuntu
 Click on Device-> insert gust addition cd image->run> power off , finally you will
see the result of you screen of the working environment .
Most frequently command in Ubuntu or Linux
 ls command used to list the file in the directory.
 Cd is used for change directory.
 ls -a is used to list all file name in the directory
 ls –c is used to list all file in order manner.
 mkdir file name is used to create a file in command
 Man is used to aske you to enter the manual you want to enter(mna
manul name).
 Clear: to clear the screen
 Cat filename: to display the content of the file name
 hitory: is used to display all the command that are run on the terminal
 chmod: change permision
N.B: All command must be in small letter
Openssl
 SSL Protocol: The SSL protocol (Secure Socket Layer) was developed by Netscape to allow
client server applications to communicate safely.

 TLS (Transport Layer Security) is a evolution of SSL proposed by IETF. SSL is a protocol
placed in session layer of OSI.

 A SSL session is done in two steps:

 A handshake phase where client and server authenticate each other(with X500 certificate) and
agree on a ciphering scheme and the corresponding key.

 The communication itself where data exchanged are compressed, encrypted and signed.
Cont…
 OpenSSL is a toolbox for cryptographic material implementing SSL and TLS. It gives a
command line (openssl) allowing

 Creation of keys

 Creation of X500 certificate

 Digest cation(MD5, SHA,...)

 Ciphering and Deciphering (DES,...)

 Signature
Symmetric encryption with openSSL
 To encrypt a file with openssl using a DES encryption
 openssl enc -des3 -in fileName -out file2
 Note: fileName is the file that contains the plaintext. File2 is the result file that
contains the ciphertext
 By default, you are asked to type a password to protect the encryption. This
password is a generator for the symmetric key. To avoid entering the password ,
you can use one of the following options:
 openssl enc -des3 -pass pass:comp -in fileName -out file2
 openssl enc -des3 -pass file:comp -in fileName -out file2
 - pass pass:comp (in this case comp is your password)
 - pass file:comp (in this case the file comp contains your password)
Cont…
 openssl enc -des3 -pass pass:comp -in fileName -out file2
 openssl enc -des3 -pass file:comp -in fileName -out file2
To decrypt the same file:
openssl enc -des3 -d -in file2 -out fileDecrypted
Note: fileName and fileDecrypted should contain the same content
For encryption mechanism:
Syntax:
Openssl enc _type-of _encryption –inflename –out filename
 Openssl enc –des3 –in lab1 –out resultenclab1
For Decryption Mechanisms
Permission
 Any file has three users at a time namely owner, group and other
users
o Every users have three type of permission:
 r: Read has the value by default 4 in octal way
 w:write has the value by default 2 “ “ “
 x:excutehas the value by default 1 “ “ “
Syntax: chmod option file name
chmod file name
righteous
Cont..
 2. symbolic:
Syntax: chmod reference operater modes file

Reference: u: owner of the file

g: users who are member of files group

o: users who are neigher u or g

a: all ugo

Operater: +: add mode to the specified file

-: remove mod from the specified file

=: exact mode to the specified class


Chmod u+x filename
Create and print keys
Create a symmetric key:
openssl enc -des3 -P

 This command asks for the password. (You can apply similar procedure as before to jump
password)It generates a key, starting from a password and a random “salt”. This salt is
there to scramble the password.

 This command prints the used salt, the generated key and an initialization vector(iv) to be
used with the key for encryption.
Cont…
openssl enc -des3 -in file1 -out file2 -K key -iv vector

The above command encrypts with DES3, the file file1 to the file file2, using the
the key key and the initialization vector vector.

To Decrypt the same file, use the command

openssl enc -des3 -d -in file2 -out file3 -K key -iv vector

(Note: file1 and file3 should have the same content)


RSA with OpenSSL
Generating key pairs
To create a pair of keys, the genrsa command is used.
openssl genrsa size

(Note: size refers the size (or length)of the key used )

To save this key in the file named keyfile.pem use the command below
openssl genrsa -out keyfile.pem 1024

The format of the file is PEM(privacy enhanced mail)


Ciphering the key file

In the file, the private key is in clear text and could be extracted. It is
necessary to encrypt it. It can be done with rsa command. In both cases the
option is -des, -des3, or -idea.

openssl rsa -in keyfile.pem -des3 -out keyEncrypted.pem

The file keyEncrypted.pem contains an encrypted version of the key,


encrypted with DES3 algorithm. Here a password is used to protect access
to the key.
Thank you!

Question and suggestion

You might also like