Kernel of Truth

Category: Vulnerabilities & Exploits Management

  • Exploits: Weaknesses Weaponised

    Exploits: Weaknesses Weaponised

    An exploit is a piece of code, technique, or tool used by attackers to take advantage of a vulnerability in a system. Exploits can target software, hardware, misconfigurations, or even social behaviours, and are often used to gain unauthorised access, escalate privileges, exfiltrate data, or disrupt operations.


    💥 What Is an Exploit?

    At its core, an exploit is the method used to trigger a vulnerability — it’s the practical weaponisation of a weakness. While vulnerabilities are the flaws, exploits are how those flaws are actively abused.

    Types of vulnerabilities exploited include:

    • Buffer overflows
    • SQL injection flaws
    • Cross-site scripting (XSS)
    • Privilege escalation bugs
    • Authentication bypasses
    • Insecure deserialisation

    🔍 Types of Exploits

    TypeDescription
    Remote ExploitLaunched over a network; attacker does not need physical access (e.g. RCE).
    Local ExploitRequires access to the system; used to escalate privileges.
    Zero-Day ExploitTargets a vulnerability not yet known to the vendor or public.
    N-Day ExploitTargets a known vulnerability that may not be patched in the target system.

    🧪 Examples of Real-World Exploits

    • EternalBlue (CVE-2017-0144): Used by WannaCry ransomware to exploit SMBv1 on Windows.
    • Log4Shell (CVE-2021-44228): Critical RCE in Log4j used to compromise Java applications.
    • Shellshock (CVE-2014-6271): Bash bug allowing remote code execution on Unix systems.
    • Heartbleed (CVE-2014-0160): Information leak from vulnerable OpenSSL versions.

    ⚙️ How Exploits Are Used

    1. Reconnaissance: Identify vulnerable targets.
    2. Weaponisation: Prepare a specific exploit payload.
    3. Delivery: Inject or deliver the payload (e.g. via phishing, HTTP, USB).
    4. Exploitation: Trigger the vulnerability.
    5. Installation/Persistence: Establish control (e.g. via a remote shell or malware).

    🛠️ Common Exploitation Tools

    • Metasploit Framework – A modular penetration testing toolkit.
    • ExploitDB – Public archive of exploits and PoCs.
    • Cobalt Strike – Advanced red team exploitation and post-exploitation toolkit.
    • Nmap & NSE – Often used for detecting exploitable services.

    🛡️ Defending Against Exploits

    • Patch Management: Keep systems up to date with vendor patches.
    • Vulnerability Management: Use tools like Qualys, Nessus, or OpenVAS to find and fix weaknesses.
    • Intrusion Detection/Prevention Systems (IDS/IPS): Detect and block known exploit signatures.
    • Web Application Firewalls (WAFs): Help prevent web-based exploitation attempts.
    • Network Segmentation: Limit lateral movement opportunities after exploitation.
    • Security Awareness: Reduce delivery vectors like phishing.

    📚 Further Reading and Resources

  • Qualys: Enterprise Security and Compliance Platform

    Qualys: Enterprise Security and Compliance Platform

    Qualys is a cloud-based platform that provides organisations with a broad set of tools for security, compliance, and IT asset management. It is widely used across industries to identify vulnerabilities, maintain compliance, and continuously monitor infrastructure — all from a single console.


    🔍 What is Qualys?

    Qualys is a Software-as-a-Service (SaaS) solution that offers vulnerability management, policy compliance, file integrity monitoring, and more. It uses lightweight cloud agents and scanners to deliver continuous visibility and threat detection across on-premises, cloud, container, and mobile environments.


    🚀 Key Features

    1. Vulnerability Management (VMDR)
    Identifies and prioritises vulnerabilities using real-time threat intelligence and machine learning. Allows you to track remediation efforts and validate fixes.

    2. Policy Compliance
    Assesses and reports on compliance with internal security policies and external regulations like PCI-DSS, HIPAA, SOX, and GDPR.

    3. Global IT Asset Inventory
    Provides a continuously updated inventory of all hardware and software assets across your network.

    4. Patch Management
    Enables automated patch deployment to fix vulnerabilities directly from the same platform.

    5. Web Application Scanning
    Finds vulnerabilities such as SQL injection and cross-site scripting in public-facing and internal web apps.

    6. Cloud Security Posture Management (CSPM)
    Assesses the security posture of public cloud services (AWS, Azure, GCP) and provides remediation guidance.

    7. File Integrity Monitoring (FIM)
    Tracks changes to critical files and system configurations for forensic analysis and compliance audits.

    8. Container Security
    Scans container images and registries to ensure compliance before deployment.


    🧩 How It Works

    Qualys deploys lightweight cloud agents or network scanners to collect data from systems. This information is securely transmitted to the Qualys Cloud Platform, where it is analysed and correlated to deliver actionable insights. There’s no need to install on-premises infrastructure, which simplifies deployment and scalability.


    🎯 Why Use Qualys?

    • Centralised View of Risk across hybrid environments
    • Automated Security Operations to reduce human error
    • Fast Deployment with minimal maintenance overhead
    • Trusted by Fortune 500 Companies and major MSSPs
    • Meets Global Compliance Standards

    🛡️ Who Uses Qualys?

    Qualys is widely used by:

    • Security Operations Centres (SOCs)
    • IT and compliance teams
    • Managed Security Service Providers (MSSPs)
    • Enterprises needing continuous security monitoring

    🔗 Learn More

    Official Website: https://www.qualys.com
    Documentation: https://docs.qualys.com
    Demo & Training: https://www.qualys.com/training/

    ✅ Summary

    Qualys is a leading cloud-native security and compliance solution that helps organisations:

    • Discover and track assets
    • Find and fix vulnerabilities
    • Maintain continuous compliance
    • Secure modern IT environments including cloud, containers, and remote endpoints

    It’s an essential platform for enterprises aiming to modernise their cybersecurity and risk management strategies.

    🚀 Key Features

    1. Vulnerability Management (VMDR)
    Qualys VMDR (Vulnerability Management, Detection and Response) helps identify, classify, prioritise, and remediate vulnerabilities across all assets. It uses:

    • CVE (Common Vulnerabilities and Exposures) identifiers to track known vulnerabilities.
    • Integrated threat intelligence to assess exploitability, malware association, and zero-day activity.
    • A built-in risk-based prioritisation engine to guide remediation efforts based on real-world risk.

    It enables security teams to:

    • Scan all assets for known vulnerabilities.
    • See which systems are affected.
    • Automatically deploy patches or initiate tickets for remediation.
    • Verify whether fixes have been applied successfully.

    📊 How Qualys Scores and Prioritises Vulnerabilities

    Qualys uses a combination of external standards and internal analytics to assess risk and guide remediation:

    • CVE Identification: Each vulnerability discovered is mapped to a CVE entry, ensuring alignment with industry-standard vulnerability tracking.
    • CVSS Scoring: It leverages the Common Vulnerability Scoring System (CVSS v2 and v3) to assign severity scores (0–10) based on exploitability, impact, and complexity.
    • Qualys TruRisk™ Score: In addition to CVSS, Qualys provides its own TruRisk score — a proprietary risk score that factors in:
      • Real-world exploit data
      • Threat actor activity
      • Exploit availability (e.g. in Metasploit, ExploitDB)
      • Asset criticality
      • Lateral movement risk
      • Patch availability and ease of remediation
    • Prioritisation Tags & Dashboards: You can filter by severity, exploitability, asset group, or compliance impact to prioritise what’s most important to fix first.

    This approach helps security teams cut through the noise — for example, by addressing actively exploited vulnerabilities even if their base CVSS score is moderate.

  • Understanding SQL Injection (SQLi)

    🛡️ Understanding SQL Injection (SQLi)

    What is SQL Injection?

    SQL Injection (SQLi) is a code injection vulnerability that allows attackers to interfere with the queries that an application makes to its database. By manipulating input fields (e.g. login forms, search boxes), a malicious actor can insert or “inject” SQL commands that the backend will unknowingly execute.

    If left unpatched, SQLi can allow:

    • Unauthorised viewing of data (sensitive user details, passwords)
    • Deletion or modification of records
    • Full system compromise

    🔍 Real-World Examples of SQL Injection

    🧪 Example 1: Bypassing Login Authentication

    Input:
    Username: admin
    Password: ' OR '1'='1

    This input alters the query to:

    SELECT * FROM users WHERE username = 'admin' AND password = '' OR '1'='1';

    Since '1'='1' is always true, the login succeeds without a valid password.


    🧨 Example 2: Dumping Database Tables

    Input:
    search term: '; DROP TABLE users; --

    Resulting query:

    SELECT * FROM products WHERE name = ''; DROP TABLE users; --';

    This would delete the users table, causing catastrophic data loss.


    🛡️ How to Protect Against SQL Injection

    ✅ 1. Use Prepared Statements (with Parameterised Queries)

    Bad (Vulnerable):

    $sql = "SELECT * FROM users WHERE username = '$username'";

    Good (Safe):

    $stmt = $pdo->prepare("SELECT * FROM users WHERE username = :username");
    $stmt->execute(['username' => $username]);

    ✅ 2. Use ORM Libraries

    Tools like Eloquent (Laravel), Hibernate (Java), or Entity Framework (.NET) abstract raw SQL and safely handle parameters.


    ✅ 3. Input Validation and Escaping

    • Sanitize user input (e.g. using filter_input() in PHP)
    • Reject unexpected characters or SQL keywords

    ✅ 4. Least Privilege Database Access

    Ensure database users have only the necessary permissions. For example, the app should not connect as a root user.


    ✅ 5. Web Application Firewalls (WAF)

    Deploy a WAF to detect and block malicious inputs in real time.


    ✅ 6. Regular Security Testing

    • Conduct automated scans (e.g. with OWASP ZAP, sqlmap)
    • Perform manual code reviews

    🧭 Summary

    AspectDetails
    RiskHigh: Data theft, unauthorised access, system damage
    Common Entry PointWeb forms, URLs, cookies
    Key DefencePrepared statements, input validation, least privilege

    📚 Further Reading