cover photo

COURSEWORK

Yeshwanth's CL-CY-001 course work. Lv 2

Yeshwanth SAUTHORACTIVE

CL-CY Level 1 report

9 / 12 / 2023


Task 1 - Javascript

The task had following objectives:

  • Percentage of each student
  • Class average
  • Rankings of the students

The experiment focused on acquainting with fundamental JavaScript concepts. Key skills acquired include understanding HTML, CSS, and JavaScript basics, along with defining and invoking functions in JavaScript, and utilizing objects within JavaScript.

JavaScript serves as the backbone of web applications, functioning as an object-oriented programming (OOP) language. Objects, characterized by properties like ame" and "mark " are employed in the process. Each new entry triggers the creation of a new object, subsequently stored within an array.

https://drive.google.com/file/d/1sk-9ZYO2ZjYuc0ag1Vf6J2b2do2KZz4P/view?usp=drivesdk

code link :

https://codesandbox.io/p/sandbox/holy-https-t309iw?file=%2Findex.html%3A2%2C17

Task 2 - Async JS

In this exercise, the objective was to delve into asynchronous JavaScript and apply it to a practical scenario by crafting a callback-oriented program to showcase the sequential steps of a food recipe.

Throughout this endeavor, I acquired proficiency in utilizing async functions, which are instrumental in maintaining website responsiveness while concurrently handling user-initiated tasks in the background. By defining and employing callback functions, I was able to seamlessly present the sequential instructions of the recipe, thereby reinforcing my understanding of asynchronous programming paradigms in JavaScript.

https://drive.google.com/file/d/1sF2fh3hmcT5mtcbaueGs8bbFsooPY-VK/view?usp=drivesdk

code link:

https://codesandbox.io/p/sandbox/practical-sanne-e9xgs7?file=%2Findex.js

Task 3 - Promises

In this task, the objective was to implement the recipe program utilizing promises, emphasizing the acquisition of skills in promise usage.

Promises serve as the return objects of asynchronous functions, reflecting the ongoing state of the process. They facilitate the determination of process completion and provide outcomes based on function execution. Notably, promises are integrated within the fetch() function, streamlining asynchronous operations and enhancing program efficiency.

Advantages of Using Promises

  • They are composable, unlike callbacks, therefore we can avoid callback hell.
  • You can easily execute code with Promise.all when multiple responses are returned.
  • You can wait for only one result from concurrent pending promises with the help of Promise.race.

https://drive.google.com/file/d/1sWAhMTbbhGQ_d-tjoN2iIn6A7C6LFhi_/view?usp=drivesdk

Task-4: Get familiar with the CLI on Ubuntu

The task aimed to introduce familiarity with the Command Line Interface (CLI) on Ubuntu, highlighting its efficacy for interacting with cloud service providers and servers.

During the exercise, a directory named "test" was established, and navigation was performed to access it using the 'cd' command. Subsequently, a blank text file was generated utilizing 'touch' command. The directory's contents were then enumerated using 'ls'. Following this, a bash script facilitated the creation of 2600 folders employing the 'mkdir' command. Lastly, two files were concatenated and their content displayed in the terminal using 'cat' and '>>'. Through this exercise, foundational skills in Bash basics and CLI functionalities were acquired.

https://drive.google.com/file/d/1sDyQZ3bAvvvUj1ytESQvTuEeEBe-xJBM/view?usp=drivesdk

https://drive.google.com/file/d/1sH60KjarQMB24qEqD2HgtX2Ug83XqD9T/view?usp=drivesdk

Task 5 - VI

#The aim of this task was to learn the basics of vi and create a markdown file in vi illustrating the various features of vi that you found to be fascinating

Vi is an inbuilt text file editor in most linux machines. It's one of the basic but also one of the most powerful editors.

The specialty of this editor is that it has command and insert mode. The file opens in command mode where we use functions like copy, paste and delete lines and characters.

In the insert mode, we can add characters to the file. After writing, the file has to be saved by going back to the command window. Some useful commands are:

  • dd- to delete the entire line of text
  • v- to select a portion of text
  • x - to cut the selection portion of text
  • y - to copy the selected portion of text
  • p - to paste the copied/cut text
  • w - to write the file to the disk
  • q - to close the editor

https://drive.google.com/file/d/1sEAgkAZ--k0rn-wRQlE9a_bSuNFiqquK/view?usp=drivesdk

https://drive.google.com/file/d/1sSWO7GHeEB4XbHDhuKD2hp3141M_wxhE/view?usp=drivesdk

