26/12/2007

Oficialment un twitter

Bé, ja he probat això del twitter. De moment es una tonteria com una altra però bé si aconsegueixes tenir uns quants followers doncs pot estar bé per fer el memo.

Pròxima parada. Twitter2minipost <-> minipost2Twitter

25/12/2007

Credits

As you may have seen there have been lots of changes on the appereance fo this blog. Well I just wanted to make post to thanks to people that make this change happen:

  • Smilies are borrowed from VikiWorks they are png that look quite good xD ;) If you follow the instructions to change from gif to png take note that the file that is have to modify is wp-includes/functions.php
  • I’ll integrate some type of minipost to quick blog from my twitter thanks to RudeWorks to show me the way to go.

I’ll keep on changing!

9/12/2007

De nou online!

Bé després d’uns quants dies amb el blog KO hi ha hagut mooolts canvis darrera.

El blog el tenia caigut cada dos per tres per problemes amb la corrent, marxava i el servidor no arrancava correctament… Crec que el disc on hi ha l’arrel i el home està morint…

Vaig decidir doncs fer un trasllat! Doncs aquí estic en una empresa de hosting externa… Com que tenim el dòlar barato s’ha d’aprofitar…

600GB de disc, 6TB de transferencia mensual, sites il·limitats, 50 DB mysql, subdominis il·limitats mooolta cosa. Al canvi d’ara son 4.7€ al mes supe tirat de preu tenint en compte les mateixes característiques amb un hosting espanyol o fins i tot europeu.

Ja ho sabeu si voleu bon hosting a bon preu jo recomano bluehost.com

A per cert! accés ssh i màquina linux… impagable! xD

16/11/2007

Hacks: Getting ranges from attackers

While researching why the servers where overloaded I saw that some webpages where attacked/scanned from hundreds of different ips. Most of the where from Caravan Networks from Russia…

I know almost for sure that no webs pages in our servers have russian clients target so I wanted to ban them all, from their IP range. The problem was this range wasn’t trivial to get, so I did this little hack to get them.

Saddly it isn’t 100% effective but nearly 80% :P

First thing to get is a list of the attackers ip. In this case we got them from grepping through an apache access log.

cat /usr/local/apache/domlogs/kedume9/somedomain.com | grep "POST /web/ht" | cut -f 1 -d " " | sort -u malos.txt

did the trick.

Now the nice bash thing:

#!/bin/bash
for malo in `cat malos.txt`;
do
whois $malo | grep inetnum | awk '{print $2,$3,$4}' - | xargs ipcalc | grep '/' >> ranges.tmp
done
sort -u ranges.tmp > ranges.txt

As you see we are grepping inetnum from the whois as almost all ips showed the same information. This is a point of failure as it’s really possible that an ip range would have been marked in another fashion, as NetRange:. You will have to manually look for error in ipcalc.

Anyway, from a list of 2531 unique ips I got 33 internet ranges. Would be nice to check the origin country at this point.

Hope this helps to anyone ;)

27/08/2007

Surtu a hispasec.com!

Bé doncs si hem mencionen a la una-al-dia del 23 d’Agost de hispasec.com titulada ¿Spam, estafa, phishing, o marketing agresivo?

Resulta que a l’empresa on curru, Concatel, està fent outsourcing d’una empresa de hosting. Doncs bé amb el temps que porto ja he vist bastantes coses, bots, pàgines de phishing, merda en general, … però aquesta vegada hem van avisar de un possible cas de phishing.

Tal i com s’explica al butlletí, no es pot considerar exactament phishing perquè el robo de credencials per estafar no es segur, el que si que ho és, és el fet que es pretengui cobrar 95€ per un suposat servei que evita que els dominis et caduquin, segons ells sempre te’ls renoven a temps, però això ja ho fa la mateixa empresa registradora on tinguis el domini. Total, al meu veure una estafa en tota regla.

Hem va semblar necessari  avisar sobre aquest fet, perquè el correu está extremadament ben segmentat i documentat amb el que el fa semblar legítim a ulls de persones poc experimentades, i n’hi ha més del que sembla en el propietaris de dominis.

Quedeu avisats si teniu un domini!

10/06/2007

ShowCase: MTR - MyTraceRoute Tool

Most of us while troubleshooting network failures use the well known traceroute which shows the path between to network points and latency in each ‘hop’ in this path. Its really helpful in order to see where packets are dropped.

Mytraceroute introduces a dynanic way of seeing the path information and allowing us a quick shot on the network problem. When using traceroute it was little hard to find which part of the network was loosing some packets packets, and not all of them; with mytraceroute you can see packet loosing as a percentage in the reporting interface.

