Strony

czwartek, 17 listopada 2011

OpenWRT (Backfire) + lighttpd + php5 + DokuWiki

Po podstawowej konfiguracji lighttpd + php5 pobrałem stabilną wersję DokuWiki (www.dokuwiki.org)
cd /tmp
wget http://www.splitbrain.org/_media/projects/dokuwiki/dokuwiki-2011-05-25a.tgz
gzip -d dokuwiki-2011-05-25a.tgz
tar -xvf dokuwiki-2011-05-25a.tar
mv dokuwiki-2011-05-25a /home/lighttpd/ssl/html/
Przy próbie instalacji aplikacji
http://server/dokuwiki/install.php
otrzymałem błąd:
The installer found some problems, indicated below. You can not continue until you have fixed them.

    * PHP function session_start is not available. Maybe your hosting provider disabled it for some reason?
    * PHP function utf8_encode is not available. Maybe your hosting provider disabled it for some reason?
    * PHP function utf8_decode is not available. Maybe your hosting provider disabled it for some reason?

Rozwiązaniem było doinstalowanie modułów php:
opkg update
opkg install php5-mod-session
opkg install php5-mod-xml

Nie ma potrzeby ingerencji w plik konfiguracyjny /etc/php.ini
ponieważ po instalacji w lokalizacji /etc/php5/ tworzą się odpowiednie pliki konfiguracyjne .ini
root@server:~$ cat /etc/php5/session.ini
extension=session.so

wtorek, 11 października 2011

VBScript - skrypty AD

1. Wyszukiwanie użytkownika w AD i listowanie jego atrybutów.

'SearchforaUserAccountinActiveDirectory

FilePath=".\samAccountName.txt"'Sciezkadoplikuzdanymiwejściowymi (np. JanKowalski)
SetobjFSO=CreateObject("Scripting.FileSystemObject")
SetobjFile=objFSO.OpenTextFile(FilePath,1)

DoUntilobjFile.AtEndOfStream
    strsamAccountName=objFile.ReadLine()

SetobjConnection=CreateObject("ADODB.Connection")
objConnection.Open"Provider=ADsDSOObject;"

SetobjCommand=CreateObject("ADODB.Command")
objCommand.ActiveConnection=objConnection

objCommand.CommandText=_
"<[*]LDAP://dc=domain,dc=com,dc=pl>;(&(objectCategory=User)"&_
"(samAccountName="&strsamAccountName&"));adspath;subtree"


SetobjRecordSet=objCommand.Execute

IfobjRecordset.RecordCount=0Then
    'WScript.Echo"sAMAccountName:" & strsamAccountName & "doesnotexist."
Else  
    WhileNotobjRecordset.EOF
        SetobjUser=GetObject(objRecordset.Fields(0).Value)
        WScript.EchoobjRecordset.RecordCount & "|" & objUser.samAccountName & "|" & objUser.mail
        objRecordSet.MoveNext
    Wend
EndIf
objConnection.Close
Loop
[*] - usuń te znaki (Blogger filtruje publikowane treści)

wtorek, 6 września 2011

AdFind - przykłady

Command line Active Directory query tool. Mixture of ldapsearch, search.vbs, ldp, dsquery, and dsget tools with a ton of other cool features thrown in for good measure.

http://www.joeware.net/freetools/tools/adfind/

1. Wyświetla wszystkich użytkowników w grupie "GroupName", rekurencyjnie (odczytuje zawartość innych grup zawierających się w grupie "GroupName").

"-samdc" - rozwiązuje min parametr userAccountControl do postaci: "546 [DISABLED(2)\;PWD_NOT_REQ(32)\;NORMAL_USER(512)]".

"-csvdelim ; " - rozdziela dane średnikiem ";" (standardowo to przecinek ","), ten parametr umożliwi poprawną obróbkę danych, szczególnie ważne gdy exportujemy równieź dn, którego zawartość posiada przecinki: "OU=Groups,DC=domain,DC=com" 
adfind -b "DC=domain,DC=com" -s subtree -f "(&(objectclass=user)(memberOf=CN=GroupName,OU=Groups,DC=domain,DC=com))" -samdc -csv -csvdelim ; sAMAccountName userAccountControl displayName givenName sn description title employeeNumber department departmentNumber company streetAddress l st postalCode physicalDeliveryOffice co telephoneNumber mobile mail manager
CDN..

środa, 20 lipca 2011

WSUS Offline Update - zawsze świeże poprawki

