Transforming a router into a hub for my cyber project

I am planning to configure my router (MikroTik Hex S) into a hub using a bash script. Since I am new to OpenWRT, I would like to know if this is possible and, if so, how I can do it.

The goal is that when a packet is sent, all ports receive it. This would enable an attacker with Wireshark to sniff packets on one of the receiving ports.

Short answer: You can't.
Long answer: You can set up port mirroring so that the switch hardware mirrors packets onto another port. I never tried that myself, but see for examples this thread that covers a similar problem.

3 Likes

If you need help ask me, I will try help you.
Probably the script works on others systems now.

1 Like

Thank you very much for your help and your response.

I have several questions :

  • Should I remove the firewall rules (traffic rules)?
  • I want the first user to be connected to port 2 of the router and send data, while the attacker connected to port 3 receives it. Should I leave it in WAN or specify the port on which I want it to be copied?
  • How do I test if the mirroring configuration is working?
1 Like

My setup:
Single interface bridge unmanagement connecting WAN port and LAN1 port.
No use firewall on this interface.

After that, I use a Script to mirror LAN1 port to LAN2 port.
On the computer, install Wireshark and enable the network interface in promiscuous mode.
Connect this computer to LAN2 and monitor all running traffic.

WAN -> ISP, LAN1 -> client, LAN2 -> attacker.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.