Skip to content

mitm6 doesn't work on VPN tunnel interface. "mitm6 -i tun0 -d <domain name>" #16

Open

Description

@ssc1982
   valid_lft forever preferred_lft forever

3: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 100
link/none
inet 10.10.15.169/23 brd 10.10.15.255 scope global tun0
valid_lft forever preferred_lft forever
inet6 dead:beef:2::11a7/64 scope global
valid_lft forever preferred_lft forever
inet6 fe80::e4e0:7a25:ea5d:b6ee/64 scope link stable-privacy
valid_lft forever preferred_lft forever

root@kali:/opt/mitm6# mitm6 -i tun0
Traceback (most recent call last):
File "/usr/local/bin/mitm6", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.8/dist-packages/mitm6/mitm6.py", line 340, in main
config = Config(args)
File "/usr/local/lib/python3.8/dist-packages/mitm6/mitm6.py", line 57, in init
self.macaddr = netifaces.ifaddresses(self.default_if)[netifaces.AF_LINK][0]['addr']
KeyError: 17

Activity

  1. korang commented on Sep 9, 2020

    @korang

    SAme issue with CSCOTUN0 cisco anyconnect vpn connection.

  2. InitRoot commented on Mar 25, 2021

    @InitRoot

    This is due to VPN on layer2 usually doesn't receive MAC addresses.
    You can try modifying the code as below for line 57:

    
      if args.mac is None:
                self.macaddr = '00:00:00:00:00:00'
            else:
                self.macaddr = args.mac
    
  3. 0x7274 commented on Aug 7, 2024

    @0x7274

    This is due to VPN on layer2 usually doesn't receive MAC addresses. You can try modifying the code as below for line 57:

    
      if args.mac is None:
                self.macaddr = '00:00:00:00:00:00'
            else:
                self.macaddr = args.mac
    

    thanks mate, works perfectly

  4. KreativeNerd commented on Aug 25, 2024

    @KreativeNerd

    image
    After following what was written here, the error still persist for me. This is the full error text:
    ┌──(kali㉿Smart-Hacker)-[~]
    └─$ sudo mitm6 -i tun0 -d secdojo.local
    [sudo] password for kali:
    /usr/local/lib/python3.11/dist-packages/scapy/layers/ipsec.py:471: CryptographyDeprecationWarning: Blowfish has been deprecated and will be removed in a future release
    cipher=algorithms.Blowfish,
    /usr/local/lib/python3.11/dist-packages/scapy/layers/ipsec.py:485: CryptographyDeprecationWarning: CAST5 has been deprecated and will be removed in a future release
    cipher=algorithms.CAST5,
    Traceback (most recent call last):
    File "/usr/local/bin/mitm6", line 33, in
    sys.exit(load_entry_point('mitm6==0.3.0', 'console_scripts', 'mitm6')())
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.11/dist-packages/mitm6-0.3.0-py3.11.egg/mitm6/mitm6.py", line 369, in main
    File "/usr/local/lib/python3.11/dist-packages/mitm6-0.3.0-py3.11.egg/mitm6/mitm6.py", line 57, in init
    KeyError: 17

  5. dovelus commented on Sep 7, 2024

    @dovelus

    Try to run the python directly instead for example for me was sudo python3 /opt/mitm6/mitm6/mitm6.py -d <domian> -i tun0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions