ScholarQuill logoScholarQuillUniversity Notes
My Semester
Explore Notes
Past Papers12 New
Video CoursesNew
Search
Settings
Study Tools
GPA/CGPA Calculator
Schedule & To-Do
Student Portal
Contact
Contact
ScholarQuill logo
My Semester
Explore Notes
Past Papers12 New
Video CoursesNew
Search
Settings
GPA/CGPA Calculator
Schedule & To-Do
Student Portal
Contact
ScholarQuill logoScholarQuillUniversity Notes
Study PortalCOMP2120Software Security Vulnโ€ฆ
Ctrl + K
Login
Explore
Search
Semester
Papers
CGPA
    COMP2120

    Information Security

    Progress0 / 15 done
    Topics15
    1Information security foundations2Security design principles3Security mechanisms4Symmetric and asymmetric cryptography5Encryption techniques6Hash functions and digital signatures7Key management, authentication and access control
    8Vulnerabilities and protections9Malware and database security
    10Firewalls and intrusion detection
    11Formation and enforcement12Risk assessment in information security13Cybercrime, law and ethics in information security14Privacy and anonymity of data15Practicals of Information security
    3 min read
    Topic 8 of 15
    Topic Study Note Illustration
    08

    Software security: Vulnerabilities and protections

    Software Security , focusing on Vulnerabilities (what can go wrong) and Protections (how to defend against attacks). This is a must-know topic in Information Security, especially if...

    Software Security, focusing on Vulnerabilities (what can go wrong) and Protections (how to defend against attacks). This is a must-know topic in Information Security, especially if you're interested in cybersecurity or development.


    ๐Ÿ’ป Software Security: Vulnerabilities and Protections


    ๐Ÿšจ Part 1: Common Software Vulnerabilities

    Vulnerabilities are weaknesses or flaws in software that attackers can exploit to compromise systems, data, or users.

    Here are some of the most common:

    Vulnerability Description Example
    Buffer Overflow Data exceeds buffer boundary and overwrites memory Crashing a program or injecting malicious code
    SQL Injection Injecting malicious SQL queries Bypassing login or accessing unauthorized data
    Cross-Site Scripting (XSS) Injecting malicious scripts into web pages Stealing cookies or user session info
    Cross-Site Request Forgery (CSRF) Forcing users to execute unwanted actions Changing account settings without consent
    Broken Authentication Flaws in login/session management Hijacking user sessions
    Insecure Deserialization Manipulating serialized data Remote code execution
    Security Misconfiguration Incorrect settings, outdated software Admin panels exposed, default passwords left unchanged
    Unvalidated Input Input not properly checked or sanitized Can lead to injection attacks or crashes
    Race Conditions Two operations happen at the same time unexpectedly Bypassing security checks or crashing systems

    ๐Ÿ›ก๏ธ Part 2: Software Security Protections

    These are techniques, tools, and practices used to protect software from being exploited.


    ๐Ÿงฑ 1. Secure Coding Practices

    โœ… Write code with security in mind:

    • Validate all inputs (never trust user input)
    • Use proper error handling
    • Avoid hardcoded secrets (like passwords)

    ๐Ÿ“˜ Use secure coding guidelines from:

    • OWASP (Open Web Application Security Project)
    • CERT secure coding standards

    ๐Ÿ” 2. Authentication & Session Security

    • Use strong password policies
    • Implement multi-factor authentication (MFA)
    • Use secure cookies and session timeouts
    • Avoid predictable session tokens

    ๐Ÿงผ 3. Input Validation & Output Encoding

    • Validate inputs on both client and server sides
    • Use whitelisting instead of blacklisting
    • Encode output to prevent XSS (e.g., escaping HTML)

    ๐Ÿ›‘ 4. Least Privilege Principle

    • Give users and applications only the permissions they need
    • Avoid running apps with admin/root privileges

    ๐Ÿ”’ 5. Use Secure Libraries and Frameworks

    • Keep dependencies up to date
    • Avoid using deprecated or insecure functions
    • Use trusted, well-maintained open-source libraries

    ๐Ÿงช 6. Security Testing

    Type Description
    Static Analysis (SAST) Analyze code without executing it (e.g., SonarQube)
    Dynamic Analysis (DAST) Analyze app during runtime (e.g., Burp Suite)
    Penetration Testing Ethical hacking to find vulnerabilities
    Fuzz Testing Inputting random data to detect crashes or bugs

    ๐Ÿงฐ 7. Tools & Techniques

    • Firewalls and WAFs (Web Application Firewalls)
    • Code obfuscation (to protect source code in compiled apps)
    • ASLR (Address Space Layout Randomization)
    • DEP (Data Execution Prevention)

    โœ… Summary Table:

    Category Vulnerability Example Protection
    Input Handling SQL Injection, XSS Input validation, output encoding
    Authentication Broken login, session hijack MFA, secure session tokens
    Configuration Default settings, exposed APIs Harden servers, remove debug info
    Code Vulnerabilities Buffer overflow, race condition Safe languages, static analysis
    Data Handling Insecure deserialization Sanitize data, safe serialization

    ๐Ÿ”„ Real-World Flow:

    1. Developer writes code โ†’ 
    2. Runs security tests (SAST/DAST) โ†’
    3. Fixes issues and follows secure coding โ†’
    4. Application is deployed with protections (e.g., WAF, secure configs) โ†’
    5. Monitored and maintained regularly
    

    โ† Previous topic 7
    Key management, authentication and access control
    Next topic 9 โ†’
    Malware and database security

    Past Papers

    Open this section to view and download past papers

    Click on Show Past Papers to load available exam papers.

    Reading Progress
    0%
    3mremaining
    512words
    Beginnerlevel
    On This Page

    No headings found

    Study Toolkit

    Subject Portal

    Information Security