📔
Cyber Security Notes
  • Introduction
  • CVEs
    • CVE-2022-33106
  • Paper Reviews
    • Imperfect Forward Secrecy: How Diffie-Hellman Fails in Practice
  • Security Basics Notes
    • Identification, Authentication and Authorization
  • Enumeration and Initial Compromise
    • Methodology
    • Footprinting
    • Network Protocols
      • FTP
      • SMB
      • DNS
      • NFS
      • SMTP
      • IMAP/POP3
      • SNMP
      • MySQL
      • MSSQL
      • Oracle TNS
      • IPMI
    • Nifty One Liners
    • Brute-Force Web Pages
      • Hydra
    • Network Pentest
      • Quick SMB cheatsheet
      • SSH keypair basics
      • Compromise using SSH Key
      • Networking fundamentals Interview topics
      • nmap quick cheatsheet
      • Metasploit Quick Reference
    • Web Pentest
      • Web Pentest Interview top topics
      • Wordpress Exploitation
      • Joomla Exploitation
      • Login Bypass using Cookie Tampering/Poisoning
      • Subdomain Enumeration
      • CSRF mitigation
      • XSS mitigation
      • CSP bypass with JSONP
      • PHP Vulnerabilities
      • Python Serialization Vulnerabilities - Pickle
      • SQL Injections
        • SQLmap
      • SSTI
      • XSS
    • Buffer Overflow Prep
      • Understanding CPUs
      • Virtual Memory and Paging
      • Syscalls
      • Theorem Proving
      • Stripping readable function names
      • Insecure C functions
      • Stack Canaries
      • Linking - GOT,PLT
      • Return Oriented Programming
    • Active Directory - Basics
      • AD DS
      • Managing OUs
      • Group Policies
      • Authentications
      • Trees, Forests and Trusts
      • Kerberos
      • Attacking Kerberos
      • Priv Esc (Post Exploitation)
    • DNS/Domain Enum Masterguide
  • Post Exploitation
    • Shell Escape Techniques
    • Getting stable shell after compromise
    • Linux Privilege Escalation
      • Sudoers file
      • Sudoers entry - Yum
      • Wildcards - Basics
      • Wildcards - Chown
      • Wildcards - Tar
      • Linux Permissions & SUID/SGID/Sticky Bit
      • SUID - nmap
      • SUID - bash
      • SUID - man
      • NFS no_root_squash
      • SUID - pkexec
      • Bad permissions
    • Windows Privilege Escalation
      • SeImpersonatePrivilege Token Impersonation
      • Firefox Creds
      • Potatoes
      • Print Spooler Basics
      • Print Spooler CVE 2020-1030
      • SpoolFool
    • Data Exfiltration Post Exploitation
  • Port Forwarding Cheatsheet
  • Powershell Essentials
    • Powershell Basics
    • Powershell Enumeration
    • Powershell Port Scanner
    • Powershell One Liner Port Scanning
    • Powershell Port Scan in a given CIDR
  • Application Security
    • System Calls in Linux
    • Buffer Overflow Defenses
    • Format string vulnerabilities
    • Sample Github Actions
    • Basic Bugs in Demo Application
    • Using AFL++
  • Linux 64-bit Assembly
    • GDB Basics
      • My relevant GDB cheatsheet
      • Task 1 - Tamper strcmp logic
      • Breakpoints
      • Always starting with intel flavor
      • GDB TUI Mode
    • Basic Hello World Program
    • Registers in 64-bit
    • global directive
    • Reducing instructions and Removing NULL-> Optimizing memory in Assembly
    • Data Types
    • Endianness
    • Moving Data
    • push, pop, and the stack
    • Analysis - Writing data on memory location and referencing
    • Arithmetic Operations
    • Bitwise Logical Operations
    • Bit-Shifting Operations
    • Control Instructions
    • Loops
    • Procedures
    • Stack-Frames and Procedures
    • String Operations
    • Shellcoding basics
      • Introduction and Common Rules
      • Basic Shellcodes->Exit
      • Testing shellcode->Skeleton Code
      • Techniques-> JMP,CALL,POP
      • Techniques-> Stack
      • Techniques-> (64-bit only) RIP Relative Addressing
      • Shellcode 1 -> execve(/bin/sh) STACK PUSH
      • Shellcode 1 -> execve(/bin/sh) JMP CALL POP
      • Techniques-> XOR-Encoder
  • Cloud Security
    • Foundational Technology
    • Learning Through Project Omega
    • IAM Essentials
      • Deep dive into IAM - Part 1
    • Amazon S3
    • Risk Management & Data Controls
    • Enumeration
      • S3 - Enum Basics - PwnedLabs
      • S3 - Identify the AWS Account ID from a Public S3 Bucket
      • EBS - Loot Public EBS Volumes
      • S3- Exploit Weak Bucket Policies for Privileged Access
  • API Security
    • WSDL
  • Reverse Engineering
    • Some string Operations
    • Numbers and Inputs
    • Address inputs
    • Recursive Function
    • Crackme: level1
    • Crackme: level2
    • CTF: Memory Dereferencing
    • CTF: Monty Python
  • CTF Challenge Learnings
    • vsCTF 2024
      • Sanity Check
      • not-quite-caesar
      • Intro to reversing
    • NCL Individual 2024
      • Web Challenges
        • PiratePals
        • Pierre's Store
    • Pico CTF 2024
      • Web Exploitation
        • Bookmarklet
        • WebDecode
        • Unminify
        • Trickster
      • General Skills
        • Commitment Issues
        • Time Machine
        • Blame Game
        • Collaborative Development
        • Binary Search
        • Dont-you-love-banners
    • Sunshine CTF
      • Knowledge Repository
    • Amazon WiCys CTF
      • I am Lazy
      • Password Locker on the Web
      • Happy Birthday Card Generator
      • Bloggergate
      • simple offer
      • Bad Actor
      • Secret Server
      • Simple PCAP
      • Hidden Message
    • C code using getenv()
    • Command Injection with filter
    • Pwning
      • Shoddy_CMP
      • PLT_PlayIT
  • Applied Cryptography
    • Linear Congruential Generator
  • Tools for everything
