Archive for June, 2007

trainraider

June 30th, 2007 | Category: vita

httpv://www.youtube.com/watch?v=4EcoZ4RoFRM

Performed by the trainrider. Before he died from leukemia, he enjoyed the last year of his life by surfing on trains. He also surfed on Germanys fastest higspeed train called ICE with a top speed of nearly 250mph(!) No one did that before. Never to be forgotten R.I.P.

No comments

da “Il piccolo sistemista”, Garzanti Editori

June 26th, 2007 | Category: tmrc

tutto e’ cominciato stamattina.

N. mi chiama: “Suuuugo?”

Io: “Si’?”

N. “Nagios dice che e’ morto il server web su [CENSORED]

(chissa’ come mai sono diventato cosi’ riservato)

Tosto mi ci collego in ssh. Il server web stava girando. Certo, il tutto era di una lentezza mostruosa, cosa che mi ha indotto a usare top, free, ps, cazzi e mazzi.

La cosa piu’ importante di quel server e’ il radius. Stava funzionando.

In effetti non poteva non funzionare.

Se fosse morto pure quello, da quel posto li’ mi avrebbero gia’ chiamato i Nagios umani (cioe’ le segretarie).

Cosi’ decido di usare rkhunter e chkrootkit, giusto per stare piu’ apposto con la coscienza.

chkrootkit mi ha sparato una lista di file sospetti troppo lunga per essere vera.

L’ho fatta vedere a E., c’abbiamo riso sopra insieme, e morta li’.

rkhunter invece mi ha trovato 3 checksum BAD: insmod, depmod e modinfo.

Mi e’ sembrato strano. L’ultima volta (e unica, a dir la verita’) che ho trovato dei binari taroccati ce n’erano molti di piu’.

Insomma, pensavo piu’ a un falso positivo.

Rootkit Hunter has found some bad or unknown hashes. This can happen due to replaced
binaries or updated packages (which give other hashes). Be sure your hashes are
up-to-date (rkhunter –update). If you’re in doubt about these hashes, contact
us through the Rootkit Hunter mailinglist at [email protected].

Cosi’ sono giunto allo script “hashupd.sh”, che ha lo scopo di aggiornare il database degli hash dei vari binari.

Purtroppo non e’ stato immediato usarlo đŸ™‚

root@CENSORED:/home/sugo# sh hashupd.sh
[FATAL] /usr/local/rkhunter/lib/rkhunter/db/os.dat not writable, exiting.

Ahhh, il classico errore di permessi… Ma:

root@CENSORED:/home/sugo# ls -lF /usr/local/rkhunter/lib/rkhunter/
total 16
drwxr-xr-x 2 root root 4096 Jun 25 22:45 db/
drwxr-xr-x 2 root root 4096 Jun 25 20:32 docs/
drwxr-xr-x 2 root root 4096 Jun 25 20:32 scripts/
drwxr-xr-x 2 root root 4096 Jun 26 00:40 tmp/

..da qui in poi tutta una serie di cazzi infiniti, paranoie, lsattr, chattr, etc…

L’unica era forse dare un’occhiata allo script e vedere un po’ di che cazzo aveva bisogno:

# 2. Functions. Easy readable code.
show_help() { echo -en “hashupd for Rootkit Hunter\nargs: \n -q: quiet, only errors shown,\n -c : supply path and
configuration file,\n -d : supply path to database directory (if not found in rkhunter.conf),\n -t
ory name>: supply path to temp directory (if not found in rkhunter.conf),\n -m : email new or changed
sums to address so you can send it to the maintainer.\n* ${progn} is an unofficial, but community-supported, helper applic
ation for adding and changing\nRootkit Hunter database information.\nFor support please see [email protected]
e.net\nPlease send new hashes for inclusion in Rootkit Hunter to [email protected]\n\n”; }
is_writable() { case “$1″ in d) check_int=”7″;; f) check_int=”6”;; esac; perm=$(stat -c %a “$2” 2>/dev/null); case “${#perm
}” in 3) check_pos=”${perm:0:1}”;; 4) check_pos=”${perm:1:1}”;; esac; if [ “$check_pos” != “$check_int” ]; then echo “[FATA
L] “$2″ not writable, exiting.”; exit 1; fi; }

La parte in neretto era quella interessata, ma diciamocelo francamente: non avevo minimamente voglia di CAPIRLA.

Alla fine ho svoltato su google un tizio che aveva avuto il mio stesso errore, e uno gli ha risposto:

Can you try 'stat -c %a /usr/local/rkhunter/lib/rkhunter/db' and let me
know what it says please.

stat: command not found.

Bene.

Il pacchetto coreutils non c’era.

Ho avuto la pessima idea di provare a metterlo con swaret. Su una Slackware 9.0.

Durante l’operazione ho letto che si vociferava di aggiornare le glibc. Mi sono spaventato e ho fatto control+c.

Ottimo.

Da qui in poi l’aria che si respirava era questa:

root@CENSORED:~# ls
/bin/ls: error while loading shared libraries: libacl.so.1: cannot open shared object file: No such file or directory

root@CENSORED:/home/sugo# mv
mv: error while loading shared libraries: libacl.so.1: cannot open shared object file: No such file or directory