$ mtr google.es to start it. Now MTR will start looping making a traceroute to the host choosen. What we will see is the path of the packets to destination and 2 main columns, Packets and Pings. In Packets columns you will see the % of Loss and where it happens, there you will find a faulty router ;). The Pings column gives us all the information related to time.

Time for fun. Try mtr to different servers that may be in different locations, in my ISP (Ono) I have spotted a couple of routers that are loosing packets, which impacts in the overall connection performance.

Have Fun!

20/04/2007

Having fun with CSSH

I’ve just dicovered CSSH. This little ugly tool can be found in ubuntu, and I presume it would be found on all others.

CSSH stans for Central SSH and its meant for cluster administration. In an environment where you have quite a few servers with almost exactly the same configuration you can type any command in the main window and its typed to every host at the same time.

I’ll have to try at work, cause there I have this type of environment. At home… with two connections to the same server  its not very exciting.

Try it and give your opinion!

16/04/2007

Xerrada exclusiva de Zeev Suraski a Concatel

Zeev Suraski, el creador de la versió moderna de PHP (>3),  ha vingut a Concatel per fer-nos una xerrada sobre PHP i com està avançant tot el tema.

Des del punt de vista d’un programador PHP amateur la xerrada ha sigut prou interessant. Després de vendre una mica la moto sobre el PHP i que cada vegada s’està posant més i més de moda entre les empreses ha arribat el que per mi ha estat el plat fort.  QEDWiki.

QEDWiki es un projecte dels gurus que es rasquen els ous a IBM, aquells que els paguen per jugar amb noves tecnologies (la bona vida) total aquesta gent ha creat un IDE rollu Visual (Basic, C,… ) .Net pero a través de web. Una wiki d’aplicacions web. La canya! Amb 10 minuts el tiu ha fet una aplicació amb una llista d’adreces i un widget de google maps on podies arrastrar les adreces i te les mostrava al mapa, no ha picat ni una linia de codi! Realment interessant per fer aquelles webs xorres que de vegades sempre s’han de fer.

A part d’això sembla que ara tot el tema de ruby, python i companyia es una moda passatgera. Pel que comenta estan integrant llibreries AJAX dins de php i sembla que no hi ha ganes de que n’acabi l’hegemonia.

Llarga vida al PHP!

1/04/2007

DLink G604T Penjat

Fa un temps veia com el D-Link que tinc a casa per l’ADSL es penjava. El problema era en que el router no era capaç d’aguantar masses connexions a la vegada i es penjava.

Aquest router porta un linux, basat en MontaVista, en podeu veure tota la info aquí.

En aquest router s’ajunten alguns problemets de la config del kernel. Per una banda una taula NAT relativament petita i un timeout per netejar-la extremadament gran, total que la taula s’omple i peta.

He trobat uns valors força coherents a adslzone així que els aplicaré. Havia provat de canviar tan sols la mida de la taula NAT però es va acabar penjant.

L’scriptillu serà el següent:

echo 2048 > /proc/sys/net/ipv4/netfilter/ip_conntrack_max
echo 50 > /proc/sys/net/ipv4/netfilter/ip_conntrack_generic_timeout
echo 5 > /proc/sys/net/ipv4/netfilter/ip_conntrack_tcp_timeout_close
echo 120 > /proc/sys/net/ipv4/netfilter/ip_conntrack_tcp_timeout_close_wait
echo 1200 > /proc/sys/net/ipv4/netfilter/ip_conntrack_tcp_timeout_established
echo 120 > /proc/sys/net/ipv4/netfilter/ip_conntrack_tcp_timeout_fin_wait
echo 60 > /proc/sys/net/ipv4/netfilter/ip_conntrack_tcp_timeout_time_wait
echo 10 > /proc/sys/net/ipv4/netfilter/ip_conntrack_udp_timeout

A veure com reacciona tot plegat.

18/01/2007

18 dies d’infart!

Bé aquests primers 18 dies de l’any han estat els més intensos de tota la carrera… el putu projecte. Les sigles haurien de ser PPM oi sigui Putu Projecte de Merda.

Com sempre no acabes mai satisfet de la teva feina i a més a ningú li importa… tot i això per si teniu curiositat… aquí us deixo la memòria del ppm ‘Estudi de les xarxes lliures sense fils’ (Mirror).

En fi, només queda la lectura, 4 slides en putapoint i ‘tirando’.

Ara ja podre dedicar-me a fer viciades a la Wii!! jojojo i a muntar el servidor de tele!!