WSUS Offline Update - http://www.wsusoffline.net/
To bardzo przydatne narzędzie, które pozwoli na pobranie wszystkich niezbędnych poprawek dla systemów Microsoft, zapisanie ich w pliku ISO, oraz w trybie offline (bez dostępu do Internetu) zainstalowanie ich na naszej maszynie.
Oprogramowanie udostępnia GUI za pomocą, którego możemy wybrać interesujący nas system Windows oraz pakiet MS Office do którego chcemy pobrać dodatki, a także utworzyć pliki ISO z poprawkami.



Z powyższego GUI skorzystamy za każdym razem jeśli będziemy chcieli  dokonać aktualizacji.

Microsoft publikuje poprawki do swoich systemów w drugi wtorek każdego miesiąca.
Jeśli chcemy mieć zawsze świeże poprawki, możemy zautomatyzować cały proces pobierania i tworzenia plików ISO za pomocą skryptu.

Skrypt pobiera poprawki:
Poprawki do systemów operacyjny Microsoft:
  • Windows XP PL x86
  • Windows 2003 EN x86
  • Windows 2003 EN x64
  • Windows 2008 x86
  • Windows 2008 x64
  • Windows Vista x86
  • Windows Vista x64
  • Windows 2008 R2
  • Windows 7 x86
  • Windows 7 x64
Poprawki do pakietu Microsoft Office
  • MS Office XP,  2003, 2007, 2010 PL

@echo off

call d:\Download\wsusoffline\cmd\DownloadUpdates.cmd wxp plk /includedotnet /verify /exitonerror
call d:\Download\wsusoffline\cmd\DownloadUpdates.cmd w2k3 enu /includedotnet /verify /exitonerror
call d:\Download\wsusoffline\cmd\DownloadUpdates.cmd w2k3-x64 enu /includedotnet /verify /exitonerror
call d:\Download\wsusoffline\cmd\DownloadUpdates.cmd w60 glb /includedotnet /verify /exitonerror
call d:\Download\wsusoffline\cmd\DownloadUpdates.cmd w60-x64 glb /includedotnet /verify /exitonerror
call d:\Download\wsusoffline\cmd\DownloadUpdates.cmd w61 glb /includedotnet /verify /exitonerror
call d:\Download\wsusoffline\cmd\DownloadUpdates.cmd w61-x64 glb /includedotnet /verify /exitonerror
call d:\Download\wsusoffline\cmd\DownloadUpdates.cmd ofc glb /includedotnet /verify /exitonerror
call d:\Download\wsusoffline\cmd\DownloadUpdates.cmd o2k3 plk /includedotnet /verify /exitonerror
call d:\Download\wsusoffline\cmd\DownloadUpdates.cmd o2k7 plk /includedotnet /verify /exitonerror

call d:\Download\wsusoffline\cmd\CreateISOImage.cmd wxp plk
call d:\Download\wsusoffline\cmd\CreateISOImage.cmd w2k3 enu
call d:\Download\wsusoffline\cmd\CreateISOImage.cmd w2k3-x64 enu
call d:\Download\wsusoffline\cmd\CreateISOImage.cmd w60 glb
call d:\Download\wsusoffline\cmd\CreateISOImage.cmd w60-x64 glb
call d:\Download\wsusoffline\cmd\CreateISOImage.cmd w61 glb
call d:\Download\wsusoffline\cmd\CreateISOImage.cmd w61-x64 glb
call d:\Download\wsusoffline\cmd\CreateISOImage.cmd ofc plk
Skrypt konfigurujemy tak, aby uruchamiał się cyklicznie: w moim przypadku druga środa każdego miesiąca o 4:00 rano.


Po zakończeniu pobierania poprawek, tworzone są obrazy ISO z poprawkami dla konkretnych systemów i pakietów office w katalogu wsusoffline\iso\

piątek, 27 maja 2011

Reanimacja TP-LINK TL-WR1043ND

UPDATE: 2013-05-23

Wczoraj popełniłem sromotny błąd...
Postanowiłem zrobić szybki upgrade firmware.
Upgrade przez mtd po wifi ale w screenie.
I niestety nie udało się.
Możliwe że błąd tkwił w tym, że obraz znajdował się na zewnętrznym hdd a nie w /tmp

Objawy po włączeniu zasilania:
  1. zapala się kontrolka PWR
  2. następnie zapalają się wszystkie kontrolki na 1s
  3. po chwili test kontrolek shwitch'a 1s i cisza
  4. ostatecznie świeci się tylko PWR
  5. brak jest jakiejkolwiek komunikacji sieciowej

Próbowałem na wszelkie sposoby uruchomić failsafe, lecz bez skutku.

Dziś zakupię kabelek NOKIA CA-42

