CL - CY Level - 1 Report
29 / 3 / 2025
R Rohan Shalom - Level 1 Report
TASK 1: Socket.IO
In this task, I learned how to build a real-time chat application using Socket.IO, the Node.js framework, and HTML and CSS for the frontend. This provided insight into the functioning of web sockets and how they can be implemented effectively in chat applications.
GitHub Repository: RohChat
Understanding WebSockets
WebSockets enable real-time, full-duplex communication between the client and server over a single persistent connection, unlike traditional HTTP, which follows a request-response model. This capability allows both client and server to send messages anytime.
Key Features of WebSockets:
- Handshake Signals: Establish the connection.
- Persistent Connection: Maintains a continuous connection.
- Message Exchange: Enables bidirectional data transfer.
- Closing the Connection: Ensures proper termination of communication.
Applications:
WebSockets are ideal for chat applications, live updates, collaborative document editing, IoT data streaming, and more.
Advantages:
- Efficiency: Reduces overhead by maintaining a single connection.
- Flexibility: Supports real-time communication.
- Scalability: Handles high traffic effectively.
Challenges:
- Complexity: Requires careful implementation to avoid security vulnerabilities.
TASK 2: Encryption Techniques - Secure Messaging App
Using the pycryptodome library, I developed a secure messaging app that encrypts user input into ciphertext and decrypts it back into plaintext. This task involved understanding cryptographic principles and implementing AES (Advanced Encryption Standard) encryption and decryption algorithms.
GitHub Repository: Crypto
Core Concepts in Cryptography:
- Ciphertext: Encrypted, unreadable data generated from plaintext.
- Tag: Ensures integrity and authenticity of the encrypted message.
- Nonce: Random value ensuring unique encryption results.
- Key: The secret value used for encryption and decryption.
Symmetric Key Cryptography:
- A single key is used for both encryption and decryption.
Asymmetric Key Cryptography:
- Uses a key pair: a public key for encryption and a private key for decryption.
How Prime Numbers are Used in RSA:
- Select Two Large Primes:
p
andq
. - Compute n:
n = p × q
. - Calculate φ(n): Euler's Totient:
φ(n) = (p-1) × (q-1)
. - Choose e: Public key exponent satisfying
1 < e < φ(n)
andgcd(e, φ(n)) = 1
. - Compute d: Private key exponent satisfying
e × d mod φ(n) = 1
. - Keys: Public key
(e, n)
and private key(d, n)
.
TASK 3: IaaS, PaaS, and SaaS
What is Cloud Computing?
Cloud computing involves delivering computing services over the internet rather than storing them locally. These services include storage, databases, networking, software, and analytics.
Cloud services are categorized into three models:
- IaaS: Infrastructure as a Service
- PaaS: Platform as a Service
- SaaS: Software as a Service
1. IaaS (Infrastructure as a Service)
IaaS provides IT infrastructure (e.g., compute, storage, networking) on a pay-as-you-go basis.
Key Features:
- Resources: Virtualized CPUs, GPUs, RAM, and storage.
- Monitoring: Includes performance tracking and security measures.
- Automation: Handles tasks like backups and load balancing.
Benefits:
- Speed: Rapid provisioning of resources.
- Performance: Geographically distributed data centers reduce latency.
- Reliability: Supports backups and disaster recovery.
- Scalability: Easily scales resources as needed.
Use Cases:
- High-performance computing, website hosting, big data analytics, and app development.
2. PaaS (Platform as a Service)
PaaS simplifies application development by providing tools, databases, and frameworks on a managed platform.
Key Features:
- Prebuilt connectors for integrations.
- Supports custom workflows with data transformation capabilities.
Benefits:
- Automation: Reduces manual tasks.
- Scalability: Adapts to large system requirements.
- Ease of Use: User-friendly tools with robust security features.
Use Cases:
- Automating workflows, keeping data synchronized, and connecting disparate systems.
3. SaaS (Software as a Service)
SaaS provides software applications hosted by vendors and accessed via browsers. It eliminates the need for infrastructure or software maintenance.
Key Features:
- Hosted applications accessed via login.
- Operates on a multi-tenant model.
Benefits:
- Accessibility: Available from any internet-enabled device.
- Cost Efficiency: Reduces upfront and maintenance costs.
- Automatic Updates: Ensures the software is up-to-date.
Use Cases:
- Gmail, Google Drive, Salesforce, Zoom, Shopify, QuickBooks, and Netflix.
TASK 4: OSI Model
The OSI model is a framework that outlines how data is transmitted across networks. It is divided into seven layers, each with specific responsibilities, enabling smooth and efficient data communication between systems.
The Seven Layers of the OSI Model:
- Application Layer: Provides the interface for user applications like web browsers and cloud services (e.g., Gmail, AWS).
- Presentation Layer: Formats data for applications, handles encryption and compression (e.g., HTTPS securing websites).
- Session Layer: Manages connections between devices, ensuring stable communication (e.g., video calls).
- Transport Layer: Ensures reliable data transfer through packetization (e.g., TCP for messages).
- Network Layer: Routes data using IP addresses, like a GPS for the internet.
- Data Link Layer: Manages data flow within the network and fixes errors, acting like a traffic controller.
- Physical Layer: Handles hardware and signals, like cables or Wi-Fi.
Analogy: OSI Model and Online Shopping
- Physical Layer: Delivery trucks and roads.
- Data Link Layer: Package labeling (e.g., barcodes).
- Network Layer: Routing to the delivery address.
- Transport Layer: Secure and tracked delivery.
- Session Layer: Stable website connection.
- Presentation Layer: User-friendly display and secure payment.
- Application Layer: The e-commerce platform (e.g., Amazon).
TASK 5: Version Control
Version control helps manage changes to files over time, ensuring collaboration and tracking modifications effectively.
Basic Git Commands:
git branch
:- Used to create, switch, or delete branches for independent work.
git merge
:- Combines changes from one branch into another, preserving histories.
- Combines changes from one branch into another, preserving histories.
git revert
:- Reverses changes by creating a new commit that undoes a previous commit.
- Reverses changes by creating a new commit that undoes a previous commit.
git cherry-pick
:- Applies changes from a specific commit to the current branch without merging the entire branch.
- Applies changes from a specific commit to the current branch without merging the entire branch.
TASK 6: IP Addressing and Web Scraping
Using the Beautiful Soup library in Python, I scraped syllabus details for the CL-CY domain from the Marvel UVCE website. The data was extracted and saved in a CSV file.
Code and Output:
TASK 7: Kali Linux and Nmap
Nmap is a powerful tool in Kali Linux for exploring and analyzing networks. I used it to scan IPs and ports, check services, detect OS versions, and more.
Scans Performed:
- SYN Scan (-sS):
- Open port: Replies with SYN-ACK.
- Closed port: Replies with RST.
- No response: Port is filtered (firewall).
- Nmap Commands Learned:
-sS
: SYN scan.-sP
: Ping scan.-A
: Aggressive scan.-Pn
: No ping.-iL
: Input list.-6
: IPv6 scan.-sn
: Host discovery (no port scan).-p
: Specify ports.
Results:
- Scanned ports, addresses, OS versions, and traceroute info were displayed in an HTML report.
- All IPv4 addresses were found to be filtered (protected by firewalls).