Title: PowerUp Get-UnquotedService doesn't check correct paths · Issue #248 · PowerShellMafia/PowerSploit · GitHub
Open Graph Title: PowerUp Get-UnquotedService doesn't check correct paths · Issue #248 · PowerShellMafia/PowerSploit
X Title: PowerUp Get-UnquotedService doesn't check correct paths · Issue #248 · PowerShellMafia/PowerSploit
Description: Specifically this line: https://github.com/PowerShellMafia/PowerSploit/blob/dev/Privesc/PowerUp.ps1#L2072 $ModifiableFiles = $Service.pathname.Split(' ') | Get-ModifiablePath For a path like "C:\Program Files\VMware Workstation\test.exe"...
Open Graph Description: Specifically this line: https://github.com/PowerShellMafia/PowerSploit/blob/dev/Privesc/PowerUp.ps1#L2072 $ModifiableFiles = $Service.pathname.Split(' ') | Get-ModifiablePath For a path like "C:\Pr...
X Description: Specifically this line: https://github.com/PowerShellMafia/PowerSploit/blob/dev/Privesc/PowerUp.ps1#L2072 $ModifiableFiles = $Service.pathname.Split(' ') | Get-ModifiablePath For a path lik...
Opengraph URL: https://github.com/PowerShellMafia/PowerSploit/issues/248
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"PowerUp Get-UnquotedService doesn't check correct paths","articleBody":"Specifically this line: https://github.com/PowerShellMafia/PowerSploit/blob/dev/Privesc/PowerUp.ps1#L2072\r\n\r\n```\r\n$ModifiableFiles = $Service.pathname.Split(' ') | Get-ModifiablePath\r\n```\r\nFor a path like \"C:\\Program Files\\VMware Workstation\\test.exe\":\r\n\r\nGet-ModifiablePath expects: @(\"C:\\Program\", \"C\\Program Files\\VMware\", \"C:\\Program Files\\VMware Workstation\\test.exe\")\r\n\r\nHowever, it receives: @(\"C:\\Program\", \"Files\\VMware\", \"Workstation\\test.exe\"). Get-ModifiablePath checks to see if each of those directories is writable, which returns nothing for \"Files\\VMware\" and \"Workstation\\test.exe\" because it doesn't obviously exist without the prefix of \"C:\\Program\".\r\n\r\nScreenshot proof: http://i.imgur.com/8thoDIe.png\r\n\r\n\r\nBetter code drop-in replacement (but someone better at PowerShell than me can probably do better since I have 0 PowerShell background aside from stumbling through):\r\n\r\n```\r\n$SplitPath = $Service.pathname.split(' ')\r\n$PossiblePaths = @()\r\n$PathStart = \"\"\r\nForEach ($chunk in $SplitPath) {\r\n if ($PathStart -ne \"\") {\r\n $PathStart += \" \"\r\n }\r\n $PathStart += $chunk\r\n $PossiblePaths += $PathStart\r\n}\r\n$ModifiableFiles = $PossiblePaths | Get-ModifiablePath\r\n```\r\n\r\n\r\nIt looks like this issue affects both master and dev branches.","author":{"url":"https://github.com/Raikia","@type":"Person","name":"Raikia"},"datePublished":"2017-07-17T18:36:31.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/248/PowerSploit/issues/248"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:4a06508f-ec7e-56af-96a8-b67375243e93 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A43E:1DE745:1758217:1E82F29:6A5C6B5F |
| html-safe-nonce | 440a67ea499691c2e3b34de510215e0bf612406feb56525028f8c042f84fde36 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNDNFOjFERTc0NToxNzU4MjE3OjFFODJGMjk6NkE1QzZCNUYiLCJ2aXNpdG9yX2lkIjoiNDE5NTM0MTUxOTg1NDI2NzIzMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f9ed13ef414cc5822c05d56834342c38715fefa49cbeed5f13f58c567414d36b |
| hovercard-subject-tag | issue:243486818 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShellMafia/PowerSploit/248/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0e899ba2d02f42f96effb2f005bd74af44bb20139e25d052867dbdea061993cb/PowerShellMafia/PowerSploit/issues/248 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0e899ba2d02f42f96effb2f005bd74af44bb20139e25d052867dbdea061993cb/PowerShellMafia/PowerSploit/issues/248 |
| og:image:alt | Specifically this line: https://github.com/PowerShellMafia/PowerSploit/blob/dev/Privesc/PowerUp.ps1#L2072 $ModifiableFiles = $Service.pathname.Split(' ') | Get-ModifiablePath For a path like "C:\Pr... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Raikia |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShellMafia/PowerSploit git https://github.com/PowerShellMafia/PowerSploit.git |
| octolytics-dimension-user_id | 15639068 |
| octolytics-dimension-user_login | PowerShellMafia |
| octolytics-dimension-repository_id | 4456049 |
| octolytics-dimension-repository_nwo | PowerShellMafia/PowerSploit |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 4456049 |
| octolytics-dimension-repository_network_root_nwo | PowerShellMafia/PowerSploit |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9c975978430e9ad293956f2bbdaf153b1bd84a99 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width