Kilka źródeł z których zamierzam skorzystać podczas próby ratowania routera:
  • http://eko.one.pl/?p=openwrt-wr1043nd
  • http://dar3kg.blogspot.com/2010/06/naprawa-tp-link-wr1043nd.html
  • http://www.dd-wrt.com/phpBB2/viewtopic.php?p=450379&sid=13bb89f8e96dd7ebc155415a26f8cab0
  • http://wiki.openwrt.org/toh/tp-link/tl-wr1043nd#opening.the.case
  • http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1261313468/0
Update


Ostatecznie skończyło się na zakupie kabla DKU-5 (15 zł), który jest starszą wersją CA-42.



Sterowniki znajdowały się da dołączonej płycie, kompatybilne z Win XP x86.

Na początku testy przeprowadziłem na maszynie wirtualnej (VMware) lecz komunikacja działała tylko w jedną stronę (brak reakcji na wprowadzanie danych w terminalu).

Przy okazji reanimacji routera dla Otziego okazało się, że wszystko działa na maszynie wirtualnej

Do reanimacji TL-WR1043ND użyłem laptopa Dell D400 z OS Win XP x86.

Przygotowanie przewodu:

Czarny:    GND (8)
Biały:     Rx  (6)
Niebieski: Tx  (7)



Nie wlutowywałem pinów w płytę główną, po prostu za pomocą lutownicy i wykałaczki usunąłem cynę i zrobiłem otwory.


Ciekawym rozwiązaniem jest: Easy Access Mini-Stereo Port

Całość podpiąłem za pomocą ścisku.


Instalujemy sterowniki do kabla i sprawdzamy nr portu COM w menadżerze urządzeń

Konfigurujemy Putty
Podpinamy zasilanie i łączymy się do routera.


U-Boot 1.1.4 (Feb  1 2010 - 10:11:24)

AP83 (ar9100) U-boot 0.0.11
DRAM:
sri
32 MB
id read 0x100000ff
flash size 8MB, sector count = 128
Flash:  8 MB
Using default environment

In:    serial
Out:   serial
Err:   serial
Net:   ag7100_enet_initialize...
No valid address in Flash. Using fixed address
: cfg1 0xf cfg2 0x7114
eth0: 00:03:7f:09:0b:ad
eth0 up
eth0
Autobooting in 1 seconds## Booting image at bf020000 ...
   Uncompressing Kernel Image ... OK

Starting kernel ...

Linux version 2.6.32.27 (cezary@eko.one.pl) (gcc version 4.3.3 (GCC) ) #18 Fri May 20 18:42:50 CEST 2011
bootconsole [early0] enabled
CPU revision is: 00019374 (MIPS 24Kc)
Atheros AR9132 rev 2, CPU:400.000 MHz, AHB:200.000 MHz, DDR:400.000 MHz
Determined physical RAM map:
 memory: 02000000 @ 00000000 (usable)
Initrd not found or empc2fc
[<801370e0>] 0x801370e0
[<801371b0>] 0x801371b0
[<800e4ed0>] 0x800e4ed0
[<800e4fcc>] 0x800e4fcc
[<800fd654>] 0x800fd654
[<800fd76c>] 0x800fd76c
[<800ef280>] 0x800ef280
[<802eccc4>] 0x802eccc4
[<801b80b4>] 0x801b80b4
[<802ed0c4>] 0x802ed0c4
[<800b5150>] 0x800b5150
[<802ec388>] 0x802ec388
[<8006d754>] 0x8006d754
[<802ec26c>] 0x802ec26c
[<8006d744>] 0x8006d744

---[ end trace 8b6952b74c4407b5 ]---
VFS: Cannot open root device "" or unknown-block(31,2)
Please append a correct "root=" boot option; here are the available partitions:
1f00             128 mtdblock0 (driver?)
1f01            1280 mtdblock1 (driver?)
1f02            6720 mtdblock2 (driver?)
1f03            3904 mtdblock3 (driver?)
1f04              64 mtdblock4 (driver?)
1f05            8000 mtdblock5 (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,2)

