Security

From My Mnemonic Rhyme
Jump to navigation Jump to search

OpenVAS

  • Debian Install Guide

http://www.openvas.org/install-packages.html#openvas4_debian_obs

Sicherheitsphilosophie

Sicherheit bezeichnet einen Zustand, der frei von unvertretbaren Risiken der Beeinträchtigung ist.

Doch was ist vertretbar?

WLAN

Wer sich mit WLANs und deren Sicherheit beschäftigt wird früher oder später über folgende Quelle stoßen: http://www.aircrack-ng.org/

Dokulinks zur gesamten Suite

Newbie Guide

Für alle die sich erstmalig mit dem Thema befassen:
http://www.aircrack-ng.org/doku.php?id=newbie_guid

Mein Env / Setup

Ich nutze im moment ein Debian Squeeze x386. Auf einem P4 2,8 Ghz mit öhm 1 GB RAM.

Network controller: Atheros Communications Inc. AR922X Wireless Network Adapter (rev 01) =) ich liebe dieses Teil!!!

Treiber:

modinfo ath9k
filename:       /lib/modules/2.6.32-5-686/kernel/drivers/net/wireless/ath/ath9k/ath9k.ko
license:        Dual BSD/GPL
description:    Support for Atheros 802.11n wireless LAN cards.
author:         Atheros Communications
alias:          pci:v0000168Cd0000002Esv*sd*bc*sc*i*
alias:          pci:v0000168Cd0000002Dsv*sd*bc*sc*i*
alias:          pci:v0000168Cd0000002Csv*sd*bc*sc*i*
alias:          pci:v0000168Cd0000002Bsv*sd*bc*sc*i*
alias:          pci:v0000168Cd0000002Asv*sd*bc*sc*i*
alias:          pci:v0000168Cd00000029sv*sd*bc*sc*i*
alias:          pci:v0000168Cd00000027sv*sd*bc*sc*i*
alias:          pci:v0000168Cd00000024sv*sd*bc*sc*i*
alias:          pci:v0000168Cd00000023sv*sd*bc*sc*i*
depends:        mac80211,led-class,ath,cfg80211
vermagic:       2.6.32-5-686 SMP mod_unload modversions 686
parm:           nohwcrypt:Disable hardware encryption (int)

Zur Installation: http://www.aircrack-ng.org/doku.php?id=install_aircrack#installing_aircrack-ng_from_source

Kurz und schmerzlos:

wget http://download.aircrack-ng.org/aircrack-ng-1.1.tar.gz
tar -zxvf aircrack-ng-1.1.tar.gz
cd aircrack-ng-1.1
make
make install

Netzwerke aufspüren

Ggf. muss vorab der DHCP Client gekillt werden.

killall dhclient
airmon-ng start wlan0

airodump-ng wlan0

Die Ausgabe könnte dann so aussehen:

