Skip to content

Instantly share code, notes, and snippets.

Barrett Adams peewpw

Block or report user

Report or block peewpw

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View ADLabDemo.txt
VPN Server User Data (for Ubuntu 18.04)
---------------------------
#!/bin/bash
wget https://gist.githubusercontent.com/peewpw/a1a367f1ab68e9262a19b13d33357596/raw/4a49617c0842a477592de916fb330636741ce5a5/quick-and-dirty-vpn.sh
chmod +x quick-and-dirty-vpn.sh
./quick-and-dirty-vpn.sh bsides.demo 10.0.0.104
Get VPN Config file
---------------------------
View quick-and-dirty-vpn.sh
#!/bin/bash
cd /opt
# Install openvpn
apt-get update
apt-get install openvpn easy-rsa -y
# force vpn server to use amazon's DNS (not dhcp options set)
View Program.cs
using System.Threading;
using System.Diagnostics;
using System.IO;
namespace peewpw
{
static class Program
{
static string psc = "<encoded powershell payload>";
static void Main(string[] args)
View b64.ps1
param (
[string]$in = $( Read-Host "Please specify a file to encode with -in" ),
[string]$out = $( Read-Host "Please specify an output file with -out" )
)
if (-Not (Test-Path $in)) { Read-Host "Please Specify a valid filepath" }
$str = [System.IO.File]::ReadAllText($in)
$bytes = [System.Text.Encoding]::Unicode.GetBytes($str)
[Convert]::ToBase64String($bytes) | Out-File $out
View xor.ps1
param (
[string]$in = $( Read-Host "Please specify a file to encode with -in" ),
[string]$out = $( Read-Host "Please specify an output file with -out" )
)
if (-Not (Test-Path $in)) { Read-Host "Please specify a valid filepath" }
$str = [System.IO.File]::ReadAllText($in)
$bytes = [System.Text.Encoding]::Ascii.GetBytes($str)
for($i=0; $i -lt $bytes.count; $i++) {
$bytes[$i] = $bytes[$i] -bxor 0x71
}
View Program.cs
using System;
using System.Diagnostics;
namespace peewpw
{
static class Program
{
[STAThread]
static void Main()
{
You can’t perform that action at this time.