Posted by Cristian | Posted in Work in progress | Posted on 13-12-2009
0
Grazie al plugin (Fast YouTube Download) è possibile scaricare con un click tutti i video presenti su youtube scegliendo il formato preferito.

Posted by Cristian | Posted in Sniffer | Posted on 12-12-2009
1
Questo tool (driftnet) che è già disponibile tra i repository ufficiali di Ubuntu ci permette di sniffare tutte le immagini che transitano all’interno della rete alla quale siamo collegati.
Basta quindi installarlo da shell con:
sudo apt-get install driftnet
e lanciarlo magari dando prima uno sguardo alle opzioni
sudo driftnet -v
e questo è il risultato

ne ho illustrato le funzionalità ma ovviamente ne sconsiglio l’utilizzo.. la privacy è la privacy
Visto che c’è chi ci prova sempre a bucare il nostro website…
[Sun Nov 15 22:39:48 2009] [error] [client xxx.xxx.xxx.xxx] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind:)
[Sat Nov 21 04:38:59 2009] [error] [client xxx.xxx.xxx.xxx] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind:)
[Sat Nov 21 05:19:41 2009] [error] [client xxx.xxx.xxx.xxx] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind:)
[Sat Nov 21 20:49:55 2009] [error] [client xxx.xxx.xxx.xxx] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind:)
[Wed Nov 25 06:23:15 2009] [error] [client xxx.xxx.xxx.xxx] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind:)
[Thu Nov 26 04:22:24 2009] [error] [client xxx.xxx.xxx.xxx] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind:)
[Fri Nov 27 06:23:02 2009] [error] [client xxx.xxx.xxx.xxx] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind:)
[Fri Nov 27 07:00:35 2009] [error] [client xxx.xxx.xxx.xxx] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind:)
[Fri Dec 04 08:37:26 2009] [error] [client xxx.xxx.xxx.xxx] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind:)
[Fri Dec 04 22:20:37 2009] [error] [client xxx.xxx.xxx.xxx] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind:)
[Tue Dec 08 06:13:16 2009] [error] [client xxx.xxx.xxx.xxx] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind:)
[Tue Dec 08 11:30:17 2009] [error] [client xxx.xxx.xxx.xxx] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind:)
[Wed Dec 09 06:32:59 2009] [error] [client xxx.xxx.xxx.xxx] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind:)
[Fri Dec 11 01:57:56 2009] [error] [client xxx.xxx.xxx.xxx] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind:)
[Fri Dec 11 05:30:52 2009] [error] [client xxx.xxx.xxx.xxx] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind:)
con questo script molto semplice e ben fatto (trovato gia pronto su internet) è possibile aggiungere in automatico un drop su iptables per bloccare tutti quegli ip che provano a sfruttare Web Vulnerability Scanner tipo DFind, basta copiare il codice evidenziato qui sotto in un file tipo w00tw00t.sh e farlo girare con il cron.
#!/bin/sh
# add iptables drop for w00tw00t scan
for ip in `cat /var/log/apache2/error_log |grep w00tw00t | awk ‘{print $8}’ | sed ‘s/]//g’ | sort -ug` ; do
countoff=$[$countoff+1]
countwoot=$[$countwoot+1]
iptables -I INPUT -s $ip -j DROP
iptables -I OUTPUT -s $ip -j DROP
Posted by Cristian | Posted in Apache2 | Posted on 12-12-2009
0
Questo PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib/php5/20060613+lfs/mcrypt.so’ su Ubuntu solitamente è dovuto al fatto che apache2 cerca di caricare il modulo mcrypt che non è stato installato e che quindi non viene trovato, basta quindi lanciare da shell:
apt-get install php5-mcrypt
Posted by Cristian | Posted in Work in progress | Posted on 07-12-2009
0
si mormora che uscirà solo nel settembre del 2010 ma si può già installare
sudo apt-get install gnome-shell
per lanciare Gnome 3 Shell
gnome-shell –replace