XXX
Dalej postępowałem analogicznie według opisu na blogu:
http://dar3kg.blogspot.com/2010/06/naprawa-tp-link-wr1043nd.html




    czwartek, 5 maja 2011

    GPS over TCP/IP via USB

    Współdzielenie odbiornika GPS wbudowanego w telefon HTC Touch Pro / Windows Mobile 6.5 z PC / Windows 7 za pomocą USB

    Instalacja i konfiguracja:

    Przed przystąpieniem do instalacji należy podłączyć telefon za pomocą ActiveSync.
    Upewnić się, że na PDA zainstalowany jest co najmniej .NET Compact Framework 2.0
    Obecność framework'a możemy sprawdzić za pomocą aplikacji \Windows\cgacutil.exe
    W moim przypadku jest to .Net 3.5


    Na telefonie instalujemy aplikację GPS2Blue
    Wybieramy port COM na którym skonfigurowany jest odbiornik GPS w telefonie w moim przypadku jest to COM4 (HTC Touch Pro) oraz prędkość: tutaj 4800, zaznaczamy TCP/IP (BT powinno być nie zaznaczone)


    Przechodzimy do instalacji oprogramowania na PC:
    Instalujemy HW Virtual Serial Port na komputerze.
    Do Naszych celów wystarczy program obsługujący jeden port COM (HW VSP Singleport)

    Podczas instalacji w oknie "Select Components" wybieramy Standalone Application


    Osobiście zaobserwowałem problem podczas instalacji tego oprogramowania na Windows 7
    Mianowicie instalacja zawiesiła się na jednej operacji, którą była rejestracja jednej z bibliotek tej aplikacji.
    Rozwiązanie: "Ubicie" procesu RegVSP.exe odpowiedzialnego za rejestrację biblioteki VSPort.dll


    i wykonanie polecenia osobno na uprawnieniach administratora czyli:
    Windows 7 x64

    "C:\Program Files (x86)\HW group\HW VSP3s\RegVSP.exe" /s /i:"HW group s.r.o.#000GNU-F1MPKC-WN5Y9K-C2MK2Y-5RPRAC-4CR23U-DC649F-0BE50E-A120FD-9AA5EE-A43D2C-A069D5" VSPort.dll

    Windows 7 x86 Windows XP

    "C:\Program Files\HW group\HW VSP3s\RegVSP.exe" /s /i:"HW group s.r.o.#000GNU-F1MPKC-WN5Y9K-C2MK2Y-5RPRAC-4CR23U-DC649F-0BE50E-A120FD-9AA5EE-A43D2C-A069D5" VSPort.dll
    Konfiguracja HW Virtual Serial Port wygląda następująco:

    W zakładce "Settings"
    zaznaczamy TCP Server Mode
    odznaczamy NVT Enable


    W zakładce "Virtual Serial Port"
    Wybieramy wolny port COM u mnie COM9
    oraz adres nasłuchiwania 0.0.0.0 oznacza wszystkie interfejsy w PC
    port: 31873


    Uruchomienie:
    NA PC w HW Virtual Serial Port tworzymy COM "Create COM"
    NA PPC w GPS2Blue uruchamiamy transmisję GPS over TCP/IP "On"

    Po nawiązaniu komunikacji będą rosły liczniki:
    w HW Virtual Serial Port licznik Rx
    w GPS2Blue licznik Bytes



    Podsumowanie:
    Tak skonfigurowane urządzenia można wykorzystać np.: do wardriving'u przy współpracy z aplikacjami takimi jak Kismet, NetStumbler, inSSIDer, lub po prostu do nawigacji z AutoMapą.

    Ponadto samo rozwiązanie połączenia PDA do komputera za pomocą USB można zastąpić poprzez BT (Bluetooth) lub WiFI (w końcu jest to GPS over TCP/IP).

    Źródła:
    http://users.skynet.be/hofinger/GPS2BlueFAQ.html
    http://www.hw-group.com/products/hw_vsp/index_en.html
    http://www.gpspassion.com/forumsen/topic.asp?TOPIC_ID=56979&whichpage=2#365580
    http://oldsap.blogspot.com/2009/07/gps2blue.html

    czwartek, 14 kwietnia 2011

    Próba włamania do TL-WR1043N z OpenWRT Backfire

    Próba miała na celu analizę logów z routera zebranych podczas próby ataku na sieć WiFi.

    Do testów użyto:
    • Router TP-Link TL-WR1043ND z alternatywnym firmware OpenWRT Backfire 10.03.1-rc4 [AP:AP:AP:AP:AP:AP]
    • Klient podłączony do AP [C1:C1:C1:C1:C1:C1]
    • WLAN 11g USB Adapter – Chipsert ZyDAS ZD1211B – [C2:C2:C2:C2:C2:C2]
    • System operacyjny BackTrack 4 R2

    Konfiguracja TL-WR1043ND
    Dystrybucja: OpenWRT Backfire 10.03.1-rc4
    Kompilacja: 2011-02-26 - r25718

    root@server:~# uname -a
    Linux server 2.6.32.27 #7 Sat Feb 26 15:25:42 CET 2011 mips GNU/Linux

    Wykonane testy:

    TEST 1. Injection test
    (http://www.aircrack-ng.org/doku.php?id=injection_test)

    root@bt:~# aireplay-ng -9 -a AP:AP:AP:AP:AP:AP -e test -B mon0

    13:51:22 Waiting for beacon frame (BSSID: AP:AP:AP:AP:AP:AP) on channel 5
    13:51:22 Trying broadcast probe requests...
    13:51:22 Injection is working!
    13:51:24 Found 1 AP

    13:51:24 Trying directed probe requests...
    13:51:24 AP:AP:AP:AP:AP:AP - channel: 5 - 'test'
    13:51:25 Ping (min/avg/max): 8.055ms/22.076ms/138.223ms Power: -50.72
    13:51:25 29/30: 96%

    13:51:25 Trying directed probe requests for all bitrates...

    13:51:25 AP:AP:AP:AP:AP:AP - channel: 5 - 'test'
    13:51:28 Probing at 1.0 Mbps: 13/30: 43%
    13:51:29 Probing at 2.0 Mbps: 23/30: 76%
    13:51:31 Probing at 5.5 Mbps: 23/30: 76%
    13:51:32 Probing at 6.0 Mbps: 24/30: 80%
    13:51:33 Probing at 9.0 Mbps: 22/30: 73%
    13:51:34 Probing at 11.0 Mbps: 24/30: 80%
    13:51:35 Probing at 12.0 Mbps: 23/30: 76%
    13:51:36 Probing at 18.0 Mbps: 26/30: 86%
    13:51:37 Probing at 24.0 Mbps: 24/30: 80%
    13:51:38 Probing at 36.0 Mbps: 24/30: 80%
    13:51:39 Probing at 48.0 Mbps: 24/30: 80%
    13:51:40 Probing at 54.0 Mbps: 26/30: 86%

    Logi AP
    Apr 13 19:51:27 hostapd: wlan0: STA 00:ad:81:0d:12:57 IEEE 802.11: did not acknowledge authentication response
    Apr 13 19:51:27 hostapd: wlan0: STA 00:33:9d:9e:04:c0 IEEE 802.11: did not acknowledge authentication response
    Apr 13 19:51:27 hostapd: wlan0: STA 00:42:51:e9:95:6d IEEE 802.11: did not acknowledge authentication response
    Apr 13 19:51:27 hostapd: wlan0: STA 00:64:ad:5c:24:66 IEEE 802.11: did not acknowledge authentication response
    Apr 13 19:51:27 hostapd: wlan0: STA 00:be:04:79:ef:c9 IEEE 802.11: did not acknowledge authentication response
    Apr 13 19:51:27 hostapd: wlan0: STA 00:a1:76:b1:77:6f IEEE 802.11: did not acknowledge authentication response
    Apr 13 19:51:27 hostapd: wlan0: STA 00:e0:24:f1:ed:37 IEEE 802.11: did not acknowledge authentication response
    Apr 13 19:51:27 hostapd: wlan0: STA 00:94:29:77:7d:be IEEE 802.11: did not acknowledge authentication response
    Apr 13 19:51:27 hostapd: wlan0: STA 00:d4:ec:65:85:63 IEEE 802.11: did not acknowledge authentication response
    Apr 13 19:51:27 hostapd: wlan0: STA 00:bf:0e:74:93:f4 IEEE 802.11: did not acknowledge authentication response
    Apr 13 19:51:27 hostapd: wlan0: STA 00:8e:19:34:99:63 IEEE 802.11: did not acknowledge authentication response
    Apr 13 19:51:27 hostapd: wlan0: STA 00:22:6d:4f:87:f2 IEEE 802.11: did not acknowledge authentication response
    Apr 13 19:51:27 hostapd: wlan0: STA 00:b3:5c:58:3b:21 IEEE 802.11: did not acknowledge authentication response
    Apr 13 19:51:27 hostapd: wlan0: STA 00:ab:fa:2f:1f:8d IEEE 802.11: did not acknowledge authentication response
    Apr 13 19:51:27 hostapd: wlan0: STA 00:5b:1d:bd:e2:65 IEEE 802.11: did not acknowledge authentication response
    Apr 13 19:51:27 hostapd: wlan0: STA 00:f2:70:7e:26:09 IEEE 802.11: did not acknowledge authentication response
    Apr 13 19:51:27 hostapd: wlan0: STA 00:e1:49:76:31:d0 IEEE 802.11: did not acknowledge authentication response
    Apr 13 19:51:27 hostapd: wlan0: STA 00:69:e4:2c:c1:1f IEEE 802.11: did not acknowledge authentication response
    Apr 13 19:51:27 hostapd: wlan0: STA 00:a6:a1:43:5c:e3 IEEE 802.11: did not acknowledge authentication response
    Apr 13 19:51:27 hostapd: wlan0: STA 00:0c:b7:00:ca:99 IEEE 802.11: did not acknowledge authentication response
    Apr 13 19:51:27 hostapd: wlan0: STA 00:65:bc:0a:e3:e3 IEEE 802.11: did not acknowledge authentication response
    Apr 13 19:56:28 hostapd: wlan0: STA 00:ad:81:0d:12:57 IEEE 802.11: disassociated due to inactivity
    Apr 13 19:56:28 hostapd: wlan0: STA 00:33:9d:9e:04:c0 IEEE 802.11: disassociated due to inactivity
    Apr 13 19:56:28 hostapd: wlan0: STA 00:42:51:e9:95:6d IEEE 802.11: disassociated due to inactivity
    Apr 13 19:56:28 hostapd: wlan0: STA 00:64:ad:5c:24:66 IEEE 802.11: disassociated due to inactivity
    Apr 13 19:56:28 hostapd: wlan0: STA 00:be:04:79:ef:c9 IEEE 802.11: disassociated due to inactivity
    Apr 13 19:56:28 hostapd: wlan0: STA 00:a1:76:b1:77:6f IEEE 802.11: disassociated due to inactivity
    Apr 13 19:56:28 hostapd: wlan0: STA 00:e0:24:f1:ed:37 IEEE 802.11: disassociated due to inactivity
    Apr 13 19:56:28 hostapd: wlan0: STA 00:94:29:77:7d:be IEEE 802.11: disassociated due to inactivity
    Apr 13 19:56:28 hostapd: wlan0: STA 00:d4:ec:65:85:63 IEEE 802.11: disassociated due to inactivity
    Apr 13 19:56:28 hostapd: wlan0: STA 00:bf:0e:74:93:f4 IEEE 802.11: disassociated due to inactivity
    Apr 13 19:56:28 hostapd: wlan0: STA 00:8e:19:34:99:63 IEEE 802.11: disassociated due to inactivity
    Apr 13 19:56:28 hostapd: wlan0: STA 00:22:6d:4f:87:f2 IEEE 802.11: disassociated due to inactivity
    Apr 13 19:56:28 hostapd: wlan0: STA 00:b3:5c:58:3b:21 IEEE 802.11: disassociated due to inactivity
    Apr 13 19:56:28 hostapd: wlan0: STA 00:ab:fa:2f:1f:8d IEEE 802.11: disassociated due to inactivity
    Apr 13 19:56:28 hostapd: wlan0: STA 00:5b:1d:bd:e2:65 IEEE 802.11: disassociated due to inactivity
    Apr 13 19:56:28 hostapd: wlan0: STA 00:f2:70:7e:26:09 IEEE 802.11: disassociated due to inactivity
    Apr 13 19:56:28 hostapd: wlan0: STA 00:e1:49:76:31:d0 IEEE 802.11: disassociated due to inactivity
    Apr 13 19:56:28 hostapd: wlan0: STA 00:69:e4:2c:c1:1f IEEE 802.11: disassociated due to inactivity
    Apr 13 19:56:28 hostapd: wlan0: STA 00:a6:a1:43:5c:e3 IEEE 802.11: disassociated due to inactivity
    Apr 13 19:56:28 hostapd: wlan0: STA 00:0c:b7:00:ca:99 IEEE 802.11: disassociated due to inactivity
    Apr 13 19:56:28 hostapd: wlan0: STA 00:65:bc:0a:e3:e3 IEEE 802.11: disassociated due to inactivity
    Apr 13 19:56:29 hostapd: wlan0: STA 00:ad:81:0d:12:57 IEEE 802.11: deauthenticated due to inactivity
    Apr 13 19:56:29 hostapd: wlan0: STA 00:33:9d:9e:04:c0 IEEE 802.11: deauthenticated due to inactivity
    Apr 13 19:56:29 hostapd: wlan0: STA 00:42:51:e9:95:6d IEEE 802.11: deauthenticated due to inactivity
    Apr 13 19:56:29 hostapd: wlan0: STA 00:64:ad:5c:24:66 IEEE 802.11: deauthenticated due to inactivity
    Apr 13 19:56:29 hostapd: wlan0: STA 00:be:04:79:ef:c9 IEEE 802.11: deauthenticated due to inactivity
    Apr 13 19:56:29 hostapd: wlan0: STA 00:a1:76:b1:77:6f IEEE 802.11: deauthenticated due to inactivity
    Apr 13 19:56:29 hostapd: wlan0: STA 00:e0:24:f1:ed:37 IEEE 802.11: deauthenticated due to inactivity
    Apr 13 19:56:29 hostapd: wlan0: STA 00:94:29:77:7d:be IEEE 802.11: deauthenticated due to inactivity
    Apr 13 19:56:29 hostapd: wlan0: STA 00:d4:ec:65:85:63 IEEE 802.11: deauthenticated due to inactivity
    Apr 13 19:56:29 hostapd: wlan0: STA 00:bf:0e:74:93:f4 IEEE 802.11: deauthenticated due to inactivity
    Apr 13 19:56:29 hostapd: wlan0: STA 00:8e:19:34:99:63 IEEE 802.11: deauthenticated due to inactivity
    Apr 13 19:56:29 hostapd: wlan0: STA 00:22:6d:4f:87:f2 IEEE 802.11: deauthenticated due to inactivity
    Apr 13 19:56:29 hostapd: wlan0: STA 00:b3:5c:58:3b:21 IEEE 802.11: deauthenticated due to inactivity
    Apr 13 19:56:29 hostapd: wlan0: STA 00:ab:fa:2f:1f:8d IEEE 802.11: deauthenticated due to inactivity
    Apr 13 19:56:29 hostapd: wlan0: STA 00:5b:1d:bd:e2:65 IEEE 802.11: deauthenticated due to inactivity
    Apr 13 19:56:29 hostapd: wlan0: STA 00:f2:70:7e:26:09 IEEE 802.11: deauthenticated due to inactivity
    Apr 13 19:56:29 hostapd: wlan0: STA 00:e1:49:76:31:d0 IEEE 802.11: deauthenticated due to inactivity
    Apr 13 19:56:29 hostapd: wlan0: STA 00:69:e4:2c:c1:1f IEEE 802.11: deauthenticated due to inactivity
    Apr 13 19:56:29 hostapd: wlan0: STA 00:a6:a1:43:5c:e3 IEEE 802.11: deauthenticated due to inactivity
    Apr 13 19:56:29 hostapd: wlan0: STA 00:0c:b7:00:ca:99 IEEE 802.11: deauthenticated due to inactivity
    Apr 13 19:56:29 hostapd: wlan0: STA 00:65:bc:0a:e3:e3 IEEE 802.11: deauthenticated due to inactivity

    TEST 2. Fake authentication
    (http://www.aircrack-ng.org/doku.php?id=fake_authentication)

    root@bt:~# aireplay-ng -1 0 -e test -a AP:AP:AP:AP:AP:AP -h C2:C2:C2:C2:C2:C2 mon0
    Logi AP
    Apr 13 20:38:09 hostapd: wlan0: STA C2:C2:C2:C2:C2:C2 IEEE 802.11: No WPA/RSN IE in association request
    Apr 13 20:38:09 hostapd: wlan0: STA C2:C2:C2:C2:C2:C2 IEEE 802.11: did not acknowledge authentication response
    Apr 13 20:38:12 hostapd: wlan0: STA C2:C2:C2:C2:C2:C2 IEEE 802.11: No WPA/RSN IE in association request
    Apr 13 20:38:12 hostapd: wlan0: STA C2:C2:C2:C2:C2:C2 IEEE 802.11: did not acknowledge authentication response
    Apr 13 20:38:15 hostapd: wlan0: STA C2:C2:C2:C2:C2:C2 IEEE 802.11: No WPA/RSN IE in association request
    Apr 13 20:38:15 hostapd: wlan0: STA C2:C2:C2:C2:C2:C2 IEEE 802.11: did not acknowledge authentication response
    Apr 13 20:38:18 hostapd: wlan0: STA C2:C2:C2:C2:C2:C2 IEEE 802.11: authenticated
    Apr 13 20:38:18 hostapd: wlan0: STA C2:C2:C2:C2:C2:C2 IEEE 802.11: No WPA/RSN IE in association request
    Apr 13 20:38:21 hostapd: wlan0: STA C2:C2:C2:C2:C2:C2 IEEE 802.11: No WPA/RSN IE in association request
    Apr 13 20:38:21 hostapd: wlan0: STA C2:C2:C2:C2:C2:C2 IEEE 802.11: did not acknowledge authentication response
    Apr 13 20:38:24 hostapd: wlan0: STA C2:C2:C2:C2:C2:C2 IEEE 802.11: No WPA/RSN IE in association request
    Apr 13 20:38:24 hostapd: wlan0: STA C2:C2:C2:C2:C2:C2 IEEE 802.11: did not acknowledge authentication response
    Apr 13 20:38:27 hostapd: wlan0: STA C2:C2:C2:C2:C2:C2 IEEE 802.11: No WPA/RSN IE in association request
    Apr 13 20:38:27 hostapd: wlan0: STA C2:C2:C2:C2:C2:C2 IEEE 802.11: did not acknowledge authentication response
    Apr 13 20:38:30 hostapd: wlan0: STA C2:C2:C2:C2:C2:C2 IEEE 802.11: No WPA/RSN IE in association request
    Apr 13 20:38:30 hostapd: wlan0: STA C2:C2:C2:C2:C2:C2 IEEE 802.11: did not acknowledge authentication response
    Apr 13 20:38:33 hostapd: wlan0: STA C2:C2:C2:C2:C2:C2 IEEE 802.11: No WPA/RSN IE in association request
    Apr 13 20:38:33 hostapd: wlan0: STA C2:C2:C2:C2:C2:C2 IEEE 802.11: did not acknowledge authentication response
    Apr 13 20:38:36 hostapd: wlan0: STA C2:C2:C2:C2:C2:C2 IEEE 802.11: No WPA/RSN IE in association request
    Apr 13 20:38:36 hostapd: wlan0: STA C2:C2:C2:C2:C2:C2 IEEE 802.11: did not acknowledge authentication response
    Apr 13 20:38:39 hostapd: wlan0: STA C2:C2:C2:C2:C2:C2 IEEE 802.11: No WPA/RSN IE in association request
    Apr 13 20:38:39 hostapd: wlan0: STA C2:C2:C2:C2:C2:C2 IEEE 802.11: did not acknowledge authentication response
    Apr 13 20:38:42 hostapd: wlan0: STA C2:C2:C2:C2:C2:C2 IEEE 802.11: No WPA/RSN IE in association request
    Apr 13 20:38:42 hostapd: wlan0: STA C2:C2:C2:C2:C2:C2 IEEE 802.11: did not acknowledge authentication response
    Apr 13 20:38:45 hostapd: wlan0: STA C2:C2:C2:C2:C2:C2 IEEE 802.11: No WPA/RSN IE in association request
    Apr 13 20:38:45 hostapd: wlan0: STA C2:C2:C2:C2:C2:C2 IEEE 802.11: did not acknowledge authentication response
    Apr 13 20:38:48 hostapd: wlan0: STA C2:C2:C2:C2:C2:C2 IEEE 802.11: No WPA/RSN IE in association request
    Apr 13 20:38:48 hostapd: wlan0: STA C2:C2:C2:C2:C2:C2 IEEE 802.11: did not acknowledge authentication response
    ...
    Apr 13 20:43:10 hostapd: wlan0: STA C2:C2:C2:C2:C2:C2 IEEE 802.11: disassociated due to inactivity
    Apr 13 20:43:11 hostapd: wlan0: STA C2:C2:C2:C2:C2:C2 IEEE 802.11: deauthenticated due to inactivity

    TEST 3. Capturing
    (http://www.aircrack-ng.org/doku.php?id=airodump-ng)

    root@bt:~# airodump-ng -c 5 --bssid AP:AP:AP:AP:AP:AP -w test mon0
    Logi AP
    Brak

    TEST 4. Deauthentication
    (http://www.aircrack-ng.org/doku.php?id=deauthentication)

    root@bt:~# aireplay-ng -0 2 -a AP:AP:AP:AP:AP:AP -c C1:C1:C1:C1:C1:C1 mon0

    15:44:21 Waiting for beacon frame (BSSID: AP:AP:AP:AP:AP:AP) on channel 5
    15:44:22 Sending 64 directed DeAuth. STMAC: [C1:C1:C1:C1:C1:C1] [87|107 ACKs]
    15:44:22 Sending 64 directed DeAuth. STMAC: [C1:C1:C1:C1:C1:C1] [ 0|63 ACKs]
    Logi AP
    Apr 13 21:44:22 hostapd: wlan0: STA C1:C1:C1:C1:C1:C1 IEEE 802.11: authenticated
    Apr 13 21:44:22 hostapd: wlan0: STA C1:C1:C1:C1:C1:C1 IEEE 802.11: associated (aid 1)
    Apr 13 21:44:22 hostapd: wlan0: STA C1:C1:C1:C1:C1:C1 WPA: pairwise key handshake completed (RSN)
    Apr 13 21:44:22 dnsmasq-dhcp[1364]: DHCPREQUEST(br-lan) 10.0.0.10 C1:C1:C1:C1:C1:C
    Apr 13 21:44:22 dnsmasq-dhcp[1364]: DHCPACK(br-lan) 10.0.0.10