root@CENSORED:/home/sugo# cp
cp: error while loading shared libraries: libacl.so.1: cannot open shared object file: No such file or directory

Insomma, avevo rotto tutto.

Per fortuna esiste IL BACKUP, non a caso il nostro server di backup si chiama “salvatore” đŸ™‚

Ho ripristinato i binari, e tutto e’ tornato a funzionare.

p.s. fanculo alle installazioni “a risparmio” đŸ™‚ đŸ™‚

7 comments

ti

June 21st, 2007 | Category: vita

camminavo dietro

era notte, ma mi piace avere un ricordo artificiale di quei momenti – ossia immaginarli di giorno
il tuo immergerti nella folla, confonderti tra le masse

proprio come se non fossi speciale

No comments

wifi: storia di un rapporto

June 11th, 2007 | Category: tmrc

e’ da poco che ho imparato a configurare una scheda wireless sotto linux, quando c’e’ di mezzo il wpa.
avevo letto qualcosa velocemente, tipo che ci voleva un software “wpa supplicant”.. diciamo pure che mi ero scazzato subito perche’ mi sembrava tutto poco-immediato.
ad es. quando arrivo’ a casa il modem adsl Alice-merda l’ho tenuto per mesi soltanto col wep.


poi un giorno ho avuto personalmente bisogno di infrangere questo limite.


“la necessita’ e’ madre dell’invenzione” (da qui il nome della prima band di F. Zappa, “Mothers of Invention”)

/mode James Joyce on
decoder:~# wpa_
wpa_action wpa_cli wpa_passphrase wpa_supplicant

mm, quale sara’ quello giusto? proviamo wpa_supplicant senza niente

decoder:~# wpa_supplicant
wpa_supplicant v0.5.5
Copyright (c) 2003-2006, Jouni Malinen and contributors

This program is free software. You can distribute it and/or modify it
under the terms of the GNU General Public License version 2.

Alternatively, this software may be distributed under the terms of the
BSD license. See README and COPYING for more details.

This product includes software developed by the OpenSSL Project
for use in the OpenSSL Toolkit (http://www.openssl.org/)

usage:
wpa_supplicant [-BddehLqquvwW] [-P

] [-g] \
-i -c [-C] [-D] [-p] \
[-b [-N -i -c [-C] [-D] \
[-p] [-b] …]
drivers:
hostap = Host AP driver (Intersil Prism2/2.5/3)
madwifi = MADWIFI 802.11 support (Atheros, etc.)
atmel = ATMEL AT76C5XXx (USB, PCMCIA)
wext = Linux wireless extensions (generic)
ndiswrapper = Linux ndiswrapper
ipw = Intel ipw2100/2200 driver
wired = wpa_supplicant wired Ethernet driver
test = wpa_supplicant test driver
options:
-b = optional bridge interface name
-B = run daemon in the background
-c = Configuration file
-C = ctrl_interface parameter (only used if -c is not)
-i = interface name
-d = increase debugging verbosity (-dd even more)
-D = driver name
-g = global ctrl_interface
-K = include keys (passwords, etc.) in debug output
-t = include timestamp in debug messages
-h = show this help text
-L = show license (GPL and BSD)
-p = driver parameters
-P = PID file
-q = decrease debugging verbosity (-qq even less)
-u = enable DBus control interface
-v = show version
-w = wait for interface to be added, if needed
-W = wait for a control interface monitor before starting
-N = start describing new interface
example:
wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf

Ahh che figo, c’e’ l’esempio. Pero’ vuole alla fine un file di configurazione.

Vediamo se esiste gia’

decoder:/etc# cat wpa_supplicant/
functions.sh ifupdown.sh home.conf wpa_supplicant.conf

Ci sta ma e’ vuoto.

Proviamo con wpa_passphrase

decoder:/etc# wpa_passphrase
usage: wpa_passphrase [passphrase]

If passphrase is left out, it will be read from stdin

Ah ok, questo mi sembra facile

decoder:/etc# wpa_passphrase miglianino_e_valentina (..censured..)

mi ha sputato fuori questo

network={
ssid=”miglianino_e_valentina”
#psk=”(..censured..)”
psk=333blabla.. serie infinita di numeri e lettere
}


Mm e se fosse questo il file di conf che vuole lui?

decoder:/etc# wpa_passphrase miglianino_e_valentina (..censured..) > /etc/wpa_supplicant/cototto.conf
ok proviamo

decoder:/etc# wpa_supplicant -Dwext -ieth4 -c /etc/wpa_supplicant/cototto.conf

..e mi sono associato đŸ˜›

/mode James Joyce off

” Il suggerimento per imparare UNIX e’ di leggere un po’, poi provare.
Continuate a provare finche’ non comincerete ad avere dimestichezza con i
concetti, e poi iniziate a girare all’interno del libro. Troverete una
varieta’ di argomenti, alcuni dei quali vi interesseranno, altri vi
annoieranno. Dopo un po’ avrete abbastanza confidenza per iniziare ad usare comandi senza sapere quello che fanno esattamente, che e’ una cosa molto utile.”

(Linux User Guide, di Larry Greenfield – 1996)

Se volete sta qui, in italiano, ma se usate Win dovrete installarvi Ghostview, credo. E’ stato molto bello leggerla!

2 comments

lo

June 08th, 2007 | Category: vita