Posted by Cristian | Posted in Comandi Shell Linux | Posted on 29-10-2009
0
Per prima cosa creo la chiave:
openssl req -new > new.cert.csr
rimuovo la frase di sicurezza:
openssl rsa -in privkey.pem -out new.cert.key
converto la richiesta nel certificato firmato:
openssl x509 -in new.cert.csr -out new.cert.cert -req -signkey new.cert.key -days 365
faccio il move dei due file nel path che andrò poi ad inserire nel file di configurazione di Apache
edito sul file di configurazione di apache i path ai due file:
vi /etc/httpd/conf/httpd.conf (su RedHat/Centos)
# ..inizio…………………su RedHat/Centos
SSLCertificateFile /etc/httpd/conf/ssl/new.cert.cert
SSLCertificateKeyFile /etc/httpd/conf/ssl/new.cert.key
# ..fine…………………su RedHat/Centos
e reimposto i permessi sui due file (RedHat/Centos):
chmod 400 /etc/httpd/conf/ssl/*
# ..inizio………………… su Debian/Ubuntu *
SSLCertificateFile /etc/apache2/ssl/my.cert.pem
SSLCertificateKeyFile /etc/apache2/ssl/my.key.pem
# ..fine………………… su Debian/Ubuntu
e reimposto i permessi sui due file (Debian/Ubuntu):
chmod 400 /etc/apache2/ssl/*
Posted by Cristian | Posted in Comandi Shell Linux | Posted on 24-10-2009
0
Nella quasi totalità delle distribuzioni linux, alla pressione simultanea dei tasti CTRL-ALT-CANC (CTRL-ALT-DEL) ha inizio il processo di reboot del sistema anche senza avere nessuna credenziale di accesso al sistema.
Specialmente nei sistemi in produzione, disabilitare quest’impostazione può evitare sgradevoli situazioni.
L’azione che viene eseguita alla pressione simultanea dei tasti CTRL-ALT-CANC è definita nel file /etc/inittab e varia di poco da distribuzione a distribuzione.
Qualche esempio:
su RedHat la riga è questa:
ca::ctrlaltdel:/sbin/shutdown -t3 -r now
su Debian questa:
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
per disabilitare questa azione è sufficiente rimpiazzare la riga con questa:
ca:12345:ctrlaltdel:/bin/echo “CTRL-ALT-DEL disabilitato per il reboot”
dopo aver fatto la modifica basta riavviare init con il comando init q.
su Ubuntu:
vi /etc/event.d/control-alt-delete
commento la riga seguente
exec /sbin/shutdown -r now “Control-Alt-Delete pressed”
così che diventi così
#exec /sbin/shutdown -r now “Control-Alt-Delete pressed”
Posted by Cristian | Posted in Comandi Shell Linux | Posted on 11-10-2009
0
Due comandi che permettono di ottenere molte informazioni utili sui componenti del computer in uso.
dmidecode e lshw.
Un esempio che mi permette di ottenere informazioni sulla ram e gli slot utilizzati:
dmidecode -t memory
lshw -c memory
Posted by Cristian | Posted in Nagios | Posted on 02-10-2009
0
NSClient++ è un agent per server windows disponibile per sistemi X32, X64 ed Itanium che permette a Nagios di eseguire innumerevoli check a servizi, processi e molto altro.
Una volta scaricata dal sito nsclient.org la versione corretta per il vostro sistema ed installata, basta personalizzare il file nsc.ini presente nella directory in cui è stato installato l’agent così da attivare i moduli aggiuntivi necessario ed impostare una password di sicurezza che non è obbligatoria ma a mio avviso vivamente consigliata.
E’ bene anche controllare le impostazioni del servizio che è stato creato NSClientpp e inpostare sul Log On il flag su Local System account e Allow service to interact with desktop.


Io ho installato una versione un pò vecchia, ho visto che ora c’è la 0.3.7…
Read the rest of this entry »
Posted by Cristian | Posted in Nagios | Posted on 16-09-2009
10
NagiosGrapher si integra con Nagios e sfruttando rrd permette di popolare dei grafici sull’andamento temporale dei servizi posti sotto monitoraggio, di seguito i passi da seguire per installarlo e configurarlo al meglio su ubuntu server.

Read the rest of this entry »