piątek, 3 sierpnia 2007

WRT54G SC/MMC hack/mod

Tunning wykonałem krok po kroku za instrukcją umieszczoną w WRT54G Ultimate Hacking. I niby wszystko było ok .. system widział kartę .. dało się na niej coś zapisać .. jednak podczas instalowania na niej dodatkowych paczek z oprogramowanie router wieszał się po chwili. A to wszystko za sprawą złej kolejności ustawiania maski GPIO oraz ładowania modułu mmc.o.
Prawidłowa kolejność to najpierw maska, potem moduł. Mój skrypt startowy wygląda tak:

root@OpenWrt:# cat /etc/init.d/S20mmc
#!/bin/sh
echo "0x7e" > /proc/diag/gpiomask
insmod mmc gpio_sd_di_pin=2
mount /mnt/mmc

0x7e zamiast 0x9c które można znaleźć w innych HowTo ponieważ mod wykonałem na modelu WRT54GL v1.0 gdzie nie ma (nie znaleziono) miejsca z którego by można wyciągnąć GPIO 5, dlatego też zamiast niego użyłem GPIO 2, a następnie poinformowałem o tym moduł mmc.o przez podanie parametru gpio_sd_di_pin=2. Moduł do systemu plików ładuje za pomocą /etc/modules.d.

Kolejna sprawa która wyskoczyła w tak zwanym miedzy czasie to problem z zainstalowaniem tcpdump'a na zewnętrznej karcie. Wszystko za sprawą systemu plików FAT który uniemożliwia tworzenie symlinków, a takowe chce tworzyć niezbędna do uruchomienia tcpdump'a paczka zbiblioteką pcap. Problem można obejść tworzą kopie odpowiednich plików i nadając im odpowiednie nazwy, ale tracimy przez to niepotrzebnie miejsce.
Wyjście? Formatujemy kartę na ext2. W tym celu musimy zainstalować paczkę e2fsprogs którą znajdziemy w backportach dla wersji RC6 whiterussian. Następnie wykonać komendę:
mkfs.ext2 /dev/mmc/disc0/part1

zainstalować moduł kmod-ext2
ipkg install kmod-ext2

spowodować aby ładował się on przy każdym starcie
echo 'ext2' > /etc/modules.d/30-ext2

zmodyfikować plik /etc/fstab
echo '/dev/mmc/disc0/part1 /mnt/mmc ext2 defaults 0 0' > /etc/fstab

reboot i już :)

MikroTik RouterOS 2.9.45

Wczoraj pojawił się kolejny update do serii 2.9 z numerkiem 45.

changelog:

* routing-test -
fixed memory leak;
inside confederations ignore routes with our AS number in AS path, this fixes looping of routing information inside confederation;
* calea server supports limited intercept;
* mac address changing did not work for RB44G (realtek 8169 chip);
* fixed bug - could not set new-tos in mangle rules from console;
* realtek 8169 ethernet chip (rb44g) could stop when using vlans
* user manager - fixed bug for PayPal payments with user data containing specific characters;
* implement hw-retries setting for wireless;

środa, 1 sierpnia 2007

WRT54G Ultimate Hacking "A ROSETTA STONE FOR THE WRT54G"

Kolejna ciekawa pozycja którą połknąłem w kilka dni. Śledząc serię WRT54Gx oraz projekt OpenWRT gdzieś od dwóch lat nie mogłem nie zwrócić na nią uwagi. W książce można znaleźć informacje na temat historii walki o źródła dla WRT54G, dowiedzieć się czegoś więcej na temat hardwareu, określić który z serii modelów będzie dla mnie najlepszy (czytając buyers guide), poznać metody instalacji nowego firmwareu, pokrótce dowiedzieć się co dany firmware oferuje (OpenWRT, DD-WRT, Ewrt ... ), prześledzić kilka przykładów konfiguracji OpenWRT, poczytać o możliwych do wykonania modyfikacjach, a na końcu co zrobić w przypadku niepowodzenia podczas modyfikacji. Polecam wszystkim WRT54G geekom i nie tylko :D

Product Details
Paperback: 412 pages
Publisher: Syngress; 1 edition (May 15, 2007)
Language: English
ISBN-10: 1597491667
ISBN-13: 978-1597491662
Product Dimensions: 9.1 x 7.5 x 1 inches

Book Description
This book will teach the reader how to make the most of their WRT54G series hardware. These handy little inexpensive devices can be configured for a near endless amount of networking tasks. The reader will learn about the WRT54Gs hardware components, the different third-party firmware available and the differences between them, choosing the firmware that is right for you, and how to install different third-party firmware distributions. Never before has this hardware been documented in this amount of detail, which includes a wide-array of photographs and complete listing of all WRT54G models currently available, including the WRTSL54GS.
Once this foundation is laid, the reader will learn how to implement functionality on the WRT54G for fun projects, penetration testing, various network tasks, wireless spectrum analysis, and more! This title features never before seen hacks using the WRT54G. For those who want to make the most out of their WRT54G you can learn how to port code and develop your own software for the OpenWRT operating system.

*Never before seen and documented hacks, including wireless spectrum analysis
*Most comprehensive source for documentation on how to take advantage of advanced features on the inexpensive wrt54g platform
*Full coverage on embedded device development using the WRT54G and OpenWRT

Kilka fotek z mojego hacku:

piątek, 27 lipca 2007

MikroTik RouterOS 3.0 RC1 !!

Właśnie pojawił się Release Candidate 1 RouterOS 3.0 a w nim sporo zmian:

changelog:

* enable routing package on upgrade - to fix upgrade from 2.9 version where routing-test package was used;
* console - parser now accepts newlines as CR, LF, CR+LF, this fixes import;
* user manager - using +/- image for group field show/hide instead of confusing checkbox;
* fixed bug - usb devices did not work;
* console - added tab key completions in editor;
* fixed slowness of RB112/RB133C during bootup (introduced in 3.0beta9);
* console - fixed variable name lookup;
* console - added back '/setup' command;
* console - added '/system script environment';
* console - fixed wireless interface configuration export;
* integrated MAC Ping in to regular Ping in WinBox;
* added support for Marvell IDE controller that is embeded in new Intel motherboards;
* fixed bug - for routes received via RIP nexthop was invalid in some cases;
* added 'get' tool for downloading files to router via HTTP or FTP;
* console - some properties could not be set via API, fixed;
* user manager - fixed bug for PayPal payments with user data containing specific characters;
* ip proxy - setting parent proxy did not work;
* fixed bug - dst-active was not updated after time update by NTP;
* console:
fixed 'do' arguments in '/tool bandwidth-test' and other commands;
inside expressions variables can be referenced without putting '$' before variable name;
'find' commands have new argument 'where' that allows to write filtering condition as console expression;
when entering commands from prompt, global variables can be used without declaring them;