News for hackers. Stuff that matters.
Re:API Shouldn't Redirect HTTP to HTTPS by dfabulich on Tuesday May 28, 2024 @04:41PM (#40505392)
The author includes a surprising response from "Provider B" to the HackerOne report.

> Provider B: Reported on 2024-05-21 through their HackerOne program. Got a prompt triage response, stating that attacks requiring MITM (or physical access to a user's device) are outside the scope of the program. Sent back a response explaining that MITM or physical access was not required for sniffing. Awaiting response.

I think Provider B morally should require HTTPS, but it really surprises me that the author would say "MITM or physical access is not required for sniffing."

Is that true? Isn't HTTP sniffing an example of a MITM attack, by definition? Am I using the words "MITM" or "sniffing" differently from the author?

I'm familiar with the following attacks, all of which I'd call "MITM":

1. Public unencrypted (or weakly WEP encrypted) wifi, with clients connecting to HTTP websites. Other clients on the same wifi network can read the unencrypted HTTP packets over the air.

2. Public encrypted wifi, where the attacker controls the wifi network (or runs a proxy wifi with the same/similar SSID,) tricking the client into connecting to the attacker over non-TLS HTTP.

3. ISP-level attacks where the ISP reads the packets between you and the HTTP website.

Aren't all of these MITM attacks, or at the very least "physical access" attacks? How could anyone possibly perform HTTP sniffing without MITM or physical access??

Re:API Shouldn't Redirect HTTP to HTTPS by tsimionescu on Tuesday May 28, 2024 @06:55PM (#40506465)
I don't think people would consider 1 or 3 to be MITM. MITM requires someone who is, well, in the middle: you connect to the MITM, and they connect to your destination. 2 is clearly a MITM.

Also, while 1 is arguably a case of "physical access", I don't think 3 is. If you have a tap in an ISP, you don't have "physical access" to any of the endpoints of the HTTP connection. Otherwise, you could say you have "physical access" to literally every machine on the internet, since there is some physical path between you and that machine.

For another example, Kubernetes started as IPv4-only, and there are still plenty of plugins that have IPv4-only features.

Re:API Shouldn't Redirect HTTP to HTTPS by HL33tibCe7 on Tuesday May 28, 2024 @05:52PM (#40506005)
MITM generally refers to someone who can intercept and modify traffic, i.e. they sit “in the middle”, between you and your recipient, reading/modifying/relaying traffic.

“Passive eavesdropper” is often used to describe what you talk about. Someone on an unencrypted WiFi network sniffing your traffic isn’t really “in the middle” at all, after all.

Re:API Shouldn't Redirect HTTP to HTTPS by tsimionescu on Tuesday May 28, 2024 @06:52PM (#40506445)
I agree that's not a case of MITM, but I do think it's fair to call sitting in range of the same Wi-Fi access point "physical access".
Re:API Shouldn't Redirect HTTP to HTTPS by Control8894 on Tuesday May 28, 2024 @06:09PM (#40506150)
I disagree. So does Wikipedia ("where the attacker secretly relays and possibly alters the communications between two parties who believe that they are directly communicating with each other, as the attacker has inserted themselves between the two parties ... for example, an attacker within range of an Wi-Fi access point hosting a network without encryption could insert themselves as a man in the middle") and so I believe do most people.

"Active MITM" would be how you describe someone who does modify traffic.

And an attacker in each of the scenarios GP mentioned can modify traffic. (For ISP/attacker-controlled networks it's trivial; for other networks you just need to ARP spoof)

Re:API Shouldn't Redirect HTTP to HTTPS by dTP90pN on Tuesday May 28, 2024 @06:21PM (#40506244)
There's no "relaying" when the the attacker just captures unencrypted WiFi packets from the air, or more traditionally, splits some light out of the fiber line.
Re:API Shouldn't Redirect HTTP to HTTPS by Brian_K_White on Tuesday May 28, 2024 @07:15PM (#40506592)
I hate to agree but they are right. Endpoint-spoofing and relaying between two spoofed endpoinbts is just one of the possible forms of mitm attack that just happens to be required if you happen need to open and re-pack encryption in order to evesdrop, or if you need to modify the data.

Spoofing the two endpoints to decrypt and re-encrypt, just so that you can evesdrop without modifying the data (other than the encryption) is certainly still "mitm". Yet all the man in the middle did was evesdrop. Becoming two endpoints in the middle was only an implimentetion detail required because of the encryption.

If you are admin of one of the mail servers along the way between sender and recipient and and can read all the plain smtp messages that pass through your hands like postcards without having to decrypt or spoof endpoints, that is still mitm.

So listening to wifi is no less. There is nothing substantive that makes it any different.

For endpoint-spoofing to be required for mitm, you would have to say that mitm only applies to modifying the data, which I don't think is so. Several purely evesdropping applications are still called mitm.

Re:API Shouldn't Redirect HTTP to HTTPS by Control8894 on Tuesday May 28, 2024 @06:22PM (#40506249)
> for example, an attacker within range of an Wi-Fi access point hosting a network without encryption

The monkey in the middle doesn't get to "relay" anything either, but he can sure see it going over his head.

Re:API Shouldn't Redirect HTTP to HTTPS by chaorace on Wednesday May 29, 2024 @09:13AM (#40511627)
It's just semantics... but I'll throw my hat into the ring nevertheless:

The "eavesdropping" attack happens when you capture unecrypted packets. From there, you could either try to hijack the session by inserting yourself into the local conversation (effectively launching a "MITM" attack) or completely independently of the local conversation attempt to impersonate the login session (effectively launching an "impersonation" attack).

Re:API Shouldn't Redirect HTTP to HTTPS by cricketlover on Wednesday May 29, 2024 @02:29PM (#40515159)
How fan we capture unencrypted packets from the network? I thought you had to run tcpdump or something like that to be able to do that. But you won't be able to run tcpdump if you don't have access to the interface (source or destination), no?
Re:API Shouldn't Redirect HTTP to HTTPS by chaorace on Wednesday May 29, 2024 @06:40PM (#40517935)
I'm speaking in the context of the parent conversation ("unencrypted WiFi packets"). On wireless networks, all devices share the same "wire", so to speak. Normally that traffic is useless when captured due to encryption, but that's not the case on unencrypted (i.e. public) WiFi.
Re:API Shouldn't Redirect HTTP to HTTPS by Control8894 on Thursday May 30, 2024 @05:49PM (#40529094)
It doesn't matter if the wifi is encrypted or not. All that matters is that you share the network with an attacker. You can ARP poison just fine, encrypted or open, wifi or wired.
Re:API Shouldn't Redirect HTTP to HTTPS by chaorace on Thursday May 30, 2024 @06:10PM (#40529280)
Well, actually... you can only successfully launch an ARP poisoning attack if you're on the same network segment as the impersonated host.

(Yes, I am indeed being pedantic on purpose to prove a point. I offer this parenthetical to you in place of an apology)

Re:API Shouldn't Redirect HTTP to HTTPS by syncsynchalt on Tuesday May 28, 2024 @08:58PM (#40507163)
Eve and Mallory are both MITM, in my opinion.
Re:API Shouldn't Redirect HTTP to HTTPS by Aachen on Tuesday May 28, 2024 @04:45PM (#40505430)
Definition question. I can see your reasoning and I can see the author's, where they define MITM as requiring an active component being in the middle to actually tamper with it and not just some far-off device receiving backscatter with a high-gain antenna, or a read-only mirror port on a switch or whatever is technically not "in the middle" but in a cul-de-sac. I'm not sure I've got a strong opinion, claiming one or the other is the only correct definition might just be nitpicking

They may have chosen this wording ("it's not MITM") to get the team into action rather than dismissing the risk

Edit: another legitimate-sounding question downvoted in this thread without further comment (since I'm the only comment still after it got downvoted). Can people maybe just explain what's wrong with a post when it's not a personal attack, not off topic, not answered in the article, or any other obvious downvote reason? Everyone would appreciate the author learning from the problem if there is one

Re:API Shouldn't Redirect HTTP to HTTPS by thaumasiotes on Tuesday May 28, 2024 @05:27PM (#40505800)
> Public unencrypted (or weakly WEP encrypted) wifi, with clients connecting to HTTP websites. Other clients on the same wifi network can read the unencrypted HTTP packets over the air.

That's sniffing. The other two are MITM. The sniffer isn't in the middle of anything; you never speak to him.

Re:API Shouldn't Redirect HTTP to HTTPS by Brian_K_White on Tuesday May 28, 2024 @07:32PM (#40506702)
You have to mitm in order to evesdrop on an encrypted channel. If you do nothing but evesdrop, isn't it still mitm? You had to actively replace & spoof the two endpoints, but that is just a technicality required by the encryption, in the end you still only evesdropped, yet it was still called mitm.

So, mere evesdropping is mitm. So, how is evesdropping on unencrypted traffic or wifi traffic meaningfully different than evesdropping by decrypt & reencrypt?

I don't think the term mitm includes a requirement that you aren't talking to who you thought you were talking to, because generally you do still talk to who you thought you were, just not directly.

The traffic may be modified along the way rather than merely copied, or one or the other endpoint may be wholly faked rather than merely relayed, but they also may not be, the attacker may simply relay everything verbatim in both directions, IE pure evesdropping, and the attack would still be called mitm.

Then again, I guess a keylogger is evesdropping and not called mitm.

Re:API Shouldn't Redirect HTTP to HTTPS by danparsonson on Tuesday May 28, 2024 @07:43PM (#40506751)
> You have to mitm in order to evesdrop on an encrypted channel.

OK but we're talking about evesdropping HTTP, which is unencrypted.

Re:API Shouldn't Redirect HTTP to HTTPS by Brian_K_White on Wednesday May 29, 2024 @12:47AM (#40508562)
So what? My point was the encryption doesn't matter, it's just the reason you have to impersonate in order to merely evesdrop sometimes.
Re:API Shouldn't Redirect HTTP to HTTPS by danparsonson on Wednesday May 29, 2024 @06:08AM (#40510289)
The point is that you don't need to be 'in the middle' to evesdrop unencrypted data - you can sniff traffic without either end being any the wiser, but if the data is TLS encrypted then you can only decrypt it if you interpose yourself.
Re:API Shouldn't Redirect HTTP to HTTPS by Brian_K_White on Wednesday May 29, 2024 @09:52AM (#40512023)
I said that already. What are you trying to contest or expand?

One of us has not understood the others purpose, because I don't understand the point of your response to my first comment. Nothing is making sense after that.

My initial point was to show that mere evesdropping on an encrypted link is still mitm, and so the full interposition is merely an implimentation detail, required by the encryption.

If mere evesdropping is still mitm, then as far as I'm concerned any other evesdropping is also mitm.

But then I also add that a keylogger is an evesdropper and I wouldn't call that mitm so maybe the argument is missing something.

Maybe the way I should think of it is "Yeah. It's an implimentation detail. An implimentation detail called man in the middle. Evesdropping on an encrypted link requires mitm, but not all evesdropping is mitm the way all beef is meat but not all meat is beef."

IE the fact that you chose not to do anything with the mitm but merely evesdrop isn't really significant the way I argued at first. That particular example of "mere evesdropping" is still called mitm not because "therefor evesdropping is a form of mitm", but because that instance of evesdropping required mitm to do it.

Allll that said, I now actually think all those other examples of evesdropping like even a keylogger should be considered mitm. Because they are all examples of you're not talking to who you thought you were talking to. In the case of a passive observer like a wifi or keylogger or phone tap, you thought you were talking to a certain listener, but in fact you were talking to them plus other listeners.

It's perfectly logically arguable both ways.

Re:API Shouldn't Redirect HTTP to HTTPS by danparsonson on Wednesday May 29, 2024 @11:59PM (#40519940)
> I don't understand the point of your response to my first comment. Nothing is making sense after that.

You're right, my initial comment wasn't detailed enough to make the point I was trying to make. Let me try again; and just to be certain we're all on the same page, and not to patronise you - MITM here stands for 'Man In The Middle'.

Per your original comment:

> You have to mitm in order to evesdrop on an encrypted channel.

This is correct. The reason for this is important - the evesdropper has to decrypt the traffic, and the only way they can do that (assuming TLS or equivalent) is to get involved in the initial key exchange. If Alice and Bob are trying to communicate, and Eve wants to listen in, Eve has to spoof both Alice- and Bob's connections so that they (unwittingly) each negotiate an encrypted connection with Eve, instead of with each other. Then, Eve is 'in the middle' of the connection - all traffic explicitly travels through an endpoint controlled by Eve. The communication looks like Alice <-> Eve <-> Bob. Alice and Bob think they are communicating with each other, and as you point out, indirectly they are, but there is a Man (or Woman) In The Middle of the channel - Eve. Eve can do whatever she likes with the data - just store it, or modify it in some way. No matter what Eve chooses to do, the topology of the attack is, by definition, a MITM attack.

> If you do nothing but evesdrop, isn't it still mitm?

It depends on the topology of the connection. In the scenario above, then yes. However if Eve is just sniffing unencrypted wifi packets then no, because, again by definition, there is no third party in the middle of the communication channel. Wifi traffic is broadcast and therefore can be logged by anyone nearby without affecting the connection - just as you and I can both listen to the same radio station using different handsets (that's why busy wifi networks suffer congestion and have to use all kinds of tricks to deal with that - if every device is talking at once then the router can't easily pick them apart; they have to find ways to take turns).

In this situation it's more like Alice and Bob shouting at each other across a room, while Eve hides behind a curtain and listens in. Eve doesn't have to do anything to make this happen, apart from showing up - she is not involved in the communication channel in any way.

> If mere evesdropping is still mitm, then as far as I'm concerned any other evesdropping is also mitm.

Hopefully this is clearer now, but no, that's not true. The mechanism by which the evesdropping occurs defines whether or not the attack is a MITM attack. As an aside:

> Then again, I guess a keylogger is evesdropping and not called mitm.

Yes, a keylogger works as a kind of MITM - all communication between the keyboard and the applications travels through a third party of sorts.

Hopefully that's more useful?

Re:API Shouldn't Redirect HTTP to HTTPS by thaumasiotes on Wednesday May 29, 2024 @12:54AM (#40508589)
> because generally you do still talk to who you thought you were, just not directly.

...that's the requirement. The indirection of someone interposing themselves between you and the party you're trying to speak to is what is referred to by the phrase "man in the middle".

There is no phrase "man to the side". If you don't represent yourself as being the party they want to talk to, you aren't performing a man-in-the-middle attack.

Re:API Shouldn't Redirect HTTP to HTTPS by CGamesPlay on Wednesday May 29, 2024 @03:19AM (#40509356)
At the end of the day it doesn't matter how you define "MITM". HTTPS means that even if I control a network hop in between the two endpoints, I can't get the key. Provider B says "we are OK with any hop on your route gaining access to your keys" (e.g. via owning a wifi router and giving customers access, or via being a customer and sniffing other customer's traffic, or the industrial-level equivalents of this).
Re:API Shouldn't Redirect HTTP to HTTPS by joveian on Wednesday May 29, 2024 @12:20PM (#40513674)
Consider: 4. Someone else logs unencrypted traffic for whatever reason and the attacker gets access to the log later.

MITM means that you need to be in the middle at the time of the attack and so is more limited than an attack that works on logs.