Skip to content

Instantly share code, notes, and snippets.

View ericbaranowski's full-sized avatar

Eric Baranowski ericbaranowski

View GitHub Profile
#!/usr/bin/env python

Run Startup.ps1 as script in Azure

Then run ubuntu.sh on the WSL machine

Windows Terminal

Add Git Bash to Windows Terminal

Generate a new GUID in Powershell [guid]::NewGuid() the use it to add this to the settings, like

Reverse Shell Cheat Sheet

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”.

@ericbaranowski
ericbaranowski / 00-New setup.md
Last active March 4, 2022 17:06 — forked from cderv/00-New setup.md
New computer setup
# 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
if [[ -f $HOME/.zshrc ]]; then
mv $HOME/.zshrc $HOME/.zshrc.bak
fi
if [[ -f $HOME/.zhistory ]]; then
@ericbaranowski
ericbaranowski / restart_clearlinux_services.sh
Created October 1, 2019 15:51
restart_clearlinux_services.sh
#!/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
@ericbaranowski
ericbaranowski / add_icp_docker_registry.sh
Created July 4, 2019 10:35
Add IBM Cloud Private Docker Registry to Docker-for-Mac or Ubuntu Docker VM
#!/bin/bash
echo "192.168.27.100 master.cfc mycluster.icp" | sudo tee /etc/hosts
if [[ $(uname -s) == 'Linux' ]]; then
# ubuntu
scp -r vagrant@mycluster.icp:/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