Preparation for Cisco Global Cyber Ops Scholarship step 2

Getting email titled: Step 2 of 2: Applying to the Cisco Global Cyber Ops Scholarship – The Prequalification Exam

Now it’s time to take this exam, but the thing is what’s to prepare? what topic’s gonna cover? When I ask someone who experienced it, they just answer ‘it’s so basic’. How basic it is???

Now, I would like to share my experience about the topics this exam covered. Yes, it’s basic, but we need to know what kind of things to prepare for it. I cannot tell you guys specific questions because I don’t remember those :)

As the program stated, you need some prerequisites like need to have some knowledge of CCNA1 & CCNA2 or CCENT or CCNA or other related knowledge.

So let get into What topics:

  • Some basic knowledge of how to use computer and internet, it’s like a fun, but it’s true
  • Some basic knowledge of using Windows OS regarding to some basic cmd command lines like cmd, gpedit, dir, ipconfig, arp…
  • Some basic knowledge of Linux file system and commands like /bin, /home, ifconfig, top, ls, grep…
  • Some basic knowledge of the Internet and protocols like TCP, UDP [layer 4], DNS, DHCP, HTTP, HTTPS, SSH [layer 7] or ARP [layer] Here I want to stress as well about a-must knowledge of OSI model
  • Some basic knowledge of security and attacks like VPN, SSL, Antivirus, Firewall, Brute force, DoS, malware…
  • Some basic knowledge of Computer networking, a plus if related to Cisco devices, like routing table, VLAN, STP, NAT…
  • Some basic knowledge of IPv4 and IPv4 addressing like class, netmask, default gateway, private, public, subnetting…

As a conclusion, you must have a fundamental knowledge of computer networking in general, system management on Windows and Linux and security knowledge as it is a so-called “Cisco Global Cyber Ops Scholarship

Understanding TCP window size and ACK

Answer from: https://networkengineering.stackexchange.com/questions/12485/window-size-and-ack-number

I teach TCP, and I often run into people who were mis-taught that the ACK is only sent when the Window Size is reached. This is not true. (To be really transparent, I too taught this incorrectly before I knew better as well, so I completely understand the mistake).

NOTE, I’ll be using Receiver/Sender to describe it, but keep in mind TCP is bidirectional, and both parties maintain a Window Size.

The Window Size (that the Receiver sets) is a hard limit on how many bytes the Sender can send without being forced to stop to wait for an acknowledgement.

The Window Size does not determine how often the Receiver should be sending ACKnowledgements. Originally, the TCP protocol called for an acknowledgement to be sent after each segment was received. Later, TCP was optimized to allow the Receiver to skip ACKs and send an ACKnowledgment every other packet (or more).

The goal of TCP then, is for the Sender to continually be sending packets, without delay or interruption, because it continually receives ACKnowledgements, such that the count of “bytes in transit” is always less than the Window Size. If at any time, the Sender has sent a count of bytes equal to the window size without receiving an ACK, it is forced to pause sending and wait.

The important thing to consider in all this is the Round Trip Time. Often, when you are studying TCP in a wireshark, you are only seeing the perspective of one party in the TCP conversation, which makes it hard to infer, or truly “see”, the effect of the RTT. To illustrate the effect of RTT, take a look at these two captures. They are both capturing the same conversation, a 2MB file download over HTTP, but one is from the perspective of the Client, and the other is from the perspective of the Server.

Note: its easier to analyse TCP if you turn off the Wireshark feature “Allow subdissector to reassemble TCP streams

