cover photo

BLOG · 1/4/2025

MARVEL Level 2 Tasks Report : Part 3

Jeethan Tauro
Jeethan Tauro
OP
MARVEL Level 2 Tasks Report : Part 3
This Article is yet to be approved by a Coordinator.

TASK 6: Hashing

What did I learn?

  • So I learnt what hashing is, Hashing is the process of converting an input (or "message") into a fixed-size string of characters, using a mathematical algorithm called a hash function. The output, known as the hash value or digest, is unique for a given input. Even a small change in the input will produce a vastly different hash value.
  • I learnt different hashing algorithms : Hashing algorithms are categorized into two major types: 1. Cryptographic Hashing – Designed for security (passwords, digital signatures, blockchain). 2. Non-Cryptographic Hashing – Designed for speed (hash tables, checksums, error detection).
AlgorithmHash LengthSecure?Use Case
MD5128-bitNoLegacy file checksums (not for security)
SHA-1160-bitNoOld SSL/TLS, digital signatures (deprecated)
SHA-256256-bitYesBlockchain, file verification
BcryptVariableYesSecure password hashing (includes salting)
Argon2VariableYesModern password hashing, highly secure
MurmurHashVariableNoHash tables, fast database lookups
FNV-1aVariableNoCaching, simple hash functions
CRC3232-bitNoError detection in networking

TASK 7: NMap

What did I learn?

  • Nmap (Network Mapper) is a powerful network scanning tool used for discovering hosts, scanning ports, detecting services, identifying operating systems, and finding security vulnerabilities.
  • It works by sending network packets to a target and analyzing the responses to gather information about the system.

  • Basic Nmap Commands and Their Use Cases

CommandDescriptionUse Case
nmap Basic scan to detect live hosts and open ports.Quick check for available hosts and open services.
nmap -sS Stealthy TCP SYN scan. Sends SYN packets without completing handshake.Used for fast, undetected scanning on networks with firewalls or IDS.
nmap -sT TCP Connect scan. Completes the full handshake.Used when running Nmap as a normal (non-root) user.
nmap -sU UDP Scan to detect open UDP ports.Identifies services like DNS, DHCP, SNMP, VoIP which run on UDP.
nmap -p 80 Scan a specific port (e.g., 80 for HTTP).Used to check if a specific service (e.g., a web server) is running.
nmap -p 1-1000 Scan a range of ports (1 to 1000).Checks for common open ports.
nmap -p- Scan all 65535 ports on a target.Comprehensive scan to detect all running services.
nmap -O OS detection. Identifies the operating system of the target.Helps determine if the target is running Windows, Linux, or macOS.
nmap -sV Service version detection. Identifies the exact software running on open ports.Useful for finding outdated or vulnerable services.
nmap -A Aggressive scan (combines OS detection, service version detection, script scanning, and traceroute).Provides detailed information about the target.
nmap --script=vuln Runs vulnerability detection scripts.Identifies known security weaknesses in software.
nmap -Pn Disables host discovery (ping scan) and assumes the target is online.Useful when ping requests are blocked by firewalls.
nmap -f Fragment packets to evade firewalls.Helps bypass network security filters.
nmap -D RND:10 Decoy scanning. Spoofs 10 random IP addresses to mask the real scanner.Used to avoid detection and make tracking difficult.
nmap -T4 Adjust scan speed (-T0 is slow, -T5 is fastest).Faster scans for large networks (-T4 is a good balance).
nmap -sC Run default scripts for common vulnerabilities and misconfigurations.Quick security check for known issues.
nmap -sM Firewalk scan to test firewall rules.Helps map out which ports are allowed or blocked by a firewall.
nmap -sX XMAS scan (sets FIN, PSH, and URG flags) to detect closed ports.Used for stealth scanning since some firewalls do not detect these packets.
nmap -sP Ping scan to detect all live hosts in a network.Finds all connected devices in a subnet (e.g., 192.168.1.0/24).
nmap --traceroute Traces the path of packets to the target.Helps in network troubleshooting by showing the route packets take.
nmap -oN output.txt Saves scan results to a file in normal text format.Used to log scan results for later analysis.
nmap -oX output.xml Saves scan results in XML format.Helps in automating scans and exporting data for other tools.

TASK 8: AWS Lambda

What did I learn ?

  • So I learnt more about AWS in this task, I learnt about what FaaS is and why is it used
  • So, AWS Lambda is a serverless computing service provided by Amazon Web Services (AWS) that lets you run code without provisioning or managing servers. It automatically scales and only charges you for the execution time of your code.
  • This means that the developer only focuses on code and doesn't need to worry about managing servers and database
  • AWS uses DynamoDB to store data
  • Features of AWS lambda
    1. Event-Driven Execution
      • AWS Lambda executes code when triggered by an event from AWS services (e.g., an HTTP request, a database update, or a file upload to an S3 bucket).
    2. No Server Management
      • AWS manages the infrastructure, so you don’t need to worry about provisioning or scaling servers.
    3. Auto-Scaling
      • It automatically scales up or down based on the incoming number of events.
    4. Pay-per-Use Pricing
      • You are billed only for execution time (milliseconds) and the number of requests.
FeatureAWS Lambda (Serverless)Traditional Servers (EC2, On-Premises)
ProvisioningNo servers to manageRequires manual server setup
ScalingAutomatic scalingRequires load balancers and manual scaling
PricingPay only for execution timePay for entire server uptime
ComplexityEasier to maintainMore infrastructure management needed
So in this task I have made a simple HelloWorld program which when triggers print key-value pairs as shown and have also made a command-line chat app too

Task 9: SSH

What did I learn?

  • SSH stands for Secure Shell. It is a protocol used to securely connect to a remote computer or server over an unsecured network. SSH provides encrypted communication between the two systems, ensuring the confidentiality, integrity, and authenticity of the connection.
  • SSH is used for : 1. Secure Remote Access: SSH is primarily used to remotely access and manage servers, devices, or computers. It allows administrators to execute commands, transfer files, and perform system maintenance securely. 2. Encrypted Communication: Unlike older protocols like Telnet or FTP, SSH encrypts all data transmitted between the client and the server, protecting against eavesdropping and man-in-the-middle attacks. 3. Authentication and Authorization: SSH uses cryptographic keys or passwords to verify the identity of users, ensuring only authorized individuals can access the system.
  • How Does SSH Work?
    1. Client-Server Model: SSH operates using a client-server architecture. One system acts as the client initiating the connection, while the other acts as the server, accepting and responding to the connection.

    2. Encryption:

      • When a client connects to an SSH server, both systems exchange cryptographic keys to establish a secure, encrypted communication channel.
      • The encryption ensures that all data transferred between the client and server is scrambled, making it unreadable to anyone intercepting the communication.
    3. Authentication:

      • Password Authentication: The client provides a username and password to authenticate.
      • Public/Private Key Authentication: A more secure method where the client has a private key, and the server has the corresponding public key. The client proves its identity by signing a challenge using the private key.
    4. Session Establishment:

      • After authentication, a secure session is established. Commands sent by the client are executed on the server, and the results are returned to the client.

  • So in this task I connected to the first EC2 instance and then searched for ssh.pem file and then transferred it into the second EC2 instance

Click here for part 4


UVCE,
K. R Circle,
Bengaluru 01