{"action":"created","comment":{"url":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/comments/165566350","pull_request_review_id":93528231,"id":165566350,"diff_hunk":"@@ -0,0 +1,120 @@\n+##\n+# This module requires Metasploit: https://metasploit.com/download\n+# Current source: https://github.com/rapid7/metasploit-framework\n+##\n+\n+class MetasploitModule < Msf::Post\n+  include Msf::Post::File\n+  include Msf::Post::Windows::UserProfiles\n+  include Msf::Post::OSX::System\n+  include Msf::Post::Unix\n+\n+  def initialize(info = {})\n+    super(update_info(info,\n+      'Name' => 'Web browsers HSTS entries eraser',\n+      'Description' => %q{\n+        This module removes the HSTS database of the following web browsers: Mozilla Firefox,\n+        Google Chrome, Opera & Safari.\n+      },\n+      'License' => MSF_LICENSE,\n+      'Author' =>\n+        [\n+          'Sheila A. Berta (UnaPibaGeek)', # ElevenPaths\n+        ],\n+      'Platform'     => %w(linux osx unix win),\n+      'References'   =>\n+        [\n+          [ 'URL', 'http://blog.en.elevenpaths.com/2017/12/breaking-out-hsts-and-hpkp-on-firefox.html' ],\n+          [ 'URL', 'https://www.blackhat.com/docs/eu-17/materials/eu-17-Berta-Breaking-Out-HSTS-And-HPKP-On-Firefox-IE-Edge-And-Possibly-Chrome.pdf' ]\n+  \n+        ],\n+      'SessionTypes' => %w(meterpreter shell)\n+    ))\n+  end\n+\n+  def run\n+    profiles = user_profiles\n+\n+    profiles.each do |user_profile|\n+      account = user_profile['UserName']\n+      browsers_hsts_db_path = {}\n+\n+      case session.platform\n+      when 'windows'\n+        browsers_hsts_db_path = {\n+          'Chrome' => \"#{user_profile['LocalAppData']}\\\\Google\\\\Chrome\\\\User Data\\\\Default\\\\TransportSecurity\",\n+          'Firefox' => \"#{user_profile['AppData']}\\\\Mozilla\\\\Firefox\\\\Profiles\", #Just path for now\n+          'Opera' => \"#{user_profile['AppData']}\\\\Opera Software\\\\Opera Stable\\\\TransportSecurity\"\n+        }\n+      when 'unix', 'linux'","path":"modules/post/multi/manage/hsts_eraser.rb","position":49,"original_position":49,"commit_id":"ae93162faf5a1fb2072dcd8b2d0deb7c1d279d75","original_commit_id":"ae93162faf5a1fb2072dcd8b2d0deb7c1d279d75","user":{"login":"wvu-r7","id":4551878,"avatar_url":"https://avatars2.githubusercontent.com/u/4551878?v=4","gravatar_id":"","url":"https://api.github.com/users/wvu-r7","html_url":"https://github.com/wvu-r7","followers_url":"https://api.github.com/users/wvu-r7/followers","following_url":"https://api.github.com/users/wvu-r7/following{/other_user}","gists_url":"https://api.github.com/users/wvu-r7/gists{/gist_id}","starred_url":"https://api.github.com/users/wvu-r7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wvu-r7/subscriptions","organizations_url":"https://api.github.com/users/wvu-r7/orgs","repos_url":"https://api.github.com/users/wvu-r7/repos","events_url":"https://api.github.com/users/wvu-r7/events{/privacy}","received_events_url":"https://api.github.com/users/wvu-r7/received_events","type":"User","site_admin":false},"body":"```\r\nwvu@hiigara:~$ ll .wget-hsts\r\nlrwxrwxrwx 1 wvu wvu 9 Mar  9  2017 .wget-hsts -> /dev/null\r\nwvu@hiigara:~$\r\n```","created_at":"2018-02-02T06:21:39Z","updated_at":"2018-02-02T06:21:39Z","html_url":"https://github.com/rapid7/metasploit-framework/pull/9444#discussion_r165566350","pull_request_url":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/9444","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/comments/165566350"},"html":{"href":"https://github.com/rapid7/metasploit-framework/pull/9444#discussion_r165566350"},"pull_request":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/9444"}},"in_reply_to_id":163428170},"pull_request":{"url":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/9444","id":164428898,"html_url":"https://github.com/rapid7/metasploit-framework/pull/9444","diff_url":"https://github.com/rapid7/metasploit-framework/pull/9444.diff","patch_url":"https://github.com/rapid7/metasploit-framework/pull/9444.patch","issue_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/9444","number":9444,"state":"open","locked":false,"title":"HSTS eraser module","user":{"login":"UnaPibaGeek","id":15347928,"avatar_url":"https://avatars2.githubusercontent.com/u/15347928?v=4","gravatar_id":"","url":"https://api.github.com/users/UnaPibaGeek","html_url":"https://github.com/UnaPibaGeek","followers_url":"https://api.github.com/users/UnaPibaGeek/followers","following_url":"https://api.github.com/users/UnaPibaGeek/following{/other_user}","gists_url":"https://api.github.com/users/UnaPibaGeek/gists{/gist_id}","starred_url":"https://api.github.com/users/UnaPibaGeek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UnaPibaGeek/subscriptions","organizations_url":"https://api.github.com/users/UnaPibaGeek/orgs","repos_url":"https://api.github.com/users/UnaPibaGeek/repos","events_url":"https://api.github.com/users/UnaPibaGeek/events{/privacy}","received_events_url":"https://api.github.com/users/UnaPibaGeek/received_events","type":"User","site_admin":false},"body":"This post exploitation module removes the HSTS database of the following web browsers: Mozilla Firefox, Google Chrome, Opera & Safari.\r\nO.S supported: Windows, UNIX/Linux and Mac. It's multi-user as well.\r\n\r\nYou will need a meterpreter session. \r\n\r\nmeterpreter> run multi/manage/hsts_eraser\r\n\r\nAfter HSTS databases are removed, you can enjoy your favorite sniffer ;-).\r\n","created_at":"2018-01-22T22:03:40Z","updated_at":"2018-02-02T06:21:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d7858e865a2b0c0a5ce6b963ffdbc6031b82773a","assignee":{"login":"asoto-r7","id":35073726,"avatar_url":"https://avatars1.githubusercontent.com/u/35073726?v=4","gravatar_id":"","url":"https://api.github.com/users/asoto-r7","html_url":"https://github.com/asoto-r7","followers_url":"https://api.github.com/users/asoto-r7/followers","following_url":"https://api.github.com/users/asoto-r7/following{/other_user}","gists_url":"https://api.github.com/users/asoto-r7/gists{/gist_id}","starred_url":"https://api.github.com/users/asoto-r7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asoto-r7/subscriptions","organizations_url":"https://api.github.com/users/asoto-r7/orgs","repos_url":"https://api.github.com/users/asoto-r7/repos","events_url":"https://api.github.com/users/asoto-r7/events{/privacy}","received_events_url":"https://api.github.com/users/asoto-r7/received_events","type":"User","site_admin":false},"assignees":[{"login":"asoto-r7","id":35073726,"avatar_url":"https://avatars1.githubusercontent.com/u/35073726?v=4","gravatar_id":"","url":"https://api.github.com/users/asoto-r7","html_url":"https://github.com/asoto-r7","followers_url":"https://api.github.com/users/asoto-r7/followers","following_url":"https://api.github.com/users/asoto-r7/following{/other_user}","gists_url":"https://api.github.com/users/asoto-r7/gists{/gist_id}","starred_url":"https://api.github.com/users/asoto-r7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asoto-r7/subscriptions","organizations_url":"https://api.github.com/users/asoto-r7/orgs","repos_url":"https://api.github.com/users/asoto-r7/repos","events_url":"https://api.github.com/users/asoto-r7/events{/privacy}","received_events_url":"https://api.github.com/users/asoto-r7/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/9444/commits","review_comments_url":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/9444/comments","review_comment_url":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/9444/comments","statuses_url":"https://api.github.com/repos/rapid7/metasploit-framework/statuses/ae93162faf5a1fb2072dcd8b2d0deb7c1d279d75","head":{"label":"UnaPibaGeek:hsts_eraser","ref":"hsts_eraser","sha":"ae93162faf5a1fb2072dcd8b2d0deb7c1d279d75","user":{"login":"UnaPibaGeek","id":15347928,"avatar_url":"https://avatars2.githubusercontent.com/u/15347928?v=4","gravatar_id":"","url":"https://api.github.com/users/UnaPibaGeek","html_url":"https://github.com/UnaPibaGeek","followers_url":"https://api.github.com/users/UnaPibaGeek/followers","following_url":"https://api.github.com/users/UnaPibaGeek/following{/other_user}","gists_url":"https://api.github.com/users/UnaPibaGeek/gists{/gist_id}","starred_url":"https://api.github.com/users/UnaPibaGeek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UnaPibaGeek/subscriptions","organizations_url":"https://api.github.com/users/UnaPibaGeek/orgs","repos_url":"https://api.github.com/users/UnaPibaGeek/repos","events_url":"https://api.github.com/users/UnaPibaGeek/events{/privacy}","received_events_url":"https://api.github.com/users/UnaPibaGeek/received_events","type":"User","site_admin":false},"repo":{"id":118519356,"name":"metasploit-framework","full_name":"UnaPibaGeek/metasploit-framework","owner":{"login":"UnaPibaGeek","id":15347928,"avatar_url":"https://avatars2.githubusercontent.com/u/15347928?v=4","gravatar_id":"","url":"https://api.github.com/users/UnaPibaGeek","html_url":"https://github.com/UnaPibaGeek","followers_url":"https://api.github.com/users/UnaPibaGeek/followers","following_url":"https://api.github.com/users/UnaPibaGeek/following{/other_user}","gists_url":"https://api.github.com/users/UnaPibaGeek/gists{/gist_id}","starred_url":"https://api.github.com/users/UnaPibaGeek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UnaPibaGeek/subscriptions","organizations_url":"https://api.github.com/users/UnaPibaGeek/orgs","repos_url":"https://api.github.com/users/UnaPibaGeek/repos","events_url":"https://api.github.com/users/UnaPibaGeek/events{/privacy}","received_events_url":"https://api.github.com/users/UnaPibaGeek/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/UnaPibaGeek/metasploit-framework","description":"Metasploit Framework","fork":true,"url":"https://api.github.com/repos/UnaPibaGeek/metasploit-framework","forks_url":"https://api.github.com/repos/UnaPibaGeek/metasploit-framework/forks","keys_url":"https://api.github.com/repos/UnaPibaGeek/metasploit-framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/UnaPibaGeek/metasploit-framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/UnaPibaGeek/metasploit-framework/teams","hooks_url":"https://api.github.com/repos/UnaPibaGeek/metasploit-framework/hooks","issue_events_url":"https://api.github.com/repos/UnaPibaGeek/metasploit-framework/issues/events{/number}","events_url":"https://api.github.com/repos/UnaPibaGeek/metasploit-framework/events","assignees_url":"https://api.github.com/repos/UnaPibaGeek/metasploit-framework/assignees{/user}","branches_url":"https://api.github.com/repos/UnaPibaGeek/metasploit-framework/branches{/branch}","tags_url":"https://api.github.com/repos/UnaPibaGeek/metasploit-framework/tags","blobs_url":"https://api.github.com/repos/UnaPibaGeek/metasploit-framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/UnaPibaGeek/metasploit-framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/UnaPibaGeek/metasploit-framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/UnaPibaGeek/metasploit-framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/UnaPibaGeek/metasploit-framework/statuses/{sha}","languages_url":"https://api.github.com/repos/UnaPibaGeek/metasploit-framework/languages","stargazers_url":"https://api.github.com/repos/UnaPibaGeek/metasploit-framework/stargazers","contributors_url":"https://api.github.com/repos/UnaPibaGeek/metasploit-framework/contributors","subscribers_url":"https://api.github.com/repos/UnaPibaGeek/metasploit-framework/subscribers","subscription_url":"https://api.github.com/repos/UnaPibaGeek/metasploit-framework/subscription","commits_url":"https://api.github.com/repos/UnaPibaGeek/metasploit-framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/UnaPibaGeek/metasploit-framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/UnaPibaGeek/metasploit-framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/UnaPibaGeek/metasploit-framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/UnaPibaGeek/metasploit-framework/contents/{+path}","compare_url":"https://api.github.com/repos/UnaPibaGeek/metasploit-framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/UnaPibaGeek/metasploit-framework/merges","archive_url":"https://api.github.com/repos/UnaPibaGeek/metasploit-framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/UnaPibaGeek/metasploit-framework/downloads","issues_url":"https://api.github.com/repos/UnaPibaGeek/metasploit-framework/issues{/number}","pulls_url":"https://api.github.com/repos/UnaPibaGeek/metasploit-framework/pulls{/number}","milestones_url":"https://api.github.com/repos/UnaPibaGeek/metasploit-framework/milestones{/number}","notifications_url":"https://api.github.com/repos/UnaPibaGeek/metasploit-framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/UnaPibaGeek/metasploit-framework/labels{/name}","releases_url":"https://api.github.com/repos/UnaPibaGeek/metasploit-framework/releases{/id}","deployments_url":"https://api.github.com/repos/UnaPibaGeek/metasploit-framework/deployments","created_at":"2018-01-22T21:45:23Z","updated_at":"2018-01-22T21:45:46Z","pushed_at":"2018-01-22T21:54:09Z","git_url":"git://github.com/UnaPibaGeek/metasploit-framework.git","ssh_url":"git@github.com:UnaPibaGeek/metasploit-framework.git","clone_url":"https://github.com/UnaPibaGeek/metasploit-framework.git","svn_url":"https://github.com/UnaPibaGeek/metasploit-framework","homepage":"https://www.metasploit.com/","size":330529,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rapid7:master","ref":"master","sha":"65781efa9e68ac9015ddd9a9f63deed29bbb0473","user":{"login":"rapid7","id":1013671,"avatar_url":"https://avatars1.githubusercontent.com/u/1013671?v=4","gravatar_id":"","url":"https://api.github.com/users/rapid7","html_url":"https://github.com/rapid7","followers_url":"https://api.github.com/users/rapid7/followers","following_url":"https://api.github.com/users/rapid7/following{/other_user}","gists_url":"https://api.github.com/users/rapid7/gists{/gist_id}","starred_url":"https://api.github.com/users/rapid7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rapid7/subscriptions","organizations_url":"https://api.github.com/users/rapid7/orgs","repos_url":"https://api.github.com/users/rapid7/repos","events_url":"https://api.github.com/users/rapid7/events{/privacy}","received_events_url":"https://api.github.com/users/rapid7/received_events","type":"Organization","site_admin":false},"repo":{"id":2293158,"name":"metasploit-framework","full_name":"rapid7/metasploit-framework","owner":{"login":"rapid7","id":1013671,"avatar_url":"https://avatars1.githubusercontent.com/u/1013671?v=4","gravatar_id":"","url":"https://api.github.com/users/rapid7","html_url":"https://github.com/rapid7","followers_url":"https://api.github.com/users/rapid7/followers","following_url":"https://api.github.com/users/rapid7/following{/other_user}","gists_url":"https://api.github.com/users/rapid7/gists{/gist_id}","starred_url":"https://api.github.com/users/rapid7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rapid7/subscriptions","organizations_url":"https://api.github.com/users/rapid7/orgs","repos_url":"https://api.github.com/users/rapid7/repos","events_url":"https://api.github.com/users/rapid7/events{/privacy}","received_events_url":"https://api.github.com/users/rapid7/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rapid7/metasploit-framework","description":"Metasploit Framework","fork":false,"url":"https://api.github.com/repos/rapid7/metasploit-framework","forks_url":"https://api.github.com/repos/rapid7/metasploit-framework/forks","keys_url":"https://api.github.com/repos/rapid7/metasploit-framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rapid7/metasploit-framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rapid7/metasploit-framework/teams","hooks_url":"https://api.github.com/repos/rapid7/metasploit-framework/hooks","issue_events_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/events{/number}","events_url":"https://api.github.com/repos/rapid7/metasploit-framework/events","assignees_url":"https://api.github.com/repos/rapid7/metasploit-framework/assignees{/user}","branches_url":"https://api.github.com/repos/rapid7/metasploit-framework/branches{/branch}","tags_url":"https://api.github.com/repos/rapid7/metasploit-framework/tags","blobs_url":"https://api.github.com/repos/rapid7/metasploit-framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rapid7/metasploit-framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rapid7/metasploit-framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/rapid7/metasploit-framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rapid7/metasploit-framework/statuses/{sha}","languages_url":"https://api.github.com/repos/rapid7/metasploit-framework/languages","stargazers_url":"https://api.github.com/repos/rapid7/metasploit-framework/stargazers","contributors_url":"https://api.github.com/repos/rapid7/metasploit-framework/contributors","subscribers_url":"https://api.github.com/repos/rapid7/metasploit-framework/subscribers","subscription_url":"https://api.github.com/repos/rapid7/metasploit-framework/subscription","commits_url":"https://api.github.com/repos/rapid7/metasploit-framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/rapid7/metasploit-framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/rapid7/metasploit-framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/rapid7/metasploit-framework/contents/{+path}","compare_url":"https://api.github.com/repos/rapid7/metasploit-framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rapid7/metasploit-framework/merges","archive_url":"https://api.github.com/repos/rapid7/metasploit-framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rapid7/metasploit-framework/downloads","issues_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues{/number}","pulls_url":"https://api.github.com/repos/rapid7/metasploit-framework/pulls{/number}","milestones_url":"https://api.github.com/repos/rapid7/metasploit-framework/milestones{/number}","notifications_url":"https://api.github.com/repos/rapid7/metasploit-framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rapid7/metasploit-framework/labels{/name}","releases_url":"https://api.github.com/repos/rapid7/metasploit-framework/releases{/id}","deployments_url":"https://api.github.com/repos/rapid7/metasploit-framework/deployments","created_at":"2011-08-30T06:13:20Z","updated_at":"2018-02-02T05:39:36Z","pushed_at":"2018-02-02T05:59:55Z","git_url":"git://github.com/rapid7/metasploit-framework.git","ssh_url":"git@github.com:rapid7/metasploit-framework.git","clone_url":"https://github.com/rapid7/metasploit-framework.git","svn_url":"https://github.com/rapid7/metasploit-framework","homepage":"https://www.metasploit.com/","size":331623,"stargazers_count":11072,"watchers_count":11072,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":6344,"mirror_url":null,"archived":false,"open_issues_count":465,"license":null,"forks":6344,"open_issues":465,"watchers":11072,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/9444"},"html":{"href":"https://github.com/rapid7/metasploit-framework/pull/9444"},"issue":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/issues/9444"},"comments":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/issues/9444/comments"},"review_comments":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/9444/comments"},"review_comment":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/9444/commits"},"statuses":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/statuses/ae93162faf5a1fb2072dcd8b2d0deb7c1d279d75"}},"author_association":"NONE"}}
{"actor":{"display_login":"wvu-r7"}}