Lab Guide line for instalation VM and ubuntu
Lab Guide line for instalation VM and ubuntu
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)
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)
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 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
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
a: all ugo
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.
openssl enc -des3 -d -in file2 -out file3 -K key -iv vector
(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
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.