Generate a new GUID in Powershell [guid]::NewGuid()
the use it to add this to the settings, like
#!/usr/bin/env python |
If you’re lucky enough to find a command execution vulnerability during a penetration test, pretty soon afterwards you’ll probably want an interactive shell.
If it’s not possible to add a new account / SSH key / .rhosts file and just log in, your next step is likely to be either trowing back a reverse shell or binding a shell to a TCP port. This page deals with the former.
Your options for creating a reverse shell are limited by the scripting languages installed on the target system – though you could probably upload a binary program too if you’re suitably well prepared.
The examples shown are tailored to Unix-like systems. Some of the examples below should also work on Windows if you use substitute “/bin/sh -i” with “cmd.exe”.
# installed by winget
winget install PowerShell-Preview
winget install git
git config --global user.name "Eric Baranowski"
git config --global user.email eric@kulado.com
winget install rstudio
winget install vscode
winget install -e R
winget install Github.GithubDesktop
#!/bin/bash | |
set -e | |
#set -u | |
set -x | |
DEBIAN_FRONTEND=noninteractive | |
export DEBIAN_FRONTEND=noninteractive |
#!/bin/sh | |
sudo systemctl --no-ask-password try-restart containerd.service | |
sudo systemctl --no-ask-password try-restart systemd-networkd.service | |
sudo systemctl --no-ask-password try-restart kvp.service | |
sudo systemctl --no-ask-password try-restart kubelet.service | |
sudo systemctl --no-ask-password try-restart libvirtd.service | |
sudo systemctl --no-ask-password try-restart vss.service | |
sudo systemctl --no-ask-password try-restart systemd-machined.service | |
sudo systemctl --no-ask-password try-restart waagent.service |
#!/bin/bash | |
echo "192.168.27.100 master.cfc mycluster.icp" | sudo tee /etc/hosts | |
if [[ $(uname -s) == 'Linux' ]]; then | |
# ubuntu | |
scp -r [email protected]:/etc/docker/certs.d/mycluster.icp\:8500 /usr/local/share/ca-certificates | |
sudo cp -r /usr/local/share/ca-certificates/mycluster.icp\:8500 /etc/docker/certs.d | |
sudo update-ca-certificates | |
elif [[ $(uname -s) == 'Darwin' ]]; then |
#!/bin/bash | |
git clone -q https://github.com/akinomyoga/ble.sh.git $HOME/ble.sh | |
git clone -q --depth=1 https://github.com/Bash-it/bash-it.git $HOME/.bash_it | |
echo 'installing bash-it...' | |
$HOME/.bash_it/install.sh --silent | |
sleep 1 |
os: darwin | |
metadata: | |
name: Recipe | |
description: Recipe Description | |
stages: | |
- metadata: | |
name: Stage 1 | |
description: Stage 1 description | |
url: https://stage1.example.com |
$contents |