Regarding "Inferring and hijacking VPN-tunneled TCP connections"

William J. Tolley william at breakpointingbad.com
Fri Dec 6 13:58:43 CET 2019


Hi all,

So the nft rule worked flawlessly on our Ubuntu machines, but I'm
having trouble applying the rule in Manjaro (undoubtedly user error).
I'll try again on some different machines in the lab.

Addressing zrm's question about carrying out the first two parts of the
attack with rp_filter is strict mode - it should have been clarified
that, as far as we know, this only affects certain systems with
sufficiently complicated and/or misconfigured routing rules using
connmarks and fwmarks, such as Android. 

The patch was issued for Android in the September security update,
however, I can still perform the attack without any modification. The
difference now is that if I manually set rp_filter to strict on Android
I can prevent the attack for IPv4 etc. Before this update, it would
basically respond to any spoofed
packets addressed to the virtual interface IP on the wireless and/or
mobile interface(s). This is CVE-2019-9461.

Thanks,

Wm.


On Thu, 2019-12-05 at 21:24 +0100, Jason A. Donenfeld wrote:
> Hey Vasili,
> 
> On Thu, Dec 5, 2019 at 8:50 PM Vasili Pupkin <diggest at gmail.com>
> wrote:
> > Isn't it enough to just enforce Strong Host Model, i.e. a host
> > won't
> > respond from it's IP that is not facing the interface. If a host is
> > connected to two subnets 10.1.x.x and 10.2.x.x and have two IP
> > 10.1.0.1
> > and 10.2.0.1, it will just drop all the packets sent to 10.1.0.1
> > that
> > came from the interface 10.2.0.1 and vice verse. This model can be
> > emulated using the FIB lookup feature of NFT with this one liner:
> > 
> > nft add rule inet filter input fib daddr . iif type != { local,
> > broadcast, multicast } drop
> > 
> > this also works for both IP4 and IP6. This mode can be safely
> > enabled on
> > most setups not breaking things. Enabling it is a good precaution
> > measure anyway and it is a shame that it is not widely assumed as
> > default and standard.
> > 
> > Doing the same with just iptables isn't easy and can't be
> > accomplished
> > with one liner but nft perfectly coexist with iptables.
> > 
> 
> That actually appears to work pretty well in my quick bootleg setup.
> Thanks. I'm adding William to the email chain -- perhaps he can try
> this and report back with his attack rig?
> 
> If we can make nft coexistance work reliably, perhaps we can run the
> nft rule on systems where the nft binary simply exists.
> 
> For cleanup, we'll need some way of marking that rule as belonging to
> wg-quick(8) for our interface. The iptables magic currently uses
> --comment for that.
> 
> There's also the issue with nft not having default table and chain
> names. Perhaps it'd be cleanest to just ad a new table and chain with
> a given name, and set that as a high priority input hook?
> 
> We'll also probably want to make this only apply to our interface,
> and
> not others, if that's possible.
> 
> Any downsides I'm overlooking?
> 
> William -- you might want to subscribe to follow along better:
> https://lists.zx2c4.com/pipermail/wireguard/2019-December/004679.html
> https://lists.zx2c4.com/mailman/listinfo/wireguard



More information about the WireGuard mailing list