Notes »

Hacking HTTPS websockets with mitmproxy

I don't do much "hacking" anymore, but every once in a while I run into something that needs that sort of special attention. I won't get into specifics, but here are some notes on intercepting and manipulating websocket messages on a site that uses HTTPS using mitmproxy.


Install mitmproxy, Void has it in it's repo so it was simply xbps-install mitmproxy. After that I ran it with:

mitmproxy --mode regular@9099

I had to change it from the default 8080 port because I'm running a cryptocurrency rpc node on 8080

then I start chromium with the proxy-server flag:

chromium --proxy-server=localhost:9099

go to the magic url: which allows you to download a certificate authority .pem file, you can import it into chromium by searching 'cert' in settings, clicking 'View certificates...' and then on the 'Authorities' tab click 'Import...' and import the mitmproxy-ca-cert.pem file you downloaded.

Now you should be able to intercept HTTPS traffic in that chromium session.

edit SideBar

Page last modified on June 22, 2023, at 04:56 am