{"action":"created","issue":{"url":"https://api.github.com/repos/zmap/zgrab2/issues/39","repository_url":"https://api.github.com/repos/zmap/zgrab2","labels_url":"https://api.github.com/repos/zmap/zgrab2/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/zmap/zgrab2/issues/39/comments","events_url":"https://api.github.com/repos/zmap/zgrab2/issues/39/events","html_url":"https://github.com/zmap/zgrab2/pull/39","id":291335256,"number":39,"title":"Add NTP zgrab2 module","user":{"login":"justinbastress","id":33579608,"avatar_url":"https://avatars0.githubusercontent.com/u/33579608?v=4","gravatar_id":"","url":"https://api.github.com/users/justinbastress","html_url":"https://github.com/justinbastress","followers_url":"https://api.github.com/users/justinbastress/followers","following_url":"https://api.github.com/users/justinbastress/following{/other_user}","gists_url":"https://api.github.com/users/justinbastress/gists{/gist_id}","starred_url":"https://api.github.com/users/justinbastress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinbastress/subscriptions","organizations_url":"https://api.github.com/users/justinbastress/orgs","repos_url":"https://api.github.com/users/justinbastress/repos","events_url":"https://api.github.com/users/justinbastress/events{/privacy}","received_events_url":"https://api.github.com/users/justinbastress/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-01-24T19:43:12Z","updated_at":"2018-02-02T21:30:04Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/zmap/zgrab2/pulls/39","html_url":"https://github.com/zmap/zgrab2/pull/39","diff_url":"https://github.com/zmap/zgrab2/pull/39.diff","patch_url":"https://github.com/zmap/zgrab2/pull/39.patch"},"body":"NTP module for zgrab2. Supports both normal operation and sending MONLIST requests.\r\n\r\n## How to Test\r\n\r\nNormal operation can be tested against any NTP server, e.g. `echo \"time.nist.gov\" | cmd/zgrab2/zgrab2 ntp --timeout 3 | jp data`. The timestamp should appear in `data.ntp.result.time`.\r\n\r\nTo test the `--monlist` mode, you obviously will need an NTP service with MONLIST enabled -- the container in `integration-test/ntp/container-4.2.6` can serve this purpose (it builds [NTP 4.2.6](https://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-4.2.6p5.tar.gz) with the default options, which allows MONLIST). So you could run\r\n\r\n * `docker build -t zgrab_ntp:4.2.6 integration_tests/ntp/container-4.2.6`\r\n * `docker run -itd -p 33123:123/udp --rm --name ntptest zgrab_ntp:4.2.6`\r\n * `echo \"127.0.0.1\" | cmd/zgrab2/zgrab2 ntp --port 33123 --timeout 3 --monlist`\r\n\r\nThere should be a `data.ntp.result.monlist_response` with some binary data and a `data.ntp.result.monlist_header` with more details on the response, in addition to the `data.ntp.result.time` and `data.ntp.result.time_response` fields that were present before (they should disappear if you pass `--skip-get-time`).\r\n\r\n## Notes & Caveats\r\n\r\n * For some reason, on my machine at least, forwarding UDP to ::1 on docker containers does not seem to work (forwarding to IPv4 addresses does, and forwarding TCP to IPv6 addresses works as well).\r\n\r\n## Issue Tracking\r\n\r\nPart of the DDoS amplifiers list\r\n"},"comment":{"url":"https://api.github.com/repos/zmap/zgrab2/issues/comments/362713293","html_url":"https://github.com/zmap/zgrab2/pull/39#issuecomment-362713293","issue_url":"https://api.github.com/repos/zmap/zgrab2/issues/39","id":362713293,"user":{"login":"dadrian","id":1158264,"avatar_url":"https://avatars3.githubusercontent.com/u/1158264?v=4","gravatar_id":"","url":"https://api.github.com/users/dadrian","html_url":"https://github.com/dadrian","followers_url":"https://api.github.com/users/dadrian/followers","following_url":"https://api.github.com/users/dadrian/following{/other_user}","gists_url":"https://api.github.com/users/dadrian/gists{/gist_id}","starred_url":"https://api.github.com/users/dadrian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dadrian/subscriptions","organizations_url":"https://api.github.com/users/dadrian/orgs","repos_url":"https://api.github.com/users/dadrian/repos","events_url":"https://api.github.com/users/dadrian/events{/privacy}","received_events_url":"https://api.github.com/users/dadrian/received_events","type":"User","site_admin":false},"created_at":"2018-02-02T21:30:04Z","updated_at":"2018-02-02T21:30:04Z","author_association":"OWNER","body":"I haven't gone digging into the details of this too much yet, but here's a couple high level comments:\r\n- We should avoid returning private structs from public functions, and avoid making public fields on structs be private types. I'll see if I can dig up a good article on this.\r\n- We should start putting a brief description of the protocol and how the scanner scans the protocol as a package-level docs for the module. Example below, only needs to be in one file.\r\n\r\n```\r\n// Package sort provides primitives for sorting slices and user-defined\r\n// collections.\r\npackage sort\r\n```"}}
{"actor":{"display_login":"dadrian"}}