Posts mit dem Label sdm werden angezeigt. Alle Posts anzeigen
Posts mit dem Label sdm werden angezeigt. Alle Posts anzeigen

Donnerstag, 26. November 2009

DE - IOS HTTP Server "hacking" Vorsorge

So nachdem ich heute 4 Firmen angerufen hab und denen mitgeteilt hab das die Konfiguration Murks ist, poste ich die ganze Geschichte auch noch in deutsch.

Vor kurzem bin ich über eine Suchmaschine gestolpert mit der man auch was finden kann. Dabei ging es aber nicht um den Inhalt der Webseite sondern mehr das drum herum. So war es möglich nach dem Webserver und deren Version zu suchen.

Gesagt getan auf meine suche nach Cisco IOS Webservern erhielt ich über 67.000 Treffer. Ouch,. mal ehrlich 67k wieso müssen die Webinterfaces haben und vor allem warum müssen die via Publik IP Verfügbar sein.

Als ich so durch die liste surfte stellt ich fest das einige nicht mit der 401 sondern mit einer 200 als HTTP Statuscode antworteten. Einen von den Routern angeklickt und schon hat sich gezeigt. Prima die Systeme arbeiten ganz ohne Authentifizierung.

Ich hab die Suchkriterien angepasst und von 67.000 Routern brauchen mehr als 1200 Kein Passwort sind also ungeschützt.

Da es über die Weboberfläche möglich ist ein show cdp neigbor abzusetzen zeigte sich das hinter den Routern noch andere Cisco Komponenten hängen. Ich hoffe das die nicht so lausig konfiguriert sind wie der Router.

Um sicher zu sein, gilt daher entweder eine Access Liste auf den Webserver binden:

access-list 1 permit X.X.X.X ! x.x.x.x= your management network
ip http access-class 1

oder noch besser:

no ip http server


cheers
NWG

EN - IOS HTTP Server hacking prevention

OK I need to post this since this is really scary to me.

A few days ago I stumbled upon a quite cool search engine (no I will not post the URL) what was really interesting is that it did not search for the content of the website it was more interested in the server replies like Server Version HTTP status code.

Since Cisco routers and switches offer a web server for configuration I searched for Cisco IOS servers. The result was scary (it gets worse a bit later) more than 67.000 routers and switches operating the HTTP server are public available. Their may be reasons why routers should be available via HTTP from the Internet but 67000 router people you are kidding me.
I checked some of them and most look like real routers/ switches.

But while browsing the list I found a few routers responding with Cisco IOS Server AND HTTP 200 code. (most of the routers respond with 401 authorization required). I tried one of these and great I could log in and have a look at the configuration passwords etc.

I decided to redefine my search and the result was: from those 67.000 routers 1200 are not requiring authorization of any kind, great.

A quick show cdp neigh showed that most of them I've checked are connected to other Cisco devices. I hope that these devices aren't configured that poorly.

To get out of this list just bind an access list to you HTTP Server,


access-list 1 permit X.X.X.X ! x.x.x.x= your management network
ip http access-class 1


or even better do a

no ip http server


hope some of those guys owning these routers fix them (fast)


Cheers
NWG

Montag, 16. November 2009

DE – SDM mit Dynamips Routern (IINS Vorbereitung)

Das wird ein kurzes Zwischenpost da das Thema an sich recht einfach ist.
Jeder der sich auf den IINS Test von Cisco vorbereitet weiß das der SDM zu den Dingen gehört die zwingend notwendig sind, um bei dem Test was zu erreichen. Wer aber (wie ich) nicht unbedingt so viel Geld in die Hand nehmen will für echte Routerhardware, der nutzt vermutlich Dyanmips, Dynagen bzw GNS3. Doch dann stellt sich die Frage, wie bekommt man den SDM auf einem virtuellen Router zu laufen , dem gehen wir hier nach.

Vorbereitung: In meinem Aufbau, musste ich eine VM meines dynaBuntu anlegen und diese mit dem Router LAB_R001 verbinden (das werden die meisten von euch nicht machen)

