[Windows Mobile Development and Hacking General] evilcat:
We are testing IP forwarding feature on windows mobile 6.1 platform. The scenario is as following:

169.254.19.49/16 169.254.54.165/16

+--------| a +--------+

| PC1 | ----------- | Mobile |

+--------+ +--------+

\ |

\ c b |

\ |

\ |

\ +---------+

\-------------- | PC2 |

169.254.160.194/16 +---------+

We setup an Wi-Fi ad-hoc network and 3 nodes involved. This is a full mesh network. There is a direct wireless link 'c' between PC1 and PC2 and we expect the IP packets path changed to be PC1--Mobile--PC2.

We enabled IP forwarding on the mobile phone and change PC1 and PC2's routing tables. But it seems IP forwarding does not work properly. We did 'ping 169.254.19.49' from PC2 and we did get the ICMP replies. While the packet sniffer shows that those replies are originated by the middle node (source IP is 169.254.54.165) and no packets are received by 169.254.19.49. How come the mobile phone take the responsibility to answer the ICMP reply for PC1 and it even does not check the reachability to PC1.It seems there is some kind of proxy running on the mobile? Any configuration we are missing?

The modifications to the devices are attached below:

PC1

----------------------------------------------------------------------------------------

IP: 169.254.19.49/16

Routing Table:

Network Destination Netmask Gateway Interface Metric

169.254.0.0 255.255.0.0 169.254.19.49 169.254.19.49 30

169.254.19.49 255.255.255.255 127.0.0.1 127.0.0.1 30

169.254.160.194 255.255.255.255 169.254.54.165 169.254.19.49 30

169.254.255.255 255.255.255.255 169.254.19.49 169.254.19.49 30

Basically, the routing setting implies that 'to 169.254.160.194, the next hop is 169.254.54.165'.

Registry setting:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\EnableICMPRedirect = 0

The purpose is to ignore possible ICMP redirect message from the mobile phone which would change the route entry 169.254.160.194 back to a direct network route.

Mobile:

----------------------------------------------------------------------------------------

IP: 169.254. 54.165/16

Routing Table:

Network Destination Netmask Gateway Interface

Metric

169.254.0.0 255.255.0.0 169.254.160.194 0x3

25

169.254.19.49 255.255.255.255 169.254.54.165 0x3

30

169.254.54.165 255.255.255.255 127.0.0.1 0x3

30

169.254.160.194 255.255.255.255 169.254.54.165 0x3

30

169.254.255.255 255.255.255.255 169.254.2.1 0x30002

30

169.254.255.255 255.255.255.255 169.254.54.165 0x3

30

Registry setting:

HKEY_LOCAL_MACHINE\Comm\Tcpip\Parms\IpEnableRouter = 1

HKEY_LOCAL_MACHINE\Comm\Tcpip\Parms\EnableICMPRedirects = 0

PC2

----------------------------------------------------------------------------

------------

IP: 169.254.160.194/16

Routing Table:

Network Destination Netmask Gateway Interface

Metric

169.254.0.0 255.255.0.0 169.254.160.194 169.254.160.194

25

169.254.19.49 255.255.255.255 169.254.54.165 169.254.160.194

30

169.254.160.194 255.255.255.255 127.0.0.1 127.0.0.1

25

169.254.255.255 255.255.255.255 169.254.2.2 169.254.2.2

30

169.254.255.255 255.255.255.255 169.254.160.194 169.254.160.194

25

Basically, the routing setting implies that 'to 169.254.19.49, the next hop

is 169.254.54.165'.

Registry setting:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Enable

ICMPRedirect = 0