Sobes.tech
Middle

What types of vulnerabilities in web applications do you know?

sobes.tech AI

Answer from AI

  • SQL Injection: Injection of malicious SQL code through user input to manipulate the database.
    -- Example of SQL injection in the "id" parameter  
    SELECT * FROM users WHERE id = '1' OR '1' = '1';  
    
  • XSS (Cross-Site Scripting): Injection of malicious client-side scripts into web pages viewed by other users.
    <!-- Example of reflected XSS -->  
    <script>alert('XSS vulnerability!');</script>  
    
  • CSRF (Cross-Site Request Forgery): An attack that forces a user to perform unwanted actions on a web application in which they are authenticated.
  • LFI/RFI (Local/Remote File Inclusion): Vulnerability allowing execution of code or viewing files on the server via request parameters.
    // Example of vulnerable LFI code  
    include($_GET['page'] . '.php');  
    
  • Serialization Vulnerabilities: Hacking an application by manipulating serialized objects.
    // Example of unsafe deserialization  
    $data = unserialize($_GET['data']); // Potentially dangerous function  
    
  • Security Misconfiguration: Absence or incorrect setup of security mechanisms (e.g., open directories, default passwords).
  • Access Control Flaws: Ability to access resources or functionalities that the user should not have rights to.
    Role Resource Permissions
    User User profile Read, Write
    User Admin page None
  • OS Command Injection: Executing operating system commands via user input.
    // Example of vulnerable OS command injection  
    $output = shell_exec('ls ' . $_GET['dir']);  
    
  • XXE (XML External Entity): Vulnerabilities related to processing external entities in XML documents.
  • Broken Authentication: Weak or missing user authentication mechanisms.
  • Broken Access Control: Improper implementation of access rights verification, allowing unauthorized access to data or functions.
  • Security Misconfiguration: Default accounts left open, misconfigured HTTP headers, excessive error messages.
  • Sensitive Data Exposure: Transmission or storage of confidential data (passwords, card numbers) in unencrypted form.
  • Using Components with Known Vulnerabilities: Using outdated libraries, frameworks, or CMS with known vulnerabilities.
  • Insufficient Logging & Monitoring: Lack or incomplete logging of security events, hindering incident detection and investigation.