0%

Ovirt

oVirt is an open-source distributed virtualization solution, designed to manage your entire enterprise infrastructure. oVirt uses the trusted KVM hypervisor and is built upon several other community projects, including libvirt, Gluster, PatternFly, and Ansible.
Go to Ovirtto see how to install Ovirt.
oVirt Engine and a Host are installed together with the Engine running as a Virtual Machine on that Host.I use cockpit wizard to install Ovirt on CentOS.
Two types hosts

  • oVirt node, other name ‘thin host’, it is a minimal OS, contains the only packagesrequired for the machine to act as a host.
  • centOS or RHEL host
    I use centOS 7 as a host.
    1
    yum update -y
    Add the official oVirt repository:
    1
    yum install https://resources.ovirt.org/pub/yum-repo/ovirt-release43.rpm
    I use cockpit wizard to install Ovirt on CentOS.
    Install Cockpit and the cockpit-ovirt-dashboard plugin:
    1
    yum install cockpit cockpit-ovirt-dashboard -y
    Enable Cockpit:
    1
    systemctl enable --now cockpit.socket
    Open the firewall:
    Read more »

Git is a software and be installed on different OS, such as Linux, Mac, Windows. Github is a web server which provide a tool for people to use on a website.

on Github

Create a repository
Create a new file
Commit (same as save)
Issue (like comments)
Create an organization
Create branch
Pull request
Merge

Most of the time, you need to work on your local machine to use git. You can clone your repo from github.

On local computer
1
2
3
4
5
6
7
8
9
git clone git@github.com:vmnet8/Hello-World.git
Cloning into 'Hello-World'...
remote: Enumerating objects: 4, done.
remote: Counting objects: 100% (4/4), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 14 (delta 0), reused 0 (delta 0), pack-reused 10
Receiving objects: 100% (14/14), done.
Resolving deltas: 100% (1/1), done.
Checking connectivity... done.

make this a repo located on your local OS
compare with github repo you clone

1
2
3
4
git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
After you make some changes on your local computer, you need to save it into repo, it is not just save, it needs two steps to “save” into repo.for example, add a new line in “README”
1
2
3
4
5
6
7
8
9
10
git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)

modified: README.md

no changes added to commit (use "git add" and/or "git commit -a")
1
git add README.md

put this changed file to a stage to wait to be saved in the future.
any changes if want to be saved should be added to this stage first!

1
2
3
git commit README.md -m "add new line under bottom"
[master 37c5b60] add new line under bottom
1 file changed, 1 insertion(+)

only done this, the changed can be “saved” into repo

1
2
3
git remote -v
origin git@github.com:vmnet8/Hello-World.git (fetch)
origin git@github.com:vmnet8/Hello-World.git (push)

Then you can make the changes you made on your local computer to sync to github repo

1
2
3
4
5
6
7
8
9
git push origin master
Counting objects: 3, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 302 bytes | 0 bytes/s, done.
Total 3 (delta 1), reused 0 (delta 0)
remote: Resolving deltas: 100% (1/1), completed with 1 local object.
To git@github.com:vmnet8/Hello-World.git
efdcef9..37c5b60 master -> master

If you made changes on github first, how to get your local to sync to github repo?

Read more »

Abstract:

Install Virtualbox in computer system, in which to install Kali Linux, then try wireshark, nmap and crunch application. It shows a lot of security tools can be implemented correctly in Virtualbox.

Methods:

  1. Go to virtualbox page to download the virtual 5.2.18 version, then install it based on wizard.

  2. Search “kali OVA”, then go to official kali linux download page, select the “Kali Linux 64 bit Vbox”, click “offensive security download page” icon to select “Kali Linux 64 bit Ova” which is for Virtualbox, download it.

  3. Open Virtual box,click “file” button then select “import application”, input the “kali 2018.3 ova” into the frame, then select the fold where the “kali linux 64 bit” you have download before, then open it.

  4. Select the “OS Redhat 64 bit”, choose all other items as defaults, such as sound card, network adapter card etc, then click “import”. Waiting a couple minutes to finish installing. After installation, you can see “kali 2018.3” icon on the Virtualbox panel.

  5. Double click the “kali 2018.3”, it will start to boot, just taking defaults. Input the username “root” and password “toor” to log in Kali.

    Read more »

RAID stands for “Redundant Array of Independent Disks”.

The RAID levels

Raid 0: stripe mode,no redundancy in this level,not safe for storage.
Raid 1: mirror mode,having redundancy and good at backup.
Raid 1+0:it is the combination of RAID-1 and RAID-0.
Raid 5: at least 3 disks, can stand max 1 disk broken
Raid 6:at least 4 disks, can stand max 2 disks broken

config file

/etc/mdadm.conf
/proc/mdstat

