This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
session:extra:heartbleed-poc [2014/07/31 11:42] vladum [Compile Nginx & vulnerable OpenSSL] |
session:extra:heartbleed-poc [2020/07/19 12:49] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | = Extra - Heartbleed | + | ====== 0x0Cb. |
- | == Information Leak | + | ===== Information Leak ===== |
In the context of binary exploitation, | In the context of binary exploitation, | ||
Line 14: | Line 14: | ||
This section will go through a Proof-of-Concept exploit that will enable us to leak a normal user's session cookie for a vulnerable server (localhost). | This section will go through a Proof-of-Concept exploit that will enable us to leak a normal user's session cookie for a vulnerable server (localhost). | ||
- | == Environment Setup | + | ===== Environment Setup ===== |
To setup a minimal environment, | To setup a minimal environment, | ||
- | === Download Nginx & OpenSSL | + | ==== Download Nginx & OpenSSL |
* [[https:// | * [[https:// | ||
* [[http:// | * [[http:// | ||
- | === Compile Nginx & vulnerable OpenSSL | + | ==== Compile Nginx & vulnerable OpenSSL |
<code bash> | <code bash> | ||
Line 72: | Line 72: | ||
</ | </ | ||
- | === Basic SSL website | + | ==== Basic SSL website |
Prepare a self-signed certificate: | Prepare a self-signed certificate: | ||
Line 120: | Line 120: | ||
sudo chown vladum: / | sudo chown vladum: / | ||
echo “Hello” > / | echo “Hello” > / | ||
+ | </ | ||
+ | |||
+ | Start the server: | ||
+ | |||
+ | <code bash> | ||
+ | ~$ ~/ | ||
</ | </ | ||
You should see the page live at https:// | You should see the page live at https:// | ||
- | == Vulnerability | + | ===== Vulnerability |
General information about this vulnerability can be obtained from [[http:// | General information about this vulnerability can be obtained from [[http:// | ||
- | The TLS Heartbeat protocol extension (see [[http:// | + | The TLS Heartbeat protocol extension (see [[http:// |
<code text> | <code text> | ||
Line 174: | Line 180: | ||
If the attacker sends a '' | If the attacker sends a '' | ||
- | == Exploit | + | ===== Exploit |
A TLS channel is established after the initial handshake part of the protocol. Since the Heartbeat RFC specifies the a Heartbeat Request can be send at any time, we simply have to initiate a TLS connection with a '' | A TLS channel is established after the initial handshake part of the protocol. Since the Heartbeat RFC specifies the a Heartbeat Request can be send at any time, we simply have to initiate a TLS connection with a '' |