Schritt 1: Vorbereitung des Virtuellen Routers mit den üblichen Einstellungen wie Hostnamen Interface IPs etc.

Schritt 2: Einschalten des HTTP Servers des Routers mittels des Befehls

ip http server

Jetzt sollte die Konfiguration des Routers in etwa so aussehen (defaults und unwichtige Informationen wurden raus gelassen)


service password-encryption
!
hostname R_LAB_SDM_01
!
enable secret 5 $1$51xU$t3K/gEBYlwwTYeTEdCqTy/
!
ip domain name playingwithnetworks.com
interface FastEthernet0/0
description ### Link to LAB_R001 and HyperV ###
ip address 172.20.1.3 255.255.255.0
speed 100
full-duplex
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
ip http server
!
line con 0
password 7 XYZXYZ
logging synchronous
login
line vty 0 4
password 7 YZXZY
logging synchronous
login
transport input telnet


Schritt 3: Eine Kopie des SDM besorgen – das macht sich am besten von der Cisco Seite, wofür aber ein CCO Account gebraucht wird

Zwischenschritt 4: Es ist sicherzustellen das der Router die VM oder den PC erreichen kann und umgekehrt, das funktioniert am besten mit einem Ping zwischen den Geräten..

Schritt 4: Installation des SDM

Welcome Window – klick next
License Agreement – anklicken “I accept the terms of agreement” & klick next
Install Options: - auswählen der Option : “This Computer” & klick next
Choose Destination Location – klick next (oder einen anderen Pfad wählen)
Ready to Install the Program – klick install

Sobald die Installation beendet ist findet sich auf dem Desktop der Workstation ein Icon mit dem Namen: “Cisco SDM” das bitte durch doppelklick starten. Nach Eingabe der guiltigen IP (bei mir 172.20.1.3) sollte folgendes Bild erscheinen (oder so ähnlich)



Das war es erst mal, danke für die Aufmerksamkeit :D

cheers NWG
PS Ein etwas ausführlichers Video zum Thema SDM auf GNS3 von Blindhog.net

EN - SDM on Dynamips Routers (IINS preparation)

This post will be quite short because the topic is pretty easy.
To prepare for the IINS exam you need to have a router with SDM support. If you (like me) don't want to spend the money on real hardware you'll use dynamips/dynagen/gns3.

So how can you run a dynamips router with SDM support. Well this is pretty straight forward
pre-step 1:
In my setup I've had to set up a new dynaBuntu VM and connect this VM to LAB_R001 (you'll probably not have to do this)
Step 1: prepare your router with the usually fluff: set up interfaces, users hostname etc ..
Step 2: add http and if desired https server capability to the router setup

ip http server


The configuration of your dynamips router could look like this (defaults have been skipped) one by now:


service password-encryption
!
hostname R_LAB_SDM_01
!
enable secret 5 $1$51xU$t3K/gEBYlwwTYeTEdCqTy/
!
ip domain name playingwithnetworks.com
interface FastEthernet0/0
description ### Link to LAB_R001 and HyperV ###
ip address 172.20.1.3 255.255.255.0
speed 100
full-duplex
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
ip http server
!
line con 0
password 7 XYZXYZ
logging synchronous
login
line vty 0 4
password 7 YZXZY
logging synchronous
login
transport input telnet


Step 3: get you copy of the SDM from Cisco (CCO required)

pre-step 4: make sure your dynamips Router can ping your SDM host and vice versa
Step 4:: install the SDM on a PC (or VM)

Welcome Window – click next
License Agreement – select “I accept the terms of agreement” & click next
Install Options: - choose the option: “This Computer” & click next
Choose Destination Location – click next (or select an other location)
Ready to Install the Program – click Install

After the installation has finished you've got a new icon on your desktop called: “Cisco SDM”, double click the icon and enter the IP of your dynamips router. If you've followed this guide you should be able to login to your router via SDM and get something like this screenshot.


Cheers and Thanks for your attention.
NWG

PS a little more detailed movie about the SDM on GNS3 topic, just click to get to the blindhog Video