{"action":"created","comment":{"url":"https://api.github.com/repos/guardicore/monkey/pulls/comments/208265817","pull_request_review_id":144024227,"id":208265817,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwODI2NTgxNw==","diff_hunk":"@@ -9,176 +9,66 @@\n import re\n \n import logging\n-from exploit import HostExploiter\n-from exploit.tools import get_target_monkey, get_monkey_depth\n-from tools import build_monkey_commandline, HTTPTools\n-from model import CHECK_LINUX, CHECK_WINDOWS, POWERSHELL_HTTP, WGET_HTTP, EXISTS, ID_STRING, RDP_CMDLINE_HTTP, \\\n-                  DROPPER_ARG\n+from web_rce import WebRCE\n+import copy\n \n __author__ = \"VakarisZ\"\n \n LOG = logging.getLogger(__name__)\n \n DOWNLOAD_TIMEOUT = 300\n \n-class Struts2Exploiter(HostExploiter):\n+\n+class Struts2Exploiter(WebRCE):\n     _TARGET_OS_TYPE = ['linux', 'windows']\n \n     def __init__(self, host):\n         super(Struts2Exploiter, self).__init__(host)\n-        self._config = __import__('config').WormConfiguration\n-        self.skip_exist = self._config.skip_exploit_if_file_exist\n-        self.HTTP = [str(port) for port in self._config.HTTP_PORTS]\n \n     def exploit_host(self):","path":"infection_monkey/exploit/struts2.py","position":29,"original_position":29,"commit_id":"7c1a68e0262dfe65375c598f20c3ef69793d2584","original_commit_id":"7c1a68e0262dfe65375c598f20c3ef69793d2584","user":{"login":"itaymmguardicore","id":30774653,"node_id":"MDQ6VXNlcjMwNzc0NjUz","avatar_url":"https://avatars3.githubusercontent.com/u/30774653?v=4","gravatar_id":"","url":"https://api.github.com/users/itaymmguardicore","html_url":"https://github.com/itaymmguardicore","followers_url":"https://api.github.com/users/itaymmguardicore/followers","following_url":"https://api.github.com/users/itaymmguardicore/following{/other_user}","gists_url":"https://api.github.com/users/itaymmguardicore/gists{/gist_id}","starred_url":"https://api.github.com/users/itaymmguardicore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itaymmguardicore/subscriptions","organizations_url":"https://api.github.com/users/itaymmguardicore/orgs","repos_url":"https://api.github.com/users/itaymmguardicore/repos","events_url":"https://api.github.com/users/itaymmguardicore/events{/privacy}","received_events_url":"https://api.github.com/users/itaymmguardicore/received_events","type":"User","site_admin":false},"body":"It seems like this should be the flow of all web-rce exploits, why not have it as the actual implementation of exploit_host on WebRCE?\r\nIf there's some data that's missing (like parameters to get_ports_w), maybe add an abstract getter for these parameters.","created_at":"2018-08-07T14:59:08Z","updated_at":"2018-08-07T14:59:39Z","html_url":"https://github.com/guardicore/monkey/pull/160#discussion_r208265817","pull_request_url":"https://api.github.com/repos/guardicore/monkey/pulls/160","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/guardicore/monkey/pulls/comments/208265817"},"html":{"href":"https://github.com/guardicore/monkey/pull/160#discussion_r208265817"},"pull_request":{"href":"https://api.github.com/repos/guardicore/monkey/pulls/160"}}},"pull_request":{"url":"https://api.github.com/repos/guardicore/monkey/pulls/160","id":202519136,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAyNTE5MTM2","html_url":"https://github.com/guardicore/monkey/pull/160","diff_url":"https://github.com/guardicore/monkey/pull/160.diff","patch_url":"https://github.com/guardicore/monkey/pull/160.patch","issue_url":"https://api.github.com/repos/guardicore/monkey/issues/160","number":160,"state":"open","locked":false,"title":"Struts2 with framework","user":{"login":"VakarisZ","id":36815064,"node_id":"MDQ6VXNlcjM2ODE1MDY0","avatar_url":"https://avatars1.githubusercontent.com/u/36815064?v=4","gravatar_id":"","url":"https://api.github.com/users/VakarisZ","html_url":"https://github.com/VakarisZ","followers_url":"https://api.github.com/users/VakarisZ/followers","following_url":"https://api.github.com/users/VakarisZ/following{/other_user}","gists_url":"https://api.github.com/users/VakarisZ/gists{/gist_id}","starred_url":"https://api.github.com/users/VakarisZ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VakarisZ/subscriptions","organizations_url":"https://api.github.com/users/VakarisZ/orgs","repos_url":"https://api.github.com/users/VakarisZ/repos","events_url":"https://api.github.com/users/VakarisZ/events{/privacy}","received_events_url":"https://api.github.com/users/VakarisZ/received_events","type":"User","site_admin":false},"body":"# Feature / Fixes\r\n> Changed struts2 implementation according to the new web rce framework.\r\n\r\nTested with the same servers and same windows/ubuntu machines\r\n","created_at":"2018-07-19T10:47:55Z","updated_at":"2018-08-07T14:59:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"50a5ac99f3ed3b33172d051fd71d95342287074b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/guardicore/monkey/pulls/160/commits","review_comments_url":"https://api.github.com/repos/guardicore/monkey/pulls/160/comments","review_comment_url":"https://api.github.com/repos/guardicore/monkey/pulls/comments{/number}","comments_url":"https://api.github.com/repos/guardicore/monkey/issues/160/comments","statuses_url":"https://api.github.com/repos/guardicore/monkey/statuses/7c1a68e0262dfe65375c598f20c3ef69793d2584","head":{"label":"VakarisZ:Struts2_with_framework","ref":"Struts2_with_framework","sha":"7c1a68e0262dfe65375c598f20c3ef69793d2584","user":{"login":"VakarisZ","id":36815064,"node_id":"MDQ6VXNlcjM2ODE1MDY0","avatar_url":"https://avatars1.githubusercontent.com/u/36815064?v=4","gravatar_id":"","url":"https://api.github.com/users/VakarisZ","html_url":"https://github.com/VakarisZ","followers_url":"https://api.github.com/users/VakarisZ/followers","following_url":"https://api.github.com/users/VakarisZ/following{/other_user}","gists_url":"https://api.github.com/users/VakarisZ/gists{/gist_id}","starred_url":"https://api.github.com/users/VakarisZ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VakarisZ/subscriptions","organizations_url":"https://api.github.com/users/VakarisZ/orgs","repos_url":"https://api.github.com/users/VakarisZ/repos","events_url":"https://api.github.com/users/VakarisZ/events{/privacy}","received_events_url":"https://api.github.com/users/VakarisZ/received_events","type":"User","site_admin":false},"repo":{"id":131517358,"node_id":"MDEwOlJlcG9zaXRvcnkxMzE1MTczNTg=","name":"monkey","full_name":"VakarisZ/monkey","owner":{"login":"VakarisZ","id":36815064,"node_id":"MDQ6VXNlcjM2ODE1MDY0","avatar_url":"https://avatars1.githubusercontent.com/u/36815064?v=4","gravatar_id":"","url":"https://api.github.com/users/VakarisZ","html_url":"https://github.com/VakarisZ","followers_url":"https://api.github.com/users/VakarisZ/followers","following_url":"https://api.github.com/users/VakarisZ/following{/other_user}","gists_url":"https://api.github.com/users/VakarisZ/gists{/gist_id}","starred_url":"https://api.github.com/users/VakarisZ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VakarisZ/subscriptions","organizations_url":"https://api.github.com/users/VakarisZ/orgs","repos_url":"https://api.github.com/users/VakarisZ/repos","events_url":"https://api.github.com/users/VakarisZ/events{/privacy}","received_events_url":"https://api.github.com/users/VakarisZ/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/VakarisZ/monkey","description":"Infection Monkey - An automated pentest tool","fork":true,"url":"https://api.github.com/repos/VakarisZ/monkey","forks_url":"https://api.github.com/repos/VakarisZ/monkey/forks","keys_url":"https://api.github.com/repos/VakarisZ/monkey/keys{/key_id}","collaborators_url":"https://api.github.com/repos/VakarisZ/monkey/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/VakarisZ/monkey/teams","hooks_url":"https://api.github.com/repos/VakarisZ/monkey/hooks","issue_events_url":"https://api.github.com/repos/VakarisZ/monkey/issues/events{/number}","events_url":"https://api.github.com/repos/VakarisZ/monkey/events","assignees_url":"https://api.github.com/repos/VakarisZ/monkey/assignees{/user}","branches_url":"https://api.github.com/repos/VakarisZ/monkey/branches{/branch}","tags_url":"https://api.github.com/repos/VakarisZ/monkey/tags","blobs_url":"https://api.github.com/repos/VakarisZ/monkey/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/VakarisZ/monkey/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/VakarisZ/monkey/git/refs{/sha}","trees_url":"https://api.github.com/repos/VakarisZ/monkey/git/trees{/sha}","statuses_url":"https://api.github.com/repos/VakarisZ/monkey/statuses/{sha}","languages_url":"https://api.github.com/repos/VakarisZ/monkey/languages","stargazers_url":"https://api.github.com/repos/VakarisZ/monkey/stargazers","contributors_url":"https://api.github.com/repos/VakarisZ/monkey/contributors","subscribers_url":"https://api.github.com/repos/VakarisZ/monkey/subscribers","subscription_url":"https://api.github.com/repos/VakarisZ/monkey/subscription","commits_url":"https://api.github.com/repos/VakarisZ/monkey/commits{/sha}","git_commits_url":"https://api.github.com/repos/VakarisZ/monkey/git/commits{/sha}","comments_url":"https://api.github.com/repos/VakarisZ/monkey/comments{/number}","issue_comment_url":"https://api.github.com/repos/VakarisZ/monkey/issues/comments{/number}","contents_url":"https://api.github.com/repos/VakarisZ/monkey/contents/{+path}","compare_url":"https://api.github.com/repos/VakarisZ/monkey/compare/{base}...{head}","merges_url":"https://api.github.com/repos/VakarisZ/monkey/merges","archive_url":"https://api.github.com/repos/VakarisZ/monkey/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/VakarisZ/monkey/downloads","issues_url":"https://api.github.com/repos/VakarisZ/monkey/issues{/number}","pulls_url":"https://api.github.com/repos/VakarisZ/monkey/pulls{/number}","milestones_url":"https://api.github.com/repos/VakarisZ/monkey/milestones{/number}","notifications_url":"https://api.github.com/repos/VakarisZ/monkey/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/VakarisZ/monkey/labels{/name}","releases_url":"https://api.github.com/repos/VakarisZ/monkey/releases{/id}","deployments_url":"https://api.github.com/repos/VakarisZ/monkey/deployments","created_at":"2018-04-29T18:03:06Z","updated_at":"2018-06-06T09:59:20Z","pushed_at":"2018-08-07T14:44:40Z","git_url":"git://github.com/VakarisZ/monkey.git","ssh_url":"git@github.com:VakarisZ/monkey.git","clone_url":"https://github.com/VakarisZ/monkey.git","svn_url":"https://github.com/VakarisZ/monkey","homepage":"","size":4151,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"guardicore:develop","ref":"develop","sha":"3e1edeac6114f4ef15709532f053403e65f0f31c","user":{"login":"guardicore","id":5675395,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2NzUzOTU=","avatar_url":"https://avatars2.githubusercontent.com/u/5675395?v=4","gravatar_id":"","url":"https://api.github.com/users/guardicore","html_url":"https://github.com/guardicore","followers_url":"https://api.github.com/users/guardicore/followers","following_url":"https://api.github.com/users/guardicore/following{/other_user}","gists_url":"https://api.github.com/users/guardicore/gists{/gist_id}","starred_url":"https://api.github.com/users/guardicore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardicore/subscriptions","organizations_url":"https://api.github.com/users/guardicore/orgs","repos_url":"https://api.github.com/users/guardicore/repos","events_url":"https://api.github.com/users/guardicore/events{/privacy}","received_events_url":"https://api.github.com/users/guardicore/received_events","type":"Organization","site_admin":false},"repo":{"id":41620215,"node_id":"MDEwOlJlcG9zaXRvcnk0MTYyMDIxNQ==","name":"monkey","full_name":"guardicore/monkey","owner":{"login":"guardicore","id":5675395,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2NzUzOTU=","avatar_url":"https://avatars2.githubusercontent.com/u/5675395?v=4","gravatar_id":"","url":"https://api.github.com/users/guardicore","html_url":"https://github.com/guardicore","followers_url":"https://api.github.com/users/guardicore/followers","following_url":"https://api.github.com/users/guardicore/following{/other_user}","gists_url":"https://api.github.com/users/guardicore/gists{/gist_id}","starred_url":"https://api.github.com/users/guardicore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardicore/subscriptions","organizations_url":"https://api.github.com/users/guardicore/orgs","repos_url":"https://api.github.com/users/guardicore/repos","events_url":"https://api.github.com/users/guardicore/events{/privacy}","received_events_url":"https://api.github.com/users/guardicore/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/guardicore/monkey","description":"Infection Monkey - An automated pentest tool","fork":false,"url":"https://api.github.com/repos/guardicore/monkey","forks_url":"https://api.github.com/repos/guardicore/monkey/forks","keys_url":"https://api.github.com/repos/guardicore/monkey/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guardicore/monkey/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guardicore/monkey/teams","hooks_url":"https://api.github.com/repos/guardicore/monkey/hooks","issue_events_url":"https://api.github.com/repos/guardicore/monkey/issues/events{/number}","events_url":"https://api.github.com/repos/guardicore/monkey/events","assignees_url":"https://api.github.com/repos/guardicore/monkey/assignees{/user}","branches_url":"https://api.github.com/repos/guardicore/monkey/branches{/branch}","tags_url":"https://api.github.com/repos/guardicore/monkey/tags","blobs_url":"https://api.github.com/repos/guardicore/monkey/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guardicore/monkey/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guardicore/monkey/git/refs{/sha}","trees_url":"https://api.github.com/repos/guardicore/monkey/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guardicore/monkey/statuses/{sha}","languages_url":"https://api.github.com/repos/guardicore/monkey/languages","stargazers_url":"https://api.github.com/repos/guardicore/monkey/stargazers","contributors_url":"https://api.github.com/repos/guardicore/monkey/contributors","subscribers_url":"https://api.github.com/repos/guardicore/monkey/subscribers","subscription_url":"https://api.github.com/repos/guardicore/monkey/subscription","commits_url":"https://api.github.com/repos/guardicore/monkey/commits{/sha}","git_commits_url":"https://api.github.com/repos/guardicore/monkey/git/commits{/sha}","comments_url":"https://api.github.com/repos/guardicore/monkey/comments{/number}","issue_comment_url":"https://api.github.com/repos/guardicore/monkey/issues/comments{/number}","contents_url":"https://api.github.com/repos/guardicore/monkey/contents/{+path}","compare_url":"https://api.github.com/repos/guardicore/monkey/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guardicore/monkey/merges","archive_url":"https://api.github.com/repos/guardicore/monkey/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guardicore/monkey/downloads","issues_url":"https://api.github.com/repos/guardicore/monkey/issues{/number}","pulls_url":"https://api.github.com/repos/guardicore/monkey/pulls{/number}","milestones_url":"https://api.github.com/repos/guardicore/monkey/milestones{/number}","notifications_url":"https://api.github.com/repos/guardicore/monkey/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guardicore/monkey/labels{/name}","releases_url":"https://api.github.com/repos/guardicore/monkey/releases{/id}","deployments_url":"https://api.github.com/repos/guardicore/monkey/deployments","created_at":"2015-08-30T07:22:51Z","updated_at":"2018-08-06T10:41:42Z","pushed_at":"2018-08-07T14:44:41Z","git_url":"git://github.com/guardicore/monkey.git","ssh_url":"git@github.com:guardicore/monkey.git","clone_url":"https://github.com/guardicore/monkey.git","svn_url":"https://github.com/guardicore/monkey","homepage":"","size":4229,"stargazers_count":2297,"watchers_count":2297,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":230,"mirror_url":null,"archived":false,"open_issues_count":17,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":230,"open_issues":17,"watchers":2297,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/guardicore/monkey/pulls/160"},"html":{"href":"https://github.com/guardicore/monkey/pull/160"},"issue":{"href":"https://api.github.com/repos/guardicore/monkey/issues/160"},"comments":{"href":"https://api.github.com/repos/guardicore/monkey/issues/160/comments"},"review_comments":{"href":"https://api.github.com/repos/guardicore/monkey/pulls/160/comments"},"review_comment":{"href":"https://api.github.com/repos/guardicore/monkey/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/guardicore/monkey/pulls/160/commits"},"statuses":{"href":"https://api.github.com/repos/guardicore/monkey/statuses/7c1a68e0262dfe65375c598f20c3ef69793d2584"}},"author_association":"NONE"}}
{"actor":{"display_login":"itaymmguardicore"}}