Monitorizar el tamaño de un directorio con monit

monit es un herramienta para monitorizar procesos, ficheros, directorios y sistemas de ficheros, que permite enviar alertas cuando suceden eventos tales como que un proceso no arranca, se incrementa la carga del sistema o el uso de memoria por encima de un umbral determinado, se modifican ficheros o directorios, etc. El problema es que, por ahora, no permite controlar que el tamaño de un directorio, es decir, de los ficheros contenidos en él, supere cierto valor. Sin embargo, podemos conseguir este resultado utilizando un script que se ejecute de forma periódica y que modifique la fecha de un fichero concreto mientras el tamaño del directorio sea correcto. Este fichero de control nos servirá para saber cuándo se ha superado el limite. ...

September 22, 2012 · 3 min · 438 palabras · Nacho Cano

Comprobar que no tenemos configurado Apache como un proxy abierto

Revistando logs de Apache, he visto que tenía algunas entradas del tipo: 93.174.93.52 - - [18/Sep/2012:02:23:11 +0200] "GET http://myproxylists.com/my-http-headers HTTP/1.1" 404 1046 "-" "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.28) Gecko/20120306 Firefox/3.6.28 (.NET CLR 3.5.30729)" 93.174.93.52 - - [20/Sep/2012:08:21:08 +0200] "GET http://myproxylists.com/my-http-headers HTTP/1.1" 404 1046 "-" "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.28) Gecko/20120306 Firefox/3.6.28 (.NET CLR 3.5.30729)" Este suele ser el resultado de peticiones maliciosas que buscan encontrar servidores proxy abiertos. Si encontramos entradas de este tipo, lo primero que deberíamos hacer es comprobar que tenemos configurado el servidor correctamente, para no permitir hacer de proxy a peticiones de anónimos. De hecho, si no necesitamos un servidor proxy, lo mejor es asegurarnos que la directiva ProxyRequests no está inicializada a on. ...

September 21, 2012 · 2 min · 234 palabras · Nacho Cano

My dog: the paradox

» Matthew Inman | theoatmeal.com

September 20, 2012 · 1 min · 5 palabras · Nacho Cano

An open letter to Senator Rockefeller

Dear Sen. Rockefeller, I am a cyber expert. I invented a key technology known as ”IPS” that is a standard part of network defense. I invented hacking techniques like ”sidejacking” that are a standard part of network offense. I am a coder who has written a million lines of production code. I am a ”pentester” who has performed simulated attacks that confirm your worst nightmares about power-grid blackouts and financial meltdowns. ...

September 20, 2012 · 1 min · 161 palabras · Nacho Cano

Cosmo, the Hacker ’God’ Who Fell to Earth

Cosmo is huge ” 6 foot 7 and 220 pounds the last time he was weighed, at a detention facility in Long Beach, California on June 26. And yet he’s getting bigger, because Cosmo ” also known as Cosmo the God, the social-engineering mastermind who weaseled his way past security systems at Amazon, Apple, AT&T, PayPal, AOL, Netflix, Network Solutions, and Microsoft ” is just 15 years old. He turns 16 next March, and he may very well do so inside a prison cell. ...

September 16, 2012 · 1 min · 158 palabras · Nacho Cano

How to Argue on the Internet Without Becoming a Troll

It’s September of an election year, and people are drawing lines, taking stands, and proclaiming their political beliefs. Even the lurkers, who brag that they ”never post political stuff on Facebook” find their trigger fingers twitching over the ”share” button. The internet is a battlefield, and you simply can’t get around online without being drawn into a shootout from time to time. When that happens, these tips will keep you knocking down opponents without losing your cool or becoming a troll. ...

September 15, 2012 · 1 min · 86 palabras · Nacho Cano

Southampton engineers a Raspberry Pi Supercomputer

Computational Engineers at the University of Southampton have built a supercomputer from 64 Raspberry Pi computers and Lego. The team, led by Professor Simon Cox, consisted of Richard Boardman, Andy Everett, Steven Johnston, Gereon Kaiping, Neil O’Brien, Mark Scott and Oz Parchment, along with Professor Cox’s son James Cox (aged 6) who provided specialist support on Lego and system testing. Professor Cox comments: ”As soon as we were able to source sufficient Raspberry Pi computers we wanted to see if it was possible to link them together into a supercomputer. We installed and built all of the necessary software on the Pi starting from a standard Debian Wheezy system image and we have published a guide so you can build your own supercomputer.” ...

September 13, 2012 · 1 min · 136 palabras · Nacho Cano

Well, Actually

As software developers, we develop habits that allow us to build products that work and do not fail under stress. Every software developer knows what an ”off-by-one” error is, and like the Karate Kid, we train extensively so we can avoid those traps. We learn how to avoid these and other similar software problems and we sharpen our skills to find logic errors. As we mature as developers, finding logic errors and incomplete solutions becomes our way of life. It defines us. ...

September 10, 2012 · 1 min · 161 palabras · Nacho Cano

HTML Responsive Images Extension

This proposal adds new elements and attribute to [HTML5] to enable different sources of images based on browser and display characteristics. The proposal addresses multiple use cases such as images used in responsive web designs and different images needed for high density displays. This proposal allows content authors to provide user agents with the information they need to select the best image source. The current img element only allows for a single source of an image, but there are numerous use cases where document authors need to define different image sources depending on the factors such as the design, size resolution, and display density. ...

September 7, 2012 · 1 min · 155 palabras · Nacho Cano

WhatsApp is using IMEI numbers as passwords

As you probably already heard in recent news, 1,000,001 Apple UDID’s were leaked. It’s unfortunate that so many apps use UDID’s to identify users since it’s extremely insecure. This brings me to WhatsApp, a free messaging service, used by millions of people. Their system runs on a modified version of XMPP (Extensible Messaging and Presence Protocol). There is nothing wrong with using XMPP, but there is a problem in how WhatsApp handle authentication. ...

September 7, 2012 · 1 min · 114 palabras · Nacho Cano