Notice from the Server side capture (who is the sender of the file), the Server sends 8 full sized packets in a row (packet#’s 6-13) before receiving the first ACK in packet# 14. If you drill down in that ACK, notice the Client’s acknowledgement is for the segment sent in Packet#7. And the ACK the Client sent in packet 20 is from the segment sent in Packet#9.

See how the Client is indeed acknowledging every other packet. But it almost seems like it is acknowledging them “late”. But in fact, this is just the effect of Round Trip Time. The Sender is able to send 7~ segments in the time it takes for the first segment to reach client and for the client’s ACK to reach the server. If you take a look at the capture from the Client’s perspective, it looks very ‘clean’, which is to say that every second packet it receives, it sends out an ACK.

Notice also what happens at Packet# 23. The Server has sent all it can, because the “bytes in transit” reaches the Window Size, so it is forced to stop sending. Until the next ACK arrives. Since the ACK’s are coming in every other segment received. Each ACK allows the sender to again send two new segments, before the Window is full again, and the Server is again forced to pause. This happens up until Packet# 51, when the Client (Recever) increases the Window Size significantly, allowing the Server (sender) to start transmitting data uninhibited again… at least until Packet #175, when the new Window fills up.

Create Multiple Users in Linux using Python script

The last post for years, I showed how to create multiple in Linux using a shell script. But the limitation is that every user needs to use the same given password. This time, I’ll show you how to create multiple users in Linux using Python script. I know that most of Linux (maybe all, if I’m not wrong) come with Python (.py) as default as Shell script (.sh), so you don’t need to worry if you need to install additional Python package.

E.g. Create three users (john, richhat, jackie) with its own password. Here is how, you need to run a script called multiUser.py followed by user_pass.txt that contains user and password:

$ python multiUser.py user_pass.txt

You can name the file anything you wish and below is the content of each file:

multiUser.py

import sys
import os
import string
import random
import crypt

# function for create one user with supplied password
def createUser(name,passwd):
   two = ''.join(random.choice(string.ascii_letters) for x in range(2))
   encPass = crypt.crypt(passwd, two)
   os.system("useradd -p "+encPass+ " -m "+name)

# main program
if __name__ == '__main__':
   # prepare variables like file name and lists of user and password
   fname = sys.argv[1]
   list_users = []
   list_passwds = []
   # read username and password from file and save to the created lists
   with open(fname,'r') as file:
      for line in file:
         list_temp = line.rstrip('\n').split(" ")
         list_users.append(list_temp[0])
         list_passwds.append(list_temp[1])
   # start creating users
   for i,user in enumerate(list_users):
      createUser(list_users[i],list_passwds[i])

user_pass.txt (separate username and password by space)

john 1234
richhat secret123
jackie 1234567

Type Khmer Unicode on Microsoft Office Word on MacOS [Macbook]

I have spent a lot of time searching and trying and finally, I got an easy tip for you. It works for me and one friend of mine, so I hope it works for you too.

This is a quick video tutorial in Khmer (for you guy not Khmer, I have written a script where you can pause or just follow along with the movement).

[Fixed] Khmer font in Word on Mac

1. Install Khmer Unicode NiDA keyboard

Download and copy Khmer.keylayout to /Users/YourName/Library/Keyboard Layouts You may follow this guide

If you’re familiar with terminal, issue the following command to copy:

cp Where-You-Extra-To/Khmer.keylayout ~/Library/Keyboard\ Layouts/

Then, open “System Preferences“, search for “keyboard layouts“, click plus sign “+“, scroll down and select “Others“, you will see “NiDA Khmer“, select it and click “Add” and you’ve done!

2. Install more Khmer fonts

Download fonts here and extra it, then open “Font Bookwhere you can find by click on “Lauchpad” and search for “Font Book”, right click and choose “Add Fonts …” , browse to folder where you extracted your fonts to, select all, and click “Open” 

 

Note that some fonts will not display correctly, some of them I found work well are basically “Khmer OS …” font family. I would recommend you to select font before you start your typing :-)

That’s it!!! Have fun!!! :)

Screen Shot 2018-01-03 at 3.11.51 PM

How to install and access to your Raspberry Pi (Rasbian Lite version — No GUI)

Teamviewer on rasbian lite (no GUI)

  1. make sure you have TeamViewer account
  2. Download package: $ wget https://download.teamviewer.com/download/linux/teamviewer-host_armhf.tar.xz
  3. Extract package: $ tar -xvf teamviewer-host_armhf.tar.xz
  4. Install via dpkg tool: $ dpkg -i teamviewer-host_armhf.deb
  5. Run apt to fix: $ apt install -f (then you will ask to install a lot of dependencies, by issue ‘Y’)
  6. Run this command: $ teamviewer setup -> accept agreement -> login your credential (email) -> go to your
  7. email and add trusted devices -> you should get your TeamViewer ID for your raspberry box
  8. Create password for your device corresponding to your TeamViewer ID you get from the previous step: $ teamviewer –passwd YOUR_PASSWORD

===> Now you should be able to log in to your raspberry pi via teamviewer shown as SSH console.

 

Screen Shot 2017-12-07 at 4.40.20 PM

Sample image: Raspberry Pi from TeamViewer Apps with ‘htop’ running