Task 6 - Linux Continued

The task involved acquiring proficiency in regular expressions, piping in Linux, as well as utilizing grep effectively.

With grep, one can extract specific information from text files based on patterns defined by regex. This is particularly useful for tasks like extracting login times from system logs, as demonstrated using the 'last' command. By piping the output of one command into another, like using grep with 'last', we can streamline the process of filtering information. Additionally, mastering tools like gzip and tar enables efficient compression and archival of files and directories. In summary, these skills empower users to manipulate and manage data effectively in a Linux environment.

Here, A .sh file was created with a snippet of bash code.

https://drive.google.com/file/d/1sH0muhBsZcqEf_REyCZfMIrLOpXMIYzS/view?usp=drivesdk

The login info is displayed on the command window using last command. The output of this is then piped into egrep to get the logins which happened only during the months of april, may and september. Which then were stored in a file named logs.txt. Then this text file is converted into a compressed and an archived file using gzip and tar -czvf commands.

https://youtu.be/o6KIxXcnOjM?si=NrLiWcptQ8B-74Ww

Task 7 -Introduction to Cloud Computing

The aim of this task was to learn the basics of Cloud Computing and various things that comes while working with it.

Skills Learnt: Basics of Cloud Computing, Local File Sharing on LAN.

The resource article was written on the basics of Cloud Computing. Click here https://hub.uvcemarvel.in/article/c8cdcfd3-a37f-4dc4-ab3a-41d2c137135d to access the article.

Another task was to share files and folders across devices and accessing them.

The steps are as below:
  • Go to network and sharing center and enable network discovery and file and printer sharing in advanced sharing settings for both private and public modes.

  • Disable password protected sharing under all network settings.

  • Go to SSDP discovery service and under properties, set startup type to automatic.

  • Do the same for UPnP Device Host, Function Discovery Provider Host and Function Discovery Resource Publication .

  • Select the folder that you want to share and under its properties, go to Sharing tab, select Advanced Sharing. Edit the settings as per your needs and apply. Then click the Share button to share the folder.

https://drive.google.com/file/d/1sHe7AbBi1ahSTN9IAS-JhmgrQ1qhRN8y/view?usp=drivesdk

https://drive.google.com/file/d/1sOvtHvdeNdkFfmg_9RPIwYZ5L8MWZTQm/view?usp=drivesdk

https://drive.google.com/file/d/1sPWCTD23bU50ZXYZL5uvhHvbBGHjUo-h/view?usp=drivesdk

Task 8 - Introduction to Cybersecurity

It is a field of computer science which deals with the process of preventing the attacks, leaks and unauthorized access to the confidential information.

Why Cybersecurity?

  • Protection of your business
  • Increased productivity
  • Customer confidence
  • Data security

CIA: Confidentiality, Integrity, Availability

These are the Parameters which define the industry standard for cybersecurity.

Confidentiality: Asserts that Information and functions are accessed only by authorized parties.

Integrity: Asserts that information and functions are modified, added and removed only by authorized parties.

Availability: Asserts that systems, functions and data should be available on demand based upon the agreed-upon parameters based on the level of the service.

Cyber-crimes:

  • Computer Assisted
  • Computer as Target
  • Computer incidental to crime
Types of hackers: Black Hat. Grey Hat, White Hat

Most common attacks in CS:

  • DOS- Denial of service
  • Malware
  • Phishing
  • Cross site scripting
  • Password attack
  • SQL injection

Malware: A malware attack is a common cyberattack where malware (normally malicious software) executes unauthorized actions on the victim’s system. The malicious software (a.k.a. virus) encompasses many specific types of attacks such as ransomware, spyware, command and control, and more. example: https://blog.rapid7.com/2019/05/13/wannacry-two-years-on-current-threat-landscape-forgotten-lessons-and-hope-for-the-future/

