{"id":15750915,"url":"https://github.com/rgl/tls-troubleshoot-vagrant","last_synced_at":"2026-07-17T22:03:23.419Z","repository":{"id":139753548,"uuid":"139364581","full_name":"rgl/tls-troubleshoot-vagrant","owner":"rgl","description":"A SSL/TLS troubleshooting Vagrant Environment","archived":false,"fork":false,"pushed_at":"2018-07-01T21:59:45.000Z","size":279,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-31T07:22:36.533Z","etag":null,"topics":["ssl","tls"],"latest_commit_sha":null,"homepage":null,"language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rgl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-07-01T21:47:26.000Z","updated_at":"2018-07-01T21:59:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"1b87a149-5e2e-4ce4-b86d-6e11d0dd9c46","html_url":"https://github.com/rgl/tls-troubleshoot-vagrant","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rgl/tls-troubleshoot-vagrant","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgl%2Ftls-troubleshoot-vagrant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgl%2Ftls-troubleshoot-vagrant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgl%2Ftls-troubleshoot-vagrant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgl%2Ftls-troubleshoot-vagrant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rgl","download_url":"https://codeload.github.com/rgl/tls-troubleshoot-vagrant/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgl%2Ftls-troubleshoot-vagrant/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279020079,"owners_count":26086806,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ssl","tls"],"created_at":"2024-10-04T07:00:38.470Z","updated_at":"2025-10-14T17:25:12.918Z","avatar_url":"https://github.com/rgl.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"This is a SSL/TLS troubleshooting [Vagrant](https://www.vagrantup.com/) Environment.\n\n\n# Usage\n\nInstall the [Windows 2016 Base Box](https://github.com/rgl/windows-2016-vagrant).\n\nInstall the needed plugins:\n\n```bash\nvagrant plugin install vagrant-reload   # see https://github.com/aidanns/vagrant-reload\n```\n\nThen start this environment:\n\n```bash\nvagrant up\n``` \n\nAfter the environment is installed, login into desktop, and wait a bit until it configures the Desktop.\n\nInstall npcap (the setup is in the Desktop).\n\n# Decrypting an HTTPS request\n\n1. Start Wireshark and open the preferences window:\n\n    ![](wireshark-preferences-menu.png)\n\n1. Select the `SSL` `protocol` on the left tree control, then click the `RSA keys list` `Edit` button:\n\n    ![](wireshark-preferences-protocol-ssl.png)\n\n1. Add the server private key files in `PEM` (a `.pem` file) or `PKCS#12` (a `.p12`/`.pfx` file) format:\n\n    ![](wireshark-preferences-protocol-ssl-key.png)\n\n    **NB** to add more keys, click the plus button that is on the bottom left corner of the window.\n\n1. Click the `OK` buttons.\n\n1. Start a capture in the `Npcap Loopback Adapter`.\n\n1. Start the HTTPS server `C:\\Users\\vagrant\\Desktop\\tls-dump-clienthello\\tls-dump-clienthello.exe`.\n\n1. From a new PowerShell session, run the following snippet:\n\n    ```powershell\n    [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\n    (New-Object Net.WebClient).DownloadString(\"https://example.com:8888\")\n    ```\n\n1. In Wireshark, apply the `tcp.port==8888` view filter.\n\n1. Right-click a packet that comes from the server (source port is `8888`) and select the `Decode As...` menu item.\n\n    ![](wireshark-decode-as.png)\n\n1. Configure it as:\n\n    ![](wireshark-decode-as-configure.png)\n\n1. Click `OK`.\n\n1. You should now see the decrypted HTTP transaction:\n\n    ![](wireshark-decoded.png)\n\n**NB** You can only decrypt SSL sessions that use the RSA key-exchange. This works on this vagrant environment because [Schannel](https://docs.microsoft.com/en-us/windows/desktop/secauthn/secure-channel) was configured as such at [provision-iiscrypto.ps1](provision-iiscrypto.ps1). You can also use IIS Crypto to only enable the `PKCS` key exchange (don't forget to reboot after applying the settings):\n\n![](iiscrypto-only-rsa-key-exchange.png)\n\n\n# Filters\n\n* `ssl.handshake.type==1`: ClientHello\n* `ssl.handshake.type==2`: ServerHello\n* `ssl.handshake.extensions_server_name`: all handshakes that use Server Name Indication (SNI).\n* `tcp.analysis.flags`: tcp analysis.\n\n\n# Reference\n\n* [Wireshark SSL preferences](https://wiki.wireshark.org/SSL#Preference_Settings).\n* [SSL/TLS Decryption: Uncovering Secrets (Peter Wu) (video)](https://www.youtube.com/watch?v=bwJEBwgoeBg) and [Slides from a previous presentation](https://sharkfesteurope.wireshark.org/assets/presentations17eu/15.pdf).\n* [TCP Analysis (Jasper Bongertz) (video)](https://www.youtube.com/watch?v=Tz6IfyfodKo)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frgl%2Ftls-troubleshoot-vagrant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frgl%2Ftls-troubleshoot-vagrant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frgl%2Ftls-troubleshoot-vagrant/lists"}