cover photo

COURSEWORK

V.A's CL-CY-001 course work. Lv 2

V.AAUTHORACTIVE
This Report is yet to be approved by a Coordinator.

30 / 10 / 2024


CL-CY Level 1 Report

Task 1: Linux Based Task with Socket.io

Socket.IO is an open-source library enabling real-time, two-way communication between a web client and a server. Built on top of WebSockets, it supports instant data transfer, making it event-driven so that both client and server can listen for and emit changes. This makes it ideal for low-latency, real-time applications like chat apps and gaming, thanks to its automatic reconnection feature.

For this task, I set up a basic chat app on Linux (via WSL) using Node.js (Express) and Socket.IO. The app logs when users connect, disconnect, and share messages.

Chat Interface

Node socketIO

Task 2: Git bash and Github

As we know, GitHub is a go-to for hosting and finding open-source projects. GitHub Desktop offers a GUI to simplify tasks, though I found Git Bash quicker for specific commands. If you forget any instructions, GitHub shows them when you create a repo.

To complete my tasks, I used Git Bash and relied on some common commands, such as:

  • git init
  • git add file.txt
  • git commit -m "A very descriptive message"
  • git push origin
  • git clone "

Task 3: OSI Model

OSI The OSI Model, which stands for Open Systems Interconnection, is crucial for cloud and cybersecurity analysts. It consists of seven layers, each playing a vital role in data communication:

  1. Application Layer: This layer is where humans process data and information, utilizing protocols like HTTP, FTP, and SNMP.
  2. Presentation Layer: Data is formatted for usability, using standards such as ASCII, UTF encoding, and protocols like SSL and TLS for encryption, as well as GZip for compression.
  3. Session Layer: This layer maintains connections between applications, utilizing protocols like SOCKS, NetBIOS, and SIP.
  4. Transport Layer: Data is forwarded to the service capable of handling it, employing protocols such as TCP, UDP, and QUIC.
  5. Network Layer: This layer determines the path that packets travel using protocols like IPv4, IPv6, ICMP, and IPSec.
  6. Link Layer: Responsible for directing packets to the appropriate physical devices, using technologies like Wi-Fi, NDP, and Ethernet.
  7. Physical Layer: This layer encompasses the physical infrastructure necessary for data transport, including technologies like CAN Bus, Ethernet, and Bluetooth.

Task 4: Encryption techniques

Encryption is essential for safeguarding sensitive data like passwords in databases. It converts readable information into an unreadable format, protecting against unauthorized access and maintaining data integrity. I used the PyCrypto library to implement AES (Advanced Encryption Standard), a block cipher that encrypts and decrypts 16-byte blocks of data. This ensures that even if attackers access the database, the passwords remain secure and unreadable. Basic types of ciphers:

Symmetric Encryption: Uses the same key for both encryption and decryption. It’s fast and efficient for large data but requires secure key distribution.

Asymmetric Encryption: Uses a public key for encryption and a private key for decryption, enhancing security in communications without needing to share private keys.

Hashing: Transforms data into a fixed-size hash, irreversible and used for data integrity (e.g., password storage) rather than encryption.

End-to-End Encryption: Protects data through its entire journey, from sender to receiver, commonly used in messaging apps to prevent third-party access.

Transport Layer Security (TLS): Encrypts data over the internet to secure web connections, commonly used in HTTPS for online security.

Output Encryption decryption

Task 5: IP Addressing and Protocols

Beautiful Soup is a Python library that makes it easy to parse and navigate HTML and XML documents. Selenium is a powerful tool for automating web browsers, allowing users to simulate actions like clicking buttons and interacting with elements. When scraping web pages, server and user IP addresses are often present in the HTML. This information can be useful for analytical purposes, but it also raises privacy concerns. In this task, I used the aforementioned tools to perform web scraping with a Python script. I employed regex to extract the IPv4 addresses found in the HTML sources. This task introduced me to web scraping and its applications

Web scraping

Ip and Protocols

Task 6: Kali Linux and SSH

Kali Linux is a popular open-source ethical hacking distro based on Ubuntu, featuring various tools for pen testing and networking professionals. SSH (Secure Shell) is a cryptographic protocol for secure communication between devices over an unsecured network, allowing users to log into remote servers, execute commands, and transfer files securely.

Nmap, or Network Mapper, scans networks for open ports, making it useful in pen testing due to its stealthiness (undetectable by IDS) and the valuable information it provides. It sends packets to each port to check if it’s open; if open, it receives SYN-ACK; if not, SYN-RST.

For this task, I used Nmap on my Kali VM to scan my own VM’s network. Since no ports were open, I started the SSH service, opening port 22 for TCP. Here are a few commands I used:

nmap

•	`nmap -sS  (SYN Scan)`
•	`nmap -O  (Operating System Detection)`
•	`nmap -A ` (Agressive)
•	`nmap -v ` (Verbose)

Task 7: Databases

CRUD stands for Create, Read, Update, and Delete, which are basic actions any full-stack app with a database performs. I built a bookstore app that includes title, description, and price. I used the MySQL plugin with my Express backend to manage the database, which displays data on my React frontend.

DB Home Update CRUD App

UVCE,
K. R Circle,
Bengaluru 01