Dec 9

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

Nov 16

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 ;)

Sep 16

ShowCase: equivs

Recentment he tingut que fer ús d’aquesta nova eina, anomenada equivs

Resulta que en el servidor he fet una instalació  de qmailrocksi tot el qmail es compilat amb els seus patches i demés. Tot perfecte, en uns dies postejaré sobre el tema, però el problema ha vingut a l’hora d’instalar algún paquet que depengués d’algún “mail-transport-agent”. Al no instal·lar el paquet del servidor MTA a través de la paqueteria del APT no té les dependències satisfetes per aquest paquet.

Davant aquest problema i remenant una mica per google me trobat amb equivs. El que fa aquest bon programet es crear paquets ficticis per satisfer dependencies ja resoltes a priori a través d’altres métodes, i curiosament si mireu el HowTo del link solventa aquest mateix problema de dependències que he tingut.

Bé, no m’allargo més, si algú en vol saber més, que es miri el tutorial que jo tot just l’acabo de descobrir!

Aug 27

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!

Aug 24

La última d’agost…

Aquesta era la resposta de la típica pregunta d’aquests dies, “i tu, quan vas de vacances?” Doncs bé, la última d’agost ja es aquí! Una setmaneta de descans i relax merescut :P

Aprofitaré per trencar el silenci d’aquest blog i tinc pensat una série d’artícles sobre seguretat i sobre bots i porqueria varia que es pot trobar en els servidors de hosting :P

També engegaré un altre projecte web que tinc entremans, ja en donaré notícies xD Tinc ganes de reactivar aquest blog que s’ho val! :P

Jun 10

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!

Jun 8

Escriu o mor

Doncs si avui he rebut amenaces d’un lector perquè actualizi el blog. Els lectors fidels necessiten els meus magnífics posts per poder llegir alguna cosa de qualitat.

En el món dels blog, o actualitzes o mors, hem sembla que es una màxima massa encertada i tot.

Prometo que en breu escriure algún ‘caltre’ review sobre algunes eines que he utilitzat últimament.

Apr 24

Diada de St. Jordi amb petunies

Bé la veritat és que no tinc clar si eren petunies pero es clar que CiU no regalava pas roses i no entenc ben bé per que.

No sé com va anar a altres indrets de la geografia catalana, però a Igualada hem va cridar l’atenció la manera en com CiU, sent tan de la terra, catalanista i demés era capaç de trencar amb una tradició tan nostra com la de regalar roses i cambiar-ho per una torreta petita amb 4 flors…

Si els critico per això, i sí, si haguessin regalat roses hagués fet la conyeta xD Hem fan bastanta gràcia… un altre dia a regalar llibres i fora punyetes.

Espero que llegiu els llibres de gust i oloreu la poca olor que fan les roses, res com tallar les que surten al balcó!

Apr 23

VMWare and Ubuntu Feisty Fawn incompatibilites

Last week I upgraded my work computer to the new Feisty. Of course such an upgrade installed a new kernel and it wasn’t supported by vmware…

Today I’ve got time and I found this page (VMWare and Ubuntu Feisty) a comenteer says to apply a patch to vmware, I did it and the modules compiled well.

Just to let you know ;)

Apr 20

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!