CH  4 ][ Elapsed: 1 min ][ 2011-03-28 22:10

 BSSID              PWR  Beacons    #Data, #/s  CH  MB   ENC  CIPHER AUTH ESSID

 00:00:00:00:C5:AF  -68      163      725   31   6  54e  WEP  WEP         ESSID
 88:25:2C:00:59:1C  -74       31        3    0   1  54e  WPA  TKIP   PSK  ESSID
 00:22:3F:00:74:46  -83       19        0    0  11  54 . WPA2 CCMP   PSK  ESSID
 00:1F:3F:D3:DA:49  -84       21        0    0  11  54e. WPA2 CCMP   PSK  ESSID

WPA

Tutorial: http://www.aircrack-ng.org/doku.php?id=simple_wep_crack

Flowchart:

Sniffing

Standardmäßig "hüpft" airodump zwischen den Channels hin und her.

Mit folgenden Paramtern werden alle Pakete eines APs (--bssid MAC) in einen Dump geschrieben.

airodump-ng -c 11 --bssid 00:01:02:03:04:05 -w dump rausb0
Anzahl der benötigten Pakete

Nicht jedes PW benötigt gleich viele IVs!

Rechnerisch: 64Bit = ~250k 128Bit = ~1.5mio

Es wird vom 45-80k Paketen gesprochen, wenn man ein WPA Passwort knacken will.

Das Problem ist, dass ohne Verkehr nur wenige Pakete gedumpt werden können...

Aktive Attacken

Um das Problem mit dem benötigten Traffic zu "lösen", folgende Ansätze:

Injection Test

Erst einmal sollte man wissen, ob seine Karte dieses Feature überhaupt unterstützt:
http://www.aircrack-ng.org/doku.php?id=injection_test

ARP Request Reinjection

http://www.aircrack-ng.org/doku.php?id=arp-request_reinjection#what_is_arp

Address Resolution Protocol:
http://en.wikipedia.org/wiki/Address_resolution_protocol

Kurz gesagt: Ein Host möchte eine MAC Adresse zu einer IP wissen und frage per Broadcast im Netzwerk. Dies tut er per ARP Protokoll.<br>

Dieser Mechanismus wird genutzt um immer neue "initiale" Pakete (IVs) zu generieren und somit mehr "auswertbares" Material zu bekommen:

aireplay-ng --fakeauth 0 -e "your network ESSID" -a 00:01:02:03:04:05 rausb0
asd

Cracken

Folgender Befehl versucht das PW aus den Dumps wiederherzustellen:

aircrack-ng -b 00:01:02:03:04:05 dump-01.cap

-b essid
dump*.cap für mehrere Dump-Files

Die volle Manpage zu aircrack-ng

Passwort Listen erstellen

Das Zauberwort heißt:

/pentest/passwords/crunch

Dieses Beispiel finde ich am Aussagefräftigesten:

      crunch 8 8 -f charset.lst mixalpha-numeric-all-space -o wordlist.txt -t @@dog@@@
      -s cbdogaaa
      crunch should generate a 8 character  wordlist  using  the  mixalpha-number-all-
      space  characterset from charset.lst and will write the wordlist to a file named
      wordlist.txt.  The file will start at cbdogaaa and end at "  dog   "

Die Ziffern findet man in dem File charset.lst:

+# charset configuration file for winrtgen v1.2 by Massimiliano Montoro (mao@oxid.it)
# compatible with rainbowcrack 1.1 and later by Zhu Shuanglei <shuanglei@hotmail.com>

hex-lower                     = [0123456789abcdef]
hex-upper                     = [0123456789ABCDEF]

numeric                       = [0123456789]
numeric-space                 = [0123456789 ]

symbols14                     = [!@#$%^&*()-_+=]
symbols14-space               = [!@#$%^&*()-_+= ]

symbols-all                   = [!@#$%^&*()-_+=~`[]{}|\:;"'<>,.?/]
symbols-all-space             = [!@#$%^&*()-_+=~`[]{}|\:;"'<>,.?/ ]

ualpha                        = [ABCDEFGHIJKLMNOPQRSTUVWXYZ]
ualpha-space                  = [ABCDEFGHIJKLMNOPQRSTUVWXYZ ]
ualpha-numeric                = [ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]
ualpha-numeric-space          = [ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ]
ualpha-numeric-symbol14       = [ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_+=]
ualpha-numeric-symbol14-space = [ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_+= ]
ualpha-numeric-all            = [ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_+=~`[]{}|\:;"'<>,.?/]
ualpha-numeric-all-space      = [ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_+=~`[]{}|\:;"'<>,.?/ ]

lalpha                        = [abcdefghijklmnopqrstuvwxyz]
lalpha-space                  = [abcdefghijklmnopqrstuvwxyz ]
lalpha-numeric                = [abcdefghijklmnopqrstuvwxyz0123456789]
lalpha-numeric-space          = [abcdefghijklmnopqrstuvwxyz0123456789 ]
lalpha-numeric-symbol14       = [abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()-_+=]
lalpha-numeric-symbol14-space = [abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()-_+= ]
lalpha-numeric-all            = [abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()-_+=~`[]{}|\:;"'<>,.?/]
lalpha-numeric-all-space      = [abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()-_+=~`[]{}|\:;"'<>,.?/ ]

mixalpha                   = [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]
mixalpha-space             = [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ ]
mixalpha-numeric           = [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]
mixalpha-numeric-space     = [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ]
mixalpha-numeric-symbol14  = [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_+=]
mixalpha-numeric-symbol14-space = [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_+= ]
mixalpha-numeric-all       = [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_+=~`[]{}|\:;"'<>,.?/]
...

Mein erster Versuch :)

./crunch 6 10 -f charset.lst mixalpha-numeric -o wordlist.txz

->

Crunch will now generate 9369657521483141120 bytes of data
Crunch will now generate 8935601731761 MB of data
Crunch will now generate 8726173566 GB of data

Wirre Linksammlung

http://de.wikipedia.org/wiki/Promiscuous_Mode mhhh ;)

http://www.backtrack-linux.org/ Security Distro

http://www.linuxsecurity.com/ Security Blog

http://www.security-freak.net Blog

http://www.clubhack.com/ Blog

http://www.darknet.org.uk/ Security Blog / Links

http://sickness.tor.hu Videos / Howtos

http://blacklight.gotdns.org Videos / Howtos

http://tools.question-defense.com/Cracking_Passwords_Guide.pdf PDF / Howto