Powered by GitBook
On this page

Was this helpful?

  1. Paper Reviews

Imperfect Forward Secrecy: How Diffie-Hellman Fails in Practice

Paper here: https://weakdh.org/imperfect-forward-secrecy-ccs15.pdf

PreviousPaper ReviewsNextSecurity Basics Notes

Last updated 2 years ago

Was this helpful?

The paper presents interesting findings on security issues in the Diffie Hellman Key Exchange method which allows senders and receivers to generate secret keys for message encryption. It also provides forward secrecy in TLS’s ephemeral modes. The paper asserts that the Diffie Hellman Key Exchange method for 1024-bit groups or under is not as secure as they were believed to be. Around 82% of servers in total over the internet and 8.4% of the top million websites were using a single 512-bit group making them vulnerable to Logjam attack. The authors carried out the Logjam attack and ran computations for a week to come up with the statistics given above. The paper further even pulls up leaked NSA diagrams (from Snowden’s leak) and discusses how the agency might have used a similar method to decrypt VPN traffic in a passive manner. The paper concludes by strongly recommending that modern TLS servers only allow DH groups of 1024-bit or higher and Elliptic Key approach be used with Diffie-Hellman.

The authors presented that 512-bit DH groups are fairly easy to compute using discrete log algorithms. To carry out the attack, they did a week-long pre-computation and concluded that they could calculate any discrete logarithm in 512-bit groups in under a minute on two 18-core Intel Xeon E5-2699 CPUs and 128 GB of RAM machine, effectively breaking the encryption. Diffie Hellman, as claimed, is typically implemented with prime fields and large group orders. Any attacker who can find the discrete log x from y = gx mod p can easily find the shared secret. An efficient discrete log algorithm called Near Field Sieve was used to do these week-long pre-computations which had four steps: polynomial selection, sieving, matrix and logging, and finally, deducing log of the target. Computations helped reduce cryptanalysis time by an exponential percentage effectively reducing it to minutes on high-end systems. Logjam attack which allows an attacker to downgrade a TLS connection to export-grade Diffie-Hellman on any server that supported DHE_EXPORT (or by coercing to use DHE_EXPORT) was discussed since effectively downgrading a connection to use 512-bit DH groups would help an attacker then use NFS to compute variable primes and therefore, the shared secret. The observation lead the authors to believe and further theorize if the same approach could be used in groups of 768 and 1024-bits.

Before the paper rolled out, 82% of servers in total over the internet and 8.4% of the top million websites on Alexa were using single 512-bit DH groups. This presented as a shock since the better part of more than three-quarters of servers in the entire world might be vulnerable to the attack. The paper also serves as significant proof to counter the belief that 512-bit groups are infeasible to break by cryptanalysts. It also brought light to the importance of using previously ignored approaches like the Elliptic Curve Diffie-Hellman which are now being readily used by many popular companies. The attack mentioned in the paper also significantly reduces the time complexity in a similar FREAK attack which took attackers hours to downgrade a regular RSA exchange (by which there is a huge possibility server generates a fresh ephemeral key). The paper further claims that a small number of fixed or standardized groups are used by millions of servers. Thus, performing precomputation for a single 1024-bit group would allow passive eavesdropping on 18% of popular HTTPS sites, and a second group would allow decryption of traffic to 66% of IPsec VPNs and 26% of SSH servers.

Findings in the paper imply a massive threat to privacy. Cryptography exists to provide users apprehension-free internet usage. By analyzing the Snowden leak, it was brought to attention that NSA may have been decrypting internet traffic including VPNs by passively eavesdropping, rendering privacy useless since they have the resources to effortlessly downgrade even 768 and 1024-bit DH groups. By the medium of this freely accessible paper, the authors encouraged cyber awareness and encouraged corporate security teams to use better DH methods and stronger bit groups. As a result, the majority of the browsers rolled out patches for Logjam attack. Thereafter in 2017, IETF published RFC 8270 recommending that SSH’s minimum DH modulus size should be 2048 bits long.

References:

[1]

[2]

[3] Highlights -

https://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange
https://en.wikipedia.org/wiki/Logjam_(computer_security)
https://jhalderm.com/pub/papers/weakdh-cacm19.pdf