Create

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
[root@client ~]# mdadm --create /dev/md0 --auto=yes --level=5 --raid-devices=3 --chunk=64 /dev/sdb{2,3,4}
mdadm: Defaulting to version 1.2 metadata
mdadm: array /dev/md0 started.
[root@client ~]# mkfs.xfs /dev/md0
meta-data=/dev/md0 isize=512 agcount=8, agsize=65456 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=0, sparse=0
data = bsize=4096 blocks=523648, imaxpct=25
= sunit=16 swidth=32 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=1
log =internal log bsize=4096 blocks=2560, version=2
= sectsz=512 sunit=16 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
[root@client mnt]# mkdir raid_md0
[root@client mnt]# mount /dev/md0 /mnt/raid_md0/
[root@client mnt]# df -h /dev/md0
Filesystem Size Used Avail Use% Mounted on
/dev/md0 2.0G 33M 2.0G 2% /mnt/raid_md0
Read more »

Abstract:

Using Zenmap, enumerating 2 IP address to scan, Using Wireshark to observe the TCP handshake process when enumerating 2 IP addresses with Zenmap.

Introduction:

Scan 2 IP with Zenmap and use Wireshark to observe the TCP handshake.

Methods:

  1. Go to nmap page to download zenmap application.

  2. Open Wireshark to see the Wi_Fi wiggling wave, it shows capturing the packets, then click it.

  3. Open Zenmap, input first IP address 192.168.227.187 into “target” frame, then select “quick scan” to see what will happen.

  4. go to Wireshark to stop and save it for first IP scan.

  5. go back to Zenmap to input other IP address into “target” frame, do quick scan again.

  6. In Wireshark, select the source and destination IP address 192.168.0.1 to observe the captured packets, analyze the TCP handshake process.

    Read more »

Wireshark is a network packet analyzer. It will try to capture network packets and tries to display that packet data as detailed as possible.

Abstract: Install Wireshark and use it to trace the packet I generated, find my IP address.

Methods:

  1. Go to wireshark pages, read some basic knowledge of wireshark, then download wireshark Windows Installer(64-bit), according to the instructions to install it on my windows operating system.

  2. go to desktop to open Wireshark up, double click “*Wi-Fi” link,it will show a “Capturing from my local area connection” to see the packets captured here.

  3. Open a browser and input a website, such as www.qwerty.com to generate the traffic.

    Read more »

LVM: logical volume manager

Advantage: give more flexible of space

LVM thin volume

Create thin pool first

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
[root@client ~]# lvcreate -L 1G -T thin_vg/thinpool
Using default stripesize 64.00 KiB.
Logical volume "thinpool" created.
[root@client ~]# lvdisplay thin_vg/thinpool
--- Logical volume ---
LV Name thinpool
VG Name thin_vg
LV UUID ncc3Kh-eZgD-WLQn-F4cq-pPJJ-rYjD-XsTx34
LV Write Access read/write
LV Creation host, time client.centos7.study, 2019-07-12 13:02:42 -0700
LV Pool metadata thinpool_tmeta
LV Pool data thinpool_tdata
LV Status available
# open 0
LV Size 1.00 GiB
Allocated pool data 0.00%
Allocated metadata 0.98%
Current LE 256
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 8192
Block device 253:6
Read more »

Identify the potential risk or threat on computer\iPad\Phone, decide how the impact and likely of threat, deal the threat with the mitigation, using the risk chart to record the steps.

Item 1 name: ThinkPad laptop 2017

Description: This is a laptop with a lot of important files on it.
Threat 1: Virus Attacks that can damage computer systems and data.
Mitigation: Install the anti-virus software, such as McAfee.

Item 2 name: laptop hard drive

Description: Hard drive is the most important part in laptop. With the damage hard drive, the laptop can’t even start.
Threat 2: HDD has unrecoverable failure and lost all data on laptop
Mitigation: Make extra copy on other computer or buy extra HDD for storing important files.

Read more »

Two repetition structures in python:

  • while loop
  • for loop

    Nest loop

    For loop has a nest loop function. clock is a good example.
    Nest loop can use to print some patterns.
    Some examples:
pattern 1
1
2
3
4
5
6
rows = int(input('how many rows?'))
cols = int(input('how many columns?'))
for r in range(rows):
for c in range(cols):
print('*',end='')
print()

after input rows and clos value 6, runing code, it will show

1
2
3
4
5
6
******
******
******
******
******
******
pattern 2
1
2
3
4
5
6
7
*
**
***
****
*****
******
*******

code as following:

1
2
3
4
5
base_size = 7
for r in range(base_size):
for c in range(r+1):
print('*',end='')
print()
pattern 3: up side down triangle:
Read more »

Abstract:

Using MBSA to audit computer to find 4 things need to be fixed, some missing update, some passwords are vulnerable. To fix these problems, update application and change the password policy to force users to change passwords.

Methods:

Got MBSA App 2.1 from Microsoft website and install it.

Get started to scam computer, it takes a little longer than expected to finish scan.

Finding 1:

Description: The Automatic Updates system service is not configured to be started as Automatic.

Mitigation: Since sometimes automatic updates is not always good to computer system and network, it is not necessary to update all the time. Keep this configuration not change, then regularly check the system service to determine which needs to be updated.

Finding 2:

Description: Some user accounts (4 of 6) have blank or simple passwords, or could not be analyzed.

Mitigation: change password policy and inforce the password security, let the users change their passwords.

Read more »