Types of Malware: There are three main types of malware attack vectors:

  • Trojan Horse: This is a program which appears to be one thing (e.g. a game, a useful application, etc.) but is really a delivery mechanism for malware. A trojan horse relies on the user to download it (usually from the internet or via email attachment) and run it on the target.

  • Virus: A virus is a type of self-propagating malware which infects other programs/files (or even parts of the operating system and/or hard drive) of a target via code injection. This behavior of malware propagation through injecting itself into existing software/data is a differentiator between a virus and a trojan horse (which has purposely built malware into one specific application and does not make attempts to infect others).

  • Worm: Malware designed to propagate itself into other systems is a worm. While virus and trojan horse malware are localized to one infected target system, a worm actively works to infect other targets (sometimes without any interaction on the user’s behalf).

    1. Phishing: Phishing attacks are the practice of sending fraudulent communications that appear to come from a reputable source. It is usually done through email. The goal is to steal sensitive data like credit card and login information, or to install malware on the victim’s machine. Phishing starts with a fraudulent email or other communication that is designed to lure a victim. The message is made to look as though it comes from a trusted sender. If it fools the victim, he or she is coaxed into providing confidential information, often on a scam website. Sometimes malware is also downloaded onto the target’s computer. Types of phishing attacks: Deceptive phishing, Spear phishing, Whaling, Pharming
  • 2.Social engineering Social engineering is the term used for a broad range of malicious activities accomplished through human interactions. It uses psychological manipulation to trick users into making security mistakes or giving away sensitive information.

https://drive.google.com/file/d/1sljAxmUDYjnmg5hxE1k1AIxqtsQ5I4fW/view?usp=drivesdk

Techniques of Social Engineering: Baiting, Scareware, Pretexting

Ciphers:

  • Ceaser Cipher: It is one of the simplest and most widely known encryption techniques. It is a type of substitution cipher in which each letter in the plaintext is replaced by a letter some fixed number of positions down the alphabet. Plain Text: Cybersecurity in Marvel

Shift 10:

<-10 (->16)\tMilobcomebsdi sx Wkbfov

->10 (<-16)\tSoruhiuskhyjo yd Cqhlub

  • Pigpen Cipher: is a geometric simple substitution cipher, which exchanges letters for symbols which are fragments of a grid.

https://drive.google.com/file/d/1sn94DhbUazV6bOHNKHPKUVsVElaeTUq8/view?usp=drivesdk

Encoded:

https://drive.google.com/file/d/1snj_p7OsDJY-tVFAFA-2LJS5pKRJ6m_o/view?usp=drivesdk

  • Morse Code: Morse code is a method used in telecommunication to encode text characters as standardized sequences of two different signal durations, called dots and dashes, or dits and dahs.[3][4] Morse code is named after Samuel Morse, one of the inventors of the telegraph.

https://drive.google.com/file/d/1suTMU_pQwnyd92BvR5gJXf2mDzZlMeZJ/view?usp=drivesdk

Encoded: -.-. -.-- -... . .-. ... . -.-. ..- .-. .. - -.-- / .. -. / -- .- .-. ...- . .-..

  • Rail Fence Cipher: The rail fence cipher (also called a zigzag cipher) is a classical type of transposition cipher. It derives its name from the manner in which encryption is performed, in analogy to a fence built with horizontal rails.

Grid[rails-3]:

C r u y v

y e s c r t n M r e

b e i i a l

encoded text: Cruy v yescrt nMre beiial

  • Polybius CIpher: It is used for fractionating plaintext characters so that they can be represented by a smaller set of symbols, which is useful for telegraphy, steganography, and cryptography. GRID:

\\t1\t2\t3\t4\t5

1\tA\tB\tC\tD\tE

2\tF\tG\tH\tI\tJ

3\tK\tL\tM\tN\tO

4\tP\tQ\tR\tS\tT

5\tU\tV\tW\tX\tY

encoded: 135512154344151351432445552434331143521532

  • Playfair Cipher: The Playfair cipher uses a 5×5 grid of letters, and encrypts a message by breaking the text into pairs of letters and swapping them according to their positions in a rectangle within that grid. Rules: 7. If both letters are the same (or only one letter is left), add an "X" after the first letter. Encrypt the new pair and continue. Some variants of Playfair use "Q" instead of "X", but any letter, itself uncommon as a repeated pair, will do.

  • If the letters appear on the same row of your table, replace them with the letters to t

  • Heir immediate right respectively (wrapping around to the left side of the row if a letter in the original pair was on the right side of the row).

  • If the letters appear on the same column of your table, replace them with the letters immediately below respectively (wrapping around to the top side of the column if a letter in the original pair was on the bottom side of the column).

  • If the letters are not on the same row or column, replace them with the letters on the same row respectively but at the other pair of corners of the rectangle defined by the original pair. The order is important – the first letter of the encrypted pair is the one that lies on the same row as the first letter of the plaintext pair.

grid: Playfair square

M\tA\tR\tV\tE

L\tB\tC\tD\tF

G\tH\tI\tK\tN

O\tP\tQ\tS\tT

U\tW X\tY\tZ

encrypted: DXFAVQRFXMNQXKGERVEMCU

"

UVCE,
K. R Circle,
Bengaluru 01