Sep 2 2010

Ochrona Apache (phpmyadmina) przed atakiem brute force

format logowania w mod_ssl.conf:

CustomLog /var/log/httpd/ssl_request_log \
“%h %t %l %u %{userStatus}n %>s %{SSL_PROTOCOL}x %{SSL_CIPHER}x \”%r\” %b”

format logowania w httpd.conf

LogFormat “%h %l %u %t \”%r\” %>s %b \”%{Referer}i\” \”%{User-Agent}i\” %{userStatus}n” combined

tworzymy plik /etc/fail2ban/filter.d/apache-mysql.conf

failregex = <HOST>.* mysql-denied

w pliku /etc/fail2ban/jail.conf dodajemy linijki

[apache-mysql]
enabled  = true
filter   = apache-mysql
action   = hostsdeny
iptables-multiport[name=apache-auth, port=”80,443,3306″, protocol=tcp]
mail-whois[name=Apache-mysql, dest=root]
logpath  = /var/log/httpd/ssl_request_log
maxretry = 6

Restartujemy fail2ban.

Sep 2 2010

Postfix – kasowanie maili z kolejki

Pokaż maile w kolejce:
postqueue -p
Skasuj maila o identyfikatorze d z kolejki:
postsuper -d id_maila

Przekolejkowanie kolejki
postsuper -r ALL

Podgląd konkretnego maila w kolejce
postcat -q id_maila

Kasowanie wszystkich maili w kolejce
postsuper -d ALL

Kasowanie wszystkich maili w kolejce deffered
postsuper -d ALL deferred

Aug 4 2010

Slackware 13.1 + Postfix + MySQL

postfix z TLS, dovecot, mysql
na systemie 32-bit
make makefiles CCARGS=’-DUSE_TLS -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\”dovecot\” -I/usr/lib/dovecot -DHAS_MYSQL -I/usr/include/mysql’ AUXLIBS=”-L/usr/lib -lsasl2 -L/usr/lib/mysql -lmysqlclient -lz -lm -lssl -lcrypto”

jeśli wyskoczą błędy:
gcc -Wmissing-prototypes -Wformat -DHAS_MYSQL -I/usr/include/mysql -DHAS_PCRE -g -O -I. -DLINUX2 -c alldig.c
mv /usr/include/mysql/events.h /usr/include/mysql/events.h.bak

Aug 3 2010

DELIVER ME TO HELL – REAL ZOMBIES ATTACK

Jul 20 2010

SpamAssassin nie działa po uaktualnieniu

Jeśli po uaktualnieniu do nowszej wersji spamd nie chce zastartować, wystarczy wydac polecenie:

sa-update -D

i zrestartować spamassassina.

Jul 13 2010

lstat – „wiszące” procesy fping

Edytujemy plik Std_obj.pm w katalogu lib lstat-a.
Szukamy ciągu package TIPGrapher.
Szukamy procedury Update_Object.

Po linijkach:

close(INPUT);
@output=<OUTPUT>;
@erroutput=<ERROR>;
close (OUTPUT);
close (ERROR);

wstawiamy kod:

waitpid ($fpingpid,0);

Jul 13 2010

lstat i rrdtool

Jeśli masz problem z wyświetlaniem opisów wykresów  w lstat, zainstaluj rrdtool w wersji 1.2.19

A tu link do Slackbuilda.

May 31 2010

Autostart Explorera z folderem „Moje Dokumenty”

Jeśli podczas uruchamiania komputera samoczynnie uruchamiają Moje Dokumenty.
uruchamiamy regedit:
pewnie jest tak:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
“Userinit”=”userinit.exe,EXPLORER.EXE”

a powinno być tak:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
“Userinit”=”userinit.exe”

dodatkowo:

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]

PersistBrowsers ma mieć wartość 0 .

May 28 2010

How to use Ubuntu LiveCD to get Windows Product Key from hosed system

@lkraemer, I posted it here because lots of people use the Ubuntu LiveCD to troubleshoot Windows problems. I thought I could get help here… and I was right. However, your response was very Microsoftian: lots of talk, but nothing useful.

@juanoleso, et al…

Because of your help, I was able to learnthe location of the Windows Registry files:
(C:\WINDOWS\system32\config\)

I also had found Magic Jellybean KeyFinder (MJBKF) in my searching previously, but was unaware that it would work on a hive that was not the current one, like some other programs of similar purpose. With information from you folks, I made some attempts. Here’s what worked…

1. I copied the config folder (mentioned above) to my USB drive using Ubuntu to get access to the hard drive.
2. On another Windows machine, I installed MJBKF and plugged in the USB drive.
3. MJBKF didn’t work if I pointed it to the config folder. So I thought to duplicate the directory structure it might normally see in Windows.
4. I created a windows folder, and then created a system32 folder in it.
5. I then moved the config folder into the system32 folder.
6. MJBKF worked fine when I pointed it to the newly-created windows folder. I was able to get my Windows XP Key!

L

May 27 2010

Poczta głosowa w PLUS-ie

Numer skrzynki: 2222

z telefonu stacjonarnego lub innej sieci komórkowej: 0 601 22 2222

Wyłączanie
Wprowadź do aparatu kod: ##002# i naciśnij “zadzwoń”.
Włączanie
w sytuacji nie odbierania połączenia (przekazanie nastąpi po 25 sek. nie odbierania połączenia):
**61*+48601222222*11# i przycisk, którym rozpoczyna się połączenie

w sytuacji, gdy numer jest zajęty:
**67*+48601222222*11# i przycisk, którym rozpoczyna się połączenie

w sytuacji, gdy numer jest wyłączony lub jest poza zasięgiem sieci:
**62*+48601222222*11# i przycisk, którym rozpoczyna się połączenie