{"action":"created","issue":{"url":"https://api.github.com/repos/offensive-security/kali-nethunter/issues/602","repository_url":"https://api.github.com/repos/offensive-security/kali-nethunter","labels_url":"https://api.github.com/repos/offensive-security/kali-nethunter/issues/602/labels{/name}","comments_url":"https://api.github.com/repos/offensive-security/kali-nethunter/issues/602/comments","events_url":"https://api.github.com/repos/offensive-security/kali-nethunter/issues/602/events","html_url":"https://github.com/offensive-security/kali-nethunter/issues/602","id":179377406,"number":602,"title":"Commands Ignoring Linux Routing Tables","user":{"login":"Physicist1616","id":6197004,"avatar_url":"https://avatars.githubusercontent.com/u/6197004?v=3","gravatar_id":"","url":"https://api.github.com/users/Physicist1616","html_url":"https://github.com/Physicist1616","followers_url":"https://api.github.com/users/Physicist1616/followers","following_url":"https://api.github.com/users/Physicist1616/following{/other_user}","gists_url":"https://api.github.com/users/Physicist1616/gists{/gist_id}","starred_url":"https://api.github.com/users/Physicist1616/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Physicist1616/subscriptions","organizations_url":"https://api.github.com/users/Physicist1616/orgs","repos_url":"https://api.github.com/users/Physicist1616/repos","events_url":"https://api.github.com/users/Physicist1616/events{/privacy}","received_events_url":"https://api.github.com/users/Physicist1616/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-27T01:36:24Z","updated_at":"2016-10-06T21:48:24Z","closed_at":null,"body":"### Device:\r\nNexus 5x Bullhead\r\n\r\n\r\n### OS version (KitKat/Lollipop/Marshmallow/Nougat):\r\nNougat (I know, not officially working yet, but this doesn't seem to my newbly eyes like something this version switch would break; it seems more like it's caused by Android's handling of Wifi and Data hand-offs superseding the Linux routing table.)\r\n\r\nI discovered this by getting no results from nmap; it turns out _I had Syn scanned a private range through my data connection_.  I'm guessing my provider isn't too happy with me, but really, the routes look fine, so I can't figure out why it didn't work.\r\n\r\n### Built from repo (date and build command) or downloaded from website (links):\r\nOriginally downloaded from OffSec git Sep 2nd(-ish), built with `-f` flag on the 22nd(-ish).\r\n`./build.py -f -n -d bullhead -fs full`\r\nNetHunter-LRT for installation\r\n### Output of `cat /proc/version` in adb shell or NetHunter Terminal:\r\nLinux version 3.10.73kali-gddc7121 (root@nhbuild-box) (gcc version 4.9.x-google 20140827 (prerelease) (GCC) ) #2 SMP PREEMPT Wed Aug 24 20:47:30 CDT 2016\r\n\r\n\r\n## Issue:\r\nThe Kali and Android terminals aren't using the right route for the network.  Connected to LTE and a WAP that has no WAN connection simultaneously, I cannot ping or scan into the network despite having an IP and a route; the packets go to rmnet_data0 device instead of wlan0.\r\n\r\nThe results are the same whether I am in the chroot, androidsu, vnc'd to the kali desktop, or using Jack Palevich's terminal emulator from the Play store.\r\n\r\nSpecifying `-I wlan0` on the ping command works correctly, but I'm pretty sure most commands and tools don't have such an interface flag, relying instead on the routing table.  Why would the routing table not work here, and can I make it work?  Is there some preferred method for retaining a working data connection while on wifi? (I noticed cSploit doesn't like this scenario either).\r\n\r\n![screenshot_20160926-145122](https://cloud.githubusercontent.com/assets/6197004/18856997/e065ae62-83fb-11e6-8068-52a5486b35c0.png)\r\n"},"comment":{"url":"https://api.github.com/repos/offensive-security/kali-nethunter/issues/comments/252098604","html_url":"https://github.com/offensive-security/kali-nethunter/issues/602#issuecomment-252098604","issue_url":"https://api.github.com/repos/offensive-security/kali-nethunter/issues/602","id":252098604,"user":{"login":"Physicist1616","id":6197004,"avatar_url":"https://avatars.githubusercontent.com/u/6197004?v=3","gravatar_id":"","url":"https://api.github.com/users/Physicist1616","html_url":"https://github.com/Physicist1616","followers_url":"https://api.github.com/users/Physicist1616/followers","following_url":"https://api.github.com/users/Physicist1616/following{/other_user}","gists_url":"https://api.github.com/users/Physicist1616/gists{/gist_id}","starred_url":"https://api.github.com/users/Physicist1616/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Physicist1616/subscriptions","organizations_url":"https://api.github.com/users/Physicist1616/orgs","repos_url":"https://api.github.com/users/Physicist1616/repos","events_url":"https://api.github.com/users/Physicist1616/events{/privacy}","received_events_url":"https://api.github.com/users/Physicist1616/received_events","type":"User","site_admin":false},"created_at":"2016-10-06T21:48:24Z","updated_at":"2016-10-06T21:48:24Z","body":"That's useful, but it shows me that Linux isn't driving here at all, and it only updates itself to reflect what Android is doing.  It seems, then, that adjusting routes by using the Linux command `ip route add` will make no difference to what my device will actually do.  (Right?)\r\n\r\nMy use case is this:  The targeted wifi network does not have a gateway **or** I don't want to use it because of a firewall, NMS, or no port forwarding.\r\n\r\nTypically, my wifi connection would bounce in this case, but I managed to make it stay up by turning the gateway and dns fields to 0.0.0.0.  Subsequently, setting `ip route default dev rmnet_data0` still causes `ping 8.8.8.8` to return unreachable.\r\n\r\nHow can I tell my device to use the default route for internet stuff or ssh/vnc servers and the closed wifi for any interaction with private address space if `ip route add` doesn't work?  I see you're using it in that script you linked; is the `scope link table $table` portion actually important to setting the route, or am I doing something else wrong, or is this just a nougat bug?"}}
{"actor":{"display_login":"Physicist1616"}}