1

I'm trying to make SSL MITM attack but do not really understand how to configure my interfaces to preroute traffic.

I have a laptop, connected to a PC via Ethernet, the PC is connected to the rest of the network vie Ethernet as well.

The PC is running Linux. It has a bridge lets call it mimtbr, and I connected to the bridge the laptop's eth - leth, and the PC's network - pceth.

Then I configure iptables:

sudo iptables -t nat -F
sudo iptables -t nat -A PREROUTING -i leth -p tcp --dport 80 -j REDIRECT --to-ports 8080
sudo iptables -t nat -A PREROUTING -i leth -p tcp --dport 443 -j REDIRECT --to-ports 8443

And on localhost I have a running sslsplit listening ports 8080 and 8443.

And PREROUTING doesn't work. The laptop can connect to any web-site directly.

Can someone suggest me what I'm doing wrong, please.

  • 1
    try -i pceth. – Aria Nov 8 '16 at 10:52
1

I didn't work out how to make it with bridges and solved it another way.

Using DHCP daemon I assign to the laptop an IP and redirect all the traffic via PC. In this case I just configure proper NAT and PREROUTING works smooth then.

  • 1
    I realize that this question is old. However, it makes sense that it didn't work with bridging. Bridging effectively uses those two interfaces like an Ethernet switch at layer 2. Your IPtables rules are operating at layer 3 and above, and will have no effect on the passing of packets across the bridge. – multithr3at3d Aug 6 '17 at 16:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.