{"action":"created","issue":{"url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/7774","repository_url":"https://api.github.com/repos/rapid7/metasploit-framework","labels_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/7774/labels{/name}","comments_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/7774/comments","events_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/7774/events","html_url":"https://github.com/rapid7/metasploit-framework/pull/7774","id":198281630,"number":7774,"title":"Fix recvfrom / recvfrom_nonblock on pivoted UDP sockets","user":{"login":"busterb","id":4108654,"avatar_url":"https://avatars.githubusercontent.com/u/4108654?v=3","gravatar_id":"","url":"https://api.github.com/users/busterb","html_url":"https://github.com/busterb","followers_url":"https://api.github.com/users/busterb/followers","following_url":"https://api.github.com/users/busterb/following{/other_user}","gists_url":"https://api.github.com/users/busterb/gists{/gist_id}","starred_url":"https://api.github.com/users/busterb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/busterb/subscriptions","organizations_url":"https://api.github.com/users/busterb/orgs","repos_url":"https://api.github.com/users/busterb/repos","events_url":"https://api.github.com/users/busterb/events{/privacy}","received_events_url":"https://api.github.com/users/busterb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-01-01T21:03:33Z","updated_at":"2017-01-01T21:20:26Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/7774","html_url":"https://github.com/rapid7/metasploit-framework/pull/7774","diff_url":"https://github.com/rapid7/metasploit-framework/pull/7774.diff","patch_url":"https://github.com/rapid7/metasploit-framework/pull/7774.patch"},"body":"While testing UDP pivoting on https://github.com/rapid7/mettle/pull/50 I found that modules calling recvfrom on a pivoted socket did not ever receive any data. Several overzealous rescues deep, I tracked it down to recvfrom_nonblock being changed in #6692 to call super (which is the ruby socket implementation), which does not accept *nil* for the flags parameter. So, any module that does not specify flags on recvfrom will cause a silent exception on that call, and fail to receive any data at all.\r\n\r\n## Verification\r\n\r\nList the steps needed to make sure this thing works\r\n\r\n- [ ] Start `msfconsole` and setup a windows meterpreter session (the only meterpreter with working UDP pivoting currently, unless https://github.com/rapid7/mettle/pull/50 is merged.\r\n- [ ] Run a UDP socket pivot-capable module, such as udp_probe, and enable a route so you can scan an active network with UDP services:\r\n\r\n```\r\nmsf > route add 192.168.1.0 255.255.255.0 1\r\nmsf > use auxiliary/scanner/discovery/udp_probe\r\nmsf > set rhosts 192.168.1.1\r\nmsf > run\r\n```\r\n- [ ] **Verify** that the module can detect UDP services through the pivot, and that it is actually generating traffic via the pivot.\r\n\r\nI also changed the behavior of the DIO handler to truncate datagrams rather than splitting them into smaller chunks, since it should be impossible to actually receive such a large UDP datagram, even with IP fragmentation (the actual limit here.)"},"comment":{"url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/comments/269920144","html_url":"https://github.com/rapid7/metasploit-framework/pull/7774#issuecomment-269920144","issue_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/7774","id":269920144,"user":{"login":"busterb","id":4108654,"avatar_url":"https://avatars.githubusercontent.com/u/4108654?v=3","gravatar_id":"","url":"https://api.github.com/users/busterb","html_url":"https://github.com/busterb","followers_url":"https://api.github.com/users/busterb/followers","following_url":"https://api.github.com/users/busterb/following{/other_user}","gists_url":"https://api.github.com/users/busterb/gists{/gist_id}","starred_url":"https://api.github.com/users/busterb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/busterb/subscriptions","organizations_url":"https://api.github.com/users/busterb/orgs","repos_url":"https://api.github.com/users/busterb/repos","events_url":"https://api.github.com/users/busterb/events{/privacy}","received_events_url":"https://api.github.com/users/busterb/received_events","type":"User","site_admin":false},"created_at":"2017-01-01T21:20:26Z","updated_at":"2017-01-01T21:20:26Z","body":"For some reason, udp_sweep (which is supposed to replace udp_probe) does attempt to use channels. Might try to fix it and push with this."}}
{"actor":{"display_login":"busterb"}}