Hi everyone, I’ve been trying to understand how MiTM setups like a transparent proxy work.

Obviously, the use-case here is in a personal scope: I’d like to inspect the traffic of some of my machines. I am aware that Squid can be a transparent proxy, and some might use the Burp Suite to analyse network traffic.

Could someone explain the basic networking and the concept of certificates in this scenario? I feel like I don’t understand how certificates are used well enough.


For example: I realise that if someone inserts a root certificate in the certificate store of an OS, the machine trusts said CA, thus allowing encrypted traffic from the machine to be decrypted. However, say the machine was trying to access Amazon; won’t Amazon have its own certificate? I don’t know how I’m confused about such a simple matter. Would really appreciate your help!

If you are acting as the proxy for the user, then all web requests go through you. A normal proxy would just forward those on to the Amazon (e.g.) server.

In your scenario, the proxy sends a cert to the client saying ‘I’m Amazon’, and the client believes it. The client talks to you like you’re Amazon, and you read all his messages. At the same time, you talk to Amazon pretending to be the user, so you can get all the correct Amazon responses to send back to the user.

@MigratingtoLemmy@lemmy.world
creator
link
fedilink
English
11Y

the proxy sends a cert to the client saying ‘I’m Amazon’, and the client believes it

Thanks, could you explain this a bit more? I didn’t understand what you mean by “sends a cert saying ‘I’m Amazon’”

@SheeEttin@lemmy.world
link
fedilink
English
31Y

That’s literally it. It sends a cert for amazon.com, that your client trusts, because the CA cert used to sign it is in your trusted store.

@MigratingtoLemmy@lemmy.world
creator
link
fedilink
English
11Y

I see, thanks for the explanation. Amazon sends the certificate to the proxy, and the proxy sends its own certificate, masquerading as amazon, to the user.

Thanks

losttourist
link
fedilink
21Y

Yes, I think that ‘masquerading’ is the key bit to grasp. The MITM Proxy isn’t just intercepting the traffic, it alters the traffic as it passes through.

@MigratingtoLemmy@lemmy.world
creator
link
fedilink
English
11Y

Thanks, got it!

Create a post

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.

Rules:

  1. Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it’s not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

  • 1 user online
  • 31 users / day
  • 84 users / week
  • 216 users / month
  • 846 users / 6 months
  • 1 subscriber
  • 1.42K Posts
  • 8.09K Comments
  • Modlog