You are on page 1of 21

automating configurations using python

El Codigo se encuentra aqui: https://github.com/alejandrolab/pr-defaults.py/blob/master/pr-defaults.py

Why?
• Conocia del programa stkeys con el cual es muy facil encontrar las claves de Wifi cuando los routers estan configurados “by default” con su wireless SSID. Necesitaba una contramedida.

MAS RAZONES … 1 OCT 2012

“Millions of Internet users in Brazil have fallen victim to a
sustained attack that exploited vulnerabilities in DSL modems, forcing people visiting sites such as Google or Facebook to reach imposter sites that installed malicious software and stole online banking credentials. Links:
• • http://arstechnica.com/security/2012/10/dsl-modem-hack-infects-millions-withmalware/ http://www.virusbtn.com/conference/vb2012/abstracts/Assolini.xml

Objetivo:
(reto )
Accesso al router: Prevenir acceso no autorizado hasta donde sea posible, cambiando configuraciones en el router. ( default SSID + password ) Deshabilitar servicios innecesarios.( FTP, UPNP, SSDP )
http://en.wikipedia.org/wiki/Simple_Service_Discovery_Protocol http://lifehacker.com/5803975/what-is-upnp-and-how-do-i-use-it-to-stream-media-to-my-tv http://en.wikipedia.org/wiki/Universal_Plug_and_Play

Opciones de DNS ( opendns para escuelas etc … ) Automatizar aprendiendo a programar en python Que se mantenga la configuracion (:saveall) Regresar a defaults. ( :system reset)

RESEARCH:
SSID, SERIAL NUMBER, IP, open ports, etc ... localdomain: dsldevice.lan CLI manual user guide manuals
http://www.clarotodo.com/Ayuda/Guia_de_Usuario_TG782_Espanol.pdf

whirpool forums
http://forums.whirlpool.net.au/archive/813746 http://forums.modem-help.co.uk/viewtopic.php?t=1070

Wireshark: http://10.0.0.138/upnp/IGD.xml

Nmap

Browser:

making the support call ( LAYER 8 )
not really … ☺

• can i disable wireless ? • can i log in ? • how ? Thank you!

user.ini
• • • • Hostnames MAC ADDRESS md5 for users passwords Wifi name, and passwords in clear text

COMMAND IN bash TO HASH A STRING OF TEXT TO MD5: # echo -n CP1014NTTSZ|md5sum c4c90f71328522d084af8c5792bab002 The same string “c4c90f71328522d084af8c5792bab002” is in the user.ini file: add name=CP1014NTTSZ password=_CYP_c4c90f71328522d084af8c5792bab002 role=SuperUser

Source of information - http://forums.whirlpool.net.au/archive/813746

Misc telnet commands
CHANGE MAC ADDRESS OF ROUTER: :ip ifconfig intf=LocalNetwork mtu=1500 status=up hwaddr=11:26:44:3a:ab:61 group=lan linksensing=disabled primary=enabled mcastmode=default mcastpromisc=disabled symmetric=disabled SHOW WHO IS CONNECTED VIA WIRELESS: :wireless stations list ACCESS POINT PIN: :wireless wps ap_pin ssid 0 (DMAXC79626) has AP pin 94721201 ENVIROMENT VARIABLES :env list WRITE PASSWD FILE TO TFTP SERVER :tftp write src-file=/rw/etc/passwd server=10.0.0.67 dst-file=file.txt BROWSE filesystem via :tftp :tftp fs cd dir=/etc

DNS BENCHMARKS

www.grc.com/dns/benchmark.htm

Live demo!

python

Learn python
• docs.python.org/library/telnetlib.html • udacity.com • code.he.net

Ruby version + MSF

ruby

Learn ruby!
• tryruby.org
• www.rubyinside.com/media/poignant-guide.pdf

Gracias !!
Email: alejandro@vliot.com CompTIA A+, N+, Linux+ Ayudo a: mi comunidad amigos clientes