I've been testing this script and it works great but i'm come across some machines which have SMTP port 25 open and when trying to exploit the vulnerability using STARTTLS, the script returns a timeout error.
However, testing it with other implementations like https://github.com/sensepost/heartbleed-poc work fine.
The issue is probably related to the case when the server dumps the memory through heartbleed but doesn't close the connection and makes the script time out. There have been reports of the same false negative on other scritps.
On the _readframe function, If you print the buffer before returning you will see some garbage followed by the bleed:
if ( ! select( my $rout = $rin,undef,undef,$timeout )) {
$$rerr = 'timeout';
print Dumper $buf ."\n"; ---> added this line - It dumps the server bleed (i used the module Data::Dumper)
return;
};
I've been testing this script and it works great but i'm come across some machines which have SMTP port 25 open and when trying to exploit the vulnerability using STARTTLS, the script returns a timeout error. However, testing it with other implementations like https://github.com/sensepost/heartbleed-poc work fine. The issue is probably related to the case when the server dumps the memory through heartbleed but doesn't close the connection and makes the script time out. There have been reports of the same false negative on other scritps. On the _readframe function, If you print the buffer before returning you will see some garbage followed by the bleed: