{"action":"created","issue":{"url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/7435","repository_url":"https://api.github.com/repos/rapid7/metasploit-framework","labels_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/7435/labels{/name}","comments_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/7435/comments","events_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/7435/events","html_url":"https://github.com/rapid7/metasploit-framework/pull/7435","id":182377766,"number":7435,"title":"NTLM Util change to support Unicode hostnames","user":{"login":"bwatters-r7","id":17987018,"avatar_url":"https://avatars.githubusercontent.com/u/17987018?v=3","gravatar_id":"","url":"https://api.github.com/users/bwatters-r7","html_url":"https://github.com/bwatters-r7","followers_url":"https://api.github.com/users/bwatters-r7/followers","following_url":"https://api.github.com/users/bwatters-r7/following{/other_user}","gists_url":"https://api.github.com/users/bwatters-r7/gists{/gist_id}","starred_url":"https://api.github.com/users/bwatters-r7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bwatters-r7/subscriptions","organizations_url":"https://api.github.com/users/bwatters-r7/orgs","repos_url":"https://api.github.com/users/bwatters-r7/repos","events_url":"https://api.github.com/users/bwatters-r7/events{/privacy}","received_events_url":"https://api.github.com/users/bwatters-r7/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rapid7/metasploit-framework/labels/database","name":"database","color":"f7c6c7"},{"url":"https://api.github.com/repos/rapid7/metasploit-framework/labels/enhancement","name":"enhancement","color":"5319e7"},{"url":"https://api.github.com/repos/rapid7/metasploit-framework/labels/rn-enhancement%20(r7%20use%20only)","name":"rn-enhancement (r7 use only)","color":"3DC2DA"}],"state":"closed","locked":false,"assignee":{"login":"bcook-r7","id":10031469,"avatar_url":"https://avatars.githubusercontent.com/u/10031469?v=3","gravatar_id":"","url":"https://api.github.com/users/bcook-r7","html_url":"https://github.com/bcook-r7","followers_url":"https://api.github.com/users/bcook-r7/followers","following_url":"https://api.github.com/users/bcook-r7/following{/other_user}","gists_url":"https://api.github.com/users/bcook-r7/gists{/gist_id}","starred_url":"https://api.github.com/users/bcook-r7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcook-r7/subscriptions","organizations_url":"https://api.github.com/users/bcook-r7/orgs","repos_url":"https://api.github.com/users/bcook-r7/repos","events_url":"https://api.github.com/users/bcook-r7/events{/privacy}","received_events_url":"https://api.github.com/users/bcook-r7/received_events","type":"User","site_admin":false},"assignees":[{"login":"bcook-r7","id":10031469,"avatar_url":"https://avatars.githubusercontent.com/u/10031469?v=3","gravatar_id":"","url":"https://api.github.com/users/bcook-r7","html_url":"https://github.com/bcook-r7","followers_url":"https://api.github.com/users/bcook-r7/followers","following_url":"https://api.github.com/users/bcook-r7/following{/other_user}","gists_url":"https://api.github.com/users/bcook-r7/gists{/gist_id}","starred_url":"https://api.github.com/users/bcook-r7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcook-r7/subscriptions","organizations_url":"https://api.github.com/users/bcook-r7/orgs","repos_url":"https://api.github.com/users/bcook-r7/repos","events_url":"https://api.github.com/users/bcook-r7/events{/privacy}","received_events_url":"https://api.github.com/users/bcook-r7/received_events","type":"User","site_admin":false}],"milestone":null,"comments":9,"created_at":"2016-10-11T21:21:52Z","updated_at":"2016-10-14T19:22:32Z","closed_at":"2016-10-14T14:47:30Z","pull_request":{"url":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/7435","html_url":"https://github.com/rapid7/metasploit-framework/pull/7435","diff_url":"https://github.com/rapid7/metasploit-framework/pull/7435.diff","patch_url":"https://github.com/rapid7/metasploit-framework/pull/7435.patch"},"body":"# This PR relies on a change to rex-text: https://github.com/rapid7/rex-text/pull/3\r\n\r\n# What does this do?\r\nThis is a change to the ntlm utilities library to properly convert and store unicode hostnames.  Previously, the NTLM blob was parsed and the data was put into ANSI using an in-house conversion before it was passed back to the calling module.  That destroyed any hostname that could not be rendered by ANSI characters.  This PR adds code to convert the UTF-16LE native hostnames contained in the blob to UTF-8 strings using ruby built-ins so that they can be displayed and stored to the database.  This probably fixes international domain names, too.  Without the rex-text change, the UTF-8 encoded data will display in the scanner, but the sanitization functions called before the db write will choke on the UTF-8 characters.\r\n\r\n# What does this break?\r\nI know that there seems to be an issue in displaying the data, as when you run `hosts`, the whitespace padding appears incorrect.  Otherwise, I do not know.  This does have the possibility of breaking other things, though I tried to minimize it.\r\n\r\n## Verification\r\n\r\n- [x] Start `msfconsole`\r\n- [x] `use auxiliary/scanner/smb/smb_version`\r\n- [x] `set rhosts <host with international hostname>`\r\n- [x] `run`\r\n- [x] **Verify** hostname is given correctly in the output\r\n- [x] `hosts`\r\n- [x] **Verify** hostname is stored in the database correctly\r\n\r\n## Example Run:\r\n```\r\nmsf > use auxiliary/scanner/smb/smb_version \r\nmsf auxiliary(smb_version) > set rhosts <russian_host_ip>\r\nrhosts => <russian_host_ip>\r\nmsf auxiliary(smb_version) > run\r\n\r\n[*] <russian_host_ip>:445    - Host is running Windows 2012 R2 Standard (build:9600) (name:КОМПЬЮТЕР)\r\n[*] Scanned 1 of 1 hosts (100% complete)\r\n[*] Auxiliary module execution completed\r\nmsf auxiliary(smb_version) > hosts\r\n\r\nHosts\r\n=====\r\n\r\naddress         mac  name                os_name          os_flavor  os_sp  purpose  info  comments\r\n-------         ---  ----                -------          ---------  -----  -------  ----  --------\r\n<russian_host_ip>       КОМПЬЮТЕР  Windows 2012 R2  Standard          server         \r\n\r\nmsf auxiliary(smb_version) >\r\n```"},"comment":{"url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/comments/253897294","html_url":"https://github.com/rapid7/metasploit-framework/pull/7435#issuecomment-253897294","issue_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/7435","id":253897294,"user":{"login":"tdoan-r7","id":1195616,"avatar_url":"https://avatars.githubusercontent.com/u/1195616?v=3","gravatar_id":"","url":"https://api.github.com/users/tdoan-r7","html_url":"https://github.com/tdoan-r7","followers_url":"https://api.github.com/users/tdoan-r7/followers","following_url":"https://api.github.com/users/tdoan-r7/following{/other_user}","gists_url":"https://api.github.com/users/tdoan-r7/gists{/gist_id}","starred_url":"https://api.github.com/users/tdoan-r7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tdoan-r7/subscriptions","organizations_url":"https://api.github.com/users/tdoan-r7/orgs","repos_url":"https://api.github.com/users/tdoan-r7/repos","events_url":"https://api.github.com/users/tdoan-r7/events{/privacy}","received_events_url":"https://api.github.com/users/tdoan-r7/received_events","type":"User","site_admin":false},"created_at":"2016-10-14T19:22:32Z","updated_at":"2016-10-14T19:22:32Z","body":"# Release Notes\r\n\r\nThe NTLM utilities library now properly converts and stores unicode host names. The UTF-16LE native hostnames contained in the blob is converted to UTF-8 strings using ruby built-ins so that they can be displayed and stored to the database. \r\n"}}
{"actor":{"display_login":"tdoan-r7"}}