Security Notes
  • Whoami
  • Pentesting
    • WEP-Pen
      • Reconnaissance
      • Enumeration
      • OWSAP TOP 10
        • Injection
          • Cross Site Scripting
            • Cross Site Scripting
            • Exploitation
            • Protections
          • SQL Injection
            • SQL Injection Overview
          • NoSQL Injection
          • CRLF Injection
          • XML Injection
        • Broken Access Control
          • Path Traversal
          • Sensitive Cookie with Improper SameSite Attribute
          • Link Following
          • Incorrect Default Permissions
          • Information disclosure
          • CSRF
            • csrf checklist
          • 403 bypass
          • Exposure of WSDL File Containing Sensitive Information
          • bussiness logic checklist
          • 2FA bypass checklist
          • admin panal checklist
          • idor checklist
          • Authentication checklist
          • reset_password_checklist
          • ATO
        • Cryptographic Failures
          • Cryptographic Failure
          • Weak Encoding for Password
          • Improper Following of a Certificate's Chain of Trust
            • Understanding Digital Certificates : Self-Signed and CA-Signed Certificate **
            • Transport Layer Security (TLS) and SSL **
          • Clear Text Transmission Of Sensitive Data
            • SSLStripping **
        • Insecure Design
        • Security Misconfiguration
          • CORS Miscofigration
          • Mail Server Misconfiguration
        • Vulnerable and Outdated Components
          • Using Components with Known Vulnerabilities
        • Identification and Authentication Failures
          • JWT Hacking
          • SAML Authentication bypass
        • Software and Data Integrity Failures
          • mass assignment
          • PostMessage Vulnerabilities
            • PostMessage Vulnerabilities
            • Blocking main page to steal postmessage
            • Bypassing SOP with Iframes - part 1
            • Bypassing SOP with Iframes - part 2
            • Steal postmessage modifying iframe location
        • Security Logging and Monitoring Failures
        • Server-Side Request Forgery (SSRF)
          • SSRF
      • Checklists
        • aem misconfiguration
        • exif_geo
        • xss
        • Session Management
        • Authorization
        • cookie
        • Django
        • Symfony
        • json
        • bypass rate limit
        • Rce
        • Register Page
      • eWPTXv2 Preparation
        • Encoding & Filtering
        • Evasion Basics
        • Cross-site scripting (XSS)
        • XSS Filter Evasion
        • Cross-site request forgery (CSRF
        • HTML5
      • API-Pen
        • API Discovry
        • Reverse Engineering API Documentation
        • Excessive Data Exposure
        • Vulnerability Scanning
        • API Authentication Attacks
          • Classic Authentication Attacks
          • API Token Attacks
        • API Authorization Attacks
          • Broken Object Level Authorization (BOLA)
          • Broken Function Level Authorization
        • Improper Assets Management
        • Mass Assignment
        • SSRF
        • Injection Attacks in API
        • Evasive Maneuvers
        • GraphQL Vulnerabilities
    • NET-Pen
      • Active Directory Pentesting
        • Active Directory Components
        • Initial Attack Vectors
          • LLMNR Poisoning
          • SMB Relay Attacks
          • IPv6 Attacks ( IPv6 DNS Takeover )
          • Printer Hacking
          • Methodology
          • Some Other Attacks
            • Zerologon (CVE-2020-1472)
            • PrintNightmare (CVE-2021-1675)
        • Post-Compromise Attacks
          • Pass Attacks
          • Kerberoasting Attack
          • Token Impersonation Attack
          • LNK File Attack
          • GPP / cPassword Attacks
          • Mimikatz
          • Methodology
        • We've Compromised the Domain
          • Dumping the NTDS.dit
          • Golden Ticket Attacks
          • Methodology
        • Case Study
        • Password Attacks
      • Attack Vectors by Port
        • FTP 21
        • SSH 22
        • Telnet 23 - 2323
        • SMTP 25
        • DNS 53
        • Kerberos 88
        • POP 110-995
        • RPC 111
        • Ident 113
        • NNTP 119
        • NetBIOS 137-138
        • SMB / Samba 135-139, 445
        • MSRPC 135
        • SNMP 161
        • LDAP 389,636
        • Modbus 502
        • OpenSSL 1337
        • Ms-SQL 1433
        • Oracle Listener 1521 1522 1529
        • NFS 2049
        • MySql 3306
        • RDP 3389
        • ADB Android Debug Bridge 5555
        • WinRM 5985 5986
        • VNC 5800 5900
        • Redis 6379
        • Unreal IRC 6667
        • Tomcat 8080
        • MongoDB 27017
        • http 80
      • Network basics
      • Information Gathering
      • Privilege Escalation
        • Windows Privilege Escalation
        • Linux Privilege Escalation
    • write-ups
      • How i found a Privilege Escalation via Impersonation Features feature
      • How I was able to discover ATO Via IDOR vulnerability
      • Easy full Account Takeover via Facebook OAuth Misconfiguration
Powered by GitBook
On this page
  1. Pentesting
  2. WEP-Pen
  3. OWSAP TOP 10
  4. Cryptographic Failures
  5. Improper Following of a Certificate's Chain of Trust

Transport Layer Security (TLS) and SSL **

extra knowledge

TLS (formerly SSL) secures communication between a client (browser) and a server by encrypting data to prevent eavesdropping and tampering. Before TLS, online communication was vulnerable to interception. SSL 2.0 (1995) introduced encryption, authentication, and data integrity, but all SSL versions are now deprecated due to security flaws. Only TLS (preferably TLS 1.3) should be used today.

How SSL/TLS Works

A secure connection is established through a cipher suite, which consists of:

  • Authentication Algorithm – Verifies both parties (via certificates).

  • Key Exchange Algorithm – Determines how encryption keys are shared.

  • Bulk Encryption Algorithm – Encrypts the data to keep it private.

  • Message Authentication Code (MAC) Algorithm – Ensures data integrity.

Before communication, the SSL/TLS handshake occurs, where the client and server agree on a common cipher suite. If they can't agree, the connection fails.

Ingredients for SSL/TLS

SSL/TLS ensures that users connect to the legitimate server, not an imposter. This is done through digital certificates, issued and cryptographically secured by Certificate Authorities (CAs). These CAs are globally trusted, and their certificates cannot be forged.

  1. Authentication with Certificates

    • When a client connects, the server provides its certificate.

    • If the domain name matches the certificate, the connection is considered secure.

  2. Key Exchange & Asymmetric Encryption

    • Certificates use asymmetric key pairs (public & private keys).

    • Messages encrypted with the public key can only be decrypted by the private key (and vice versa).

    • This prevents eavesdroppers from reading messages sent to the server.

  3. Forward Secrecy & Secure Key Exchange

    • TLS 1.3 only allows key exchange methods that support forward secrecy (e.g., Diffie-Hellman key exchange).

    • This ensures that if a private key is compromised, past communications remain secure.

    • Diffie-Hellman generates a shared secret without sending it over the network, reducing risks.

  4. Bulk Encryption & Secure Communication

    • After key exchange, symmetric encryption (faster and equally secure) encrypts all data.

    • The Message Authentication Code (MAC) Algorithm ensures integrity—any tampering is detected, and the connection may be closed.

The general workflow is as follows:

  • Client Hello – The client initiates communication and sends a list of supported cipher suites.

  • Server Response – The server selects the most secure shared cipher suite and sends its public certificate.

  • Certificate Verification – The client verifies the certificate’s authenticity by checking its signature against a trusted Certificate Authority.

  • Key Exchange – The client and server negotiate a symmetric encryption key using the Key Exchange Algorithm.

  • Secure Communication Begins – The client encrypts its first HTTP request using the Bulk Encryption Algorithm.

  • Decryption & Integrity Check – The server decrypts the request and verifies its integrity using the Message Authentication Code (MAC).

  • Server Response – The server encrypts and sends the HTTP response, which the client decrypts and verifies.

  • Session Continuation – This encrypted exchange continues until the session ends. A new session requires a fresh key exchange.

PreviousUnderstanding Digital Certificates : Self-Signed and CA-Signed Certificate **NextClear Text Transmission Of Sensitive Data

Last updated 2 months ago

TLS Example Workflow