<?xml version="1.0" encoding="UTF-8" standalone="no"?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0"><channel><title>IT Freek Zone</title><description>constante deseo por saber cómo funcionan las cosas</description><managingEditor>noreply@blogger.com (V3kt0r)</managingEditor><pubDate>Sun, 22 Feb 2026 17:51:00 -0300</pubDate><generator>Blogger http://www.blogger.com</generator><openSearch:totalResults xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">220</openSearch:totalResults><openSearch:startIndex xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">1</openSearch:startIndex><openSearch:itemsPerPage xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">25</openSearch:itemsPerPage><link>http://itfreekzone.blogspot.com/</link><language>en-us</language><itunes:explicit>no</itunes:explicit><itunes:subtitle>constante deseo por saber cómo funcionan las cosas</itunes:subtitle><itunes:category text="Technology"/><itunes:owner><itunes:email>noreply@blogger.com</itunes:email></itunes:owner><item><title>Puppet Types y Providers</title><link>http://itfreekzone.blogspot.com/2018/09/puppet-types-y-providers.html</link><category>articulos</category><category>DevOps</category><category>Puppet</category><category>sysadmin</category><author>noreply@blogger.com (V3kt0r)</author><pubDate>Sun, 23 Sep 2018 13:29:00 -0300</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-271207292388274566.post-8117309295634924366</guid><description>Todos los que utilizamos puppet en algún momento nos encontraremos con la necesidad de crear un módulo que no se puede implementar sólo utilizando los recursos existentes. Es en ese momento donde surge la necesidad de crear nuestro propio tipo.
&lt;br /&gt;
&lt;br /&gt;
Puppet provee la posibilidad de crear nuestros propios tipos, desarrollados en ruby. Contar con la posibilidad de programar expande muchísimo nuestro horizonte de cosas que se pueden hacer con puppet.
&lt;br /&gt;
&lt;br /&gt;
Desde mi punto de vista, ruby es horrible para programar, pero es la única opción que existe actualmente en puppet, así que no nos quedará otra que aprender aunque sea las bases de este lenguaje.
&lt;br /&gt;
&lt;br /&gt;
Puppet separa la definición de un recurso en dos partes: types y providers&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;El archivo type define todas las propiedades y parámetros que se pueden usar en nuestro recurso. Es decir, define la estructura del recurso y como interactuaremos desde un manifest con él.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Por otra parte, el provider se encarga de implementar el type que definimos.
&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
Algo interesante es que podemos tener múltiples providers para el mismo type. El ejemplo más claro de esto es la implementación del type package. Existen varios providers para este tipo: apt, yum, pacman, etc. La forma en que interactuamos con el type es independiente de cómo luego se implemente.
&lt;br /&gt;
&lt;br /&gt;
Como todo en puppet, es importante la estructura y los nombres de nuestros directorios y archivos. Para definir nuestro type y provider, hay que seguir el siguiente árbol:
&lt;br /&gt;
&lt;pre&gt;module
  |-- metadata.json
  |-- README.md
  |-- manifests
  |-- lib
       |-- puppet
             |-- provider
             |     |-- configjs
             |           |-- configjs.rb
             |-- type
                   |-- configjs.rb
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
La idea es que la explicación sea bastante dinámica, así que plantearé un ejemplo que seguiremos a lo largo del artículo.
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-size: large;"&gt;&lt;b&gt;Crear nuestro type&lt;/b&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;br /&gt;
Como mencioné, los types deben ubicarse en el path &amp;lt;module name&amp;gt;/lib/puppet/type/&amp;lt;nombre del tipo&amp;gt;.rb para satisfacer la nomenclatura de puppet.
&lt;br /&gt;
&lt;br /&gt;
Por ejemplo, voy a definir un tipo para administrar configuraciones en formato JSON. Llamaré al tipo configjs:
&lt;br /&gt;
&lt;pre&gt;  #configjs/lib/puppet/type/configjs.rb
  Puppet::Type.newtype(:configjs) do
    @doc = "Manage json configs"

    ensurable

    newparam(:path, :namevar =&amp;gt; true) do
      desc "Path to the JSON File"

      newvalues(/\A\/\w+/)
    end

    newparam(:showdiff) do
      desc "Show a diff when changing values"

      defaultto :true
      newvalues(:true, :false)
    end

    newproperty(:config) do
      desc "The configuration to set"

      isrequired

      def insync?(is)
        is.sort == should.sort
      end
    end
  end
  &lt;/pre&gt;
La forma de invocar un tipo es la misma que cuando lo definimos con define en un .pp. Este tipo se utilizaría de la siguiente manera en un manifest:
  &lt;br /&gt;
&lt;pre&gt;  $myconfig = {
    'name' =&amp;gt; 'itfreek',
    'url' =&amp;gt; 'http://itfreekzone.blogspot.com'
  }
  configjs {'/etc/myconfig.js':
    config =&amp;gt; $myconfig
  }
  &lt;/pre&gt;
Veamos un poco qué significa cada parte del tipo configjs.
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Propiedades y parámetros&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Para empezar declaramos un parámetro (path) y una propiedad (config). Si bien lucen similares, la diferencia entre ambos es muy importante:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;El parámetro se utitliza para designar un valor desde puppet. En el ejemplo, path define la ubicación del archivo en el servidor.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Una propiedad es algo que se puede inspeccionar y cambiar. La misma cuenta con dos valores. Por un lado, tenemos el valor que se indica desde puppet, denominado "should", y por otro el valor que tiene actualmente en el sistema, denominado "is". En el ejemplo, una config en el sistema será el JSON contenido en el file, que pudo haber sido modificado manualmente (esto es el "is"). Si puppet setea un JSON, este es el valor que esa propiedad debe tener, y por eso se denomina "should". La diferencia entre ambos valores es lo que puppet muestra al momento de ejecutar una corrida.
&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Namevar&lt;/b&gt;
&lt;br /&gt;
&lt;br /&gt;
Otro punto destacable es el uso de ":namevar =&amp;gt; true" en el parámetro path. Como saben puppet usa el concepto namevar para distinguir un recurso en el sistema, y es el valor que asignamos al crear el recurso. En nuestro caso, el path es el nombre que nos permite distinguir un file de otro, lo mismo que sucede con el recurso file. En dicho ejemplo, el valor que tendrá el path es /etc/myconfig.js y será el nombre de nuestro recurso.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Otras opciones
&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Finalmente también encontramos "isrequired" y "defaultsto". Con el primero indicamos que la propiedad es requerida, es decir, si no se setea puppet dará error. El segundo indica cuál es el valor default que tomará el parámetro si no se especifica ninguno.
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Validación y munging
&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Veamos el uso de newvalues. Con este método podemos restringir qué valores son aceptables para el parámetro. Podríamos incluir una lista de valores (newvalues(:true, :false)), o, como hice yo, una expresión regular a matchear. Más adelante veremos cómo invocar funciones a partir de valores con ensurable. Si el valor otorgado no cumple con esta restricción, puppet dará error.
&lt;br /&gt;
&lt;br /&gt;
Las otras opciones que tenemos son validar el input (validate) y transformar (o sanitizar) el valor (munge).
&lt;br /&gt;
&lt;br /&gt;
Por ejemplo, si queremos validar que el path sea un path absoluto, podemos agregar lo siguiente:
  &lt;br /&gt;
&lt;pre&gt;  newparam(:path, :namevar =&amp;gt; true) do
    ...
    validate do |value|
      unless Puppet::Util.absolute_path? value
        raise ArgumentError, "archive path must be absolute: #{value}"
      end
    end
  end
  &lt;/pre&gt;
Por otra parte, si quisieramos setear los permisos del file, podríamos agregar un parámetro mode. Mode debería ser un string en la definición del recurso, pero nosotros necesitamos que sea un integer en notación octal para poder setearlo en el filesystem (ej: 0644). Podríamos hacer esto con munge:
  &lt;br /&gt;
&lt;pre&gt;  newparam(:mode) do
    munge do |value|
      value.to_i(8)
    end
  end
  &lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="font-size: large;"&gt;Providers
&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Ahora que contamos con la definición del tipo, pasemos al provider. El mismo debe ubicarse en &lt;module name=""&gt;/lib/puppet/provider/&lt;nombre del="" type=""&gt;/&lt;nombre del="" provider=""&gt;.rb. Un tipo puede tener varios providers (como package, o vcsrepo).
&lt;br /&gt;&lt;br /&gt;
En nuestro ejemplo, el provider se llamará igual al tipo (aunque podría llamarse diferente) y lo definimos así:
  &lt;/nombre&gt;&lt;/nombre&gt;&lt;/module&gt;&lt;br /&gt;
&lt;pre&gt;  #configjs/lib/puppet/provider/configjs/configjs.rb
  Puppet::Type.type(:configjs).provide(:configjs) do
    def config
      if File.exists?(resource[:path])
        content = File.read(resource[:path])
        PSON.load(content)
      else
        {}
      end
    end

    def config=(value)
      create
    end

    def exists?
      File.exists?(resource[:path])
    end

    def create
      config_file = File.new(resource[:path], 'w+')
      config_file.write(JSON.pretty_generate(resource[:config]))
      config_file.close
    end

    def destroy
      FileUtils.rm(resource[:path])
    end
  end
  &lt;/pre&gt;
Acá aparece el hash 'resource'. Este hash contiene los valores para cada uno de los parámetros y las propiedades que se setearon. Dentro del type también se puede acceder a este hash, pero como self (ejemplo: self[:path]).
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: large;"&gt;&lt;b&gt;Definiendo la funcionalidad&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: small;"&gt;&lt;b&gt;Ensurable
&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Si prestaron atención, el tipo configjs invoca el método ensurable. Un recurso se considera 'ensurable' cuando su presencia se puede verificar. Esto es, si no existe y debería existir (ensure =&amp;gt; present), hay que crearlo, mientras que si existe y no debería existir (ensure =&amp;gt; absent), eliminarlo. Al realizar esta invocación, deberemos definir tres funciones:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&amp;nbsp;exists? debe retornar true si nuestro recurso existe en el sistema y falso sino.&lt;/li&gt;
&lt;li&gt;create: crear el recurso si no existe y debería existir.&lt;/li&gt;
&lt;li&gt;destroy: destruir el recurso si existe y no debería.
&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
En el ejemplo anterior, exists? nos dice si el file existe o no. Si no existe, creamos el archivo con el contenido indicado en la propiedad config. Si queremos destruirlo, simplemente hacemos un rm del file.
&lt;br /&gt;
&lt;br /&gt;
Es posible redefinir los métodos invocados al utilizar "ensure =&amp;gt; present/absent", e incluso agregar más valores. La forma de hacerlo es la siguiente:
  &lt;br /&gt;
&lt;pre&gt;  #configjs/lib/puppet/type/configjs.rb
  Puppet::Type.newtype(:configjs) do
    ...

    ensurable do
      newvalue(:present) do
        provider.generate
      end

      newvalue(:absent) do
        provider.remove
      end

      newvalue(:empty) do
        provider.empty
      end
    end
  end
  &lt;/pre&gt;
&lt;br /&gt;
Esto es, indicamos que si ensure es present invoque la función generate en lugar de create, mientras que si es absent invoque remove en lugar de destroy. Además, agregamos el valor emtpy que nos permite invocar la función emtpy en el provider.
&lt;br /&gt;
&lt;br /&gt;
Como habrán notado, es posible invocar funciones del provider desde la definición del type.
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: small;"&gt;&lt;/span&gt;
&lt;span style="font-size: small;"&gt;&lt;b&gt;Refresheable
&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Ahora, qué pasa si realizamos un cambio en el file desde fuera del resource, como por ejemplo, un exec en un manifest? La simple lógica anterior nos indica que si el file existe en el filesystem, entonces no hay que realizar ninguna acción, no verifica si el contenido del file es el correcto.
&lt;br /&gt;
&lt;br /&gt;
Este comportamiento lo cambiaremos con los setters y getters (explicado a continuación), pero hay otra forma si no queremos utilizar propiedades, podemos hacerlo indicando que el recurso es refresheable.
&lt;br /&gt;
&lt;br /&gt;
Que nuestro tipo sea refresheable significa que se ejecutará algo con un cambio en la propiedad, o si tenemos una relación notify/subscribe. En el ejemplo podríamos realizar estos cambios:
  &lt;br /&gt;
&lt;pre&gt;  #configjs/lib/puppet/type/configjs.rb
  Puppet::Type.newtype(:configjs, :self_refresh =&amp;gt; true)) do
    ...
    ...
    def refresh
      provider.create
    end
  end
  &lt;/pre&gt;
Lo que hicimos es, primero indicar que nuestro tipo es refresheable con ":self_refresh =&amp;gt; true". Luego definimos la función refresh, donde indicamos qué se debe ejecutar en un refresh. En nuestro caso lo que hacemos es invocar el método create del provider.
&lt;br /&gt;
&lt;br /&gt;
Con esta nueva funcionalidad, además de crearse el file si no existe en el filesystem, también se pisará el contenido si por alguna razón cambia una propiedad o algún otro recurso le notifica que debe hacer un refresh (notify).
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Setters y Getters
&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Siempre que definamos una propiedad, puppet utilizará distintas funciones para determinar si el valor de la propiedad difiere de la que está actualmente en el host. Si este es el caso, seteará el valor que corresponda. Esto es, /etc/myconfig.js tiene el contenido que se indicó por puppet?
&lt;br /&gt;
&lt;br /&gt;
Para saber cuál es el valor actual de la propiedad y setear el que corresponde, puppet invoca métodos cuyos nombres son igual a la propiedad. Estos métodos se definen en el provider.
&lt;br /&gt;
&lt;br /&gt;
Para el ejemplo anterior, la propiedad se llama config, entonces las funciones get y set se definen de la siguiente manera:
  &lt;br /&gt;
&lt;pre&gt;  #Getter: decime qué valor tiene la config ahora en el server
  def config
  end

  #Setter: setea este value como contenido de la config
  def config=(value)
  end
  &lt;/pre&gt;
Puppet determina si el valor actual es el que debería tener invocando el método "insync?", es decir, esta propiedad está sincronizada? Por defecto esta función realiza una comparación entre el valor actual y el que debería mediante el operador "==". Para comparar strgins va genial, pero si, por ejemplo, estamos comparando hashes, la comparación podría no resultar como esperamos. Para estos casos, podemos redefinir el método insync? en la definición de la propiedad (en el type).
&lt;br /&gt;
&lt;br /&gt;
Siguiendo nuestro ejemplo, vemos esta definición:
  &lt;br /&gt;
&lt;pre&gt;  #configjs/lib/puppet/type/configjs.rb
  Puppet::Type.newtype(:configjs) do
    ...
    newproperty(:config) do
      ...

      def insync?
        is.sort == should.sort
      end
    end
    ...
  end
  &lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Prefetch y flush
&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
En ciertos casos no queremos definir setters y getters para todas las propiedades de nuestro tipo. Si estamos en esa situación, nuestro approach debería ser utilizar un esquema prefetch/flush.
&lt;br /&gt;
&lt;br /&gt;
Un provider prefetch/flush implementa sólo dos métodos:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;prefetch: dada una lista de recursos, retornará y seteará las instancias con los valores obtenidos.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;flush: se invoca luego de que todos los valores se setearon.
&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
Dado que puppet intentará invocar los setter/getters para cada una de las propiedades, podemos evitar la definición de todos estos métodos invocando mkresource_method, que define setter/getters default para todas las propiedades.
&lt;br /&gt;
&lt;br /&gt;
Luego definimos el método prefetch para realizar todas las tareas que haríamos con los getters, y flush para todos los setters.
&lt;br /&gt;
&lt;br /&gt;
No utilicé este esquema aún, pero el formato básico es:
  &lt;br /&gt;
&lt;pre&gt;  #configjs/lib/puppet/provider/configjs/configjs.rb
  Puppet::Type.type(:configjs).provide(:configjs) do
    mkresource_method

    def prefetch
      ...
    end

    def flush
      ...
    end
  end
  &lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Initialize&lt;/b&gt;
&lt;br /&gt;
&lt;br /&gt;
Otra opción útil para la definición de types y providers es el uso del método initialize. Este método se ejecuta cuando ruby crea un objeto, por lo que podremos realizar algunas inicializaciones ahí si lo necesitamos.
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Ejecutar Comandos
&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
En el ejemplo sólo utilizamos files y no necesitamos ejecutar ningún comando. Pero qué pasa si queremos tener un recurso que utilice comandos? Tomando nuestro ejemplo de referencia, tal vez utilicemos el config json generado como input de un comando.
&lt;br /&gt;
&lt;br /&gt;
Sólo para ejemplificar el uso de comandos, redefiniré el método create del provider agregando la creación de un container lxd a partir del json. No probé este comando, por lo que puede tener algún error, pero sirve para ejemplificar.
  &lt;br /&gt;
&lt;pre&gt;  #configjs/lib/puppet/provider/configjs/configjs.rb
  Puppet::Type.type(:configjs).provide(:configjs) do
    commands :curl =&amp;gt; 'curl'

    def create
      config_file = File.new(resource[:path], 'w+')
      config_file.write(JSON.pretty_generate(resource[:config]))
      config_file.close

      curl("-k", "-L", "--cert", ""~/.config/lxc/client.crt", "--key", ~/.config/lxc/client.key", "-H", "Content-Type: application/json", "-X", "POST", "-d", "@#{resource[:path]}", "https://127.0.0.1:8443/1.0/containers)
    end

    ...
  end
  &lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Cambiar el output&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Cuando puppet cambia un recurso, se registra un evento. Vemos la notificación de que algo cambió de la siguiente forma:&lt;br /&gt;
&lt;pre&gt;Notice: /Stage[main]/&amp;lt;resource&amp;gt;/Config_js[/etc/myconfig.js]/Configjs[/etc/myconfig.js]/config: config changed &amp;lt;IS VALUE&amp;gt; to &amp;lt;SHOULD VALUE&amp;gt;&lt;/pre&gt;
&lt;br /&gt;
La forma en que puppet crea el mensaje es convirtiendo el valor actual y el que debería tener en strings (usando el método to_s de ruby). Dependiendo el valor de la propiedad, la conversión a string puede no ser la deseada y el cambio no resulta claro.
&lt;br /&gt;
&lt;br /&gt;
Por suerte podemos customizar tanto la forma en que dichos valores se convierten a string, como el mensaje de lo que va a cambiar. Para ello debemos definir los métodos is_to_s, should_to_s y change_to_s dentro de la propiedad o parámetro:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;resource&gt;&lt;is value=""&gt;&lt;should value=""&gt;is_to_s: se ejecuta para convertir a string el valor que actualmente tiene el server.&amp;nbsp;&lt;/should&gt;&lt;/is&gt;&lt;/resource&gt;&lt;/li&gt;
&lt;li&gt;&lt;resource&gt;&lt;is value=""&gt;&lt;should value=""&gt;should_to_s: debe convertir el valor a aplicar a string.&amp;nbsp;&lt;/should&gt;&lt;/is&gt;&lt;/resource&gt;&lt;/li&gt;
&lt;li&gt;&lt;resource&gt;&lt;is value=""&gt;&lt;should value=""&gt;change_to_s: se invoca para mostrar lo que va a cambiar. Si no redefinimos esta función puppet mostrará el valor actual devuelto por is_to_s y el aplicable retornado por should_to_s.
&lt;/should&gt;&lt;/is&gt;&lt;/resource&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;resource&gt;&lt;is value=""&gt;&lt;should value=""&gt;
En general nos alcanzará con redefinir is_to_s y should_to_s, o sólamente change_to_s, es muy raro que utilicemos las tres, ya que si definimos change_to_s no tiene mucho sentido definir también las otras dos.
&lt;br /&gt;&lt;br /&gt;
Siguiendo el ejemplo anterior, la propiedad config es un hash. La función to_s no nos retorna un string muy lindo de los hashes, así que en su lugar, podríamos usar inspect en is_to_s y should_to_s:
  &lt;/should&gt;&lt;/is&gt;&lt;/resource&gt;&lt;br /&gt;
&lt;pre&gt;  #configjs/lib/puppet/type/configjs.rb
  Puppet::Type.newtype(:configjs) do
    ...

    newproperty(:config) do
      ...

      def is_to_s(value)
        value.inspect
      end

      def should_to_s(value)
        value.inspect
      end
    end
  end
  &lt;/pre&gt;
En lugar de lo anterior, podríamos simplemente redefinir change_to_s:
  &lt;br /&gt;
&lt;pre&gt;  #configjs/lib/puppet/type/configjs.rb
  Puppet::Type.newtype(:configjs) do
    ...

    newproperty(:config) do
      ...

      def change_to_s(is, should)
        "old value #{(is).inspect},
        new #{(should).inspect}"
    end
  end
  &lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;Update 1&lt;/b&gt;: descubrí que cuando ejecutamos puppet con --noop, no se ejecuta change_to_s, sino una función noop que no podemos redefinir y tiene un output predefinido de "current value %s, should be %s (noop), param.is_to_s(current_value), param.should_to_s(param.should)". Ver &lt;a href="https://tickets.puppetlabs.com/browse/PUP-8135"&gt;reporte&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Como no podemos cambiar esta funcionalidad, encontré un workaround en el tipo file. Lo que hace file es imprimir las diferencias entre los files en la función issync? y hacer que is_to_s y should_to_s devuelvan checksums en lugar de printear ambos files.&lt;br /&gt;
&lt;br /&gt;
La forma de implementar esto sería:&lt;br /&gt;
&lt;pre&gt;  Puppet::Type.newtype(:configjs) do
    ...
    def is_to_s(is)
      '{md5}' + Digest::MD5.hexdigest(is.to_s)
    end

    def should_to_s(should)
      '{md5}' + Digest::MD5.hexdigest(should.to_s)
    end

    def insync?(is)
      return @is_insync unless @is_insync.nil?

      @is_insync = super(is)
      if ! @is_insync &amp;amp;&amp;amp; Puppet[:show_diff]
        send @resource[:loglevel], "old value #{(is).inspect},
        new #{(should).inspect}"
      end
      @is_insync
    end
  end
&lt;/pre&gt;
&lt;br /&gt;
Con esto logramos hacer nuestro propio print de los cambios tanto con --noop como si se van a aplicar de verdad.&lt;br /&gt;
&lt;br /&gt;
Tuve que reescribir las funciones is_to_s y should_to_s para que no retornen el contenido, sino un md5. Ese cambio es necesario porque el método noop de puppet llama estas funciones siempre. Si no modifico su output, obtendremos un print de los cambios dos veces.&lt;br /&gt;
&lt;br /&gt;
También tuve que agregar una variable a la clase para detectar si ya ejecuté insync anteriormente. La clase property llama el método insync? dos veces, así que si no determinamos que ya se ejecutó terminaremos imprimiendo el mismo diff dos veces.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Update 2: Utilizar gems externos en nuestro provider&lt;/b&gt;
&lt;br /&gt;
&lt;br /&gt;
Algo interesante que me surgió durante la creación de un módulo fue la necesidad de utilizar un gem externo. En mi caso, el gem era inifile.&lt;br /&gt;
&lt;br /&gt;
Ej:
&lt;br /&gt;
&lt;pre&gt;  Puppet::Type.type(:mytype).provide(:mytype) do
    ...
    require 'inifile'
    ini_file = IniFile.load('/etc/config.ini')
    ...
  end
&lt;/pre&gt;
Como muchas cosas en puppet, un poco de magia negra es necesaria, dado que puppet no provee una forma de definir dependencias de librerías ruby en la definición del módulo, así que debemos utilizar un workaround.&lt;br /&gt;
&lt;br /&gt;
Luego de leer en comentarios en reportes de bugs y foros, llegué a &lt;a href="http://alcy.github.io/2012/11/21/handling-gem-dependencies-in-custom-puppet-providers/"&gt;esta solución&lt;/a&gt;.
&lt;br /&gt;
Básicamente, lo que podemos hacer es:
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Instalar la dependencia gem con puppet.&lt;/li&gt;
&lt;li&gt;Hacer que nuestro recurso dependa de la instalación de este paquete.&lt;/li&gt;
&lt;li&gt;Agregar una feature y un confine para que el provider no se ejecute si la librería no está instalada.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
Vamos por partes, primero instalemos el gem necesario:
&lt;br /&gt;
&lt;pre&gt;  package {'inifile':
    ensure   =&amp;gt; 'installed',
    provider =&amp;gt; 'puppet_gem',
  }
&lt;/pre&gt;
&lt;br /&gt;
Agregamos la dependencia a la definición de nuestro tipo:
&lt;br /&gt;
&lt;pre&gt;  mytype { 'nombre':
    ...
    require =&amp;gt; Package['inifile'],
  }
&lt;/pre&gt;
&lt;br /&gt;
Ahora, creemos una feature (lib/puppet/feature/inifilelib.rb) con el siguiente contenido:
&lt;br /&gt;
&lt;pre&gt;  Puppet.features.add(:inifilelib, :libs =&amp;gt; ["inifile"])
&lt;/pre&gt;
&lt;br /&gt;
Por último agreguemos el confine en nuestro provider:&amp;nbsp; &lt;br /&gt;
&lt;pre&gt;  require 'inifile' if Puppet.features.inifilelib?
  Puppet::Type.type(:mytype).provide(:mytype) do
    confine :feature =&amp;gt; :inifilelib
    ...
    require 'inifile'
    ini_file = IniFile.load('/etc/config.ini')
    ...
  end
&lt;/pre&gt;
&lt;br /&gt;
Esto hará que el provider no se evalúe hasta que el gem inifile no esté instalado. Pueden encontrar una explicación un poco más detallada en el link.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: large;"&gt;&lt;b&gt;Final, pero hay más para aprender
&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Si bien este artículo debería cubrir un buen porcentaje de lo que podemos necesitar al crear un type, surgiran cosas que no están acá. Una de ellas es la herencia de providers para crear nuevos providers, el uso de autorequire, features, etc. Recomiendo dar un vistaso a las referencias para más info.
&lt;br /&gt;
&lt;br /&gt;
Me decidí a escribir sobre types porque no encontré información muy buena. Si bien hay artículos interesantes que te introducen a la creación de tipos, a medida que avanzas y necesitas entender cómo funcionan ciertas cosas me costó bastante. La info está muy desparramada y se asumen muchas cosas que cuesta entender de dónde salen. Reconozco que no leí completamente el libro &lt;a href="https://www.safaribooksonline.com/library/view/puppet-types-and/9781449339319/"&gt;Puppet Types and Providers by Nan Liu, Dan Bode&lt;/a&gt; que supuestamente es la referencia más completa al respecto.
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="font-size: large;"&gt;Referencias&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://www.oreilly.com/library/view/puppet-types-and/9781449339319/"&gt;Puppet Types and Providers&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://puppet.com/docs/puppet/5.5/custom_types.html"&gt;Puppet Custom Types&lt;/a&gt;&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://puppet.com/docs/puppet/5.5/provider_development.html"&gt;Puppet Provider Development&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://puppet.com/docs/puppet/5.5/complete_resource_example.html"&gt;Puppet Complete Resource Example&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://garylarizza.com/blog/2013/11/25/fun-with-providers/"&gt;Fun With Puppet Providers - Part 1 of Whatever&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://garylarizza.com/blog/2013/11/26/fun-with-providers-part-2/"&gt;Who Abstracted My Ruby?&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://garylarizza.com/blog/2013/12/15/seriously-what-is-this-provider-doing/"&gt;Seriously, What Is This Provider Doing?&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.masterzen.fr/2011/11/02/puppet-extension-point-part-2/"&gt;Puppet Extension Points - Part 2&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://www.safaribooksonline.com/library/view/puppet-types-and/9781449339319/ch04.html"&gt;Chapter 4. Advanced Types and Providers&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://www.slideshare.net/TimCinel/writing-custom-puppet-types-and-providers-to-manage-webbased-applications"&gt;Writing Custom Puppet Types and Providers to Manage Web-Based Applications (slides)&lt;/a&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Configurar slaves OpenLDAP para aplicar lock de usuarios por logins fallidos (ppolicy)</title><link>http://itfreekzone.blogspot.com/2017/01/configurar-slaves-openldap-para-aplicar.html</link><category>administracion</category><category>autenticacion</category><category>GNU/Linux</category><category>LDAP</category><category>OpenLDAP</category><category>seguridad</category><category>sysadmin</category><author>noreply@blogger.com (V3kt0r)</author><pubDate>Thu, 5 Jan 2017 19:31:00 -0300</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-271207292388274566.post-810666863049443178</guid><description>Quienes utilicen LDAP para autenticación de servidores/workstations, seguramente se han topado o se toparan con el overlay ppolicy, el cual permite configurar policies de password como largo mínimo, complegidad, history, lock por cantidad de intentos, etc. Cómo habilitar y configurar ppolicy está bastante bien explicado en diversos sites como &lt;a href="http://www.zytrax.com/books/ldap/ch6/ppolicy.html"&gt;este&lt;/a&gt;, por lo que no lo incluiré acá. El problema es que ninguno explica bien qué hacer si tenes servidores slave que se utilizan para autenticación.&lt;br /&gt;
&lt;br /&gt;
Cuando tenés una configuración master -&amp;gt; slaves, los slaves son read-only, por lo que no guardarán ningún atributo por si mismos, sino que replican lo que tiene el master. Esto es, si por ejemplo están utilizando un slave como ldap server, varios intentos fallidos de login nunca bloquearán la cuenta, porque el tipo no guardará el atributo pwdAccountLockedTime en ningún lado. Esto es lo mismo que sucede cuando intentan hacer un change password y están usando un slave, el pass no se puede cambiar.&lt;br /&gt;
&lt;br /&gt;
Para solucionar este problema, OpenLDAP provee la alternativa de que los slave redirijan los updates al master. Esto es, si alguien quiere actualizar un valor en el slave, el slave redirigirá el update al ldap master, y lo obtendrá por replicación. La solución comprende utilizar updateref, enconjunto con el overlay chain y la opción ppolicy_forward_updates, donde:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;updateref "&amp;lt;master ldap server&amp;gt;" indica a qué servidor LDAP enviar los updates (se utiliza sólo en slaves). Esta opción por sí sola retorna al cliente la URL del master ldap, y es el cliente quien se debe encargar de tomar esa URL y hacer el update allí.&lt;/li&gt;
&lt;li&gt;El overlay chain facilita lo anterior, haciendo que el update lo haga el mismo slave, en lugar de retornar la URL del master al cliente. Con chain podemos configurar que si alguna acción dispara un update, el slave se conecte al master y lo aplique. Para ello, hay que configurar un usuario de binding que en el master tenga permisos de escritura para los atributos que deberá actualizar. Este overlay también se usa para resolver DNs que no están replicados en el slave, ya que sin él, OpenLDAP retornará un redirect que el cliente final deberá seguir.&lt;/li&gt;
&lt;li&gt;ppolicy_forward_updates es la opción del overlay ppolicy que le indica que debe forwardear los password failures, ya que sino asume que es un master y no dispara el hook de redirect.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
Veamos todo junto en un ejemplo, donde el ldap master se llama masterserver.dvpem.org. Esta config es para el slave y va en slapd.conf. Incluí sólo las líneas relevantes de la configuración, no es una configuración slapd.conf completa. &lt;br /&gt;
&lt;br /&gt;
IMPORTANTE:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;La configuración del overlay chain debe ir lo más arriba posible, antes de la configuración de cualquier base de datos y de la configuración de replicación.&lt;/li&gt;
&lt;li&gt;updateref debe ir luego de la configuración de replicación (syncrelp).&lt;/li&gt;
&lt;li&gt;El usuario que utilicen para el overlay chain debe tener permiso manage sobre los atributos de password. Por ejemplo, este es el permiso necesario para un user SlaveUpdater:&lt;br /&gt;
&lt;blockquote&gt;
{0}to dn.subtree="ou=people,dc=dvpem,dc=org" attrs=pwdChangedTime,pwdAccountLockedTime,pwdFailureTime,pwdHistory,pwdGraceUseTime,pwdReset by dn.base="cn=SlaveUpdater,dc=dvpem,dc=org" manage by * +0 break&lt;/blockquote&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;...
#importamos el módulo que contiene el overlay chain
moduleload back_ldap.la

#cargamos el overlay
overlay chain
#definimos cuál es la URL del master y con qué usuario bindear. Recuerden que el user debe tener permiso manage.
chain-uri "ldap://masterserver.dvpem.org"
chain-idassert-bind&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; bindmethod="simple"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; binddn="cn=SlaveUpdater,dc=dvpem,dc=org"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; credentials="elpassdeSlaveUpdater"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mode="self"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #starttls=yes        #necesario si usamos ldaps como protocolo
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #tls_reqcert=allow   #necesario si usamos ldaps como protocolo
chain-return-error TRUE

...
...

#cargamos el overlay ppolicy
moduleload ppolicy.la
overlay ppolicy

#indicamos dónde está la pólicy default de password (largo, cantidad de intentos, etc). Misma config que en el master.
ppolicy_default "cn=default,ou=Policies,dc=dvpem,dc=org"

#indicamos que se deben forwardear los updates al master
ppolicy_forward_updates

...
...

#configuración estándar syncrelp
syncrelp rid=001
&amp;nbsp;&amp;nbsp;&amp;nbsp; provider=ldap://masterserver.dvpem.org
&amp;nbsp;&amp;nbsp;&amp;nbsp; type=refreshAndPersist
&amp;nbsp;&amp;nbsp;&amp;nbsp; interval=00:00:02:00
&amp;nbsp;&amp;nbsp;&amp;nbsp; retry="30 10 120 +"
&amp;nbsp;&amp;nbsp;&amp;nbsp; searchbase="dc=dvpem,dc=org"
&amp;nbsp;&amp;nbsp;&amp;nbsp; attrs="*,+"
&amp;nbsp;&amp;nbsp;&amp;nbsp; bindmethod=simple
&amp;nbsp;&amp;nbsp;&amp;nbsp; binddn="cn=replicator,dc=dvpem,dc=org"
&amp;nbsp;&amp;nbsp;&amp;nbsp; credentials=elpassdelreplicator
&amp;nbsp;&amp;nbsp;&amp;nbsp; tls_reqcert=allow

#especificamos a dónde redirigir los updates
updateref "ldap://masterserver.dvpem.org"

&lt;/pre&gt;
Si tienen configurado el slave para utilizar la base cn=config, deberán ejecutar el diguiente ldif (aquí lo llamo enable-ppolicy-forward.ldif):&lt;br /&gt;
&lt;pre&gt;dn: cn=module{0},cn=config
changetype: modify
add: olcModuleLoad
olcModuleLoad: back_ldap

dn: olcOverlay={0}chain,olcDatabase={-1}frontend,cn=config
changetype: add
objectClass: olcOverlayConfig
objectClass: olcChainConfig
olcOverlay: {0}chain
olcChainCacheURI: FALSE
olcChainMaxReferralDepth: 1
olcChainReturnError: TRUE

dn: olcDatabase=ldap,olcOverlay={0}chain,olcDatabase={-1}frontend,cn=config
changetype: add
objectClass: olcLDAPConfig
objectClass: olcChainDatabase
olcDatabase: ldap
olcDbURI: "ldaps://masterserver.dvpem.org"
olcDbStartTLS: none  starttls=no
olcDbIDAssertBind: mode=self
  flags=prescriptive,proxy-authz-non-critical 
  bindmethod=simple
  timeout=0
  network-timeout=0
  binddn="cn=SlaveUpdater,dc=dvpem,dc=org"
  credentials="elpassdeSlaveUpdater"
  keepalive=0:0:0
  starttls=yes
  tls_cert="/etc/ldap/ssl/certificado.pem"
  tls_key="/etc/ldap/ssl/certificado.pem"
  tls_cacert="/etc/ldap/ssl/certificado.pem"
  tls_reqcert=allow
  tls_cipher_suite=NORMAL
olcDbRebindAsUser: FALSE
olcDbChaseReferrals: TRUE
olcDbTFSupport: no
olcDbProxyWhoAmI: FALSE
olcDbProtocolVersion: 3
olcDbSingleConn: FALSE
olcDbCancel: abandon
olcDbUseTemporaryConn: FALSE
olcDbConnectionPoolMax: 16
olcDbSessionTrackingRequest: FALSE
olcDbNoRefs: FALSE
olcDbNoUndefFilter: FALSE

dn: olcDatabase={1}hdb,cn=config
changetype: modify
add: olcUpdateRef
olcUpdateRef: ldaps://masterserver.dvpem.org

dn: olcOverlay={0}ppolicy,olcDatabase={1}hdb,cn=config
changetype: modify
replace: olcPPolicyForwardUpdates
olcPPolicyForwardUpdates: TRUE&lt;/pre&gt;
&lt;br /&gt;
Ejecutamos el ldif con ldapmodify (cambien el usuario admin por el que corresponda a ustedes):&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
ldapmodify -D "cn=admin,cn=config" -W -f enable-ppolicy-forward.ldif&lt;/blockquote&gt;
&lt;br /&gt;
Como siempre, espero que les haya resultado útil. Yo perdí un buen rato hasta entender cómo funciona esta lógica.</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total></item><item><title>Reverse Proxy con Apache en 4 pasos</title><link>http://itfreekzone.blogspot.com/2016/04/reverse-proxy-con-apache-en-4-pasos.html</link><category>administracion</category><category>apache</category><category>GNU/Linux</category><category>Reverse Proxy</category><category>seguridad</category><category>web</category><author>noreply@blogger.com (V3kt0r)</author><pubDate>Mon, 11 Apr 2016 03:00:00 -0300</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-271207292388274566.post-942665069455086448</guid><description>Los reverse proxy son muy útiles para poder proteger nuestros servers, ya que podemos colocar el server que realiza el procesamiento en la red interna y publicar todo a través del proxy, el cual puede filtrar y actuar de application firewall, balancear carga, etc. La idea del post no es explicar qué es ni qué ventajas tiene un Reverse Proxy, sino cómo crear uno usando apache. Para entender qué son, pueden arrancar por la &lt;a href="https://en.wikipedia.org/wiki/Reverse_proxy"&gt;wiki&lt;/a&gt;.&lt;br /&gt;
Existen módulos para Apache que nos permiten convertirlo en un Reverse Proxy, denominados mod_proxy_*. Los que interesan para esta explicación son mod_proxy y mod_proxy_http.&lt;br /&gt;
&lt;br /&gt;
Supongamos que tenemos la siguiente configuración:&lt;br /&gt;
&lt;br /&gt;
Internet ----&amp;gt; | www.dvpem.org / proxy.dvpem.org |&amp;lt;---&amp;gt; | background-man1.dvpem.org |&lt;br /&gt;
&lt;br /&gt;
Donde www.dvpem.org tiene IP pública accesible desde Internet y es atendida por el server proxy.dvpem.org, y background-man1.dvpem.org tiene una IP privada. El web server background-man1 es el encargado de procesar todos los pedidos, pero no queremos exponerlo, por lo que levantamos un Reverse Proxy (proxy.dvpem.org), que es quien atiende los request a la página www.dvpem.org y los reenvía a background-man1 para su procesamiento. Una vez que background-man1 termina, retorna los resultados a proxy.dvpem.org que es quien responde finalmente al cliente.&lt;br /&gt;
&lt;br /&gt;
Para lograr esto, sólo necesitamos realizar los siguientes 4 pasos:&lt;br /&gt;
&lt;br /&gt;
1. Instalar apache.&lt;br /&gt;
2. Habilitar mod_proxy y mod_proxy_http:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; a2enmod proxy proxy_http&lt;br /&gt;
3. Crear un Virtual Host que atienda los pedidos www.dvpem.org y los reenvíe a background-man1:&lt;br /&gt;
&lt;code&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;VirtualHost *:80&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ServerName&amp;nbsp;&amp;nbsp; www.dvpem.org:80&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ServerAlias&amp;nbsp; www.dvpem.org&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Alias /about.html /var/www/about.html&amp;nbsp;&amp;nbsp; #about.html lo procesa el proxy&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProxyPassMatch ^/about.html !&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #Indicamos que no proxee los requests del file about.html&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProxyPass / http://background-man1.dvpem.org/&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #Mapeamos los request www.dvpem.org para que vayan a background-man1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProxyPassReverse / http://background-man1.dvpem.org/&amp;nbsp;&amp;nbsp;&amp;nbsp; #Reescribe los headers retornados por background-man1 (ej: Location, Content-Location, URI) para que hagan referencia a www.dvpem.org&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;
&lt;/code&gt;
En la configuración agregué una yapa, y es que los request de about.html sean retornados por el mismo proxy, utilizando el file que está en su filesystem local. Esto es, no irá a background-man1, sino que lo retornará de un file en el mismo server. Esto puede ser muy útil si queremos que además de proxy sirva algunas cosas.&lt;br /&gt;
4. Reloadear la configuración de apache:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; service apache2 reload&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
El módulo es muchísimo más polenta que esto, expliqué un uso muy básico. Algo interesante es que podríamos resolver diferentes paths a diferentes servers, como por ejemplo usando:&lt;br /&gt;
&lt;code&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ProxyPass /main http://background-man1.dvpem.org/&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ProxyPassReverse /main http://background-man1.dvpem.org/&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ProxyPass /images http://images.dvpem.org/&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ProxyPassReverse /images http://images.dvpem.org/&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&lt;/code&gt;
Pueden leer más sobre mod_proxy en su &lt;a href="https://httpd.apache.org/docs/2.4/mod/mod_proxy.html"&gt;página oficial&lt;/a&gt;.</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Obtener SSL/TLS Ciphers Soportados</title><link>http://itfreekzone.blogspot.com/2016/03/obtener-ssltls-ciphers-soportados.html</link><category>bash</category><category>ciphers</category><category>GNU/Linux</category><category>openssl</category><category>programacion</category><category>seguridad</category><category>SSL/TLS</category><author>noreply@blogger.com (V3kt0r)</author><pubDate>Wed, 2 Mar 2016 18:12:00 -0300</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-271207292388274566.post-5676854742080461776</guid><description>Ufff casi un año sin postear nada, desde que cambié de trabajo estoy extremadamente ocupado y no he tenido tiempo para postear, a pesar de que estuve viendo muchas cosas interesntes. Espero poder retomar un ritmo de post más seguido :)&lt;br /&gt;
&lt;br /&gt;
Con el auge de las vulnerabilidades en TLS/SSL este último tiempo, tuvimos que ir ajustando el listado de ciphers varias veces, ya que los requerimientos son cada vez más exigentes. El problema es la compatibilidad con sistemas operativos/browsers más antiguos, que no soportan las versiones más nuevas de TLS (TLS 1.2) o ciphers más seguros.&lt;br /&gt;
&lt;br /&gt;
Hoy les traigo algo que me sirvió mucho, que es listar los ciphers soportados por un servidor usando un simple script en bash que se basa en openssl. Si bien hay varias tools que hacen esta tarea, siendo la que más uso &lt;a href="http://www.bolet.org/TestSSLServer/"&gt;TestSSLServer&lt;/a&gt;, quería algo que pudiera ejecutar desde cualquier lugar, sin depender de tools externas o la instalación de java. OpensSSL está presente en toda las distribuciones, así que no necesitamos nada extra para correr este script.&lt;br /&gt;
&lt;br /&gt;
El core del script lo encontré en &lt;a href="http://superuser.com/questions/109213/how-do-i-list-the-ssl-tls-cipher-suites-a-particular-website-offers"&gt;este post de superuser&lt;/a&gt;, al cual le hice modificaciones para que OpenSSL use SNI, tenga un check básico de parámetros, permita pasar port por parámetro y reporte sólo los ciphers con resultado positivo. Sería un equivalente de TestSSLServer más básico, pero portable :D&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;#!/bin/bash -e

if [ "$1" == "" ]; then
    echo "usage: $0 &lt;servername&gt; [port]"
    exit
fi

if [ "$2" == "" ]; then
    PORT=443
else
    PORT=$2
fi

# OpenSSL requires the port number.
SERVER=$1:$PORT
DELAY=1
ciphers=$(openssl ciphers 'ALL:eNULL' | sed -e 's/:/ /g')

echo -n "Checking if server is up... "
result=$(echo -n | openssl s_client -connect $SERVER 2&amp;gt;&amp;amp;1)
if [[ "$result" =~ "Connection timed out" ]]; then
    echo "FAIL - connection time out"
    exit 1
fi
echo "OK"

echo "Obtaining cipher list from $(openssl version)."
for cipher in ${ciphers[@]}; do
    result=$(echo -n | openssl s_client -cipher "$cipher" -servername $SERVER -connect $SERVER 2&amp;gt;&amp;amp;1 || echo "")
    if [[ "$result" =~ "Cipher is ${cipher}" || "$result" =~ "Cipher    :" ]] ; then
        echo $cipher
    fi
    sleep $DELAY
done
&lt;/servername&gt;&lt;/pre&gt;
</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total></item><item><title>Ejecutar como servicio un programa que no es demonizable</title><link>http://itfreekzone.blogspot.com/2015/06/ejecutar-como-servicio-un-programa-que.html</link><category>administracion</category><category>CherryMusic</category><category>debian</category><category>GNU/Linux</category><category>servicios</category><category>sysadmin</category><category>ubuntu</category><author>noreply@blogger.com (V3kt0r)</author><pubDate>Tue, 2 Jun 2015 19:02:00 -0300</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-271207292388274566.post-7514957444825004560</guid><description>&lt;div&gt;
Hoy estuve lidiando con una aplicación que se ejecuta desde consola y queda escuchando en un puerto, pero que no provee la posibilidad de correr como demonio (tipo Apache, sshd, etc). Para no tener que loguear un usuario y dejar la aplicación en ejecución en alguna consola colgada, mejor es convertirla en un servicio. Mi caso en particular se dió con la aplicación &lt;a href="https://github.com/devsnd/cherrymusic"&gt;CherryMusic&lt;/a&gt;, que permite compartir musica a través de una interfaz web.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Como primer paso, vamos a crear un directorio donde alojar la aplicación, y para un caso como el que describo, creo que el mejor lugar es /opt:&lt;/div&gt;
&lt;blockquote class="tr_bq"&gt;
# mkdir /opt/cherrymusic&lt;/blockquote&gt;
&lt;div&gt;
Para cherrymusic, si hacen un clone del proyecto, el directorio se crea sólo, lo mismo si descomprimen un tar.gz.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
A continuación creemos el usuario con el que se ejecutará la aplicación:&lt;/div&gt;
&lt;blockquote class="tr_bq"&gt;
# useradd cherrymusic -d /opt/cherrymusic -s /bin/false&lt;/blockquote&gt;
&lt;div&gt;
El comando anterior indica que el home del usuario será /opt/cherrymusic y que utilice /bin/false como shell... es decir, que no tenga shell.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Para ver qué sucede con nuestra aplicación, estaría bueno ver algún log, así que creemos uno, con los permisos necesarios para que la aplicación pueda escribir:&lt;/div&gt;
&lt;blockquote class="tr_bq"&gt;
# touch /var/log/cherrymusic&lt;br /&gt;
# chown cherrymusic /var/log/cherrymusic&lt;/blockquote&gt;
&lt;div&gt;
La ejecución del programa la haremos de la siguiente forma:&lt;/div&gt;
&lt;blockquote class="tr_bq"&gt;
# sudo -u cherrymusic -H /usr/bin/python /opt/cherrymusic/cherrymusic --port 8080 &amp;amp;&amp;gt;&amp;gt;/var/log/cherrymusic&lt;/blockquote&gt;
&lt;div&gt;
Esto es, le decimos que ejecute la aplicación con el usuario cherrymusic (-u), usando el home de dicho usuario (-H), y redirigimos la salida a /var/log/cherrymusic&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Como último paso, creamos un init script. Si usamos el viejo estándar, podemos meter un script como el siguiente en /etc/init.d/cherrymusic&lt;/div&gt;
&lt;blockquote class="tr_bq"&gt;
#!/bin/bash&lt;br /&gt;
### BEGIN INIT INFO&lt;br /&gt;
# Provides: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cherrymusic&lt;br /&gt;
# Default-Start: &amp;nbsp; &amp;nbsp; 2 3 4 5&lt;br /&gt;
# Default-Stop: &amp;nbsp; &amp;nbsp; &amp;nbsp;0 1 6&lt;br /&gt;
### END INIT INFO&lt;br /&gt;
case "$1" in&lt;br /&gt;
&amp;nbsp; start)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080&lt;br /&gt;
&amp;nbsp; &amp;nbsp; sudo -u cherrymusic -H /usr/bin/python /opt/cherrymusic/cherrymusic --port 8080 &amp;amp;&amp;gt;&amp;gt;/var/log/cherrymusic&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ;;&lt;br /&gt;
&amp;nbsp; stop)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; iptables -t nat -D PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080&lt;br /&gt;
&amp;nbsp; &amp;nbsp; killall -u cherrymusic&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ;;&lt;br /&gt;
&amp;nbsp; *)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; echo "usage: $0 &amp;lt;start | stop&amp;gt;"&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ;;&lt;br /&gt;
esac&lt;/blockquote&gt;
&lt;div&gt;
Ok, tal vez un killall no es lo mejor, pero sirve para mostrar un script muy simple.&lt;/div&gt;
&lt;div&gt;
Al script le agregué un "plus" que es levantar una regla iptables que redirija lo que llegue por el puerto 80, al 8080. Esto se debe a que, al ejecutar el script con un usuario no privilegiado, el mismo no se puede hookear al puerto 80.&lt;/div&gt;
&lt;div&gt;
Faltaría sólo agregarlo para que se ejecute al inicio:&lt;/div&gt;
&lt;blockquote class="tr_bq"&gt;
&amp;nbsp; # update-rc.d cherrymusic defaults&lt;/blockquote&gt;
&lt;div&gt;
Si quisieramos hacer lo mismo, pero utilizando upstart, podemos crear el siguiente archivo en /etc/init/cherrymusic.conf:&lt;/div&gt;
&lt;blockquote class="tr_bq"&gt;
# Cherry Music&lt;br /&gt;
#&lt;br /&gt;
start on runlevel [2345]&lt;br /&gt;
stop on runlevel [!2345]&lt;br /&gt;
script&lt;br /&gt;
&amp;nbsp; iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080&lt;br /&gt;
&amp;nbsp; sudo -u cherrymusic -H /usr/bin/python /opt/cherrymusic/cherrymusic --port 8080 &amp;amp;&amp;gt;&amp;gt;/var/log/cherrymusic&lt;br /&gt;
end script&lt;br /&gt;
post-stop script&lt;br /&gt;
&amp;nbsp; iptables -t nat -D PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080&lt;br /&gt;
end script&lt;/blockquote&gt;
&lt;div&gt;
Eso es todo, ya pueden utilizar "service cherrymusic start" y "service cherrymusic stop", y además la aplicación se ejecutará cada vez que se encienda el equipo. Los pasos serían los mismos si ejecutaran cualquier otra aplicación =)&lt;/div&gt;
</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total></item><item><title>ejabberd LDAP, certificados y clustering</title><link>http://itfreekzone.blogspot.com/2015/01/ejabberd-ldap-certificados-y-clustering.html</link><category>administracion</category><category>articulos</category><category>chat</category><category>debian</category><category>ejabberd</category><category>GNU/Linux</category><category>Jabber</category><category>ubuntu</category><category>XMPP</category><author>noreply@blogger.com (V3kt0r)</author><pubDate>Wed, 28 Jan 2015 04:05:00 -0300</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-271207292388274566.post-8219226783067339432</guid><description>Después de pelear durante un par de días con ejabberd, me pareció interesante compartir la experiencia ganada en el proceso, ya que no todo es tan directo como parece. La documentación oficial está buena, pero la encontré un poco escueta, por lo que si no usas una configuración similar a la de los ejemplos, no sabes bien qué poner en cada parámetro.&lt;br /&gt;
Ejabberd está escrito en lenguaje Erlang, y utiliza el formato de este lenguaje para su archivo de configuración. Si bien no es complicado, no es a lo que uno está acostumbrado.&lt;br /&gt;
&lt;br /&gt;
Comenzaré con lo básico de todos los tutoriales, pero con la idea de que el servidor autenticará con LDAP en lugar de la autenticación interna. Luego pasaré a los topics más interesantes como autopopular rosters con grupos de usuarios LDAP y armar un servicio de alta disponibilidad con dos servidores ejabberd.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Instalación&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
En debian, Ubuntu y supongo que otros derivados también, ejabberd se encuentra en los repositorios oficiales, por lo que instalarlo es tan fácil como ejecutar lo siguiente:&lt;br /&gt;
&amp;nbsp; # apt-get install ejabberd&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Configuración básica&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Toda la configuración se realiza desde el archivo /etc/ejabberd/ejabberd.cfg. De base, tendremos que editar lo siguiente:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&amp;nbsp; {hosts, ["dvpem.org"]}.&lt;br /&gt;
&amp;nbsp; {acl, admin, {user, "vektor", "dvpem.org"}}.&lt;/blockquote&gt;
donde:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;hosts especifica los dominios que ejabberd manejará.&lt;/li&gt;
&lt;li&gt;acl Indica cuál es el usuario admin. Si utilizan LDAP (ver a continuación) este usuario debe ser uno que exista en el servidor de LDAP.&lt;/li&gt;
&lt;/ul&gt;
Como ven, muy poco es necesario para tener ejabberd funcionando. Si no utiliza LDAP deberán cambiar el nombre de usuario por uno local, y luego agregarlo con el comando ejabberctl. Por ejemplo:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&amp;nbsp; # ejabberdctl register vektor dvpem.org superPASS&lt;/blockquote&gt;
Es posible acceder a una interfaz web de administración apuntando a la siguiente URL:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
http://&amp;lt;host-o-IP&amp;gt;:5280/admin&lt;/blockquote&gt;
&lt;br /&gt;
&lt;b&gt;Habilitar LDAP&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Para habilitar autenticación por LDAP veamos un ejemplo de configuración y qué significa cada valor:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
%%{auth_method, internal}.&lt;br /&gt;
{auth_method, ldap}.&lt;br /&gt;
{ldap_servers, ["ldap.dvpem.org"]}.&lt;br /&gt;
{ldap_base, "ou=People,dc=dvpem,dc=org"}.&lt;br /&gt;
{ldap_rootdn, "cn=Usuario,dc=dvpem,dc=org"}.&lt;br /&gt;
{ldap_password, "PASSusuario"}.&lt;br /&gt;
{ldap_port, 636}.&lt;br /&gt;
{ldap_encrypt, tls}.&lt;br /&gt;
{ldap_uids, [{"uid", "%u"}]}.&lt;/blockquote&gt;
Vamos por línea:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Deshabilita (comenta) autenticación interna.&lt;/li&gt;
&lt;li&gt;Habilita autenticación por LDAP.&lt;/li&gt;
&lt;li&gt;ldap_servers: indica cuáles son los servidores LDAP a los que se conectará ejabberd.&lt;/li&gt;
&lt;li&gt;ldap_base: especifica el DN base a partir del cual buscar los usuarios. Esto dependerá si se utiliza AD, OpenLDAP, u schemas propios.&lt;/li&gt;
&lt;li&gt;ldap_rootdn: especifica el usuario utilizado para conectar ejabberd con LDAP. El usuario utilizado debe poder listar usuarios y grupos, como mínimo.&lt;/li&gt;
&lt;li&gt;ldap_password: password del usuario utilizado en la conexión con LDAP.&lt;/li&gt;
&lt;li&gt;ldap_port: puerto del servidor LDAP.&lt;/li&gt;
&lt;li&gt;ldap_encrypt: indica que utilice TLS en la conexión.&lt;/li&gt;
&lt;li&gt;ldap_uids: indica qué atributo contiene el identificador del usuario. Esto también variará según el schema. En AD podría utilizarse samAccountName.&lt;/li&gt;
&lt;/ol&gt;
Reiniciar servidor ejabberd:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
# server ejabberd restart&lt;/blockquote&gt;
&lt;u&gt;Nota 1&lt;/u&gt;: si iniciar ejabberd falla, probar de ejecutarlo en modo debug:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
# ejabberd --debug&lt;/blockquote&gt;
&lt;u&gt;Nota 2&lt;/u&gt;: cuando la configuración está mal (o algo falla), puede que igualmente ejabberd deje un procesos corriendo y que ello les traiga problemas al intentar iniciar ejabberd nuevamente. Es un problema que queda medio oculto porque al iniciar ejabberd no arroja error, pero al mirar la lista de procesos escuchando, vemos que ninguno espera conexiones en el puerto default 5222 o 5280. En este caso, buscar y matar los procesos colgados antes de iniciar ejabberd nuevamente:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
# killall -u ejabberd&lt;/blockquote&gt;
&lt;br /&gt;
&lt;b&gt;Usar grupos de LDAP como grupos en los rosters&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Es posible tomar los grupos de LDAP y utilizarlos en el roster, de forma que cada cliente que se conecte vea los grupos y los usuarios incluidos. Para ello, se puede utilizar el módulo mod_shared_roster_ldap, que por defecto no viene habilitado. Editar el archivo ejabberd.cfg, y en la sección de módulos agregar mod_shared_roster_ldap:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
...&lt;br /&gt;
{modules,&lt;br /&gt;
&amp;nbsp;[&lt;br /&gt;
&amp;nbsp; ....&lt;br /&gt;
&amp;nbsp; {mod_shared_roster_ldap, [&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {ldap_base, "ou=Group,dc=dvpem,dc=org"},&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {ldap_rfilter, "(objectClass=posixGroup)"},&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {ldap_ufilter, "(&amp;amp;(objectClass=posixAccount)(uid=%u))},&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {ldap_gfilter, "(&amp;amp;(objectClass=posixGroup)(cn=%g))"},&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {ldap_groupattr, "cn"},&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {ldap_groupdesc, "cn"},&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {ldap_memberattr,"memberUid"},&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {ldap_memberattr_format, "cn=%u,ou=People,dc=dvpem,dc=org"},&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {ldap_useruid, "uid"},&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {ldap_userdesc, "cn"}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ]},&lt;br /&gt;
&amp;nbsp;]}.&lt;/blockquote&gt;
El ejemplo está armado pensando en un servidor OpenLDAP, pero es fácilmente adaptable a AD, sólo hay que cambiar los nombres de los atributos.&lt;br /&gt;
Veamos cada uno de los atributos:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;u&gt;ldap_base&lt;/u&gt;: indica a partir de donde buscar los grupos para popular el roster.&lt;/li&gt;
&lt;li&gt;&lt;u&gt;ldap_rfilter&lt;/u&gt;: filtro que utilizará para popular el roster, y como los grupos del roster son los mismos de LDAP, pues ahí va. Dado que el base ya apunta a los grupos, no sería estrictamente necesario ya que no debería haber otra cosa que grupos en esa OU, pero por las dudas... En este caso se asume que los grupos son Posix, si usan AD tendrán que cambiar por el fitro que mejor les quede.&lt;/li&gt;
&lt;li&gt;&lt;u&gt;ldap_ufilter&lt;/u&gt;: filtro para obtener el atributo que contiene el nombre "humano" del usuario. Préstese atención que con este filtro obtenemos el nombre del atributo, no el valor del atributo, para esto último está ldap_user_desc.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;u&gt;ldap_gfilter&lt;/u&gt;: filtro para obtener el nombre "humano" de los grupos. Misma idea que con ldap_ufilter.&lt;/li&gt;
&lt;li&gt;&lt;u&gt;ldap_groupattr&lt;/u&gt;: nombre del atributo LDAP que tiene el nombre del grupo.&lt;/li&gt;
&lt;li&gt;&lt;u&gt;ldap_groupdesc&lt;/u&gt;: nombre del atributo que tiene el nombre "humano" del grupo. Se usa en conjunto con ldap_gfilter, obteniendo del resultado de este filtro su valor.&lt;/li&gt;
&lt;li&gt;&lt;u&gt;ldap_memberattr&lt;/u&gt;: nombre del atributo LDAP que apunta a los miembros del grupo (member también es común).&lt;/li&gt;
&lt;li&gt;&lt;u&gt;ldap_memberattr_format&lt;/u&gt;: especifica el formato en que se guardan los miembros de un grupo. Por ejemplo, pueden tener cn=vektor,ou=People,dc=dvpem,dc=org. El %u le indica cuál es el nombre del usuario.&lt;/li&gt;
&lt;li&gt;&lt;u&gt;ldap_useruid&lt;/u&gt;: nombre del atributo que contiene el ID de usuario (en AD samAccountName).&lt;/li&gt;
&lt;li&gt;&lt;u&gt;ldap_user_desc&lt;/u&gt;: nombre del atributo que contiene el nombre "humano" del usuario. Se utiliza en conjunto con ldap_ufilter, obteniendo del resultado de este filtro su valor.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;b&gt;Instalar certificado propio&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Para habilitar TLS/SSL ejabberd utiliza un sólo archivo que contiene clave privada, certificado y cadena de certificados. Por defecto, se genera uno al instalar ejabberd, denominado ejabberd.pem. Para no tener que editar el archivo de configuración, lo más simple es reemplazar este archivo con uno generado por nosotros a partir de nuestros certificados y clave. Este super archivo debe contener los datos en el siguiente orden:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Clave privada&lt;/li&gt;
&lt;li&gt;Certificado&lt;/li&gt;
&lt;li&gt;Cadena certificante&lt;/li&gt;
&lt;/ol&gt;
De modo que, si por ejemplo tenemos los archivos private.key, certificado.crt y CA.crt, podemos unirlos fácilmente utilizando cat de la siguiente manera:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
# cat private.key certificado.key CA.crt &amp;gt; /etc/ejabberd/ejabberd.pem&lt;/blockquote&gt;
&lt;br /&gt;
&lt;b&gt;Timeouts&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Un problema que surgió en uno de los servers que instalé, es que después de un rato de inactividad, las conexiones TCP de ejabberd con LDAP mueren. Buscando encontré que si no hay actividad durante un dado período de tiempo, algunos equipos de red pueden "desconectar" las sesiones TCP sin notificar al software que las está usando. En este caso, desde ejabberd se sigue viendo como que la conexión está activa, y al ver la conexión activa la utiliza pero sin obtener resultados. Desde mi punto de vista, esto es un bug en ejabberd, ya que si al realizar consultas no se obtiene respuesta, debería cerrar esa conexión e intentar conectarse nuevamente al servidor LDAP. En lugar de hacer eso, sólo da un authentication failure, sin loguear siquiera un timeout en los logs :S&lt;br /&gt;
&lt;br /&gt;
Lo importánte aquí es la solución a este problema. El kernel de Linux soporta el envío de paquetes keepalive, para mantener activas conexiones TCP o marcar una conexión como "muerta". Esto lo realiza enviando paquetes keepalive a intervalos definidos de tiempo, esperando respuesta del servidor para decidir si la conexión está muerta. Es decir, cumple dos funciones, por un lado envía paquetes generando tráfico de red para que la conexión no se muera, y en el caso de que la conexión ya esté muerta, lo detecta y le avisa a la aplicación que la está usando.&lt;br /&gt;
La configuración se realiza a través de tres variables que se encuentran en /proc/sys/net/ipv4/&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;tcp_keepalive_time: default 7200 segundos, es decir, 2 horas. Especifica el intervalo en segundos entre el primer paquete de una secuencia de pruebas keepalive y el primer paquete de la próxima.&lt;/li&gt;
&lt;li&gt;tcp_keepalive_intvl: default 75 segundos. Indica cada cuántos segundos enviar paquetes keepalive en una secuencia.&lt;/li&gt;
&lt;li&gt;tcp_keepalive_probes: default 9. Valor numérico que especifica cuántos paquetes enviar en una secuencia.&lt;/li&gt;
&lt;/ul&gt;
El mecanismo es el siguiente: el kernel envía un paquete keepalive, espera el tiempo especificado en tcp_keepalive_intvl y envía otro, espera de nuevo y luego envía otro, así hasta alcanzar la cantidad de pruebas indicadas en tcp_keepalive_probes. Es decir, por defecto enviará 9 paquetes con una diferencia de 75 entre sí. Si no hay respuesta del otro lado, marca la conexión como muerta. Mientras tanto, una vez que se envió el primer paquete de esta secuencia, comienzan a contarse los segundos, y cuando se llega al valor de tcp_keepalive_time, comienza de nuevo con la secuencia mencionada.&lt;br /&gt;
&lt;br /&gt;
Para no tener el problema de conexiones muertas podemo acomodar estos valores, ya que 2hs de espera puede ser demasiado. Según este post (http://start.nwt.fhstp.ac.at/blog/?p=307), los valores que mejores resultado les dieron son los siguientes:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
tcp_keepalive_time = 600&lt;br /&gt;
tcp_keepalive_intvl = 30&lt;br /&gt;
tcp_keepalive_probes = 5&lt;/blockquote&gt;
Lo cual se puede setear ejecutando:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
# echo 600 &amp;gt; /proc/sys/net/ipv4/tcp_keepalive_time&lt;br /&gt;
# echo 30 &amp;gt; /proc/sys/net/ipv4/tcp_keepalive_intvl&lt;br /&gt;
# echo 5 &amp;gt; /proc/sys/net/ipv4/tcp_keepalive_probes&lt;/blockquote&gt;
Al reiniciar el servidor, estos valores se perderán, pero pueden generar un script en bash que se ejecute al inicio.&lt;br /&gt;
&lt;br /&gt;
Así que ya saben, si ven que las conexiones con el servidor LDAP figuran activas (lsof -Pni), pero los clientes dan authentication failure sin razón, prueben esta solución.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Clustering&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
La configuración de un cluster ejabberd, es decir, tener más de un servidor ejabberd sirviendo el mismo dominio, es medio críptica, pero no compleja. Digo críptica porque hay que ejecutar comandos Erlang para que funcione. Básicamente configurar un cluster ejabberd es igual a configurar un cluster mnesia. Erlang utiliza &lt;a href="http://erlang.org/doc/man/mnesia.html"&gt;mnesia&lt;/a&gt;, un manejador de base de datos distribuido, y lo que hay que hacer es configurar mnesia para que funcione en modo replicación.&lt;br /&gt;
&lt;br /&gt;
Si bien la configuración puede ser multimaster, llamaré Master al primer nodo que damos de alta y Slave al segundo.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Configuración Master&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Copiar cookie mágica de Erlang que se encuentra en /var/lib/ejabberd/.erlang.cookie al nodo slave. Esta cookie debe ser igual en todos los nodos.&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
# scp /var/lib/ejabberd/.erlang.cookie vektor@chat2.dvpem.org:~&lt;/blockquote&gt;
O bien hacer un cat de .erlang.cookie y pegar el contenido en el nodo destino.&lt;br /&gt;
&lt;br /&gt;
Editar archivo /etc/default/ejabberd y agregar las líneas:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
ERLANG_NODE=ejabberd@chat1&lt;br /&gt;
INET_DIST_INTERFACE={192,168,1,1}&lt;/blockquote&gt;
donde:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;ERLANG_NODE especifica el nombre completo del nodo.&lt;/li&gt;
&lt;li&gt;INET_DIST_INTERFACE es la IP en la cual esperará conexiones. Utilizar comas para separar los octetos, es decir, en lugar de utilizar los convencionales puntos, separar con comas.&lt;/li&gt;
&lt;/ol&gt;
Reiniciar el master:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
# service ejabberd restart&lt;/blockquote&gt;
&lt;br /&gt;
&lt;b&gt;Configuración Slave&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Detener el servicio de ejabberd:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
# service ejabberd stop&lt;br /&gt;
# killall -u ejabberd&lt;/blockquote&gt;
Editar archivo /etc/default/ejabberd y agregar las líneas:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
ERLANG_NODE=ejabberd@chat2&lt;br /&gt;
INET_DIST_INTERFACE={192,168,1,2}&lt;/blockquote&gt;
Mover la cookie al directorio de ejabberd y cambiar los permisos para que el usuario ejabberd la pueda acceder:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
# mv .erlang.cookie /var/lib/ejabberd/&lt;br /&gt;
# chown ejabberd:ejabberd /var/lib/ejabberd/.erlang.cookie&lt;br /&gt;
# chmod 400 /var/lib/ejabberd/.erlang.cookie&lt;/blockquote&gt;
Iniciar ejabberd:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
# service ejabberd start&lt;/blockquote&gt;
Asegurarse que ejabberd se está ejecutando:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&amp;nbsp; # ejabberctl status&lt;/blockquote&gt;
Abrir una consola Erlang para conectar al nodo 1 y realizar una copia de la base de datos:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
# ejabberctl debug&lt;/blockquote&gt;
En la consola Erlang, ejecutar lo siguiente:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
(ejabberd@chat2)1&amp;gt; mnesia:stop(),&lt;br /&gt;
(ejabberd@chat2)1&amp;gt; mnesia:delete_schema([node()]),&lt;br /&gt;
(ejabberd@chat2)1&amp;gt; mnesia:start(),&lt;br /&gt;
(ejabberd@chat2)1&amp;gt; mnesia:change_config(extra_db_nodes, ['ejabberd@chat1']),&lt;br /&gt;
(ejabberd@chat2)1&amp;gt; mnesia:change_table_copy_type(schema, node(), disc_copies).&lt;br /&gt;
(ejabberd@chat2)1&amp;gt; mnesia:info().&lt;/blockquote&gt;
Cerrar la sesión precionando Ctrl+c Ctrl+c&lt;br /&gt;
&lt;br /&gt;
donde:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;mnesia:stop() detiene la ejecución de la BD mnesia,&lt;/li&gt;
&lt;li&gt;mnesia:delete_schema([node()]) elimina el schema actual del nodo,&lt;/li&gt;
&lt;li&gt;mnesia:start() inicia nuevamente la BD,&lt;/li&gt;
&lt;li&gt;mnesia:change_config(extra_db_nodes, ['ejabberd@chat1']) apunta la base de datos al nodo 1&lt;/li&gt;
&lt;li&gt;mnesia:change_table_copy_type(schema, node(), disc_copies) crea una copia local del schema.&lt;/li&gt;
&lt;li&gt;mnesia:info() imprime información del nodo. Al ejecutar este comando deberían ver ambos nodos en ejecución:&lt;br /&gt;
&amp;nbsp; ...&lt;br /&gt;
&amp;nbsp; running db nodes &amp;nbsp; = ['ejabberd@chat1','ejabberd@chat2']&lt;br /&gt;
&amp;nbsp; ...&lt;/li&gt;
&lt;/ul&gt;
Esto sólo copia el esquema de la base de datos en el slave. Si bien todo funciona correctamente así, si el master cae, el sistema en teoría deja de funcionar, ya que el slave no tiene copia de las tablas.&lt;br /&gt;
Ahora, para tener un entorno multi-master hay que realizar una copia de todas las tablas en el nodo slave... que ya no sería más slave, sino otro master. En este caso los writes serán más lentos, pero tendremos un entorno de alta disponibilidad.&lt;br /&gt;
El comando para copiar tablas de otro nodo es mnesia:add_table_copy... pero hacerlo tabla por tabla es tedioso. Encontré en un &lt;a href="http://stackoverflow.com/questions/787755/how-to-add-a-node-to-an-mnesia-cluster"&gt;comentario de StackOverflow&lt;/a&gt;&amp;nbsp;como hacer una copia de todas las tablas en un comando:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
(ejabberd@chat2)1&amp;gt;&amp;nbsp;[{Tb, mnesia:add_table_copy(Tb, node(), Type)} || {Tb, [{'ejabberd@chat1', Type}]} &amp;lt;- [{T, mnesia:table_info(T, where_to_commit)} || T &amp;lt;- mnesia:system_info(tables)]].&lt;/blockquote&gt;
Hay que ejecutarlo en una consola Erlang con "ejabberdctl debug".&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Referencias&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.process-one.net/docs/ejabberd/guide_en.html"&gt;ejabberd 14.12 - Installation and Operation Guide&lt;/a&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.ejabberd.im/files/doc/guide.html"&gt;Ejabberd Installation and Operation Guide&lt;/a&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://raymii.org/s/tutorials/Ejabberd_Active_Directory_LDAP_Login.html"&gt;Ejabberd Active Directory LDAP Login&lt;/a&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://ejabberd-msrl.alioth.debian.org/doc/0.5.3/msrl.html"&gt;mod_shared_roster_ldap 0.5.3 - Shared Roster LDAP Documentation&amp;nbsp;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://raymii.org/s/tutorials/Ejabberd_SSL_Certificate.html"&gt;Ejabberd SSL Certificate&amp;nbsp;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://tdewolf.blogspot.com.ar/2011/07/ejabberd-cluster-on-ubuntu-server.html"&gt;Ejabberd cluster on Ubuntu Server&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://raymii.org/s/tutorials/Set_up_a_federated_XMPP_Chat_Network_with_ejabberd.html"&gt;Set up a federated XMPP Chat Network with ejabberd, your own Google Talk/Hangouts alternative&amp;nbsp;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://overwatering.org/blog/2014/03/straight-forward-clustering-of-ejabberd/"&gt;Straight-forward Clustering of ejabberd&lt;/a&gt;&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total></item><item><title>Crear una CA con OpenSSL y firmar/revocar certificados con ella</title><link>http://itfreekzone.blogspot.com/2015/01/crear-una-ca-con-openssl-y.html</link><category>administracion</category><category>articulos</category><category>CA</category><category>certificados</category><category>GNU/Linux</category><category>openssl</category><category>seguridad</category><category>SSL/TLS</category><category>X.509</category><author>noreply@blogger.com (V3kt0r)</author><pubDate>Tue, 6 Jan 2015 04:30:00 -0300</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-271207292388274566.post-6020847568736994788</guid><description>Ya es el 4to &amp;nbsp;artículo (o fueron más?) que escribo sobre certificados digitales, y sin embargo siempre me encuentro con algún requerimiento nuevo. Esta vez necesitaba crear una CA propia para firmar mis certificados, y como siempre, decidí utilizar OpenSSL.&lt;br /&gt;
&lt;br /&gt;
En los siguientes pasos describiré cómo crear la susodicha CA y cómo firmar certificados con la misma.&lt;br /&gt;
&lt;br /&gt;
Si les interesa, pueden dar un repaso a los otro artículos del tema:&lt;br /&gt;
- &lt;a href="http://itfreekzone.blogspot.com.ar/2009/05/certificados-digitales.html"&gt;Certificados Digitales&lt;/a&gt;&lt;br /&gt;
- &lt;a href="http://itfreekzone.blogspot.com.ar/2010/04/firmando-una-ca-propia.html"&gt;Firmando una CA propia&lt;/a&gt;&lt;br /&gt;
- &lt;a href="http://itfreekzone.blogspot.com.ar/2013/04/shortcuts-comandos-openssl-para-generar.html"&gt;Shortcuts: comandos OpenSSL para generar claves, certificados y testear conexiones&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;1. Configurar OpenSSL&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
El primero paso es copiar o editar la información en /etc/ssl/openssl.cnf. Son pocos los campos que es importante/requerido editar. El resto pueden modificarlos también, pero &amp;nbsp;la idea acá es mostrar los requerimientos mínimos.&lt;br /&gt;
&lt;br /&gt;
En el archivo openssl.cnf buscar y editar los siguientes valores:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
[ CA_default ]&lt;br /&gt;
dir &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = /ca&lt;br /&gt;
...&lt;br /&gt;
new_certs_dir &amp;nbsp; = $dir/newcerts&lt;br /&gt;
certificate &amp;nbsp; &amp;nbsp; = $dir/ca.crt&lt;br /&gt;
...&lt;br /&gt;
private_key &amp;nbsp; &amp;nbsp; = $dir/ca.key&lt;br /&gt;
...&lt;br /&gt;
default_days &amp;nbsp; &amp;nbsp;= 365&lt;/blockquote&gt;
donde:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;dir: directorio que alojará la información de la CA, como certificados firmados, base de datos, número de serie, etc.&lt;/li&gt;
&lt;li&gt;new_certs_dir: donde se alojarán los certificados firmados.&lt;/li&gt;
&lt;li&gt;certificate: ubicación del certificado de la CA.&lt;/li&gt;
&lt;li&gt;private_key: la clave de la CA.&lt;/li&gt;
&lt;li&gt;default_days: cantidad de días de validez de un certificado por default.&lt;/li&gt;
&lt;/ul&gt;
También será de mucha utilidad pegarle una mirada y editar lo siguiente:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
[ req_distinguished_name ]&lt;br /&gt;
countryName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = Country Name (2 letter code)&lt;br /&gt;
countryName_default &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = AR&lt;br /&gt;
countryName_min &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = 2&lt;br /&gt;
countryName_max &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = 2&lt;br /&gt;
stateOrProvinceName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = State or Province Name (full name)&lt;br /&gt;
stateOrProvinceName_default &amp;nbsp; &amp;nbsp; = Buenos Aires&lt;br /&gt;
localityName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= Locality Name (eg, city)&lt;br /&gt;
0.organizationName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= Organization Name (eg, company)&lt;br /&gt;
0.organizationName_default &amp;nbsp; &amp;nbsp; &amp;nbsp;= Super CA&lt;/blockquote&gt;
Estos datos facilitan la vida al generar certificados, ya que se tomarán por default y no habrá que cargarlos cada vez que se genere un nuevo request.&lt;br /&gt;
&lt;br /&gt;
Una vez finalizada la edición, realizar lo siguiente en el directorio default (ver variable dir de la configuración):&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;crear los archivos de texto index.txt y serial:&lt;br /&gt;
# touch /ca/index.txt /ca/serial&lt;br /&gt;
    donde:&lt;br /&gt;
      index.txt es la base de datos de certificados firmados por la CA.&lt;br /&gt;
      serial cotiene el número de serie que debe colocarle al próximo certificado que firme.&lt;/li&gt;
&lt;li&gt;al archivo serial, agregarle un valor. Este será el número de serie que imprima al primer certificado que genere, luego lo actualizará solo. El valor debe ser de dos dígitos:&lt;br /&gt;
      echo "01" &amp;gt; /ca/serial&lt;/li&gt;
&lt;li&gt;crear el directorio para los certificados nuevos, si es que todavía no existe. Para el ejemplo dado:&lt;br /&gt;
      # mkdir /ca/newcerts&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;2. Generar clave y certificado de CA&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Claramente la CA debe contar con su propia clave y certificado. Estos se utilizarán para firmar los certificados que se requieran luego. La forma más rápida es utilizando un sólo comando:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
# openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout /ca/ca.key -out /ca/ca.crt -config /ca/openssl.cnf&lt;br /&gt;Generating a 2048 bit RSA private key&lt;br /&gt;...+++&lt;br /&gt;..........................................+++&lt;br /&gt;writing new private key to 'ca.key'&lt;br /&gt;-----&lt;br /&gt;You are about to be asked to enter information that will be incorporated&lt;br /&gt;into your certificate request.&lt;br /&gt;What you are about to enter is what is called a Distinguished Name or a DN.&lt;br /&gt;There are quite a few fields but you can leave some blank&lt;br /&gt;For some fields there will be a default value,&lt;br /&gt;If you enter '.', the field will be left blank.&lt;br /&gt;-----&lt;br /&gt;Country Name (2 letter code) [AR]:&lt;br /&gt;State or Province Name (full name) [Buenos Aires]:&lt;br /&gt;Locality Name (eg, city) []:&lt;br /&gt;Organization Name (eg, company) [Super CA]:&lt;br /&gt;Organizational Unit Name (eg, section) []:&lt;br /&gt;Common Name (e.g. server FQDN or YOUR name) []:super-ca.com&lt;br /&gt;Email Address []:&lt;/blockquote&gt;
Como verán, el archivo de configuración hace que los valores de "Country Name", "State or Province Name", etc se tomen de ahí.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;3. Firmar certificados&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
En los anteriores artículos expliqué cómo generar un request de certificado, por lo que no me explayaré en eso. Les dejo el siguiente comando que crea una clave y CSR, y además utiliza como template el archivo de configuración:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
# openssl req -new -newkey rsa:2048 -keyout prueba.key -out prueba.csr -config /ca/openssl.cnf&lt;br /&gt;Generating a 2048 bit RSA private key&lt;br /&gt;......................................+++&lt;br /&gt;....+++&lt;br /&gt;writing new private key to 'prueba.key'&lt;br /&gt;Enter PEM pass phrase:&lt;br /&gt;Verifying - Enter PEM pass phrase:&lt;br /&gt;-----&lt;br /&gt;You are about to be asked to enter information that will be incorporated&lt;br /&gt;into your certificate request.&lt;br /&gt;What you are about to enter is what is called a Distinguished Name or a DN.&lt;br /&gt;There are quite a few fields but you can leave some blank&lt;br /&gt;For some fields there will be a default value,&lt;br /&gt;If you enter '.', the field will be left blank.&lt;br /&gt;-----&lt;br /&gt;Country Name (2 letter code) [AR]:&lt;br /&gt;State or Province Name (full name) [Buenos Aires]:&lt;br /&gt;Locality Name (eg, city) []:&lt;br /&gt;Organization Name (eg, company) [Super CA]:&lt;br /&gt;Organizational Unit Name (eg, section) []:&lt;br /&gt;Common Name (e.g. server FQDN or YOUR name) []:superprueba.com&lt;br /&gt;Email Address []:&lt;br /&gt;Please enter the following 'extra' attributes&lt;br /&gt;to be sent with your certificate request&lt;br /&gt;A challenge password []:&lt;br /&gt;An optional company name []:&lt;/blockquote&gt;
Ok, ahora si a lo bueno, con este simple comando podremos firmar los request de certificados que deseemos:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
# openssl ca -cert /ca/ca.crt -keyfile /ca/ca.key -in prueba.csr -out prueba.crt -config /ca/openssl.cnf&lt;br /&gt;Using configuration from /ca/openssl.cnf&lt;br /&gt;Check that the request matches the signature&lt;br /&gt;Signature ok&lt;br /&gt;Certificate Details:&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;Serial Number: 2 (0x2)&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;Validity&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;Not Before: Jan &amp;nbsp;5 15:40:56 2015 GMT&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;Not After : Jan &amp;nbsp;5 15:40:56 2016 GMT&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;Subject:&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;countryName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = AR&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;stateOrProvinceName &amp;nbsp; &amp;nbsp; &amp;nbsp; = Buenos Aires&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;organizationName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= Super CA&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;commonName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= superprueba.com&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;X509v3 extensions:&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;X509v3 Basic Constraints:&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;CA:FALSE&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;Netscape Comment:&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;OpenSSL Generated Certificate&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;X509v3 Subject Key Identifier:&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;EE:9C:75:57:66:F6:3E:FA:D9:CF:6F:06:60:E0:97:D1:EE:EC:14:EA&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;X509v3 Authority Key Identifier:&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;keyid:98:7A:32:95:93:72:24:37:B0:16:61:10:8D:E7:51:5F:54:95:C7:62&lt;br /&gt;Certificate is to be certified until Jan &amp;nbsp;5 15:40:56 2016 GMT (365 days)&lt;br /&gt;Sign the certificate? [y/n]:y&lt;br /&gt;&lt;br /&gt;1 out of 1 certificate requests certified, commit? [y/n]y&lt;br /&gt;Write out database with 1 new entries&lt;br /&gt;Data Base Updated&lt;/blockquote&gt;
&lt;br /&gt;
&lt;b&gt;4. Revocar certificados&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Finalmente, y porque seguro les sucederá en algún momento, veamos cómo revocar un certificado. Es tan simple como ejecutar el siguiente comando:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
# openssl ca -revoke prueba.crt -config /ca/openssl.cnf&lt;br /&gt;Using configuration from /ca/openssl.cnf&lt;br /&gt;Revoking Certificate 01.&lt;br /&gt;Data Base Updated&lt;/blockquote&gt;
Si miran el archivo index.txt, podrán observar una R al principio de la línea del certificado.&lt;br /&gt;
&lt;br /&gt;
Un tip interesante, es qué pasa si no tenemos el certificado que queremos revocar. En este &lt;a href="http://stackoverflow.com/questions/9496698/how-to-revoke-an-openssl-certificate-when-you-dont-have-the-certificate"&gt;post de stackoverflow&lt;/a&gt;&amp;nbsp;explican una forma de hacerlo.&lt;br /&gt;
OpenSSL guarda una copia de los certificados que firma en el directorio "newcerts" (o donde lo hayan configurado en openssl.cnf). Los certificados se guardan con el número de serie como nombre, por lo que primero hay que hayar el número de serie del certificado que queremos revocar. Un simple grep puede ayudarnos en este caso:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
# grep "prueba" /ca/index.txt&lt;br /&gt;V &amp;nbsp; &amp;nbsp; &amp;nbsp; 160105143331Z &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 01 &amp;nbsp; &amp;nbsp; &amp;nbsp;unknown /C=AR/ST=Buenos Aires/O=Super CA/CN=prueba&lt;/blockquote&gt;
donde vemos que el ID es 01.&lt;br /&gt;
Con esta info, ejecutamos el comando anterior de la siguiente manera:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
# openssl ca -revoke newcerts/01.pem -config /ca/openssl.cnf&lt;/blockquote&gt;
&lt;br /&gt;
&lt;b&gt;Referencias&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
-&amp;nbsp;&lt;a href="http://pages.cs.wisc.edu/~zmiller/ca-howto/"&gt;How To Setup a CA&lt;/a&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>FirefoxOS en tu PC</title><link>http://itfreekzone.blogspot.com/2014/11/firefoxos-en-tu-pc.html</link><category>Firefox</category><category>FirefoxOS</category><category>GNU/Linux</category><category>Mobile</category><category>OS</category><category>windows</category><author>noreply@blogger.com (V3kt0r)</author><pubDate>Mon, 10 Nov 2014 05:00:00 -0300</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-271207292388274566.post-2113663891090488089</guid><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhj5WDyMyVIuLb4wBpjimVchvTjFOTzmRBIH5H8t5Rj7EL9PUOCfzvXcmaEcsVCj1YQXe6aiQIBpNvIpaBe2pTfmxSplZhx80_gV2V5Jl-uDkG_qhxoGcCGZtET4Lhw-8JHNMFCMX85IvcQ/s1600/firefoxos-logo.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhj5WDyMyVIuLb4wBpjimVchvTjFOTzmRBIH5H8t5Rj7EL9PUOCfzvXcmaEcsVCj1YQXe6aiQIBpNvIpaBe2pTfmxSplZhx80_gV2V5Jl-uDkG_qhxoGcCGZtET4Lhw-8JHNMFCMX85IvcQ/s1600/firefoxos-logo.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;
Buscando emuladores de Android, se me ocurrió que sería bueno también probar &lt;a href="https://www.mozilla.org/es-AR/firefox/os/"&gt;FirefoxOS&lt;/a&gt;, el sistema operativo de la gente de Mozilla para dispositivos móviles. Hacía rato que tenía ganas de probar este sistema, ya que Android me parece extremadamente invasivo, dándo acceso a Google y sus partnets a todo lo que haces con tus dispositivos. Tal vez la gente de Mozilla haga lo mismo, pero es bueno darle una chance y probar. Además en el sentido de la privacidad, confío más en Mozilla que en Google... aunque vale decir que no se puede confiar en nadie jejeje.&lt;br /&gt;
&lt;br /&gt;
Sé que en España y algunos países de Latinoamérica, Telefónica está vendiendo celulares con FirefoxOS instalado. Desgraciadamente estos equipos todavía no llegaron a Argentina, así que no había tenido la oportunidad de probar el sistema.&lt;br /&gt;
&lt;br /&gt;
Por suerte encontré que ejecutar FirefoxOS en una PC es extremadamente simple! tan sólo hay que instalar el add-on del simulador.&lt;br /&gt;
&lt;br /&gt;
Veamos los pasos:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Descargar el add-on para Firefox desde &lt;a href="https://ftp.mozilla.org/pub/mozilla.org/labs/fxos-simulator/"&gt;App manager add-ons&lt;/a&gt;.&lt;br /&gt;
La versión 2.0 pesa más de 120MB, así que a esperar un poco.&lt;/li&gt;
&lt;br /&gt;
&lt;li&gt;Una vez instalado, es posible acceder al simulador desde el App Manager. Al mismo se llega dando click "botón de menú -&amp;gt; Developer -&amp;gt; App Manager", o bien escribiendo en la barra de navegación la URL about:app-manager&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGBT7pvZauT_ny2q1fiZwcGj9r40m7cQLVucEmn8Mh_VV4UHx2OMd2km8Kuv7wIxbk4R3-Emlve6Bxp8MsT5XY6YkFqeTC44xN5RntjPZwSnK1XtuwATHwJRCvNttxnKzPhanljcmL53lE/s1600/firefoxos-start.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGBT7pvZauT_ny2q1fiZwcGj9r40m7cQLVucEmn8Mh_VV4UHx2OMd2km8Kuv7wIxbk4R3-Emlve6Bxp8MsT5XY6YkFqeTC44xN5RntjPZwSnK1XtuwATHwJRCvNttxnKzPhanljcmL53lE/s1600/firefoxos-start.png" height="285" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;br /&gt;
&lt;li&gt;En el App Manager damos "Start Simulator" y aparecerán en la misma barra los simuladores que tengamos instalados.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1TatNiRpH2JJ_i_kU371OqplfBgi5b9aP0Arl2I10_Md_ILgd0mc4Szq06OkP_R1W1gkJM4BtSOvGpb__9g_XSqsye4JYWO0Zcw8FWLQYv7RqFmijB1xL4CdSD1Feo9FGCHpZozElCFjJ/s1600/firefoxos-simuladores.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1TatNiRpH2JJ_i_kU371OqplfBgi5b9aP0Arl2I10_Md_ILgd0mc4Szq06OkP_R1W1gkJM4BtSOvGpb__9g_XSqsye4JYWO0Zcw8FWLQYv7RqFmijB1xL4CdSD1Feo9FGCHpZozElCFjJ/s1600/firefoxos-simuladores.png" height="26" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;br /&gt;
&lt;li&gt;Clickear el simulador que queramos ejecutar y listo!&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdXqQdikbCe3_4Z3d_S2OhN61AyQHfgrD1lQ4BMVoNXNiW9pPWklTdC4pzFh7e0wA1a_gbjH8qvSkLKG8bF_xmWoHVpGvKpXhvyb6TZ2iZTMjtroh64t1ZjGfoMYqIwDY6gpBC3SHMCHXK/s1600/firefoxos-inicial.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdXqQdikbCe3_4Z3d_S2OhN61AyQHfgrD1lQ4BMVoNXNiW9pPWklTdC4pzFh7e0wA1a_gbjH8qvSkLKG8bF_xmWoHVpGvKpXhvyb6TZ2iZTMjtroh64t1ZjGfoMYqIwDY6gpBC3SHMCHXK/s1600/firefoxos-inicial.png" height="320" width="197" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
Increíblemente simple.&lt;br /&gt;
&lt;br /&gt;
Cabe aclarar que estos pasos funcionan en GNU/Linux, Windows y Mac.&lt;br /&gt;
&lt;br /&gt;
Ahora, si no queremos abrir el firefox para ejecutar el simulador, encontré (mirando la lista de procesos), que se puede acceder ejecutando el siguiente comando (en GNU/Linux) desde la línea de comandos:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
$HOME/.mozilla/firefox/&lt;perfil&gt;/extensions/fxos_2_0_simulator@mozilla.org/b2g/b2g-bin -profile $HOME/.mozilla/firefox/&lt;perfil&gt;/extensions/fxos_2_0_simulator@mozilla.org/profile -start-debugger-server 56807 -no-remote&lt;/perfil&gt;&lt;/perfil&gt;&lt;/blockquote&gt;
En el comando anterior, reemplazar &amp;lt;perfil&amp;gt; por el nombre del directorio del perfil donde el simulador está instalado.&lt;br /&gt;
&lt;br /&gt;
El simulador me demostró ser muy eficiente. Tan sólo consume 128MB de memoria (residente) y funciona muy fluido. Además la integración con el sistema es espectacular.&lt;br /&gt;
&lt;br /&gt;
A probar FirefoxOS y ver que tal se comporta. Hasta donde ví, me gustó. Obviamente la lista de aplicaciones todavía es limitada, pero a medida que vaya ganando popularidad habrá más y más.&lt;br /&gt;
&lt;br /&gt;
Referencia: &lt;a href="https://developer.mozilla.org/en-US/Firefox_OS/Using_the_App_Manager#Configuring_device"&gt;Using the App Manager&lt;/a&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhj5WDyMyVIuLb4wBpjimVchvTjFOTzmRBIH5H8t5Rj7EL9PUOCfzvXcmaEcsVCj1YQXe6aiQIBpNvIpaBe2pTfmxSplZhx80_gV2V5Jl-uDkG_qhxoGcCGZtET4Lhw-8JHNMFCMX85IvcQ/s72-c/firefoxos-logo.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Check Network Device: plugin Nagios para chequear recursos en dispositivos de red</title><link>http://itfreekzone.blogspot.com/2014/10/check-network-device-plugin-nagios-para.html</link><category>administracion</category><category>Nagios</category><category>plugin</category><category>PNP4Nagios</category><category>programacion</category><category>python</category><category>redes</category><category>scripts</category><category>software</category><author>noreply@blogger.com (V3kt0r)</author><pubDate>Thu, 30 Oct 2014 16:28:00 -0300</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-271207292388274566.post-6741685332552504049</guid><description>Desde hace un tiempo vengo trabajando en un plugin para Nagios que me permita chequear recursos básicos de dispositivos de red.
Me focalicé en el monitoreo de dispositivos Cisco, con los cuales trabajo a diario y es mi principal interés, pero la idea es que soporte diversos dispositivos en el futuro.&lt;br /&gt;
&lt;br /&gt;
El plugin permite chequear los siguientes recursos:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Carga de CPU&lt;/li&gt;
&lt;li&gt;Temperaturas&lt;/li&gt;
&lt;li&gt;Estados de los FANs&lt;/li&gt;
&lt;li&gt;Uso de Memoria&lt;/li&gt;
&lt;li&gt;Estado de interfaces de red (up/down)&lt;/li&gt;
&lt;li&gt;Ancho de banda (input y output) en interfaces de red&lt;/li&gt;
&lt;/ul&gt;
Además de chequear el estado (con umbrales warning y critical), también retorna información contabilizable para poder graficar los resultados con &lt;a href="http://itfreekzone.blogspot.com.ar/2014/10/nagios-generar-graficos-con-pnp4nagios.html"&gt;PNP4Nagios&lt;/a&gt; u otros plugins. Los valores posibles de graficar son carga de CPU, memoria, temperatura y ancho de banda de las interfaces.&lt;br /&gt;
&lt;br /&gt;
El monitoreo se realiza por SNMP, por lo cual este protocolo debe estar activo en los dispositivos y aceptar conexiones desde el servidor Nagios. Además, el script utiliza la versión en python de la librería&amp;nbsp;Net-SNMP, la cual se encuentra en los siguientes paquetes:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;python-netsnmp //&amp;nbsp;debian&lt;/li&gt;
&lt;li&gt;net-snmp-python //&amp;nbsp;Red Hat&lt;/li&gt;
&lt;/ul&gt;
Actualmente el proyecto se encuentra en Launchpad y pueden descargar la última versión desde la siguiente dirección:&amp;nbsp;&lt;a href="https://launchpad.net/check-net-device/+download"&gt;https://launchpad.net/check-net-device/+download&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Opciones&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Se proveen varias opciones que pueden resultar abrumantes al principio, pero una vez que se entienden, no son complicadas..&lt;br /&gt;
&lt;br /&gt;
El uso de check_net_device es el siguiente:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
check_net_device -H &amp;lt;ip_address&amp;gt; -C &amp;lt;community&amp;gt; &amp;lt;-t -t device_type | -i interface_ID&amp;gt; [-o check_option] [-w warning] [-c critical] [-P log_path]&lt;/blockquote&gt;
donde las opciones obligatorias son:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;-H; --host &amp;lt;ip_address&amp;gt;: &amp;nbsp;es la IP del host a chequear.&lt;/li&gt;
&lt;li&gt;-C; --community &amp;lt;community&amp;gt;: comunidad SNMP definida en el dispositivo.&lt;/li&gt;
&lt;li&gt;-t; --type &amp;lt;device_type&amp;gt;: tipo de dipositivo a chequear. Los valores permitidos en la versión 0.4 son cisco y bc (de BlueCoat), pero sólo cisco está implementado.&lt;/li&gt;
&lt;li&gt;-i; --interface &amp;lt;interface_id&amp;gt;: se utiliza para chequear estado de interfaces y anchos de banda. El ID dado por el fabricante a la interfaz que se desea chequear. El ID de la interfaz se puede encontrar consultando el OID 1.3.6.1.2.1.31.1.1.1.1 (ifName) con snmpwalk, y sólo la última parte del OID se necesita como parámetro. Ejemplo: snmpwalk -v2c -c &amp;lt;community&amp;gt; &amp;lt;host ip&amp;gt; 1.3.6.1.2.1.31.1.1.1.1&lt;/li&gt;
&lt;li&gt;-o; --option &amp;lt;check_option&amp;gt;: especifica el recurso a chequear.&amp;nbsp;&lt;/li&gt;
Las opciones disponibles son con el argumento -t son:
&lt;ul&gt;
&lt;li&gt;env: check environmental status. On Cisco it includes temperatures and fan status.&lt;/li&gt;
&lt;li&gt;cpu: check status and return CPU load.&lt;/li&gt;
&lt;li&gt;memory: check memory status, and return percentage usage.&lt;/li&gt;
&lt;/ul&gt;
Con el argumento -i, las opciones disponibles son:
&lt;ul&gt;
&lt;li&gt;ifstatus: check the interface status, returning OK or DOWN.&lt;/li&gt;
&lt;li&gt;ifbw: check input/output bandwidth and return usage.&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;-w; --warning &amp;lt;value&amp;gt;: umbral para reportar un warning. Dependiendo del tipo de chequeo, puede ser un porcentaje o un número.&lt;/li&gt;
&lt;li&gt;-c; --critical &amp;lt;value&amp;gt;: umbral para reportar un estado crítico.&amp;nbsp;Dependiendo del tipo de chequeo, puede ser un porcentaje o un número.&lt;/li&gt;
&lt;li&gt;-P; --log-path &amp;lt;path to dir&amp;gt;: necesario para utilizar la opción "-i &amp;lt;interface id&amp;gt; -o ifbw", dado que esta opción necesita un directorio donde guardar los valores de ancho de banda leídos. El usuario que ejecute este comando (usualmente llamado nagios) necesita permiso de escritura en el directorio especificado.&lt;/li&gt;
&lt;/ul&gt;
Nota:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;-t y -i no se usan al mismo tiempo, dado que los chequeos de interfaces son independientes del tipo de dispositivo. Esta opción se puede utililizar para chequear cualquier tipo de dispositivo.&lt;/li&gt;
&lt;li&gt;-w y -c son opcionales, dado que el script posee valores ya definidos para estados de warning y critical.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;b&gt;Ejemplos&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Uso de CPU:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
$ ./check_net_device.py -C public -H 192.168.0.1 -t cisco -o cpu&lt;br /&gt;
OK - &amp;nbsp;CPU Load: 1% | 'CPU Load'=1%;60;80&lt;/blockquote&gt;
Ancho de banda:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
$ ./check_net_device.py -C public -H 192.168.0.1 -i 2 -o ifbw -P /tmp/&lt;br /&gt;
OK - &amp;nbsp;In: 1.08 Mb/s, Out: 1.49 Mb/s | 'In'=1129850B;629145600;83886080 &amp;nbsp;'Out'=1561893B;629145600;83886080&lt;/blockquote&gt;
Estado de interfaces:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
$ ./check_net_device.py&amp;nbsp;-C public -H 192.168.0.1 -i 2,3,4,6&lt;br /&gt;
OK - &amp;nbsp;All Interfaces UP | Gi1/1: Up, Gi1/2: Up, Fa2/1: Up, Fa2/3: Up&lt;/blockquote&gt;
&lt;br /&gt;
Ejemplos de gráficos con PNP4Nagios, a partir de valores retornados por check_net_device:&lt;br /&gt;
&lt;br /&gt;
Ancho de banda:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzxmGDSHoPZcE-zjQo7TC5znfsLH4-8s-LQNA4UgM7l3Me-mvSc3nJb8hVheB3vHvoZXUuUdwN3b6CWMIHywQeAflNdfAaCtNZGkMSUHyQrQdXMaLFcUOMBmf6p5EkllwYY6uo78lXFFJ5/s1600/ancho-de-banda1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzxmGDSHoPZcE-zjQo7TC5znfsLH4-8s-LQNA4UgM7l3Me-mvSc3nJb8hVheB3vHvoZXUuUdwN3b6CWMIHywQeAflNdfAaCtNZGkMSUHyQrQdXMaLFcUOMBmf6p5EkllwYY6uo78lXFFJ5/s1600/ancho-de-banda1.png" height="196" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Carga de CPU:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKD4f4cR-4n_dAaSROsYttJptqG0xhFCvdKEg4a3OWDxIbe4K9vdytxXKrh8IN-Y43zEsa1LxuysqtQomTHxgb3a-T0JCAZyVv5mHQg5AWcBggYPsF_SVhVx5epB9gSYaAjyRKexohSS5e/s1600/uso-cpu.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKD4f4cR-4n_dAaSROsYttJptqG0xhFCvdKEg4a3OWDxIbe4K9vdytxXKrh8IN-Y43zEsa1LxuysqtQomTHxgb3a-T0JCAZyVv5mHQg5AWcBggYPsF_SVhVx5epB9gSYaAjyRKexohSS5e/s1600/uso-cpu.png" height="242" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Otro Plugin?&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Alguno seguramente dirá, ya existen plugins para monitorear equipos de red. Pues si, pero desarrollé este script por tres grandes razones:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;No encontré ningún plugin que realice todo esto junto:&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;Chequeo de estado de&amp;nbsp;CPU, memoria, interfaces, ancho de banda, temperatura y fans.&lt;/li&gt;
&lt;li&gt;Entrega de información de performance para poder graficar los valores obtenidos.&lt;/li&gt;
&lt;li&gt;Sirva para múltiples dispositivos. Los que chequean múltiples tipos de dispositivos, no permiten muchos tipos de chequeos (por ejemplo check_snmp_environment).&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Los plugins que vi están todos escritos en perl, y si bien perl me parece un lenguaje fantástico, se me hace difícil de seguir, con lo cual, me dificulta la posibilidad de agregar funcionalidad a scripts existentes. Creo que un script en python facilitará que muchos lo extiendan, ya que python es más fácil de aprender.&lt;/li&gt;
&lt;li&gt;Me gusta programar =)&lt;/li&gt;
&lt;/ul&gt;
Espero que les sea útil. Si encuentran errores, por favor reportar, trataré de solucionarlos lo más rápido posible.</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzxmGDSHoPZcE-zjQo7TC5znfsLH4-8s-LQNA4UgM7l3Me-mvSc3nJb8hVheB3vHvoZXUuUdwN3b6CWMIHywQeAflNdfAaCtNZGkMSUHyQrQdXMaLFcUOMBmf6p5EkllwYY6uo78lXFFJ5/s72-c/ancho-de-banda1.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">16</thr:total></item><item><title>POODLE Attack (die SSLv3!)</title><link>http://itfreekzone.blogspot.com/2014/10/poodle-attack-die-sslv3.html</link><category>administracion</category><category>hacking</category><category>MiTM</category><category>news</category><category>nmap</category><category>POODLE</category><category>seguridad</category><category>servidores</category><category>SSL/TLS</category><category>SSLyze</category><category>vulnerabilidades</category><author>noreply@blogger.com (V3kt0r)</author><pubDate>Wed, 15 Oct 2014 13:41:00 -0300</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-271207292388274566.post-3802411872094647288</guid><description>Leyendo noticias de seguridad, me topé con este interesante ataque que afecta la versión SSLv3 y permite a un atacante desencriptar porciones de tráfico HTTPS, como por ejemplo cookies.&lt;br /&gt;
&lt;br /&gt;
Últimamente al pobre protocolo no le ha ido muy bien, basta recordar el mortal &lt;a href="http://heartbleed.com/"&gt;Heartbleed&lt;/a&gt;&amp;nbsp;descubierto hace unos meses, y otros ataques como &lt;a href="http://resources.infosecinstitute.com/beast-vs-crime-attack/"&gt;BEAST y CRIME&lt;/a&gt;&amp;nbsp;descubiertos hace un par de años, o&amp;nbsp;&lt;a href="http://www.isg.rhul.ac.uk/tls/TLStiming.pdf"&gt;Lucky-13&lt;/a&gt;, por citar algunos.&lt;br /&gt;
&lt;br /&gt;
Una de las personas que participó en el descubrimiento de esta vulnerabilidad es&amp;nbsp;Thai Duong, quien también participó (junto a Juliano Rizzo) en el descubrimiento de BEAST y CRIME. En este caso, Thai trabajó con otros empleados de Google (Bodo Möller y Krzysztof Kotowicz) para el descubrimiento.&lt;br /&gt;
&lt;br /&gt;
Como mencioné al principio, el ataque afecta sólo a SSLv3, el cual está obsoleto desde hace unos años, pero que todavía es soportado por muchos servidores y browsers por compatibilidad. La versión más actual del protocolo es TLSv1.2, pero los clientes pueden negociar con el servidor una versión inferior del protocolo, en caso de no soportar esta última.&lt;br /&gt;
&lt;br /&gt;
El ataque no es tan directo como Heartbleed, ya que es necesario realizar previamente un ataque Man-in-the-Middle (MiTM). Pero un ataque MiTM no es tan complejo si tenemos acceso a la red de la víctima, o si accedemos a una red WiFi pública (hoteles, bares, etc).&lt;br /&gt;
&lt;br /&gt;
Los detalles del ataque los pueden leer en el &lt;a href="https://www.openssl.org/~bodo/ssl-poodle.pdf"&gt;paper&lt;/a&gt; original, pero básicamente explota la encripción CBC utilizada en SSLv3, debido a la forma en que este algoritmo utiliza los paddings para completar bloques.&lt;br /&gt;
&lt;br /&gt;
Según comentan en el paper, la única forma de evitar este ataque es eliminando el uso de SSLv3. En el mismo, proponen utilizar el mecanismo&amp;nbsp;TLS_FALLBACK_SCSV para la negociación, en clientes y servidores. Utilizando&amp;nbsp;TLS_FALLBACK_SCSV, el servidor siempre utilizará la versión más actual del protocolo habilitada en el mismo, rechazando cualquier intento de conexión con una versión inferior. Obviamente, si el servidor no soporta una versión superior a SSLv3, entonces será vulnerable igual.&lt;br /&gt;
&lt;br /&gt;
Existen varios mecanismos para averiguar qué versiones de SSL/TLS soporta un servidor. Les dejo un par para que verifiquen sus servidores.&lt;br /&gt;
&lt;br /&gt;
Una forma simple, es utilizar la capacidad de ejecución de scripts de NMAP, el cual todo administrador de seguridad tiene instalado:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
$ nmap --script ssl-enum-ciphers -p 443 &amp;lt;IP Servidor&amp;gt;&lt;/blockquote&gt;
Algo más avanzado es utilizar una herramienta dedicada a chequear conexiones SSL, denominada &lt;a href="https://github.com/iSECPartners/sslyze"&gt;SSLyze&lt;/a&gt;, la cual pueden descargar &lt;a href="https://github.com/iSECPartners/sslyze/releases"&gt;aquí&lt;/a&gt;. Esta herramienta está escrita en python y se puede ejecutar sin instalarse:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
$ python sslyze.py --regular &amp;lt;IP Servidor&amp;gt;:443&lt;/blockquote&gt;
Finalmente y también muy interesante, es la herramienta web provista por Qualys, la cual chequea múltiples vulnerabilidades SSL, así como lista los protocolos soportados y genera un reporte. La misma se accede &lt;a href="https://www.ssllabs.com/ssltest/index.html"&gt;aquí&lt;/a&gt;.</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><enclosure length="1274369" type="application/pdf" url="http://www.isg.rhul.ac.uk/tls/TLStiming.pdf"/><itunes:explicit>no</itunes:explicit><itunes:subtitle>Leyendo noticias de seguridad, me topé con este interesante ataque que afecta la versión SSLv3 y permite a un atacante desencriptar porciones de tráfico HTTPS, como por ejemplo cookies. Últimamente al pobre protocolo no le ha ido muy bien, basta recordar el mortal Heartbleed&amp;nbsp;descubierto hace unos meses, y otros ataques como BEAST y CRIME&amp;nbsp;descubiertos hace un par de años, o&amp;nbsp;Lucky-13, por citar algunos. Una de las personas que participó en el descubrimiento de esta vulnerabilidad es&amp;nbsp;Thai Duong, quien también participó (junto a Juliano Rizzo) en el descubrimiento de BEAST y CRIME. En este caso, Thai trabajó con otros empleados de Google (Bodo Möller y Krzysztof Kotowicz) para el descubrimiento. Como mencioné al principio, el ataque afecta sólo a SSLv3, el cual está obsoleto desde hace unos años, pero que todavía es soportado por muchos servidores y browsers por compatibilidad. La versión más actual del protocolo es TLSv1.2, pero los clientes pueden negociar con el servidor una versión inferior del protocolo, en caso de no soportar esta última. El ataque no es tan directo como Heartbleed, ya que es necesario realizar previamente un ataque Man-in-the-Middle (MiTM). Pero un ataque MiTM no es tan complejo si tenemos acceso a la red de la víctima, o si accedemos a una red WiFi pública (hoteles, bares, etc). Los detalles del ataque los pueden leer en el paper original, pero básicamente explota la encripción CBC utilizada en SSLv3, debido a la forma en que este algoritmo utiliza los paddings para completar bloques. Según comentan en el paper, la única forma de evitar este ataque es eliminando el uso de SSLv3. En el mismo, proponen utilizar el mecanismo&amp;nbsp;TLS_FALLBACK_SCSV para la negociación, en clientes y servidores. Utilizando&amp;nbsp;TLS_FALLBACK_SCSV, el servidor siempre utilizará la versión más actual del protocolo habilitada en el mismo, rechazando cualquier intento de conexión con una versión inferior. Obviamente, si el servidor no soporta una versión superior a SSLv3, entonces será vulnerable igual. Existen varios mecanismos para averiguar qué versiones de SSL/TLS soporta un servidor. Les dejo un par para que verifiquen sus servidores. Una forma simple, es utilizar la capacidad de ejecución de scripts de NMAP, el cual todo administrador de seguridad tiene instalado: $ nmap --script ssl-enum-ciphers -p 443 &amp;lt;IP Servidor&amp;gt; Algo más avanzado es utilizar una herramienta dedicada a chequear conexiones SSL, denominada SSLyze, la cual pueden descargar aquí. Esta herramienta está escrita en python y se puede ejecutar sin instalarse: $ python sslyze.py --regular &amp;lt;IP Servidor&amp;gt;:443 Finalmente y también muy interesante, es la herramienta web provista por Qualys, la cual chequea múltiples vulnerabilidades SSL, así como lista los protocolos soportados y genera un reporte. La misma se accede aquí.</itunes:subtitle><itunes:author>noreply@blogger.com (V3kt0r)</itunes:author><itunes:summary>Leyendo noticias de seguridad, me topé con este interesante ataque que afecta la versión SSLv3 y permite a un atacante desencriptar porciones de tráfico HTTPS, como por ejemplo cookies. Últimamente al pobre protocolo no le ha ido muy bien, basta recordar el mortal Heartbleed&amp;nbsp;descubierto hace unos meses, y otros ataques como BEAST y CRIME&amp;nbsp;descubiertos hace un par de años, o&amp;nbsp;Lucky-13, por citar algunos. Una de las personas que participó en el descubrimiento de esta vulnerabilidad es&amp;nbsp;Thai Duong, quien también participó (junto a Juliano Rizzo) en el descubrimiento de BEAST y CRIME. En este caso, Thai trabajó con otros empleados de Google (Bodo Möller y Krzysztof Kotowicz) para el descubrimiento. Como mencioné al principio, el ataque afecta sólo a SSLv3, el cual está obsoleto desde hace unos años, pero que todavía es soportado por muchos servidores y browsers por compatibilidad. La versión más actual del protocolo es TLSv1.2, pero los clientes pueden negociar con el servidor una versión inferior del protocolo, en caso de no soportar esta última. El ataque no es tan directo como Heartbleed, ya que es necesario realizar previamente un ataque Man-in-the-Middle (MiTM). Pero un ataque MiTM no es tan complejo si tenemos acceso a la red de la víctima, o si accedemos a una red WiFi pública (hoteles, bares, etc). Los detalles del ataque los pueden leer en el paper original, pero básicamente explota la encripción CBC utilizada en SSLv3, debido a la forma en que este algoritmo utiliza los paddings para completar bloques. Según comentan en el paper, la única forma de evitar este ataque es eliminando el uso de SSLv3. En el mismo, proponen utilizar el mecanismo&amp;nbsp;TLS_FALLBACK_SCSV para la negociación, en clientes y servidores. Utilizando&amp;nbsp;TLS_FALLBACK_SCSV, el servidor siempre utilizará la versión más actual del protocolo habilitada en el mismo, rechazando cualquier intento de conexión con una versión inferior. Obviamente, si el servidor no soporta una versión superior a SSLv3, entonces será vulnerable igual. Existen varios mecanismos para averiguar qué versiones de SSL/TLS soporta un servidor. Les dejo un par para que verifiquen sus servidores. Una forma simple, es utilizar la capacidad de ejecución de scripts de NMAP, el cual todo administrador de seguridad tiene instalado: $ nmap --script ssl-enum-ciphers -p 443 &amp;lt;IP Servidor&amp;gt; Algo más avanzado es utilizar una herramienta dedicada a chequear conexiones SSL, denominada SSLyze, la cual pueden descargar aquí. Esta herramienta está escrita en python y se puede ejecutar sin instalarse: $ python sslyze.py --regular &amp;lt;IP Servidor&amp;gt;:443 Finalmente y también muy interesante, es la herramienta web provista por Qualys, la cual chequea múltiples vulnerabilidades SSL, así como lista los protocolos soportados y genera un reporte. La misma se accede aquí.</itunes:summary><itunes:keywords>administracion, hacking, MiTM, news, nmap, POODLE, seguridad, servidores, SSL/TLS, SSLyze, vulnerabilidades</itunes:keywords></item><item><title>Nagios: generar gráficos con PNP4Nagios</title><link>http://itfreekzone.blogspot.com/2014/10/nagios-generar-graficos-con-pnp4nagios.html</link><category>administracion</category><category>articulos</category><category>debian</category><category>GNU/Linux</category><category>monitoreo</category><category>Nagios</category><category>PNP4Nagios</category><category>redes</category><author>noreply@blogger.com (V3kt0r)</author><pubDate>Wed, 8 Oct 2014 12:07:00 -0300</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-271207292388274566.post-6824142463386903693</guid><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwFUr43LHvipxM_KNnuXXNsHrjCxH_Sb9gJLLcdCkx5AjpBV_LqEwvykIxUy1IRoRk5a10zxu2lTqOvdkRVD5p0hUFJtcoCluR7QScZA5mFhs845EkQ2dv5v9ZuoSsBcheiTWYxQRfXVu_/s1600/pnp4nagios-logo.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwFUr43LHvipxM_KNnuXXNsHrjCxH_Sb9gJLLcdCkx5AjpBV_LqEwvykIxUy1IRoRk5a10zxu2lTqOvdkRVD5p0hUFJtcoCluR7QScZA5mFhs845EkQ2dv5v9ZuoSsBcheiTWYxQRfXVu_/s1600/pnp4nagios-logo.jpg" height="82" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
Hace tiempo que estoy trabajando con Nagios y MRTG, como pudieron observar en &lt;a href="http://itfreekzone.blogspot.com.ar/2013/03/nagios-monitoreo-remoto-de-dispositivos.html"&gt;Nagios: monitoreo remoto de dispositivos + agentes Linux + agentes Windows&lt;/a&gt;, y &amp;nbsp;&lt;a href="http://itfreekzone.blogspot.com.ar/2014/03/monitoreo-de-ancho-de-banda-en.html"&gt;Monitoreo de ancho de banda en routers/switches/etc usando MRTG&lt;/a&gt;. Ambas herramientas me resultaron excelentes y me ayudan mucho en el monitoreo diario de la infraestructura de red.&lt;br /&gt;
Desde hace un tiempo vengo buscando la forma de integrar más gráficos en Nagios, y me pareció interesante utilizar MRTG para hacerlo. Esto es perfectamente posible y hasta comencé a trabajar en ello, pero luego descubrí PNP4Nagios y cambié la perspectiva.&lt;br /&gt;
&lt;br /&gt;
Tal como cita la página oficinal:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
PNP es un addon para Nagios que analiza datos de performance (performance data) provistos por los plugins y los almacena en bases de datos RRD.&lt;/blockquote&gt;
Oye, eso suena similar a lo que MRTG hace. Pues claro, el acercamiento es similar, almacenar datos en bases de datos RRD y luego graficar a partir de ellos utilizando rrdtool. De forma similar trabajan Ntop y otras herramientas.&lt;br /&gt;
&lt;br /&gt;
PNP4Nagios tiene una interfaz web muy atractiva y simple de usar, permitiendo seleccionar intervalos de tiempo de forma dinámica, navegar fácilmente entre servicios de hosts, y generar reportes en PDF. Tal vez una de las características más interesantes es la posibilidad de definir templates propios para indicarle la forma de evaluar y generar los gráficos. Dado que trabaja directamente con RRDTool, brinda todas las facilidades de graficación que esta herramienta provee.&lt;br /&gt;
&lt;br /&gt;
Cabe destacar que para poder graficar datos, los plugins deben retornar información en el campo performance_data, y no todos los plugins lo hacen. Por suerte, quienes diseñan buenos plugins si entregan datos de performance. Estos datos deben tener un formato especial para que PNP pueda parsearlos y almacenarlos, pero esa discusión la dejaré para algún artículo sobre creación de plugins.&lt;br /&gt;
Para saber fácilmente si un plugin entrega datos de performance, pueden ejecutarlo desde la consola y ver si incluye el caracter pipe "|" en el resultado impreso. Todo lo que venga luego del pipe son datos de performance. Por ejemplo:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&amp;nbsp; $./check_icmp -H 10.6.143.101&lt;br /&gt;&amp;nbsp; OK - 10.6.143.101: rta 1,593ms, lost 0%|rta=1,593ms;200,000;500,000;0; pl=0%;40;80;; rtmax=4,541ms;;;; rtmin=0,832ms;;;;&lt;/blockquote&gt;
Este plugin entrega 4 datos de performance:&lt;br /&gt;
&amp;nbsp; - rta: tiempo de respuesta,&lt;br /&gt;
&amp;nbsp; - pl: porcentaje de pérdida de paquetes,&lt;br /&gt;
&amp;nbsp; - rtmax: tiempo máximo de respuesta,&lt;br /&gt;
&amp;nbsp; - rtmin: tiempo mínimo de respuesta.&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Integración con Nagios&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
PNP4Nagios provee varios modos de integrarse con Nagios, cada uno con sus ventajas y desventajas:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Synchronous: cada vez que Nagios ejecuta un plugin, luego llama el script process_perfdata.pl para actualizar los valores de la base de datos RRD y el archivo XML correspondiente. La mayor desventaja de esta forma de integración es que Nagios ejecuta process_perfdata.pl cada vez que realiza un check de host o servicio.&lt;/li&gt;
&lt;li&gt;Bulk: este modo permite realizar múltiples actualizaciones de datos de performance juntos. Nagios escribe en un archivo temporal los datos obtenidos en cada check, y a intervalos definidos, Nagios ejecuta el script process_perfdata.pl.&lt;/li&gt;
&lt;li&gt;Bulk with NPCD: desde el punto de vista de Nagios, es la mejor opción, dado que se independiza de la ejecución del script process_perfdata.pl. La ejecución de script queda a cargo del demonio NPCD (Nagios Performance C Daemon), el cual monitorea un directorio, donde deben ubicarse los datos de performance, a la espera de que un archivo sea creado. De esta forma, Nagios se encarga de guardar los datos de la ejecución de los plugins en archivos y luego mover los archivos al directorio donde los tomará NPCD.&lt;/li&gt;
&lt;li&gt;Bulk with NPCD and npcdmod: el flujo de datos es igual a Bulk with NPCD, con la diferencia que simplifica la configuración de Nagios, ya que las definiciones de cómo procesar los datos se dejan al módulo npcdmod. El uso de este módulo se realiza definiendo un broker en la configuración de Nagios. Debe tenerse en cuenta que este modo no funciona con Nagios 4.&lt;/li&gt;
&lt;li&gt;Gearman: se utiliza el módulo Gearman como agente intermediario entre Nagios y el procesamiento de los datos. Nagios se encarga de generar los datos y mod_gearman (broker para Nagios) se encarga de encolarlos para su procesamiento, utilizando el demonio gearmand. Luego el script process_perfdata.pl escanea esta cola en busca de datos. La mayor ventaja de este modo es que Nagios y PNP4Nagios pueden ejecutarse en máquinas distintas, ya que la conexión de Nagios con Gearman es a través de sockets. Además Gearman funciona con workers y puede tener múltiples workers trabajando a la vez. Este modo es el ideal para instalaciones de Nagios con hosts y servicios.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
De las opciones listadas, elegí utilizar el modo Bulk with NPCD y npcdmod, dado lo fácil que es ponerlo en funcionamiento, y las ventajas que provee sobre el modo Synchronous. Si algún día utilizan Nagios 4, deberían utilizar otra opción como Bulk with NPCD o Gearman.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2Nq6BI1mQmgazxvzZz2iNmQMmr0GioVS7l0-mOlj5_csrmZ3Ro1JD7njefx-9Gb4kSP63u-75s8S-9tgmvv6A4GWfqW3MFV11k5icjeGsJItDuvsvvRGsrazOEvve4wDVGdz0ifE961p8/s1600/pnp4nagios-bulk-npcdmod.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2Nq6BI1mQmgazxvzZz2iNmQMmr0GioVS7l0-mOlj5_csrmZ3Ro1JD7njefx-9Gb4kSP63u-75s8S-9tgmvv6A4GWfqW3MFV11k5icjeGsJItDuvsvvRGsrazOEvve4wDVGdz0ifE961p8/s1600/pnp4nagios-bulk-npcdmod.png" height="313" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Instalación y Configuración&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Instalar PNP4Nagios en debian y derivados es tan simple como ejecutar:&lt;br /&gt;
&amp;nbsp; # apt-get install pnp4nagios rrdtool&lt;br /&gt;
Existen paquetes para otras distribuciones como CentOS.&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
Luego de instalarlo, para integrarlo con Nagios utilizando el modo Bulk with NPCD y npcdmod, debe realizarse los siguientes pasos.&lt;br /&gt;
&lt;br /&gt;
Setear la variable RUN en yes, en el archivo /etc/default/npcd, para habilitar en demonio NPCD.&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
RUN=yes&lt;/blockquote&gt;
Editar el archivo /etc/nagios3/nagios.cfg de la siguiente manera:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
# Habilita el procesamiento de datos de performance entregados por los plugins de chequeo&lt;br /&gt;process_performance_data=1&lt;br /&gt;# Hacer que Nagios comparta su información con la librería npcdmod&lt;br /&gt;broker_module=/usr/lib/pnp4nagios/npcdmod.o config_file=/etc/pnp4nagios/npcd.cfg&lt;/blockquote&gt;
Recargar Nagios:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
/etc/init.d/nagios3 reload&lt;/blockquote&gt;
Gualá, ya está la integración, eso fue fácil.&lt;br /&gt;
&lt;br /&gt;
Por defecto, PNP4Nagios se habilita en un directorio web distinto al de Nagios. Los gráficos se acceden apuntando a las siguientes direcciones:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
http://&amp;lt;nombre servidor&amp;gt;/pnp4nagios/pnp4nagios/graph?host=&amp;lt;nombre del host&amp;gt;&lt;br /&gt;http://&amp;lt;nombre servidor&amp;gt;/pnp4nagios/pnp4nagios/graph?host=&amp;lt;nombre del host&amp;gt;&amp;amp;srv=&amp;lt;descripción del servicio&amp;gt;&lt;/blockquote&gt;
Como nombre de host debe utilizarse el nombre que se utilizó para definirlo en Nagios.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaL-2p8U8enVYZcSeXuNFZoVJ3Vu7yvuefROfFWLkkZJMm1I0-suAyR8i2kpIFMGP8icUGtH6JiNBS5_JEnc85TzInwcREbnkIDgHkkd0g0Gm4AVvtCGLyIbqbQc-mSevyKZDZIlmcnzE-/s1600/pnp4nagios-cpuload.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaL-2p8U8enVYZcSeXuNFZoVJ3Vu7yvuefROfFWLkkZJMm1I0-suAyR8i2kpIFMGP8icUGtH6JiNBS5_JEnc85TzInwcREbnkIDgHkkd0g0Gm4AVvtCGLyIbqbQc-mSevyKZDZIlmcnzE-/s1600/pnp4nagios-cpuload.png" height="213" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Una forma más directa de acceder a los gráficos, es agregar el link como un action_url en la definición de hosts en Nagios. El camino fácil es definir nuevos templates para hosts y servicios, de la siguiente manera:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
define host {&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp;use&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;generic-host&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp;name&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;pnp-host&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp;action_url&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;/pnp4nagios/index.php/graph?host=$HOSTNAME$&amp;amp;srv=_HOST_&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp;register&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;0&lt;br /&gt;}&lt;br /&gt;define service {&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp;name&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;pnp-service&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp;action_url&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;/pnp4nagios/index.php/graph?host=$HOSTNAME$&amp;amp;srv=$SERVICEDESC$&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp;register&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;0&lt;br /&gt;}&lt;/blockquote&gt;
Luego, para cada host o servicio que se desee ver gráficos, simplemente agregar pnp-host y pnp-service en la definición de hosts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Pensamientos Finales&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
A diferencia de MRTG que utiliza consultas SNMP para obtener sus datos, PNP4Nagios utiliza los datos entregados por los plugins de Nagios... los cuales pueden sacar datos por SNMP o de muchas otras maneras. Esta funcionalidad me resultó mucho más abarcativa, y ya que igualmente necesito Nagios y estoy obteniendo datos con sus plugins, por qué no aprovecharlos para generar los gráficos.&lt;br /&gt;
Claro que es posible obtener con MRTG datos de otras fuentes que no sea SNMP, MRTG es muy flexible. Sería posible llegar a resultados similares a los obtenidos con Nagios y PNP, pero de una forma más laboriosa. No estoy diciendo que esta solución reemplace MRTG, sino que me parece mucho más completa. La elección de utilizar una u otra es de cada administrador.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Referencias&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://docs.pnp4nagios.org/pnp-0.6/"&gt;PNP4Nagios Documentation&lt;/a&gt;&lt;br /&gt;
- Archivo /usr/share/doc/pnp4nagios/README.Debian</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwFUr43LHvipxM_KNnuXXNsHrjCxH_Sb9gJLLcdCkx5AjpBV_LqEwvykIxUy1IRoRk5a10zxu2lTqOvdkRVD5p0hUFJtcoCluR7QScZA5mFhs845EkQ2dv5v9ZuoSsBcheiTWYxQRfXVu_/s72-c/pnp4nagios-logo.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Obtener uso de CPU y memoria, temperatura y estado de interfaces de dispositivos Cisco, utilizando SNMP</title><link>http://itfreekzone.blogspot.com/2014/09/obtener-uso-de-cpu-y-memoria.html</link><category>administracion</category><category>articulos</category><category>Catalyst</category><category>Catalyst 2950</category><category>Catalyst 4500</category><category>cisco</category><category>MIBs</category><category>monitoreo</category><category>OIDs</category><category>redes</category><category>SNMP</category><category>snmpwalk</category><category>switches</category><author>noreply@blogger.com (V3kt0r)</author><pubDate>Thu, 18 Sep 2014 16:56:00 -0300</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-271207292388274566.post-3794092086821904154</guid><description>Continuando con la labor de monitorear el estado de dispositivos conectados a la red, decidí profundizar en el control de equipamiento Cisco. Para ello, recurrí al viejo pero muy vigente y útil protocolo SNMP. Los dispositivos Cisco, como la gran mayoría de los dispositivos de red, proveen información detallada a través de SNMP. El problema es que entre tanta información provista, uno se puede marear y perder lo que le interesa conocer.&lt;br /&gt;
&lt;br /&gt;
Dado que no encontré mucha información que detalle cómo monitorear e interpretar la información de los recursos más importantes (si encontré pedazos de información por separado), decidí investigar y armar documentación propia. Distintas páginas de Cisco proveen información, pero dan por asumido que conocemos relativamente bien la información provista. Lo único que me resultó realmente útil es el navegador de objetos SNMP (http://tools.cisco.com/Support/SNMP/do/BrowseOID.do?local=en). En base a este último pude recopilar y armar las consultas que yo requería.&lt;br /&gt;
&lt;br /&gt;
Yendo al grano, con la información provista en este artículo podrán no sólo saber cómo obtener por SNMP información del estado de los recursos del dispositivo, sino también entender los valores obtenidos.&lt;br /&gt;
&lt;br /&gt;
Me centraré en obtener la información listada a continuación, la cual abarca todo lo necesario para conocer el estado de un dispositivo:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
- Estado de las interfaces de red del dispositivo.&lt;br /&gt;
- Uso de CPU.&lt;br /&gt;
- Temperatura del chasis, y/u otra información provista por los sensores que el equipo posea.&lt;br /&gt;
- Uso de memoria.&lt;/blockquote&gt;
En el artículo me centraré en describir los OIDs necesarios para obtener la información listada. Los ejemplos los haré utilizando snmpwalk como herramienta de consulta. Esta misma información se puede obtener con distintos clientes snmp, snmpwalk es sólo uno de ellos, muy versátil y completo. Una vez que se conocen los OIDs y la información provista, es muy fácil automatizar el monitoreo con herramientas como Nagios, o scripts propios. Dejaré la integración con Nagios para otro artículo :D&lt;br /&gt;
&lt;br /&gt;
Si les interesa el monitoreo de redes, pueden encontrar más información al respecto en mis anteriores artículos:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
- &lt;a href="http://itfreekzone.blogspot.com.ar/2013/03/nagios-monitoreo-remoto-de-dispositivos.html"&gt;Nagios: monitoreo remoto de dispositivos + agentes Linux + agentes Windows&lt;/a&gt;&lt;br /&gt;
- &lt;a href="http://itfreekzone.blogspot.com.ar/2014/03/monitoreo-de-ancho-de-banda-en.html"&gt;Monitoreo de ancho de banda en routers/switches/etc usando MRTG&lt;/a&gt;&lt;br /&gt;
- &lt;a href="http://itfreekzone.blogspot.com.ar/2011/09/armar-servidor-de-logging-con-rsyslog-y.html"&gt;Armar servidor de logging con rsyslog y configurar dispositivos para logging remoto&lt;/a&gt;&lt;br /&gt;
- &lt;a href="http://itfreekzone.blogspot.com.ar/2014/06/instalar-zabbix-en-debian-gnulinux.html"&gt;Instalar Zabbix en Debian GNU/Linux&lt;/a&gt;&lt;/blockquote&gt;
&lt;br /&gt;
&lt;b&gt;Estado de Interfaces&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Hay ciertas interfaces que son muy interesantes para monitorear, dado que ello nos permitirá saber si un equipo importante perdió la conexión. Interfaces de este tipo pueden ser uplinks entre edificios, conexiones a servidores, enlaces a la WAN, etc.&lt;br /&gt;
&lt;br /&gt;
El OID utilizado para ver el estado de las interfaces es el 1.3.6.1.2.1.2.2.1.8 (objeto ifOperStatus), descripto como "The current operational state of the interface". Este OID contiene una entrada por cada interfaz presente en el switch.&lt;br /&gt;
Por ejemplo, al realizar un walk en un 2950, obtenemos la siguiente información:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
$ snmpwalk -v2c -c public 192.168.1.100 -On &amp;nbsp;1.3.6.1.2.1.2.2.1.8&lt;br /&gt;
.1.3.6.1.2.1.2.2.1.8.1 = INTEGER: up(1)&lt;br /&gt;
.1.3.6.1.2.1.2.2.1.8.2 = INTEGER: down(2)&lt;br /&gt;
.1.3.6.1.2.1.2.2.1.8.3 = INTEGER: down(2)&lt;br /&gt;
...&lt;br /&gt;
...&lt;/blockquote&gt;
Ok, esto nos da el estado de las interfaces... pero cómo sabemos cuál interfaz es cada una? Para esto existe el OID 1.3.6.1.2.1.2.2.1.2 (objeto ifDescr), que contiene información de la interfaz. En el ejemplo anterior, la consulta de este OID nos dará lo siguiente:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
$ snmpwalk -v2c -c public 192.168.1.100 -On &amp;nbsp;1.3.6.1.2.1.2.2.1.2&lt;br /&gt;
.1.3.6.1.2.1.2.2.1.2.1 = STRING: FastEthernet0/1&lt;br /&gt;
.1.3.6.1.2.1.2.2.1.2.2 = STRING: FastEthernet0/2&lt;br /&gt;
.1.3.6.1.2.1.2.2.1.2.3 = STRING: FastEthernet0/3&lt;br /&gt;
...&lt;/blockquote&gt;
Ahora si, ya sabemos que el OID 1.3.6.1.2.1.2.2.1.8.1 representa el estado de la interfaz FastEthernet0/1, el 1.3.6.1.2.1.2.2.1.2.3 la Fa0/3, etc. Para cada interfaz que se desee monitorear, deberá consultarse primero la descripción de la misma, así sabemos con cuál OID se relaciona.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Uso de CPU&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Cisco almacena distintos valores para el uso de CPU, utilizando distintos períodos de tiempo. Los OIDs son:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;1.3.6.1.4.1.9.9.109.1.1.1.1.10 (cpmCPUTotalMonIntervalValue): uso de CPU en el intervalo especificado por 1.3.6.1.4.1.9.9.109.1.1.1.1.9 (cpmCPUMonInterval). El intervalo suele ser 5 segundos, y este OID es el que debe utilizarse en lugar de cpmCPUTotal5sec y cpmCPUTotal5secRev, ya en desuso.&lt;/li&gt;
&lt;li&gt;1.3.6.1.4.1.9.9.109.1.1.1.1.7 (cpmCPUTotal1minRev): uso en el último minuto. Anteriormente se utilizaba cpmCPUTotal1min.&lt;/li&gt;
&lt;li&gt;1.3.6.1.4.1.9.9.109.1.1.1.1.8 (cpmCPUTotal5minRev): uso en los últimos cinco minutos. Debe utilizarse en lugar de cpmCPUTotal5min.&lt;/li&gt;
&lt;/ul&gt;
La empresa recomienda utilizar cpmCPUTotal5minRev, dado que representa la mejor estimación de uso.&lt;br /&gt;
Todos estos valores representan porcentaje de uso y van de 0 a 100.&lt;br /&gt;
&lt;br /&gt;
Ejemplo de consulta del valor de carga de CPU en los últimos 5 minutos es el siguiente:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
$ snmpwalk -v2c -c public 192.168.1.100 -On &amp;nbsp;1.3.6.1.4.1.9.9.109.1.1.1.1.8&lt;br /&gt;
.1.3.6.1.4.1.9.9.109.1.1.1.1.8.1 = Gauge32: 6&lt;/blockquote&gt;
es decir, la carga es de 6%.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.cisco.com/c/en/us/support/docs/ip/simple-network-management-protocol-snmp/15215-collect-cpu-util-snmp.html"&gt;En la página How to Collect CPU Utilization on Cisco IOS Devices Using SNMP&lt;/a&gt;&amp;nbsp;se explica bien como obtener información del uso de CPU.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Sensores (midiendo temperatura y estado de fans)&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Existen varios sensores en los dispositivos que permiten medir diferentes valores, como la temperatura del chasis y el funcionamiento de los fans. Los valores de los sensores se almacenan en el objeto 1.3.6.1.4.1.9.9.91.1.1.1.1.4 (entSensorValue).&lt;br /&gt;
Por ejemplo, accediendo los valores de los sensores en un 4500 obtendremos algo así:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
$ snmpwalk -v2c -c public 192.168.1.200 -On 1.3.6.1.4.1.9.9.91.1.1.1.1.4&lt;br /&gt;
.1.3.6.1.4.1.9.9.91.1.1.1.1.4.9 = INTEGER: 35&lt;br /&gt;
.1.3.6.1.4.1.9.9.91.1.1.1.1.4.15 = INTEGER: 1&lt;br /&gt;
.1.3.6.1.4.1.9.9.91.1.1.1.1.4.18 = INTEGER: 2&lt;/blockquote&gt;
Este objeto contiene entradas indexadas según el índice físico de cada entidad (en este caso, el sensor es la entidad). Para saber a qué entidad refiere cada índice, se puede consultar el objeto 1.3.6.1.2.1.47.1.1.1.1.2 (entPhysicalDescr), el cual describe cada entidad física.&lt;br /&gt;
En el ejemplo anterior, podemos ver lo siguiente al consultar este objeto:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
$ snmpwalk -v2c -c public 192.168.1.200 -On 1.3.6.1.2.1.47.1.1.1.1.2&lt;br /&gt;
...&lt;br /&gt;
.1.3.6.1.2.1.47.1.1.1.1.2.9 = STRING: "Chassis Temperature Sensor"&lt;br /&gt;
...&lt;br /&gt;
.1.3.6.1.2.1.47.1.1.1.1.2.15 = STRING: "Power Supply Fan Sensor"&lt;br /&gt;
...&lt;br /&gt;
.1.3.6.1.2.1.47.1.1.1.1.2.18 = STRING: "Power Supply Fan Sensor"&lt;/blockquote&gt;
Es decir, los valores obtenidos anteriormente son la temperatura del chasis y el estado de los fans de las fuentes.&lt;br /&gt;
Ahora, qué significan esos valores? en qué unidades están representados? Bueno, para esto necesitamos consultar ooootro objeto, el 1.3.6.1.4.1.9.9.91.1.1.1.1.1 (entSensorType), que nos indica de qué tipo es cada sensor:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
.1.3.6.1.4.1.9.9.91.1.1.1.1.1.9 = INTEGER: 8&lt;br /&gt;
.1.3.6.1.4.1.9.9.91.1.1.1.1.1.15 = INTEGER: 12&lt;br /&gt;
.1.3.6.1.4.1.9.9.91.1.1.1.1.1.18 = INTEGER: 12&lt;/blockquote&gt;
Cisco tiene predefinidos estos valores en una tabla, la cual se puede encontrar en su página. La tabla indica lo siguiente:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
1:other&lt;br /&gt;
2:unknown&lt;br /&gt;
3:voltsAC&lt;br /&gt;
4:voltsDC&lt;br /&gt;
5:amperes&lt;br /&gt;
6:watts&lt;br /&gt;
7:hertz&lt;br /&gt;
8:celsius&lt;br /&gt;
9:percentRH&lt;br /&gt;
10:rpm&lt;br /&gt;
11:cmm&lt;br /&gt;
12:truthvalue&lt;br /&gt;
13:specialEnum&lt;br /&gt;
14:dBm&lt;/blockquote&gt;
Con esto sabemos que el primer sensor mide grados celsius (valor 8), y los otros dos otorgan un valor booleano (12). Pero qué significan los valores 1 y 2? cuál es verdadero y cuál es falso? Consultando la página de Cisco, encontramos lo siguiente:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
other(1): a measure other than those listed below&lt;br /&gt;
unknown(2): unknown measurement, or&lt;br /&gt;
arbitrary, relative numbers&lt;br /&gt;
voltsAC(3): electric potential&lt;br /&gt;
voltsDC(4): electric potential&lt;br /&gt;
amperes(5): electric current&lt;br /&gt;
watts(6): power&lt;br /&gt;
hertz(7): frequency&lt;br /&gt;
celsius(8): temperature&lt;br /&gt;
percentRH(9): percent relative humidity&lt;br /&gt;
rpm(10): shaft revolutions per minute&lt;br /&gt;
cmm(11),: cubic meters per minute (airflow)&lt;br /&gt;
truthvalue(12): value takes { true(1), false(2) }&lt;br /&gt;
specialEnum(13): value takes user defined enumerated values&lt;br /&gt;
dBm(14): dB relative to 1mW of power&lt;/blockquote&gt;
Gracias a esta última información, ahora sabemos que 1 es verdadero, y 2 es falso. Es decir, el Fan 1 funciona bien, mientras que el 2 no.&lt;br /&gt;
&lt;br /&gt;
Juntando todo este meollo de consultas, ahora sabemos lo siguiente:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;El switch posee 3 sensores.&lt;/li&gt;
&lt;li&gt;El primero mide la temperatura del chasis, la cual en este momento es de 35º&lt;/li&gt;
&lt;li&gt;Los otros dos sensores chequean el estado de los fans de las fuentes, estando el primer fan funcionando bien y el segundo no.&lt;/li&gt;
&lt;/ul&gt;
&amp;nbsp; &lt;br /&gt;
&lt;b&gt;Uso de Memoria&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Es posible ver el uso de memoria de los dispositivos, así como la cantidad de memoria libre, accediendo al objeto 1.3.6.1.4.1.9.9.48 (ciscoMemoryPoolMIB). Cisco divide la memoria en pools, según su uso. Los tipos de pools predefinidos son:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
1: &amp;nbsp;processor memory&lt;br /&gt;
2: &amp;nbsp;i/o memory&lt;br /&gt;
3: &amp;nbsp;pci memory&lt;br /&gt;
4: &amp;nbsp;fast memory&lt;br /&gt;
5: &amp;nbsp;multibus memory&lt;/blockquote&gt;
Además, los pools pueden ser categorizados en dinámicos o predefinidos. De los listados anteriormente, sólo el tipo processor debe ser soportado por todos los dispositivos.&lt;br /&gt;
Ejemplo de valores obtenidos en un 2950:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
$ snmpwalk -v2c -c public 192.168.1.100 -On 1.3.6.1.4.1.9.9.48&lt;br /&gt;
.1.3.6.1.4.1.9.9.48.1.1.1.2.1 = STRING: "Processor"&lt;br /&gt;
.1.3.6.1.4.1.9.9.48.1.1.1.2.2 = STRING: "I/O"&lt;br /&gt;
.1.3.6.1.4.1.9.9.48.1.1.1.3.1 = INTEGER: 2&lt;br /&gt;
.1.3.6.1.4.1.9.9.48.1.1.1.3.2 = INTEGER: 0&lt;br /&gt;
.1.3.6.1.4.1.9.9.48.1.1.1.4.1 = INTEGER: 1&lt;br /&gt;
.1.3.6.1.4.1.9.9.48.1.1.1.4.2 = INTEGER: 1&lt;br /&gt;
.1.3.6.1.4.1.9.9.48.1.1.1.5.1 = Gauge32: 2417476&lt;br /&gt;
.1.3.6.1.4.1.9.9.48.1.1.1.5.2 = Gauge32: 687872&lt;br /&gt;
.1.3.6.1.4.1.9.9.48.1.1.1.6.1 = Gauge32: 1467696&lt;br /&gt;
.1.3.6.1.4.1.9.9.48.1.1.1.6.2 = Gauge32: 1492064&lt;br /&gt;
.1.3.6.1.4.1.9.9.48.1.1.1.7.1 = Gauge32: 1274620&lt;br /&gt;
.1.3.6.1.4.1.9.9.48.1.1.1.7.2 = Gauge32: 1492060&lt;/blockquote&gt;
De los valores obtenidos, tenemos que:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;1.3.6.1.4.1.9.9.48.1.1.1.2 (ciscoMemoryPoolName) define el nombre del pool. En el ejemplo hay dos pools, Processor e I/O.&lt;/li&gt;
&lt;li&gt;1.3.6.1.4.1.9.9.48.1.1.1.5 (ciscoMemoryPoolUsed) muestra el uso de memoria actual de cada pool, expresado en bytes.&lt;/li&gt;
&lt;li&gt;1.3.6.1.4.1.9.9.48.1.1.1.6 (ciscoMemoryPoolFree) representa la memoria libre en cada pool, también en bytes.&lt;/li&gt;
&lt;/ul&gt;
La memoria total del equipo se puede obtener sumando los bytes libres con los utilizados.</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total></item><item><title>Tips: Montar carpeta compartida VirtualBox en Guests debian y derivados</title><link>http://itfreekzone.blogspot.com/2014/08/tip-montar-carpeta-compartida.html</link><category>administracion</category><category>debian</category><category>GNU/Linux</category><category>Tips</category><category>ubuntu</category><category>VirtualBox</category><category>virtualizacion</category><author>noreply@blogger.com (V3kt0r)</author><pubDate>Thu, 28 Aug 2014 14:02:00 -0300</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-271207292388274566.post-2392991135973226927</guid><description>Hoy me topé con un problema extraño, pero que por lo que encontré googleando, es común. Hasta ahora no se me había dado por montar shares en una máquina virtual debian (virtualizada usando VirtualBox), así que no me había pasado. Usando guests Windows siempre me funcionó correctamente.&lt;br /&gt;
Dado que requiere algunos pasos, decidí armar un mini instructivo de cómo hacerlo, ya que seguramente alguien más se encuentre con el mismo problema. Veamos los pasos:&lt;br /&gt;
&lt;br /&gt;
Como todo manual de VBox indica, primero hay que instalar las Guest Additions antes de poder compartir carpetas entre el host y el guest. Previo a esto, hay que contar con los headers del kernel (paquete linux-headers-&lt;version&gt;), y make. Una vez que cuentan con estos paquetes (make instala los compiladores y demás), realizar lo siguiente:&lt;/version&gt;&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Ir a la ventana de la máquina virtual, elegir la opción "Dispositivos" -&amp;gt; Insertar imagen de CD de las «Guest Additions»". Esto habilitará la imagen en la lectora virtual del guest.&lt;/li&gt;
&lt;li&gt;Montar el cd virtual ejecutando: mount /dev/cdrom -o exec&lt;/li&gt;
&lt;li&gt;Ejecutar el script correspondiente a Linux: &amp;nbsp;/media/cdrom/VBoxLinuxAdditions.run&lt;/li&gt;
&lt;/ol&gt;
Con lo anterior debería bastar para montar los shares según el manual oficial, ejecutando:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
mount -t vboxsf share /lugar-a-montar&lt;/blockquote&gt;
Sin embargo esto no es así en debian (y derivados también, no se en otras distros), al menos al utilizar VBox 4.3.10. Por alguna razón cambiaron de lugar el path donde se instalan las Guest Additions, o bien apuntaron mal el enlace de mount.vboxsf... sea cual sea la razón, al intentar montar una partición, mount dará error y syslog dirá:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
sf_read_super_aux err=-22&lt;/blockquote&gt;
Para evitar esto, tenemos dos alternativas:&lt;br /&gt;
1. Linkear el directorio desde donde debería estar a donde realmente está:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
ln -s /opt/VBoxGuestAdditions-4.3.10/lib/VBoxGuestAdditions /usr/lib/&lt;/blockquote&gt;
2. O linkear el ejecutable mount.vboxsf a donde está el ejecutable realmente:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
rm /sbin/mount.vboxsf&lt;br /&gt;
ln -s /opt/VBoxGuestAdditions-4.3.10/lib/VBoxGuestAdditions/mount.vboxsf /sbin/mount.vboxsf&lt;/blockquote&gt;
Bien, esto debería alcanzar... salvo en algunos casos. Increíblemente si dejamos el mismo nombre de share que el del directorio al que apunta el share (por ejemplo usar el share "datos" para apuntar al directorio /datos), mount fallará horriblemente diciendo:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
/sbin/mount.vboxsf: mounting failed with the error: Protocol error&lt;/blockquote&gt;
Mientras que syslog indicará lo siguiente:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
sf_read_super_aux err=-71&lt;/blockquote&gt;
&lt;div&gt;
WTF?! si, increíble. Así que recuerden llamar distinto al share que a la carpeta a la que apunta. Por ejemplo, ponerle vdatos al share que apunta a /datos en el host (siguiendo el ejemplo anterior).&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Ahora si, a montar felizmente (?!).&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Referencias&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;a href="https://forums.virtualbox.org/viewtopic.php?f=3&amp;amp;p=283645"&gt;Shared folders will not mount after 3.10 update&lt;/a&gt;&lt;br /&gt;
&lt;a href="https://www.virtualbox.org/ticket/928"&gt;Mounting share directory on Linux host result in Protocol error if default share name is used&lt;/a&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Instalar Zabbix en Debian GNU/Linux</title><link>http://itfreekzone.blogspot.com/2014/06/instalar-zabbix-en-debian-gnulinux.html</link><category>administracion</category><category>debian</category><category>GNU/Linux</category><category>HowTo</category><category>Instalacion</category><category>monitoreo</category><category>Networking</category><category>redes</category><category>Zabbix</category><author>noreply@blogger.com (V3kt0r)</author><pubDate>Fri, 6 Jun 2014 16:20:00 -0300</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-271207292388274566.post-7306802539203879884</guid><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHiXTBhgQx-WP0InceCI2bpmudklgSRudQUU28IliNSHu-WKIa-Xy6yioUEqo4TxzaAxslrJIHq8l5hKmYppGR9Qje4ItR9uQPjzH442Rhf2PRBlNlf9_hTMPrSneCyQ0MWwOLSeAENYNW/s1600/zabbix_logo_500x131.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHiXTBhgQx-WP0InceCI2bpmudklgSRudQUU28IliNSHu-WKIa-Xy6yioUEqo4TxzaAxslrJIHq8l5hKmYppGR9Qje4ItR9uQPjzH442Rhf2PRBlNlf9_hTMPrSneCyQ0MWwOLSeAENYNW/s1600/zabbix_logo_500x131.png" height="81" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
Después de haber leído muchas buenas críticas acerca de Zabbix, decidí instalarlo sobre un debian para probarlo. Dado que no fue una tarea trivial, decidí documentarla para facilitarle la vida a alguien más.
Para empezar, salvo un artículo específico, no encontré documentación que explique bien cómo utilizar los paquetes provistos en debian. Debian trae Zabbix en sus repositorios, pero instalar el servicio no es tan directo como instalar los paquetes, requiere varios pasos adicionales. Esto me molestó bastante, dado que se podría automatizar todo este proceso en la misma instalación del paquete. Igualmente, conociendo los pasos, no es una tarea compleja, sólo algo tediosa :P
El artículo en el que me basé para la instalación es &lt;a href="https://www.digitalocean.com/community/articles/how-to-install-zabbix-on-ubuntu-configure-it-to-monitor-multiple-vps-servers"&gt;How To Install Zabbix on Ubuntu &amp;amp; Configure it to Monitor Multiple VPS Servers&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Instalar los paquetes necesarios&lt;/b&gt;&lt;br /&gt;
Para instalar Zabbix, ejecutar lo siguiente:&lt;br /&gt;
&lt;blockquote&gt;
# apt-get install apache2 php5-mysql mysql-server zabbix-server-mysql zabbix-frontend-php&lt;/blockquote&gt;
Los paquetes de Apache, PHP5 y MySQL sólo son necesarios si aún no los instalaron, se agregan por completitud. 
Los paquetes de Zabbix crean los archivos del servidor zabbix, y copian los archivos del front-end en /usr/share, pero sólo eso... restan varios pasos. Es posible instalar Zabbix sobre PostgreSQL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Configuración base de datos&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Los paquetes instalados no crean la base de datos, ni el usuario, por lo que hay que hacerlo manualmente. Los siguientes pasos explican cómo hacer este proceso:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Desde MySQL (i.e. logueados con $mysql -u root -p), crear la base de datos, el usuario y asignarle permisos:&lt;br /&gt;
    &lt;blockquote&gt;
mysql&amp;gt; create database zabbix_db;&lt;br /&gt;
mysql&amp;gt; create user 'zabbix_usr'@'localhost' identified by 'ELpassword';&lt;br /&gt;
mysql&amp;gt; grant all privileges on zabbix_db.* to 'zabbix_usr'@'localhost';&lt;br /&gt;
mysql&amp;gt; flush privileges;&lt;/blockquote&gt;
&lt;/li&gt;
Los valores para el nombre de usuario y base de datos pueden elegirse a gusto. El comando final permite recargar los permisos para que se asignen los nuevos.&lt;br /&gt;
&lt;li&gt;Crear las tablas y asignar los valores default provistos por Zabbix. Para esto existen los archivos /usr/share/zabbix-server-mysql/{schema.sql.gz, images.sql.gz, data.sql.gz}. Descomprimirlos y ejecutarlos con MySQL, con destino la base de datos recién creada.&lt;br /&gt;
    &lt;blockquote&gt;
/usr/share/zabbix-server-mysql$ gunzip schema.sql.gz images.sql.gz data.sql.gz&lt;br /&gt;
$ mysql -u root -p zabbix_db &amp;lt; schema.sql&lt;br /&gt;
$ mysql -u root -p zabbix_db &amp;lt; images.sql&lt;br /&gt;
$ mysql -u root -p zabbix_db &amp;lt; data.sql&lt;/blockquote&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;b&gt;Servidor Zabbix&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Según la definición de la base de datos, hay que adaptar el archivo de configuración del serivicio Zabbix. Debe editarse el archivo /etc/zabbix/zabbix_server.conf y ajustar los siguientes valores:&lt;br /&gt;
&lt;blockquote&gt;
DBName=zabbix_db&lt;br /&gt;
DBUser=zabbix_usr&lt;br /&gt;
DBPassword=ELpassword&lt;/blockquote&gt;
Además, dado que por defecto el servicio Zabbix no inicia automáticamente, debe editarse el archivo /etc/default/zabbix-server y dejar la siguiente sentencia:&lt;br /&gt;
&lt;blockquote&gt;
START=yes&lt;/blockquote&gt;
Luego si podremos iniciar el servicio:&lt;br /&gt;
&lt;blockquote&gt;
# /etc/init.d/zabbix-server start&lt;/blockquote&gt;
&lt;br /&gt;
&lt;b&gt;Front-End Web&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Para habilitar el front end web, deben realizarse los siguientes pasos:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Copiar el archivo de configuración de Apache, provisto en el paquete Zabbix, a su lugar correspondiente, para habilitar el acceso web:&lt;br /&gt;
    # cp /usr/share/doc/zabbix-frontend-php/examples/apache.conf /etc/apache2/conf-enabled/zabbix.conf&lt;br /&gt;
    En versiones anteriores de debian, los archivos de configuración se copian en /etc/apache2/conf.d&lt;/li&gt;
&lt;br /&gt;
&lt;li&gt;Editar el archivo /etc/php5/apache2/php.ini y asignar los siguientes valores a las variables correspondientes, para adaptar la configuración de PHP a los requerimientos de Zabbix&lt;br /&gt;
    &lt;blockquote&gt;
post_max_size = 16M&lt;br /&gt;
max_execution_time = 300&lt;br /&gt;
max_input_time = 300&lt;br /&gt;
date.timezone = America/Argentina/Buenos_Aires&lt;/blockquote&gt;
donde el timezone dependerá de su ubicación (ver &lt;a href="http://ar2.php.net/manual/en/timezones.php"&gt;List of Supported Timezones&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt; Reiniciar el servidor Apache:&lt;br /&gt;
    &lt;blockquote&gt;
# service apache2 restart&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;Abrir, desde el navegador, la página de Zabbix. La misma se encuentra en http://&amp;lt;IP del servidor&amp;gt;/zabbix. Esto redirige al wizzard de configuración inicial, donde:&lt;br /&gt;
    &lt;blockquote&gt;
2- Se chequea que los requisitos para correr Zabbix se cumplan. Si alguno no se cumple, mostrará un fail y no permitirá seguir hasta tanto se corrija.&lt;br /&gt;
3- Solicita se configuren los datos de la base de datos. Si MySQL no aparece entre las opciones, es que les falta el paquete php5-mysql&lt;br /&gt;
4- Permite asignar los valores del servidor Zabbix. Si no cambiaron nada en la configuración del server, dejar los que están por defecto.&lt;br /&gt;
5- Muestra el resultado de la configuración y permite revisar los valores antes de terminar.&lt;br /&gt;
6- Intenta crear el archivo /etc/zabbix/zabbix.conf.php. Si el servicio no tiene permiso para hacerlo (lo cual será así), descargar el archivo y copiarlo manualmente en el directorio correspondiente.&lt;br /&gt;
Una vez creado el archivo, clickear "Retry" y mostrará un mensaje OK. Clickear "Finish" para ir a la página principal.&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;Ingresar al sistema con el usuario admin y contraseña zabbix.&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
Fin</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHiXTBhgQx-WP0InceCI2bpmudklgSRudQUU28IliNSHu-WKIa-Xy6yioUEqo4TxzaAxslrJIHq8l5hKmYppGR9Qje4ItR9uQPjzH442Rhf2PRBlNlf9_hTMPrSneCyQ0MWwOLSeAENYNW/s72-c/zabbix_logo_500x131.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>AirWatch MDM Review</title><link>http://itfreekzone.blogspot.com/2014/05/airwatch-mdm-review.html</link><category>administracion</category><category>AirWatch</category><category>Android</category><category>articulos</category><category>celulares</category><category>MDM</category><category>Mobile</category><category>reviews</category><category>seguridad</category><category>Tablets</category><author>noreply@blogger.com (V3kt0r)</author><pubDate>Wed, 21 May 2014 16:50:00 -0300</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-271207292388274566.post-594959268779725970</guid><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdLlkQhEabmJIRkAOsMfg06VVcTZMZFTPGgu1EtSn179ppQFbHXAIZw-cJCrr-7ozmJ8iUqgbHpBLlTq_TtJswqJHK_PRUFQWZOUKocxb_IVqwpr07D6hxthV9_sNV2dIyy6C8lNRjTsGs/s1600/airwatch-icon.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdLlkQhEabmJIRkAOsMfg06VVcTZMZFTPGgu1EtSn179ppQFbHXAIZw-cJCrr-7ozmJ8iUqgbHpBLlTq_TtJswqJHK_PRUFQWZOUKocxb_IVqwpr07D6hxthV9_sNV2dIyy6C8lNRjTsGs/s1600/airwatch-icon.png" /&gt;&lt;/a&gt;&lt;/div&gt;
Hace un tiempo comenzamos a utilizar dispositivos Android en la empresa y se hizo evidente que necesitaríamos un software para administrarlos. Desde hace varios años utilizamos BlackBerry, para lo cual contamos con BlackBerry Enterprise Server (BES). Personalmente BES siempre me pareció una cagada, tiene sus cosas buenas y fue uno de los pioneros del rubro, pero las cosas no andan bien. Los servicios de BB en general siempre me parecieron una bosta. Que algún administrador de BES me diga si al menos una vez al mes (o a la semana) algún BB deja de sincronizar los mails y encuentra otro remedio más que desvincular el equipo y volver a vincurlarlo? si, a veces se soluciona con una reiniciada, pero muchas veces no! y lo peor es que es imposible saber la causa.&lt;br /&gt;
&lt;br /&gt;
Bueno, dejando mi resentimiento hacia BES, volvemos a Android. Android es una plataforma muy buena, pero creo que no tan orientada a las empresas todavía. De a poco va queriendo, pero todavía le falta bastante. El tema es que los dispositivos Android parecen estar pensados solamente para el usuario hogareño. Para poder utilizar este sistema a nivel corporativo, necesitamos una herramienta que nos brinde ciertas funcionalidades.&lt;br /&gt;
&lt;br /&gt;
Veamos primero qué es lo que se necesita para poder administrar dispositivos móviles en general, y luego nos adentraremos en AirWatch en particular.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Introducción MDM para Android&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Mi experiencia me permite distinguir las siguientes necesidades, a la hora de administrar dispositivos móviles Android (u otros) corporativos:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Uso de mail corporativo: Android soporta ActiveSync para poder utilizar un servidor de correo Exchange. La necesidad que identifico es poder administrar esta conexión desde un software centralizado.&lt;/li&gt;
&lt;li&gt;Políticas de seguridad: muy pero muy importante es poder aplicar restricciones a los equipos. Como la mayoría sabe, existen miles de aplicaciones maliciosas para Android. Si permitimos a cualquier usuario instalar cualquier cosa, vamos a tener un grave problema. Las políticas de seguridad deben permitir:&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;Forzar uso de PIN o patrón para bloquear el dispositivo.&lt;/li&gt;
&lt;li&gt;Bloquear la instalación y desinstalación de aplicaciones. Así como no queremos que instalen nada, también queremos que no desinstalen software básico.&lt;/li&gt;
&lt;li&gt;Bloquear "reset to factory" del equipo. Si borran la configuración, después pueden hacer cualquier cosa.&lt;/li&gt;
&amp;gt;
&lt;li&gt;Bloquear el cambio de ciertas capacidades estéticas, como cambio de wallpaper.&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Instalación remota de aplicaciones: bien, no permitimos instalar aplicaciones al usuario, pero si el mismo necesita algo para sus tareas, debemos poder instalarselo. Estos usuarios puede que no estén físicamente en las instalaciones de la empresa, así que poder instalar aplicaciones desde el administrador, es un requisito.&lt;/li&gt;
&lt;li&gt;Uso de encripción: dado que los equipos pueden transportar información sensible, es necesario poder activar la encripción de la tarjeta de memoria y/o memoria del equipo.&lt;/li&gt;
&lt;li&gt;Bloqueo / Wipe remoto: si un dispositivo es robado o perdido, el administrador debe poder bloquearlo e incluso borrarlo para que no se accedan a los datos de la empresa.&lt;/li&gt;
&lt;li&gt;Configuración centralizada: tener que configurar muchos dispositivos de a uno, no solo estresa a cualquiera, sino que es una pérdida de tiempo. La mejor alternativa es realizar la configuración una vez, y que todos los dispositivos la apliquen al conectarse.&lt;/li&gt;
&lt;br /&gt;
&lt;/ul&gt;
Los programas que proveen estas funcionalidades se denominan Mobile Device Management (MDM), y hay varios dando vueltas. El mismo BES es un MDM que implementa las funcionalidades descriptas. Uno de estos MDMs es &lt;a href="http://www.air-watch.com/"&gt;AirWatch&lt;/a&gt;&amp;nbsp;y en él me enfocaré el resto del artículo. AirWatch, según sus propias palabras, es el MDM líder a nivel empresarial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;AirWatch&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Estuve utilizándo AirWatch durante un par de semanas, haciendo varias pruebas, y quería compartir mi experiencia con esta herramienta, por si alguno de ustedes está buscando algún MDM y está indeciso. Les comentaré tanto las cosas buenas, como las cosas malas que encontré al utilizarlo.&lt;br /&gt;
&lt;br /&gt;
Para empezar, me pareció muy útil que soporte múltiples sistemas operativos (Android, iOS, BlackBerry, Symbian, Windows Phone, Mac OS X, entre otros). Si el parque de dispositivos no es homogéneo, como en nuestro caso, esto es una característica importante. Es importante observar aquí que no es la panacea. Si bien el soporte de sistemas operativos existe, en muchos casos el soporte es muy limitado. Por ejemplo, no podrán reemplazar BES por AirWatch para administrar los BlackBerry, ya que las características que AirWatch soporta para BB son muy (MUY) limitadas.&lt;br /&gt;
En cada opción de configuración de AirWatch, podrán observar al costado, qué sistemas operativos la soportan. Incluso dependiendo la versión del sistema operativo, puede que la opción esté disponible o no (por ejemplo, algunas cosas disponibles para Android 3, no están disponibles para Android 2). A favor de AirWatch hay que decir que en muchos casos la limitación la pone el sistema operativo. Si el sistema operativo no provee una forma de evitar el uso de la cámara, el software no podrá hacerlo.&lt;br /&gt;
Otro punto a tener en cuenta, es que la mayoría de las opciones de configuración para Android, sólo están disponibles para dispositivos &lt;a href="http://www.samsung.com/us/safe"&gt;SAFE (Samsung For Enterprises)&lt;/a&gt;. Si no adquirieron dispositivos Android que sean SAFE, casi que ni les conviene utilizar AirWatch.&lt;br /&gt;
&lt;br /&gt;
AirWatch implementa todos los puntos listados en la introducción, aunque no todos para todos los sistemas operativos. Para equipos SAFE, todas las opciones están disponibles, teniendo algunas limitaciones en cuanto a la granularidad.&lt;br /&gt;
Algo interesante es que AirWatch permite organizar los dispositivos en unidades organizativas (por ejemplo, departamento), y a los usuarios por grupos. Luego es posible definir perfiles (que incluyen políticas de uso, certificados, bookmarks, VPN, WiFi, etc) por unidad organizativa y por grupo de usuario. Esto brinda la flexibilidad de poder definir, por ejemplo, que ciertas restricciones se apliquen a los usuarios de comercial, que se encuentren en el grupo de usuarios atención al cliente. La organización de los grupos resulta un poco confusa al principio, pero luego del uso se va afinando.&lt;br /&gt;
&lt;br /&gt;
La instalación remota de aplicaciones existe, pero no es del todo directa. Es posible distribuir tanto aplicaciones públicas, como adquiridas por la empresa (llámese APK). Es posible instalar las APK sin intervención del usuario, pero si es una aplicación de la Play Store, requerirá la intervención del usuario, algo para nada conveniente. Tal vez sea algo que me falló a mi, pero luego de varias pruebas, no logré que se instale algo directamente.&lt;br /&gt;
&lt;br /&gt;
Dado que muchos dispositivos incluyen aplicaciones que tal vez no deseamos (Google trae algunas que en modo usuario son imposible desinstalar... llámese Gmail, G+, etc), es posible desinstalarlas/desactivarlas mediante AirWatch. Este es un punto muy a favor del software, dado que sin rootear el dispositivo no es posible eliminar ciertas aplicaciones. Además es posible restringir la instalación de aplicaciones y no permitir que el usuario desinstale las importantes. Esto se logra con los grupos de aplicaciones Blacklisted, Whitelisted y Required. Todas las listas se arman con los IDs de las aplicaciones. Cada aplicación tiene un ID único, como com.google.android.gm para GMail.&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Blacklisted permite listar las aplicaciones explícitamente prohibidas. Si una aplicación está en esta lista, no se podrá instalar.&lt;/li&gt;
&lt;li&gt;Whitelisted, si está activa, restringe que no se instale ninguna aplicación que no se encuentre en la lista.&lt;/li&gt;
&lt;li&gt;Required no permite que el usuario desinstale ninguna de las aplicaciones listadas.&lt;/li&gt;
&lt;/ul&gt;
Me parece importante remarcar que las aplicaciones que vienen "de fábrica" como GMail, seguirán instaladas incluso si utilizamos la Whitelist y no la incluímos. La única forma que logré de remover estas aplicaciones es listándolas explícitamente en la Blacklist.&lt;br /&gt;
El único aspecto negativo que encontré en esta funcionalidad, es que el sistema permite al usuario llegar hasta el último paso de la instalación antes de decirle "está prohibido instalar la aplicación". Estaría bueno que no lo permitiera de entrada.&lt;br /&gt;
&lt;br /&gt;
Otro aspecto que en nuestro caso era importante, es dónde está instalado el servidor. Para empezar, AirWatch vende el servicio en la nube, es decir, está el servidor instalado en algún lugar del ciberespacio, y nosotros lo administramos remotamente. Consultando con un agente oficial, me indicaron que también es posible instalar el sistema on-site, es decir, tener nuestro propio servidor AirWatch. El requerimiento para hacerlo es contratar por lo menos 100 licencias, donde las licencias son por dispositivos... para hacer una prueba inicial no resulta muy atractivo tener que contratar 100 licencias. Como dato extra, cada licencia cuesta entre 5 y 6 dólares mensuales. No estoy para nada a favor de colocar datos de la empresa en la nube, mucho menos información de dispositivos, que incluye localización, registro de llamadas, mensajes, etc, pero en este caso, no tuvimos opción.&lt;br /&gt;
&lt;br /&gt;
Algo que todavía no mencioné es que la interfaz de administración es Web. La interfaz es, a mi gusto, poco intuitiva y confusa. No es fácil familiarizarse con ella, e incluso luego de utilizarla un par de semanas, a veces no encuentro las cosas. Tal vez sea una mera impresión mia, pero conversando con mis compañeros de trabajo, les dio la misma sensación. La primer gran confución es la diferencia entre los usuarios. Existen dos tipos de usuarios, los administradores, y los "dueños" de dispositivos. Los primeros tienen permiso de administrar la aplicación, y mediante roles se puede restringir lo que pueden hacer. Los segundos se utilizan para registrar equipos. Es decir, cuando damos de alta un equipo, éste debe pertenecer a algún usuario, por lo que antes habrá que dar de alta el usuario. Cada uno de estos usuarios puede tener asignado uno o más equipos.&lt;br /&gt;
Otra confusión es dónde estamos parados. Como cada dispositivo pertenece a una unidad organizativa, si estamos en una de ellas, no podremos ver los dispositivos en otras (salvo que estemos en la OU raíz, donde podemos ver todos). Lo mismo sucede con los usuarios.&lt;br /&gt;
Un problema que encontré aquí es mover dispositivos o usuarios entre unidades organizativas... simplemente, no pude. Si el usuario tiene asignado un dispositivo que se encuentra en una dada OU, no se puede mover el usuario, y lo mismo pasa con los dispositivos.&lt;br /&gt;
Más allá de ser confusa, tengo para decir a favor de la interfaz que genera interesantes gráficos. El dashboard es muy visual y La información sobre los dispositivos es muy completa.&lt;br /&gt;
&lt;br /&gt;
Un aspecto muy negativo, es la falta de documentación. Googlear cómo hacer algo en AirWatch es prácticamente inútil. Sólo se encuentran broshures de propaganda. Incluso en la página de AirWatch no encontrás los manuales! Tienen una sección de whitepapers que no me resultó muy útil. Por suerte, nuestro proveedor de AirWatch en la nube brindó un buen soporte a nuestras consultas, y nos entregaron un manual oficial... aunque este manual oficial no era muy completo tampoco. En fin, punto negativo en cuanto a documentación.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Agente AirWatch&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
La administración de los dispositivos se logra instalando un agente AirWatch en cada uno de ellos. Este agente se instala desde la Play Store de Google (en el caso de Android), y se registra en el servidor utilizando una URL de enrollment (que no es la misma que la de administración), el ID de la unidad organizativa, y un usuario del tipo "dispositivo" (no uno de administración).&lt;br /&gt;
&lt;br /&gt;
Para la instalación encuentro como punto negativo que no se provea una APK. El uso de la Play Store de Google fuerza registrar una cuenta Google. Para un dispositivo corporativo, por qué la empresa debería tener cuentas Google? Parte del monopolio encubierto de Google.&lt;br /&gt;
&lt;br /&gt;
Una vez que se registra el dispositivo, se aplica la configuración indicada por el servidor, la cual incluye el perfil del usuario. Acá encontré otro problema. Si bien el agente provee una forma de forzar la sincronización, la aplicación del perfil no siempre funciona. Tuve muchísimos problemas creando bookmarks desde el servidor. A veces el agente los borra, no se actualizan...&lt;br /&gt;
&lt;br /&gt;
Encontré riesgoso el echo de no poder prohibir la desactivación del agente. Si bien encontré la forma de que el usuario no desinstale el agente (Required list, descripta anteriormente), no encontré la forma de que el usuario no desactive el agente. Una vez que se desactiva el agente, el usuario sigue teniendo las restricciones, pero el servidor pierde el contacto con el dispositivo.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Conclusión&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
AirWatch es un muy buen comienzo en la administración centralizada de dispositivos móviles. Sin embargo, creo que odavía tienen mucho camino por delante. Tal vez dependa mucho de la evolución de los sistemas operativos como Android, que seguramente tomarán un approuch cada vez más empresarial, como BB.&lt;br /&gt;
No utilizaría AirWatch como reemplazo de BES. Si tienen dispositivos BB, debido al limitado soporte, recomiendo seguir utilizando BES por más feo que sea :P&lt;br /&gt;
&lt;br /&gt;
Como puntos a favor encuentro que:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&amp;nbsp;Implementa las características más importantes de un MDM.&lt;/li&gt;
&lt;li&gt;&amp;nbsp;Brinda muy buena información sobre los dispositivos.&lt;/li&gt;
&lt;li&gt;&amp;nbsp;Permite una buena restricción de las aplicaciones instaladas y que no se pueden desinstalar.&lt;/li&gt;
&lt;li&gt;&amp;nbsp;Soporte de múltiples sistemas operativos.&lt;/li&gt;
&lt;li&gt;&amp;nbsp;Aplicación de políticas por grupos de usuarios y/o dispositivos. Facilidad de generar perfiles y aplicar uno o más a cada dispositivo.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
En contra, encuentro que:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;La interfaz web de administración no es muy intuitiva.&lt;/li&gt;
&lt;li&gt;La documentación casi inexistente, ya que una vez que nos vamos adentrando en el software y queremos hilar más fino, no se encuentra información al respecto.&lt;/li&gt;
&lt;li&gt;El soporte de Android es principalmente para equipos SAFE, y salvo iOS, las características disponibles para el resto de los SOs es muy limitada.&lt;/li&gt;
&lt;li&gt;El agente falla cada tanto y no aplica correctamente los perfiles.&lt;/li&gt;
&lt;li&gt;Se requieren demasiadas licencias (al menos 100) para poder instalar el servicio on-site.&lt;/li&gt;
&lt;/ul&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdLlkQhEabmJIRkAOsMfg06VVcTZMZFTPGgu1EtSn179ppQFbHXAIZw-cJCrr-7ozmJ8iUqgbHpBLlTq_TtJswqJHK_PRUFQWZOUKocxb_IVqwpr07D6hxthV9_sNV2dIyy6C8lNRjTsGs/s72-c/airwatch-icon.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">5</thr:total></item><item><title>Thunderbird/Icedove como cliente de Mails, Calendario y Libreta de direcciones de Exchange</title><link>http://itfreekzone.blogspot.com/2014/05/thunderbirdicedove-como-cliente-de.html</link><category>articulos</category><category>DavMail</category><category>debian</category><category>Exchange</category><category>GNU/Linux</category><category>Icedove</category><category>IMAP</category><category>Mail</category><category>mailbox</category><category>smtp</category><category>Thunderbird</category><category>windows</category><author>noreply@blogger.com (V3kt0r)</author><pubDate>Thu, 8 May 2014 14:33:00 -0300</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-271207292388274566.post-309964527434868128</guid><description>El conjunto de herramientas de Exchange utilizado en entornos Windows, es muy importante en la mayoría de las empresas. Para tener una Workstation GNU/Linux totalmente funcional con respecto a sus pares Windows, necesitamos integrar tanto mails, como calendario y libreta de direcciones, provistos por Exchange.&lt;br /&gt;
&lt;br /&gt;
Por suerte, existe una excelente herramienta denominada &lt;a href="http://davmail.sourceforge.net/"&gt;DavMail&lt;/a&gt;&amp;nbsp;que nos facilita la vida. Esta herramienta actúa de proxy entre el cliente de mails que utilicemos (Thunderbird/Icedoe, Evolution, etc) y el servidor Exchange. Para ello, transforma protocolos estándar (IMAP, SMTP, LDAP, etc) en solicitudes WebDav (extensión del protocolo HTTP) reconocidas por el servicio OWA de Exchange.&lt;br /&gt;
&lt;br /&gt;
A continuación explicaré cómo utilizar Thunderbird/Icedove como cliente de mails, calendario y libreta de direcciones provistos por Exchange, a través de DavMail. La explicación está basada en los tutoriales provistos en la propia página de DavMail: &lt;a href="http://davmail.sourceforge.net/thunderbirdimapmailsetup.html"&gt;IMAP Thunderbird mail setup&lt;/a&gt;, &lt;a href="http://davmail.sourceforge.net/thunderbirdcalendarsetup.html"&gt;Thunderbird calendar setup&lt;/a&gt;&amp;nbsp;y &lt;a href="http://davmail.sourceforge.net/thunderbirddirectorysetup.html"&gt;Thunderbird directory setup&lt;/a&gt;. Además, la explicación está basada sobre debian GNU/Linux, pero la configuración es igual para otras distribuciones e incluso Windows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Instalación y configuración de DavMail&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Descargar DavMail desde su &lt;a href="http://davmail.sourceforge.net/download.html"&gt;página en sourceforge&lt;/a&gt;. Dirigirse al directorio de instalación y ejecutar:&lt;br /&gt;
&amp;nbsp; #dpkg -i davmail.deb # ver nombre real del paquete descargado, o renombrarlo&lt;br /&gt;
&amp;nbsp; #apt-get -f install &amp;nbsp;# instala todas las dependencias necesarias para davmail&lt;br /&gt;
&lt;br /&gt;
DavMail también está disponible para Windows y Mac, dado que está programado en Java.&lt;br /&gt;
&lt;br /&gt;
Una vez instalado DavMail, debe ejecutarse. Lo recomendable es linkearlo para que se ejecute al inicio de sesión del usuario, así no tenemos que ejecutarlo a mano cada vez que queramos usarlo. En la primera ejecución hay que configurarlo para que apunte al servidor Exchange.&lt;br /&gt;
Los campos requeridos, como base, se encuentran en la pestaña Main, y son los siguientes:&lt;br /&gt;
&amp;nbsp; - Exchange Protocol: elegir EWS para Exchange 2010, o WebDav para Exchange 2007.&lt;br /&gt;
&amp;nbsp; - OWA (Exchange URL): la URL del servidor Exchange, por ejemplo: https://miserver.com/OWA&lt;br /&gt;
&amp;nbsp; - Elejir los puertos locales en los que DavMail debe esperar conexiones POP, IMAP, SMTP, Caldav y LDAP. El cliente que configuremos, se conectará a estos puertos. Pueden dejar los puertos default y desactivar alguno de los protocolos si no son necesarios (POP por ejemplo).&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_RUXQir-Wiepse12En5BaTHQ5RlUlCKl2ArLiS1Ib7cTDdedfASHYp0LoA6Elyu6cYhN9nWmTJli56JDSZEq3xX-MNLP6sbQJ-U_1ZoCM3ShJoCxa1I30pympqQvc9shMIpgjnWbQAW-Q/s1600/thunderbird-exchange-0.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_RUXQir-Wiepse12En5BaTHQ5RlUlCKl2ArLiS1Ib7cTDdedfASHYp0LoA6Elyu6cYhN9nWmTJli56JDSZEq3xX-MNLP6sbQJ-U_1ZoCM3ShJoCxa1I30pympqQvc9shMIpgjnWbQAW-Q/s1600/thunderbird-exchange-0.png" height="257" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;Configuración de la cuenta de mail en Thunderbird/Icedove&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Los pasos para configurar la cuenta de dominio en el cliente Thunderbird, son los siguientes:&lt;br /&gt;
&amp;nbsp; 1- Elegir Crear una nueva cuenta de e-mail. Dependiendo de si ya tienen configurada alguna cuenta o no, los pasos pueden variar un poco al principio.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; - Si no tienen una cuenta definida, el wizzard busca para crear una cuenta con alguno de sus partners. Si este es el caso, clickear el botón "Saltear esto y usar mi correo existente".&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; - Si ya tienen otra cuenta en Thunderbird, ir a "&lt;i&gt;Editar -&amp;gt; Configuración de Cuentas...&lt;/i&gt;", elegir "&lt;i&gt;Acciones de cuenta -&amp;gt; Agregar una cuenta de correo&lt;/i&gt;".&lt;br /&gt;
&amp;nbsp; 2- Completar el campo de Nombre y dirección de mail en la configuración de la cuenta. Aconsejo destildar la opción recordar contraseña. Dar continuar.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEith6T4wEByQ0ewjxL6Fl3SwEy3ORykRXYXxxv9v-kBWlLdXh7qfr_40e5xd4n2xEwd-oLlfuSckxK8UD1lvfHMcLOcpWs87i3yHT4JgABwlUvwMcN1roI5b7bDuGxhbFhcqTbiz8kYYlHx/s1600/thunderbird-exchange-1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEith6T4wEByQ0ewjxL6Fl3SwEy3ORykRXYXxxv9v-kBWlLdXh7qfr_40e5xd4n2xEwd-oLlfuSckxK8UD1lvfHMcLOcpWs87i3yHT4JgABwlUvwMcN1roI5b7bDuGxhbFhcqTbiz8kYYlHx/s1600/thunderbird-exchange-1.png" height="200" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&amp;nbsp; 3- Al dar continuar, Thunderbird fallará en la comprobación del dominio y les solicitará que ingresen los datos manualmente. En la configuración, utilizar los siguientes valores:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
Entrante/Incoming:&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;&lt;i&gt;IMAP&lt;/i&gt; (pueden elegir POP, pero IMAP es más completo)&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;&lt;i&gt;Nombre del servidor&lt;/i&gt;: localhost&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;&lt;i&gt;Puerto&lt;/i&gt;: el puerto que configuraron en DavMail. Por defecto es 1143.&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;&lt;i&gt;SSL&lt;/i&gt;: Ninguno.&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;&lt;i&gt;Autenticación&lt;/i&gt;: Contraseña normal.&lt;br /&gt;
Saliente/Outgoing:&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;i&gt;Nombre del servidor&lt;/i&gt;: localhost&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;i&gt;Puerto&lt;/i&gt;: el puerto que configuraron en DavMail para SMTP. Por defecto 1025.&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;i&gt;SSL&lt;/i&gt;: Ninguno.&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;i&gt;Autenticación&lt;/i&gt;: Contraseña normal.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&lt;i&gt;Nombre de usuario&lt;/i&gt;: su nombre de usuario en el dominio, agregando el nombre del dominio: DOMINIO\usuario&lt;/blockquote&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhagV_vwI99Fz_Z4qynnJjW8IXAKtE-fYnjXziqXOWGzMlKODUDQVgiYLhyphenhyphenSjzyogeJ5aUQdcObQhwKzdNJU72-QypNXih9IaW1odHEUz-9Nko-Ro8NpyvgvLQf4fZPIENuvXXEJYq2IT6a/s1600/thunderbird-exchange-2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhagV_vwI99Fz_Z4qynnJjW8IXAKtE-fYnjXziqXOWGzMlKODUDQVgiYLhyphenhyphenSjzyogeJ5aUQdcObQhwKzdNJU72-QypNXih9IaW1odHEUz-9Nko-Ro8NpyvgvLQf4fZPIENuvXXEJYq2IT6a/s1600/thunderbird-exchange-2.png" height="152" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Tal vez DavMail indique que el servidor Exchange provee un certificado no confiable. Esto sucede si el servidor utiliza un certificado autofirmado, o firmado por una CA local. Dar aceptar.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Calendario&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Para configurar el calendario, debemos instalar la extensión iceowl-extension (extensión Lightning):&lt;br /&gt;
&amp;nbsp; # apt-get install iceowl-extension&lt;br /&gt;
&lt;br /&gt;
Luego, desde Thunderbird/Icedove abrimos el calendario "Events and Tasks -&amp;gt; Calendar", y realizamos los siguientes pasos:&lt;br /&gt;
&amp;nbsp; 1- Click derecho en el panel izquierdo (deben tener el predefinido calendario "Home") y clickeamos "New Calendar".&lt;br /&gt;
&amp;nbsp; 2- En la ventana que aparece, elegimos "On the Network", luego "Siguiente".&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5AtfsnsSUPDnV7IQnBLA7ge-EyfLCMVsWZ2Af24I-KqgokryjgQVb1fkBPeLhy_Ky_3AJ3b43Zf2XHEJpIZGs8vJKo1qLhCQkO_Ksf7L0EraAN0Z5Rtg4e_tjBaEWBxsNKdFX9ne1MwQ7/s1600/thunderbird-exchange-3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5AtfsnsSUPDnV7IQnBLA7ge-EyfLCMVsWZ2Af24I-KqgokryjgQVb1fkBPeLhy_Ky_3AJ3b43Zf2XHEJpIZGs8vJKo1qLhCQkO_Ksf7L0EraAN0Z5Rtg4e_tjBaEWBxsNKdFX9ne1MwQ7/s1600/thunderbird-exchange-3.png" height="250" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&amp;nbsp; 3- En la siguiente opción elegimos "CalDAV" en el formato, y utilizamos la siguiente dirección para el "&lt;i&gt;Location&lt;/i&gt;": http://localhost:1080/users/usuario@dominio.com/calendar, donde deberán reemplazar usuario@dominio.com por su usuario y dominio.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEij8iASvr3_8RJF2wTc7H3ipx0MjxG6fJWSIL_5t0OirTyzW2JlH27X0MReaq4exGMtwJetNprvtme4el7iUEULOg4NUqWaxZvyfWDz3nWC_XZFvqssK-mMACWkHFF9Y511e2I7PQqPESQV/s1600/thunderbird-exchange-4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEij8iASvr3_8RJF2wTc7H3ipx0MjxG6fJWSIL_5t0OirTyzW2JlH27X0MReaq4exGMtwJetNprvtme4el7iUEULOg4NUqWaxZvyfWDz3nWC_XZFvqssK-mMACWkHFF9Y511e2I7PQqPESQV/s1600/thunderbird-exchange-4.png" height="250" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&amp;nbsp; 4- Una vez que terminen, les solicitará un nombre de calendario, color, si desean recibir recordatorios. Configurar a gusto.&lt;br /&gt;
&amp;nbsp; 5- Para finalizar, les solicitará las credenciales de dominio. Hay que colocarlas como en el caso de los mails, utilizando el formato DOMINIO\usuario para el nombre de usuario.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Libreta global de direcciones&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
La libreta global de direcciones de Exchange se habilita de la siguiente manera:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; 1- Ir a "&lt;i&gt;Herramientas -&amp;gt; Libreta de direcciones&lt;/i&gt;".&lt;br /&gt;
&amp;nbsp; 2- En la ventana emergente, seleccionar "&lt;i&gt;Archivo -&amp;gt; Nuevo -&amp;gt; Directorio LDAP&lt;/i&gt;".&lt;br /&gt;
&amp;nbsp; 3- Abre una nueva ventana, donde se nos solicitan los siguientes datos:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;i&gt;Nombre&lt;/i&gt;: el que ustedes elijan (ej: Exchange)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;i&gt;Servidor&lt;/i&gt;: localhost&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;i&gt;DN base&lt;/i&gt;: ou=people&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;i&gt;Número de puerto&lt;/i&gt;: 1389 (ver la configuración de DavMail para saber qué puerto usar con LDAP, por defecto es 1389)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;i&gt;DN para inicio de sesión&lt;/i&gt;: DOMINIO\usuario&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg81AMy82SPl4clUC5XEJZXcMMR4kFGN-UnXnZarwbEnEy1rl0mNgkWSzT988aBwVyplIlp8weYfSsWgp6uFHwvv3vyX_aCwAfy0qMCXoQY7GHuBecNRdQP_Q5TBwAbu565Z0liE2JeyrZI/s1600/thunderbird-exchange-5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg81AMy82SPl4clUC5XEJZXcMMR4kFGN-UnXnZarwbEnEy1rl0mNgkWSzT988aBwVyplIlp8weYfSsWgp6uFHwvv3vyX_aCwAfy0qMCXoQY7GHuBecNRdQP_Q5TBwAbu565Z0liE2JeyrZI/s1600/thunderbird-exchange-5.png" height="214" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Para que Icedove autocomplete con las direcciones de la libreta global, hay que ir a "&lt;i&gt;Editar -&amp;gt; Preferencias -&amp;gt; solapa Redacción&lt;/i&gt;". Allí tildar la opción "&lt;i&gt;Servidor de directorios&lt;/i&gt;" y elegir la libreta recién creada.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinCnU-bnf6obhdmCLj5e8BFtpcMI_Ua9nzE5-KOrJmaCm3YvVhAciWlh_cFdecn9EFGFmR9ZLdfV4q27oUC51g7tKfwmTp2lkNClICeV4hH3Lg3guJ8quX46L8YkwZ5OFL9iPABn-I4bO0/s1600/thunderbird-exchange-6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinCnU-bnf6obhdmCLj5e8BFtpcMI_Ua9nzE5-KOrJmaCm3YvVhAciWlh_cFdecn9EFGFmR9ZLdfV4q27oUC51g7tKfwmTp2lkNClICeV4hH3Lg3guJ8quX46L8YkwZ5OFL9iPABn-I4bO0/s1600/thunderbird-exchange-6.png" height="215" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Cuando vayan a redactar un e-mail, Thunderbird/Icedove les solicitará la contraseña del usuario de dominio.</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_RUXQir-Wiepse12En5BaTHQ5RlUlCKl2ArLiS1Ib7cTDdedfASHYp0LoA6Elyu6cYhN9nWmTJli56JDSZEq3xX-MNLP6sbQJ-U_1ZoCM3ShJoCxa1I30pympqQvc9shMIpgjnWbQAW-Q/s72-c/thunderbird-exchange-0.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Ejecutar e Instalar Android en VirtualBox</title><link>http://itfreekzone.blogspot.com/2014/04/ejecutar-e-instalar-android-en.html</link><category>Android</category><category>articulos</category><category>celulares</category><category>GNU/Linux</category><category>Telefonia</category><author>noreply@blogger.com (V3kt0r)</author><pubDate>Tue, 8 Apr 2014 12:04:00 -0300</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-271207292388274566.post-604752995431655551</guid><description>El otro día leí el interesante artículo de &lt;a href="http://www.linuxito.com/"&gt;linuxito&lt;/a&gt;,&amp;nbsp;&lt;a href="http://www.linuxito.com/gnu-linux/nivel-medio/345-como-instalar-android-en-una-maquina-virtual-qemu-kvm"&gt;&lt;i&gt;Cómo instalar Android en una máquina virtual QEMU/KVM&lt;/i&gt;&lt;/a&gt;&amp;nbsp;y me alentó a probarlo. Para hacerlo, preferí utilizar VirtualBox, ya que tengo todas mis máquinas virtuales ahí, y me pareció bueno publicar mi experiencia, como complemento a la de linuxito.&lt;br /&gt;
&lt;br /&gt;
No conocía la versión x86 de Android. Hasta ahora había utilizado Android desde el SDK, mediante Android Virtual Devices (AVD). Este emulador es muy completo, pero también muy pesado, y la ejecución no es muy fluida que digamos (salvo que tengas una máquina muy potente). No me pasó lo mismo con la virtualización mediante VirtualBox.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Creación de la máquina virtual&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Para empezar, descarguemos la última imagen de Android para x86 desde la &lt;a href="http://sourceforge.net/projects/android-x86/"&gt;página del proyecto&lt;/a&gt;. Algo a tener en cuenta es que esta versión de Android es para tablets, por lo que algunas aplicaciones para celulares como WhatsApp no funcionarán.&lt;br /&gt;
&lt;br /&gt;
La máquina virtual que creemos en VirtualBox debe tener ciertas características, dado que Android aparentemente no trae todos los drivers y tiene requerimientos mínimos. Para la configuración base de la virtual, me basé en la información de &lt;a href="http://www.android-x86.org/documents/virtualboxhowto"&gt;Android x86 - VirtualBoxHowTo&lt;/a&gt;.&lt;br /&gt;
Utilicemos la siguiente definición:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
- Tipo: Linux&lt;br /&gt;
- Versión: 2.6&lt;br /&gt;
- Disco: 10GB deberían ser suficientes.&lt;br /&gt;
- Memoria: 256MB como mínimo, 512MB recomendado. Yo le pondría 1GB para que funcione bien fluído.&lt;br /&gt;
- Memoria de video (Pantalla -&amp;gt; Vídeo): 8MB&lt;br /&gt;
- Controlador de audio (Audio): SoundBlaster 16&lt;br /&gt;
- Red: Utilizar NAT o bridge. En modo bridge es necesario un servidor DHCP.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; - Tipo de adaptador: PCnet-FAST III&lt;br /&gt;
- Montar la imagen ISO de Android en la lectora virtual (Almacenamiento -&amp;gt; Controller: IDE)&lt;/blockquote&gt;
&amp;nbsp; &lt;br /&gt;
&lt;b&gt;Ejecución de prueba&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Al iniciar la máquina virtual, vemos que existen varias opciones de booteo. Si quieren hacer una prueba antes de instalar, pueden ejecutar Android en modo live (primer opción).&lt;br /&gt;
&lt;br /&gt;
En modo live, solamente nos solicitará que configuremos el idioma, la red WiFi, y nos preguntará sobre la localización. Como estamos en una virtual, y sólo queremos probar el sistema, dar skip a la configuración del WiFi y no tildar ninguna de las opciones de localización.&lt;br /&gt;
&lt;br /&gt;
El sistema inicia en cuestión de segundos y vemos el escritorio de Android. Acá me topé con un problema. Si están utilizando la integración del mouse de VirtualBox, probablemente les suceda que no ven el puntero dentro de la máquina virtual. Esto hace casi imposible su uso. Para solucionarlo, simplemente hay que deshabilitar la integración desde VirtualBox:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
Máquina -&amp;gt; Inhabilitar integración del ratón (Ctrl + I)&lt;/blockquote&gt;
&lt;br /&gt;
&lt;b&gt;Instalación de Android&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Para instalar Android en el disco virtual, debemos iniciar desde el cd y realizar los siguientes pasos:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Seleccionar el modo instalación en GRUB.&lt;/li&gt;
&lt;li&gt;Una vez que se carga el sistema de instalación, aparece el gestor de particiones.&lt;br /&gt; 
&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEir8SE32zKH8iYkINeXMGuQZ1aeGyYrhbkjWJnd8ZHArOvg9vYRUP19Ea8cfhCRGJSxCuFAPdse6JXKQhqfYXoTh4rO9JV1RzaLfhWYzsTNZsMV6z9pqdTqSCruOvZdnN8gM1-xGGVf7adG/s1600/android-install-1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEir8SE32zKH8iYkINeXMGuQZ1aeGyYrhbkjWJnd8ZHArOvg9vYRUP19Ea8cfhCRGJSxCuFAPdse6JXKQhqfYXoTh4rO9JV1RzaLfhWYzsTNZsMV6z9pqdTqSCruOvZdnN8gM1-xGGVf7adG/s1600/android-install-1.jpg" height="200" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;En el mismo seleccionar "Create/Modify partitions", con lo cual se abre cfdisk&lt;br /&gt;
&lt;br /&gt;
    &lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFLr2d0BP-cDfqAG1YvcO1ePoxz_WgNpXW-ObgZyTmwLF7l5yqx2t2Qp3SiacCzkGRJ7LvKQbUiv_tCYKyXD8D5s-r7r_VkdVHV_BL2xE3trHtcZtKzxhBF6LwkM6A3dV7BK5QYfNESJ1F/s1600/android-install-2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFLr2d0BP-cDfqAG1YvcO1ePoxz_WgNpXW-ObgZyTmwLF7l5yqx2t2Qp3SiacCzkGRJ7LvKQbUiv_tCYKyXD8D5s-r7r_VkdVHV_BL2xE3trHtcZtKzxhBF6LwkM6A3dV7BK5QYfNESJ1F/s1600/android-install-2.jpg" height="222" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Aquí seleccionar New -&amp;gt; Primary y dejar el tamaño completo del disco. Cuando la partición aparece, marcarla como booteable (opción Bootable).&lt;br /&gt;
&lt;br /&gt;
    &lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2dYTByWS6d6pTM6ERMHHw7elO5j8u7evn1e8Qzx551exI-F5XpDGar1ikfdjbJi9FtblOXA95jS0hWb7zoCtmRMRUFZjOWA197AgZF1-vR6q1TRprAxewh55tBJaYzD8txOg_guzE5Fpd/s1600/android-install-3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2dYTByWS6d6pTM6ERMHHw7elO5j8u7evn1e8Qzx551exI-F5XpDGar1ikfdjbJi9FtblOXA95jS0hWb7zoCtmRMRUFZjOWA197AgZF1-vR6q1TRprAxewh55tBJaYzD8txOg_guzE5Fpd/s1600/android-install-3.jpg" height="222" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Luego dar a la opción Write para que se guarden los cambios. Esta opción preguntará si estamos seguros de lo que vamos a hacer, pues decir que yes!&lt;/li&gt;
&lt;li&gt;Una vez terminado esto, seleccionar Quit para salir. Esto nos retorna a la pantalla anterior, en la cual ahora podemos seleccionar la partición para instalar el sistema.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9tcQXzD2XewLyaI0A_85cSh-X6UeQDgLjkfhFfjKhUskpW8JM5YE_Ed8RSAUqTmrihwkRo3Mtxfh8pEnOjSp7i3anDY8mUP39ER-wpzQqZx4usHqiogrOZuLH1HI4Z2brwRXhHwg-5D3X/s1600/android-install-4.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9tcQXzD2XewLyaI0A_85cSh-X6UeQDgLjkfhFfjKhUskpW8JM5YE_Ed8RSAUqTmrihwkRo3Mtxfh8pEnOjSp7i3anDY8mUP39ER-wpzQqZx4usHqiogrOZuLH1HI4Z2brwRXhHwg-5D3X/s1600/android-install-4.jpg" height="201" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Seleccionarla y formatearla con ext3.&lt;br /&gt;
&lt;br /&gt;
    &lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPwBEvJv_Nez_oyjTrnN0M82VOeRMaXs6pywirHmaQF6vS_jjKemONbtkMfW71ofpLANHmyKZKrBmHg82lr6nrlwvG3wa990CuPa5kfrJscU9J_br705GCYZ0fY0v9lNVbi26gn1VMgc2L/s1600/android-install-5.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPwBEvJv_Nez_oyjTrnN0M82VOeRMaXs6pywirHmaQF6vS_jjKemONbtkMfW71ofpLANHmyKZKrBmHg82lr6nrlwvG3wa990CuPa5kfrJscU9J_br705GCYZ0fY0v9lNVbi26gn1VMgc2L/s1600/android-install-5.jpg" height="200" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Al formatear el sistema consultará de nuevo si estamos seguros de lo que deseamos hacer, responder nuevamente que yes!&lt;/li&gt;
&lt;li&gt;Luego se nos consulta si deseamos instalar grub como boot loader. Seleccionar que si.&lt;/li&gt;
&lt;li&gt;Para finalizar, el sistema nos pregunta si deseamos hacer que /system sea un directorio de lectura+escritura. Esto permitirá mejor debugging, pero ocupará más espacio y la instalación demorará más. Dar que si, tampoco es tanto lo que pesa (ni lo que tarda).&lt;/li&gt;
&lt;li&gt;Cuando termina la copia de archivos, seleccionar reiniciar para ejecutar el nuevo sistema.&lt;br /&gt;
&lt;br /&gt;
    &lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWuLNzn_MSW1bNTadGyT7UzdhvIClsx5IcUUOYz9IsfKd2Dr6namhqqbxbSJI0NGF4LRS4p2Dvkd3_akIv7nrxhDUWQZzuKGOZLGq5cIg7H5i4E5dXx5c07wAel-pWEhpa7GV6erO-JddJ/s1600/android-install-6.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWuLNzn_MSW1bNTadGyT7UzdhvIClsx5IcUUOYz9IsfKd2Dr6namhqqbxbSJI0NGF4LRS4p2Dvkd3_akIv7nrxhDUWQZzuKGOZLGq5cIg7H5i4E5dXx5c07wAel-pWEhpa7GV6erO-JddJ/s1600/android-install-6.jpg" height="153" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;/ol&gt;
Como podrán observar, la instalación completa no demora más de 10 minutos (en mi caso no demoró ni 5).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Primer ejecución&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
La primer ejecución solicitará que configuremos algunas cosas:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Idioma: seleccionar el que más les guste.&lt;/li&gt;
&lt;li&gt;Configuración de WiFi: seleccionar skip, usaremos la conexión física.&lt;/li&gt;
&lt;li&gt;Cuenta de Google: sin una cuenta de Google configurada no se puede hacer mucho en Android, pero pueden pasar este paso sin configurar una.&lt;/li&gt;
&lt;li&gt;Enviar información de localización a Google: en este paso se nos consulta si deseamos información de localización "anonimamente" a Google. Al no tener GPS en la máquina virtual, no hace diferencia dejar tildadas o no las opciones.&lt;/li&gt;
&lt;li&gt;Nombre: la tablet necesita un nombre para personalizar aplicaciones. Pongan lo que gusten.&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;b&gt;Configuraciones básicas&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Al usar un rato Android en la virtual, encontré algunos problemas. El primero que encontré es que al abrir alguna aplicación, se rota la pantalla y no puedo retornar a la posición original. Como se imaginarán, usar el sistema rotado 90º no es nada cómodo! Esto se puede solucionar fácilmente deshabilitando el auto-rotate:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
Aplicaciones -&amp;gt; Settings -&amp;gt; Accessibility -&amp;gt; Destildar Auto-rotate scree&lt;/blockquote&gt;
Otro problema es que cuando se apaga la pantalla para ahorrar energía, no puedo recuperar el control. Para evitar esto deshabilité el modo sleep:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
Aplicaciones -&amp;gt; Settings -&amp;gt; Display -&amp;gt; Sleep -&amp;gt; Never Timeout&lt;/blockquote&gt;
&lt;br /&gt;
&lt;b&gt;Comentarios finales&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Usar la versión de Android x86 en VirtualBox u otras máquinas virtuales es muy simple y anda mucho mejor que usar AVD. Sin embargo AVD es mucho más completo que esta versión, dado que trae múltiples versiones de Android para múltiples dispositivos.&lt;br /&gt;
Hay que tener en cuenta que si no configuran una cuenta Google, no podrán instalar nada... prácticas monopólicas? naaaa&lt;br /&gt;
&lt;br /&gt;
Probar aplicaciones en el ambiente virtualizado es mucho mejor que andar instalando porquerías en una tablet o un celular directamente. Esto nos permitirá conocer Android más a fondo, dado que no tendremos miedo de romper un caro aparato. También nos servirá para testear como se ven y ejecutan aplicaciones web.&lt;br /&gt;
&lt;br /&gt;
En resumen, jueguen con este Android, que para eso está :)</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEir8SE32zKH8iYkINeXMGuQZ1aeGyYrhbkjWJnd8ZHArOvg9vYRUP19Ea8cfhCRGJSxCuFAPdse6JXKQhqfYXoTh4rO9JV1RzaLfhWYzsTNZsMV6z9pqdTqSCruOvZdnN8gM1-xGGVf7adG/s72-c/android-install-1.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">3</thr:total></item><item><title>Monitoreo de ancho de banda en routers/switches/etc usando MRTG</title><link>http://itfreekzone.blogspot.com/2014/03/monitoreo-de-ancho-de-banda-en.html</link><category>administracion</category><category>Ancho de Banda</category><category>articulos</category><category>cisco</category><category>debian</category><category>GNU/Linux</category><category>graficos</category><category>MRTG</category><category>redes</category><category>SNMP</category><author>noreply@blogger.com (V3kt0r)</author><pubDate>Thu, 13 Mar 2014 15:39:00 -0300</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-271207292388274566.post-8704904031324531962</guid><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6_PkN5rTq3Y3naR5ii9oiIQiQUcloGMORj9f7-7IF_ABvWnf3oxuBm4FaWJKIToGzSla6GltItmrYgLEUDgeGJrhYUwHIrUGKT9Il4BphA9xb0JCwSMBn9uun283qSzIKhKtTLMMlueLg/s1600/mrtg_logo.gif" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6_PkN5rTq3Y3naR5ii9oiIQiQUcloGMORj9f7-7IF_ABvWnf3oxuBm4FaWJKIToGzSla6GltItmrYgLEUDgeGJrhYUwHIrUGKT9Il4BphA9xb0JCwSMBn9uun283qSzIKhKtTLMMlueLg/s1600/mrtg_logo.gif" /&gt;&lt;/a&gt;&lt;/div&gt;
Luego de tener algunos problemas de saturación de ancho de banda, me volqué a la búsqueda de una herramienta que pueda graficar el uso de los links.&lt;br /&gt;
Comencé la búsqueda con herramientas que puedan graficar datos almacenados en archivos pcap, creados con tcpdump o wireshark, para lo cual encontré &lt;a href="http://www.tcptrace.org/"&gt;tcptrace&lt;/a&gt;. Si bien tcptrace es una herramienta interesante, me resultó bastante anticuada para lo que yo necesitaba, que era una visualización simple del uso de los links.&lt;br /&gt;
&lt;br /&gt;
Continuando la búsqueda, me orienté a herramientas que obtengan resultados por SNMP, en lugar de archivos pcap. De esta manera fui a dar con &lt;a href="http://oss.oetiker.ch/mrtg/"&gt;Multi Router Traffic Grapher (MRTG)&lt;/a&gt;. Descubrí que esta herramienta es muy utilizada, e incluso en la propia página de Cisco proveen información sobre cómo usar MRTG (una búsqueda en google "mrtg site:www.cisco.com" mostrará muchos resultados).&lt;br /&gt;
&lt;br /&gt;
Según la descripción en la página oficial:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;i&gt;MRTG monitorea dispositivos de red por SNMP y dibuja lindas imágenes mostrando cuánto tráfico ha pasado a través de cada interfaz.&lt;/i&gt;&lt;/blockquote&gt;
Si bien la idea parece ser monitorear routers, la herramienta permite ir más allá y monitorear cualquier dispositivo de red que envíe información de uso de interfaces a través de SNMP. Y no sólo eso, también permite monitorear uso de CPU, disco y memoria.&lt;br /&gt;
MRTG está escrito en perl y funciona tanto en GNU/Linux como en Windows (además de NetWare... por si a alguien le interesa), y es libre, licenciado mediante GPL.&lt;br /&gt;
&lt;br /&gt;
Si bien llevo un par de días probándolo, MRTG me parece la solución ideal para la tarea de monitoreo de links, y es un adicional muy interesante poder monitorear CPU, memoria y disco. Lo estoy probando con un switch Cisco Catalyst de más de 200 ports y va de lujo.&lt;br /&gt;
Este es un ejemplo de los gráficos que muestra:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0MQ21Oi1HkbzgowiU3dj2JSvtIjBk8Xi_xhcLIpwx5pzD5vIjkbBTjII-8w_HhdMksbEd9o1hwM5LufNXOSYUCNznklt4pzo77KN5aam_zrh4vpOG-nd8_2i7vycrSwBK4GukBtZwdf8w/s1600/mrtg.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0MQ21Oi1HkbzgowiU3dj2JSvtIjBk8Xi_xhcLIpwx5pzD5vIjkbBTjII-8w_HhdMksbEd9o1hwM5LufNXOSYUCNznklt4pzo77KN5aam_zrh4vpOG-nd8_2i7vycrSwBK4GukBtZwdf8w/s1600/mrtg.png" height="107" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Bueno, básta de cháchara y pasemos a lo importante, cómo instalar y configurarlo.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="font-size: large;"&gt;Instalación&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
La instalación es muy simple, dado que el paquete se encuentra en los repositorios de las distribuciones más importantes. Hay que tener en cuenta que se necesita tener un servidor web instalado, como ser Apache.&lt;br /&gt;
&lt;br /&gt;
En debian, MRTG se instala simplemente ejecutando:&lt;br /&gt;
&amp;nbsp; # apt-get install mrtg&lt;br /&gt;
&lt;br /&gt;
Mientras que en derivados de Red Hat (CentOS, Fedora) es:&lt;br /&gt;
&amp;nbsp; # yum -y install mrtg&lt;br /&gt;
&lt;br /&gt;
La instalación crea un archivo de configuración básico que no tiene prácticamente nada. En debian el archivo de configuración es /etc/mrtg.cfg, mientras que en derivados Red Hat es /etc/mrtg/mrtg.cfg. Además se crea un archivo cron en /etc/cron.d/mrtg.&lt;br /&gt;
El resto de la explicación la haré basándome en debian, que es donde lo probé, pero para los derivados de Red Hat sólo cambian los paths a los archivos.&lt;br /&gt;
&lt;br /&gt;
En debian hay que crear el directorio que hospede los archivos web. Dependiendo de su configuración del servidor web, el path puede variar, pero por defecto, el directorio se crearía en /var/www:&lt;br /&gt;
&amp;nbsp; # mkdir /var/www/mrtg&lt;br /&gt;
&lt;br /&gt;
Cambiamos el grupo owner para que Apache tenga más permisos sobre los archivos:&lt;br /&gt;
&amp;nbsp; # chown root:www-data /var/www/mrtg&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="font-size: large;"&gt;Configuración&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
La configuración básica de MRTG es muy simple. La forma más rápida y fácil de tener una configuración que realice pull de un dispositivo para ver el uso de ancho de banda, es usando la herramienta cfgmaker (instalada por el paquete mrtg) de la siguiente manera:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&amp;nbsp; # cfgmaker --global 'WorkDir: /var/www/mrtg' --output /etc/mrtg.cfg public@192.168.1.10&lt;/blockquote&gt;
donde:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
--global 'WorkDir: /var/www/mrtg' especifica el directorio donde se pondrán los datos recaudados, es decir, el del server web,&lt;br /&gt;
--output /etc/mrtg.cfg especifica el archivo de configuración a crear,&lt;br /&gt;
public@192.168.1.10 indica que se use la comunidad SNMP "public" y que la IP del dispositivo es 192.168.1.10.&lt;/blockquote&gt;
La comunidad "public" es la default en muchos dispositivos y por seguridad debe cambiarse, dado que es la "contraseña" de acceso a los datos SNMP. Obviamente el dispositivo que estemos consultando debe tener habilitadas las consultas SNMP con la comunidad utilizada.&lt;br /&gt;
&lt;br /&gt;
cfgmaker generará un nuevo archivo mrtg.cfg que contiene configuraciones globales, así como definiciones para cada interfaz que el dispositivo reporte en el pull SNMP. Lo más destacable de la configuración global es la sentencia "WorkDir:" que especifica el directorio pasado por parámetro.&lt;br /&gt;
&lt;br /&gt;
El siguiente paso es generar los archivos web para la configuración recién creada. Para ello, se utiliza la herramienta indexmaker, que también viene con mrtg. La generación de dichos archivos se realiza de la siguiente manera:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
# indexmaker /etc/mrtg.cfg --output /var/www/mrtg/index.html&lt;/blockquote&gt;
donde:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
/etc/mrtg.cfg es el archivo de configuración,&lt;br /&gt;
--output /var/www/mrtg/index.html es la ubicación y nombre del archivo index principal.&lt;/blockquote&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="font-size: large;"&gt;Ejecución de MRTG&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Con todo en su lugar, ahora debemos ejecutar mrtg. La instalación genera un archivo cron que ejecutará MRTG cada 5 minutos. Cada vez que se ejecuta, obtiene los valores de las interfaces para los dispositivos configurados, los almacena en su base de datos RRD, y crea los gráficos.&lt;br /&gt;
&lt;br /&gt;
Para ver si todo está bien, lo mejor es ejecutar al menos una vez el programa por consola, de la siguiente manera:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
# env LANG=C /usr/bin/mrtg&lt;/blockquote&gt;
env LANG=C se utiliza para setear la variable de entorno LANG, dado que si utilizan otro valor como UTF-8, arrojará un error.&lt;br /&gt;
&lt;br /&gt;
La primera vez que ejecuten mrtg arrojará varios errores del tipo "no encuentro tal archivo". Esto es normal, dado que los archivos que busca todavía no existen y se crean con la primer ejecución. Ejecuciones sucesivas no deberían arrojar estos errores.&lt;br /&gt;
&lt;br /&gt;
Una vez que se prueba que todo está bien, ya no hace falta ejecutarlo a mano, dado que de eso se encargará cron.&lt;br /&gt;
&lt;br /&gt;
Acceder a las gráficas es tan simple como apuntar con el navegador a la dirección del servidor donde se encuentra instalado MRTG. Por ejemplo:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
http://192.168.1.100/mrtg&lt;/blockquote&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="font-size: large;"&gt;Configuración avanzada&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Vimos como realizar una configuración de forma casi automática. Ahora, dependiendo lo que deseen monitorear y cómo, deberán editar el archivo de configuración creado con cfgmaker, o bien crearlo de cero.&lt;br /&gt;
Para esto hace falta conocer un poco más la estructura del archivo de configuración. El mismo se divide básicamente en tres secciones: opciones globales, &amp;nbsp;configuración de targets y definición de thresholds. Listaré las opciones que me parecen más importantes de cada una, para poder tunear la herramienta un poco.&lt;br /&gt;
Es interesante tener en cuenta que se pueden incluir otros archivos de configuración en el de la configuración global, utilizando el keyword "Include". Por ejemplo: &lt;i&gt;Inlude: switches.inc&lt;/i&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Global&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Entre las opciones globales, destaco:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;i&gt;WorkDir&lt;/i&gt;: establece el directorio de trabajo, donde se ubican los archivos de log y web. En el ejemplo básico, el directorio se estableció a /var/www/mrtg, pero se puede cambiar al que se desee. &lt;br /&gt;
Es posible cambiar el directorio donde se ubican los html (HtmlDir), logs (LogDir) e imagenes (ImageDir). Si se utilizan estas opciones, no debe establecerse el WorkDir, dado que sobreescribe estas opciones.&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Forks&lt;/i&gt;: permite definir cuántos procesos disparar para realizar consultas SNMP. Si se tienen que consultar muchos dispositivos, utilizar más de un proceso a la vez puede optimizar considerablemente la tarea.&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Interval&lt;/i&gt;: tiempo, en minutos, que transcurre entre ejecuciones de mrtg (por defecto es 5 minutos). Esto se refleja en los gráficos web, y se utilizar en modo daemon.&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Language&lt;/i&gt;: permite setear el lenguaje en el cual se muestran los datos web. MTRG soporta múltiples lenguajes, y tranquilamente podríamos elegir "spanish" como valor.&lt;/li&gt;
&lt;li&gt;&lt;i&gt;RunAsDaemon&lt;/i&gt;: muy interesante opción que permite independizarnos de cron y optimizar la ejeción. Si se setea en yes, no hace falta llamar el programa mrtg desde cron cada cierto intervalo de tiempo, sino que el programa se ejecuta una vez y luego queda en ejecución, realizando actualizaciones al intervalo seteado.&lt;br /&gt;En este caso es importante setear la opción "Interval" citada anteriormente, y eliminar la entrada de cron, dado que cada ejecución de mrtg iniciará un demonio nuevo.&lt;br /&gt;Esta opción debería utilizarse siempre, dado que ejecutar el programa con cron conlleva la creación del proceso y tener que releer los archivos de configuración cada vez.&lt;/li&gt;
&lt;/ul&gt;
Ejemplo de configuración global:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; WorkDir: /var/www/mrtg&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Forks: 3&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Language: spanish&lt;br /&gt;
&amp;nbsp; &amp;nbsp; RunAsDaemon: yes&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Interval: 5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Targets&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
La definición de targets tiene una cantidad de opciones abrumadora, por lo que listaré algunas que me parecen las principales. Cada target debe tener un nombre único, y el nombre debe agregarse a cada parámetro que pertenezca al mismo target (entre corchetes). Este nombre se usa también para el nombre de los archivos web, log e imágenes.&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;i&gt;Target&lt;/i&gt;: es la principal sentencia al definir un dispositivo a monitorear. Acepta muchos formatos (y cuando digo muchos, es MUCHOS) para definir el target. Las formas más comunes son las siguientes:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;u&gt;Basica&lt;/u&gt;: "puerto:comunidad@router"&lt;br /&gt;donde:&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;- puerto: es el número de la interfaz en el router a monitorear. La documentación no dice mucho al respecto, pero al menos en los Cisco, los puertos se numeran de forma consecutiva desde la primer placa, y arrancan desde el valor 2. Por ejemplo, la Fa0/37 pasa a ser el puerto 38, mientras que la Gi1/1 es el puerto 50 (es la interfaz 49 - por los 48 de la primer placa-, más 1 porque arranca en 2 la numeración).&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;- comunidad: es la comunidad SNMP que asignaron en el dispositivo.&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;- router: es el nombre DNS o la dirección IP del router/switch/etc a monitorear.&lt;br /&gt;Ejemplo: definición para graficar la interfaz 38 de un switch 3560.&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Target[switch3560_2]: 39:public@192.168.1.10&lt;/li&gt;
&lt;li&gt;&lt;u&gt;OIDs explícitos&lt;/u&gt;: "OID_1&amp;amp;OID_2:comunidad@router". Los OIDs son los identificadores SNMP que determinan los valores a obtener. Los OIDs están en cierta forma estandarizados, pero cada fabricante puede definir los que quiera. MTRG necesita al menos dos OIDs para realizar sus gráficos (uno lo dibuja en verde y el otro en azul). Esto no necesariamente necesita tener dos OIDs distintos, tranquilamente se puede especificar el mismo OID dos veces.&lt;br /&gt;Ejemplo: graficar el uso de CPU.&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp;Target[switch3560_1]: 1.3.6.1.4.1.9.2.1.57.0&amp;amp;1.3.6.1.4.1.9.2.1.57.0:public@192.168.1.10&lt;/li&gt;
&lt;/ul&gt;
Hay muchas otras formas de definir targets, así que si necesitan otra, busquen en el manual que están bien descriptas.
&lt;/li&gt;
&lt;li&gt;&lt;i&gt;MaxBytes&lt;/i&gt;: especifica los valores máximos que cualquiera de los dos valores medidos puede tomar. En el caso de interfaces, los tamaños máximos serían la velocidad soportada. Tener en cuenta que el valor es en bytes, no bits se especifica en las interfaces: 100 MB Ethernet = 12500000.&lt;br /&gt;Ejemplo:&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp;MaxBytes[switch3560_2]: 12500000&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Title&lt;/i&gt;: el string que se muestra en la barra del título de la página Web.&lt;br /&gt;Ejemplo:&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp;Title[switch3560_2]: Analisis de trafico Switch 3560&lt;/li&gt;
&lt;li&gt;&lt;i&gt;PageTop&lt;/i&gt;: texto a agregar al tope de la página HTML definida para el target. Hay que tener en cuenta que se pueden usar varias líneas, siempre que la primer columna esté vacío.&lt;br /&gt;Ejemplo:&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&amp;nbsp; PageTop[switch3560]: &amp;lt;h1&amp;gt;Analisis de trafico Switch 3560&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&amp;lt;div id="sysdetails"&amp;gt;&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;&amp;lt;table&amp;gt;&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;     &lt;/span&gt;&amp;lt;td&amp;gt;System:&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;     &lt;/span&gt;&amp;lt;td&amp;gt;Switch 3560 in &amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;     &lt;/span&gt;&amp;lt;td&amp;gt;Max Speed:&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;     &lt;/span&gt;&amp;lt;td&amp;gt;125.0 MBytes/s&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&amp;lt;/div&amp;gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Directory&lt;/i&gt;: si se especifica, los archivos web, para ese target, se ubicarán allí en lugar del WorkDir (o HtmlDir, LogDir, ImageDir). El directorio debe ser creado manualmente, dado que mrtg no lo creará.&lt;br /&gt;Ejemplo: colocar los archivos del switch3560 en el directorio /var/www/mrtg/switches&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp;Directory[switch3560]: /var/www/mrtg/switches&lt;/li&gt;
&lt;li&gt;&lt;i&gt;XSize e YSize&lt;/i&gt;: permiten especificar el tamaño del gráfico. Por defecto, los gráficos son de 400x100 pixels. Xsize debe estar comprendido entre 20 y 600, mientras que YSize debe ser mayor a 20.&lt;br /&gt;Ejemplo:&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp;XSize[switch3560_2]: 600&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp;YSize[switch3560_2]: 150&lt;/li&gt;
&lt;li&gt;&lt;i&gt;XZoom e YZoom&lt;/i&gt;: permiten hacer zoom en el gráfico.&lt;br /&gt;Ejemplo:&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp;XZoom[switch3560_2]: 2.0&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp;YSize[switch3560_2]: 2.0&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Options&lt;/i&gt;: permite setear algunos valores booleanos. Por ejemplo, por defecto los gráficos son en bytes y el tiempo se grafica de derecha a izquierda. Es posible cambiar este valor a algo más intuitivo, como valores en bits y que el gráfico crezca de izquierda a derecha:&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;Options[switch3560]: growright, bits&lt;br /&gt;Existen muchas otras opciones para setear por gráfico, y se pueden encontrar en la documentación.&lt;/li&gt;
&lt;/ul&gt;
Un dato interesante es que, dado que muchas definiciones de targets comparten la misma configuración, o configuraciones similares, mtrg permite utilizar valores default. Los datos default se configuran de la misma manera que se especifico para los targets, pero usando los caracteres _ ^ y $&lt;br /&gt;
En todos los casos, un valor en blanco, borra la configuración default. Cada una de las configuraciones default pueden ser sobre-escritas más abajo, con otra configuración default. Esto permite usar valores default distintos para distintos targets.&lt;br /&gt;
Veamos las opciones de configuración:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Valores default se especifican con el underscore "_". Las definiciones en targets sobreescriben este valor.&lt;br /&gt;Ejemplo: Especificar que todos los gráficos sean en bps, y crezcan hacia la derecha&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; Options[_]: growright, bits&lt;/li&gt;
&lt;li&gt;El signo "^" permite pre-agregar texto a valores definidos en los targets.&lt;br /&gt;Ejemplo: poner en el título de todos los targets el valor "Analisis MRTG -"&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; Title[^]: Analisis MRTG -&lt;br /&gt;Ahora, si por ejemplo se define el target switch3560:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; Title[switch3560_2]: Switch 3560 Fa0/2&lt;br /&gt;
&amp;nbsp; &amp;nbsp; El resultado será una página con el título "Analisis MRTG - Switch 3560 Fa0/2".&lt;/li&gt;
&lt;li&gt;Finalmente, el signo peso "$" permite agregar texto al final de valores definidos en los targets.&lt;br /&gt;Ejemplo: agregar el texto "- Laboratorio" a todos los títulos.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; Title[$]: - Laboratorio&lt;/li&gt;
&lt;br /&gt;
&lt;/ul&gt;
Ejemplo completo de configuración de Target (interfaz FastEthernet0/1 en switch 3560):&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
Options[_]: growright, bits&lt;br /&gt;
XSize[_]: 600&lt;br /&gt;
YSize[_]: 150&lt;br /&gt;
XZoom[_]: 2.0&lt;br /&gt;
YSize[_]: 2.0&lt;br /&gt;
Title[^]: Analisis MRTG -&lt;br /&gt;
Target[switch3560_2]: 39:public@192.168.1.10&lt;br /&gt;
MaxBytes[switch3560_2]: 12500000&lt;br /&gt;
Title[switch3560_2]: Switch 3560 Fa0/2&lt;br /&gt;
PageTop[switch3560]: &amp;lt;h1&amp;gt;Analisis de trafico Switch 3560&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;div id="sysdetails"&amp;gt;&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;table&amp;gt;&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;tr&amp;gt;&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;td&amp;gt;System:&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;td&amp;gt;Switch 3560 in &amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;tr&amp;gt;&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;td&amp;gt;Max Speed:&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;td&amp;gt;125.0 MBytes/s&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/div&amp;gt;&lt;/blockquote&gt;
&lt;br /&gt;
&lt;b&gt;Thresholds&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
La definición de thresholds permite realizar alguna acción cuando los valores sobrepasen un límite pre-establecido. Las acciones posibles son llamar un script externo o mandar un mail. Si se define llamar a un script externo, puede utilizarse la variable SetEnv para enviar parámetros extra.&lt;br /&gt;
&lt;br /&gt;
Como ejemplo de uso de thresholds, veamos la configuración para mandar un mail cuando la interfaz 2 del switch 3560 supera los 90Mb/s:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
# Directorio donde colocar los valores de threshold almacenados&lt;br /&gt;
ThreshDir: /var/www/mrtg/thresh&lt;br /&gt;
# Servidor de mail a utilizar&lt;br /&gt;
ThreshMailServer: mail.midominio.com&lt;br /&gt;
# Dirección a poner en el from del mail&lt;br /&gt;
ThreshMailSender: mtrg@midominio.com&lt;br /&gt;
# Definir a quienes mandar e-mail cuando se supere un límite. Se puede definir por host&lt;br /&gt;
ThreshMailAddress[_]: admin@midominio.com&lt;br /&gt;
# Definicion de limite maximo de uso de una interfaz (90Mb/s = 11.25MB/s = 11796480 Bytes/s)&lt;br /&gt;
ThreshMaxI[switch3560_2]: 11796480&lt;/blockquote&gt;
Tener en cuenta el uso de "ThreshDir", dado que sin él, mrtg no tiene donde almacenar los datos de mediciones de límites, causando que cada detección sea independiente y mandando muchos mails. Es decir, estamos interesados que nos informe si superamos los 90Mb/s una vez, y hasta que no baje de 90Mb/s, no vuelva a mandar otro mail.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="font-size: large;"&gt;Monitoreo Cisco&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Para poder monitorear dispositivos Cisco, primero hay que habilitar una comunidad SNMP para ser accedida en modo lectura. El nombre de la comunidad es el "password" para acceder a la información, por lo que debe mantenerse secreta.&lt;br /&gt;
Adicionalmente se puede setear una access-list que brinde acceso al servidor SNMP sólo a la IP elegida.&lt;br /&gt;
La configuración es la siguiente:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&amp;nbsp; (config)# snmp-server community &lt;comunidad&gt; ro 50&lt;/comunidad&gt;&amp;nbsp; (config)# access-list 50 permit &lt;/blockquote&gt;
&lt;br /&gt;
&lt;ip server="" snmp=""&gt;&lt;/ip&gt;
&lt;b&gt;&lt;span style="font-size: large;"&gt;Referencias&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://oss.oetiker.ch/mrtg/doc/mrtg-reference.en.html"&gt;MRTG 2.17.4 configuration reference&lt;/a&gt;&lt;br /&gt;
- &lt;a href="http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch23_:_Advanced_MRTG_for_Linux"&gt;MRTG (Multi Router Traffic Grapher) en Debian-Ubuntu&lt;/a&gt;&lt;br /&gt;
- &lt;a href="http://www.aboutdebian.com/monitor.htm"&gt;Network Monitoring Using Free Linux Tools&lt;/a&gt;&lt;br /&gt;
- &lt;a href="http://www.debianhelp.co.uk/mrtg.htm"&gt;MRTG Configuration in Debian&lt;/a&gt;&lt;br /&gt;
- &lt;a href="http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch23_:_Advanced_MRTG_for_Linux"&gt;Quick HOWTO : Ch23 : Advanced MRTG for Linux&lt;/a&gt;&lt;br /&gt;
- &lt;a href="http://www.ciscozine.com/2009/02/17/use-mrtg-to-monitor-bandwidth/"&gt;Use MRTG to monitor bandwidth&lt;/a&gt;&lt;br /&gt;
- &lt;a href="http://www.cisco.com/c/en/us/td/docs/ios/internetwrk_solutions_guides/splob/guides/dial/dial_nms/nmssol/mrtg.html"&gt;Cisco Task 3--Using MRTG to Monitor and Graph Traffic Loads&lt;/a&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6_PkN5rTq3Y3naR5ii9oiIQiQUcloGMORj9f7-7IF_ABvWnf3oxuBm4FaWJKIToGzSla6GltItmrYgLEUDgeGJrhYUwHIrUGKT9Il4BphA9xb0JCwSMBn9uun283qSzIKhKtTLMMlueLg/s72-c/mrtg_logo.gif" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">3</thr:total></item><item><title>Cargar scripts JavaScript una sola vez + llamar función cuando la carga termina</title><link>http://itfreekzone.blogspot.com/2013/12/cargar-scripts-javascript-una-sola-vez.html</link><category>codigo</category><category>HTML</category><category>JavaScript</category><category>jQuery</category><category>programacion</category><category>web</category><author>noreply@blogger.com (V3kt0r)</author><pubDate>Sat, 28 Dec 2013 07:56:00 -0300</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-271207292388274566.post-1262021427717567144</guid><description>Programando interfaces con JavaScript me topé con un problema al que no encontré una solución concreta. 
Cuando tenemos una página dinámica que carga scripts JS usando AJAX a medida que los va necesitando, podemos caer en el problema de cargar el mismo script más de una vez. Esto se debe a que de antemano no sabemos si el script se cargó o no y lo necesitamos para cumplir alguna función.

Un ejemplo rápido de ver es el caso de asignar un evento a un componente. Supongamos que tenemos una página con el siguiente componente:
&amp;lt;DIV ID="contenedor"&amp;gt;contenido&amp;lt;/DIV&amp;gt;
y tenemos una sección que cambia según el accionar del usuario, pero carga un script jQuery de la siguiente forma:
&lt;blockquote&gt;$.getScript('/js/bind.js');&lt;/blockquote&gt;
cuyo contenido es el siguiente:
&lt;blockquote&gt;$('#contenedor').click(function(event){
   $("#contenedor").append("hola");
});&lt;/blockquote&gt;
Si llamamos la misma sección más de una vez, lo que sucederá es que el evento click se enlaza más de una vez al componente "contenedor", haciendo que la palabra "hola" se agregue varias veces, en lugar de una sola vez como se esperaría.

Van entendiendo por dónde va el problema? De alguna forma, la sección que carga el script debería saber que el script ya se cargó y no debería cargarlo de nuevo. El tema es cómo saber esto...
En internet encontré algunas alternativas (sobre todo en StackOverflow) que explican cómo escapar este problema, pero al parecer ni JavaScript, ni jQuery implementan una solución directa, el programador debe encargarse de diseñar una función a tal fin.

Otro problema con el que me topé relacionado a esto es cómo saber en qué momento se terminaron de cargar varios scripts. Si usas jQuery, ellos recomiendan usar la función $(document).ready() para esperar a que la página se cargue. La realidad es que cuando se cargan scripts con $.getScript, el evento ready no espera a que estos scripts se carguen. No obstante $.getScript permite definir una función como parámetro que será llamada cuando el script se termine de cargar... pero y si queremos esperar a que un conjunto de scripts se carguen?

Para matar dos pájaros de un tiro (los problemas citados), diseñé una función jQuery denominada load_script, la cual decidí compartir con el mundo porque ninguna de las soluciones que encontré me pareció completa. Esta función está basada en distintas propuestas de distintos usuarios de StackOverflow. 

La función utiliza dos variables globales: loaded_scripts y loading_scripts. loaded_scripts mantiene la lista de scripts que ya se cargaron, así no se los vuelve a cargar nuevamente, mientras que loading_scripts mantiene la lista de scripts que se están cargando actualmente, para saber en qué momento se terminó de cargar todo.
Los parámetros de la función son: script_list y callback. script_list es un arreglo con la lista de scripts que se deben cargar y por los cuales debe esperarse a que carguen, mientras que callback es una función definida por el programador que se llamará cuando todos los scripts se terminen de cargar.

&lt;pre class="javascript" name="code"&gt;/**
 * Load the given JavaScript scripts and call the callback function when all of them are fully loaded.
 * Each script is loaded only once, meanning that if this function is called two times with the same script name
 * it will be loaded the first time. This avoids problems like redeclared functions or variables, event binded more than
 * once, and every other error produced by a script loaded multiple times.
 * The function uses two global array variables:
 *  loaded_scripts: scripts that has been already loaded. Used to know which scripts should not be loaded again.
 *  loaded_scripts: scripts that are in loading process. Used to know when the loading process is done.
 * 
 * @param script_list array containing the scripts links to load. Ex: ['/js/load_this.js', '/js/binder.js']
 * @param callback the function to call when loading of the scripts is done.
 */
var loaded_scripts = Array();
var loading_scripts = Array();
jQuery.fn.load_scripts = function(script_list, callback)
{
  var script;
  
  //check for already loaded scripts and so they're not loaded again
  for(s in script_list)
  {
    if(loaded_scripts.indexOf(script_list[s]) == -1)
      loading_scripts.push(script_list[s]);
  }
  
  //if all the requested scripts are already loaded, callback and return
  if(loading_scripts.length == 0)
  {
    callback();
    return;
  }
  
  for(s in loading_scripts)
  {
    script = loading_scripts[s];
    $.getScript(script,  function() {
      //when script is loaded, remove it from the loading scripts array.
      //if it's the last script on the array, it means we're done loading, so call the callback function.
      loading_scripts.splice(loading_scripts.indexOf(script), 1);
      loaded_scripts.push(script);
      if((loading_scripts.length == 0) &amp;&amp; (callback !== undefined))
 callback();
    });
  }
}
&lt;/pre&gt;

Un ejemplo de uso es el siguiente:
&lt;pre class="javascript" name="code"&gt;$(window).load_scripts(['/js/load_this.js', '/js/binder.js'], function() {
    $('#contenedor').click(function(event){
        $("#contenedor").append("hola");
    });
});&lt;/pre&gt;

Espero que la función les sirva, al menos como ejemplo, ya que por lo que vi es un problema recurrente en los foros. Si encuentran algún error en el código, me avisan en los comentarios ;)</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Obtener información de Wikipedia a través de su API</title><link>http://itfreekzone.blogspot.com/2013/12/obtener-informacion-de-wikipedia-traves.html</link><category>API</category><category>articulos</category><category>programacion</category><category>Web Service</category><category>Wikipedia</category><author>noreply@blogger.com (V3kt0r)</author><pubDate>Thu, 19 Dec 2013 20:14:00 -0300</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-271207292388274566.post-4376263766911701574</guid><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihI7iozUtlCeWLfHhXkQgmwWwtY2zY8Wy0WTdDYGgw3vO2kNZQgoU-JYJFkIDQRpNNYqUJxLkfpwQ0rasvctbRZit6c_bnyy04tvv0svK63rJJuOjnV_UwR8lilYzFQgCT_-VI0XsLxiEx/s1600/Wiki.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihI7iozUtlCeWLfHhXkQgmwWwtY2zY8Wy0WTdDYGgw3vO2kNZQgoU-JYJFkIDQRpNNYqUJxLkfpwQ0rasvctbRZit6c_bnyy04tvv0svK63rJJuOjnV_UwR8lilYzFQgCT_-VI0XsLxiEx/s1600/Wiki.png" /&gt;&lt;/a&gt;&lt;/div&gt;
Desde hace un tiempo me venía planteando la posibilidad de tomar información de Wikipedia para completar la información de ciertos ítems. Pensé, para qué reescribir información que ya existe de forma libre? mejor sería aportar y mejorar los artículos de Wikipedia.&lt;br /&gt;
&lt;br /&gt;
Por programas como Amarok o Clementine (que uso a diario), sabía que Wikipedia tenía alguna especie de web service para tomar información. Buscando encontré que MediaWiki, el software detrás de Wikipedia, provee una &lt;a href="http://www.mediawiki.org/wiki/API:Main_page"&gt;API&lt;/a&gt; que permite realizar consultas de diversos tipos. Esta web service viene habilitado por defecto cuando instalan el software, y Wikipedia permite su uso de forma gratuita. La API no sólo permite consultar información, sino también modificar el contenido de los artículos en sus bases de datos.&lt;br /&gt;
&lt;br /&gt;
Como la información provista en la descripción de la API me resultó algo escasa o muy desparramada, me pareció interesante explicar brevemente como realizar request de artículos.&lt;br /&gt;
&lt;br /&gt;
Para empezar, necesitamos saber que la URL del web service es la siguiente:&lt;br /&gt;
&amp;nbsp; http://@lc.wikipedia.org/w/api.php&lt;br /&gt;
donde @lc debe reemplazarse por el código del lenguaje del artículo que se desea obtener. Por ejemplo, si queremos el artículo de la Wikipedia en inglés, el código será 'en' (http://en.wikipedia.org/w/api.php), mientras que para el español, el código será 'es' (http://es.wikipedia.org/w/api.php).&lt;br /&gt;
A esta URL deben pasarse dos parámetros obligatorios, y estos parámetros fuerzan el uso de otros para especificar lo que se desea obtener. Existen muchos posibles parámetros y estos se encuentran documentados en &lt;a href="http://www.mediawiki.org/wiki/API:Properties"&gt;MediaWiki - API:Properties&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Los parámetros obligatorios para obtener contenido son los siguientes:&lt;br /&gt;
&amp;nbsp; - format: especifica en qué formato retornar el contenido. Los &lt;a href="http://www.mediawiki.org/wiki/API:Data_formats"&gt;formatos disponibles actualmente&lt;/a&gt; son:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; - json: formato JSON. Soporta la opción callback que permite especificar una función javascript a llamar cuando la carga del contenido esté completa.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; - php: formato serialized de PHP.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; - wddx: formato WDDX.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; - xml&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; - yaml&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; - rawfm: formato JSON con elementos de debugging (HTML) y callback.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; - txt: PHP print_r().&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; - dbg: PHP var_export().&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; - dump: PHP var_dump().&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Si bien la API soporta múltiples formatos, tienen pensado removerlos y dejar sólo JSON. En el artículo me centraré sólo en el uso de JSON.&lt;br /&gt;
&amp;nbsp; - action: especifica qué acción realizar. MediaWiki soporta más de 15 acciones, las cuales están descriptas &lt;a href="http://en.wikipedia.org/w/api.php"&gt;aquí&lt;/a&gt;. La acción que nos ocupa en nuestro caso es 'query'. query es una de las acciones más importantes y está documentada &lt;a href="http://www.mediawiki.org/wiki/API:Query"&gt;aquí&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Hasta ahora contamos con la siguiente URL para obtener contenido, a la cual iremos agregando parámetros según lo que necesitemos:&lt;br /&gt;
&amp;nbsp; http://en.wikipedia.org/w/api.php?format=json&amp;amp;action=query&lt;br /&gt;
&lt;br /&gt;
Ahora bien, la acción 'query' requiere los siguientes parámetros adicionales para obtener contenido:&lt;br /&gt;
&amp;nbsp; - titles, pageids, revids: es necesario utilizar uno de estos tres parámetros para especificar la página que deseamos, ya sea por el título de la misma (titles), su ID (pageids) o el ID de la revisión (revids). Cabe aclarar aca que cada página tiene múltiples revisiones, siendo la más actual la que se está mostrando. Estos parámetros soportan requests de múltiples páginas a la vez, separando el título/ID/revID de cada una utilizando el símbolo | (ejemplo: titles=PáginaA|PáginaB|PáginaC). MediaWiki aconseja solicitar múltiples páginas a la vez para ahorrar procesamiento y ancho de banda.&lt;br /&gt;
&amp;nbsp; En caso de utilizar el título para obtener la página, es necesario normalizarlo antes. La normalización del título implica poner en mayúsculas la primer letra, reemplazar todos los espacios con underscore '_', y ajustar el nombre al lenguaje que se está solicitando.&lt;br /&gt;
&amp;nbsp; - prop: se utiliza para obtener diversos datos acerca de la/s página/s especificadas con titles/pageids/revids. Cada propiedad conlleva el uso de otro parámetro para especificar información adicional sobre lo que se desea. Las propiedades se encuentran documentadas &lt;a href="http://www.mediawiki.org/wiki/API:Properties"&gt;aquí&lt;/a&gt;, siendo las que más nos interesan en nuestro caso, las siguientes:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; - info: recupera información básica acerca de una página. Este valor de prop requiere un parámetro adicional, que puede ser inprop (propiedades a obtener, separadas con el símbolo '|'), intoken o incontinue.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; - revisions: retorna las revisiones de la página solicitada, o bien la última revisión de cada una de las páginas listadas (en caso de solicitar más de una página). Revisions cuenta con varios posibles parámetros, de los cuales los que más nos interesan en este artículo son:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - rvprop: indica qué propiedad obtener de cada revisión. Existen diversas propiedades que se pueden obtener, siendo 'content' la que nos interesa, dado que es la que indica que deseamos obtener el contenido de la revisión. Si no se especifica otro parámetro, se retornará sólo la revisión actual de la página.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - rvparse: indica que el contenido retornado debe ser parseado y convertido a HTML. Si no se especifica este comando, el contenido será retornado en formato wikitext.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; - imageinfo/ii: obtiene información de imágenes. Esta propiedad también cuenta con varios posibles parámetros, de los cuales nos interesa iiprop. iiprop permite obtener distintos atributos de una imagen, y de estos nos resultan interesantes 'url' y 'size', que permiten obtener la URL donde se encuentra la imágen y el tamaño de la misma.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
Además de los listados, los siguientes dos parámetros también son de mucha utilidad:&lt;br /&gt;
&amp;nbsp; - redirects: se puede utilizar en conjunto con titles, para que MediaWiki resuelva los redirects necesarios para llegar al contenido, en caso que el título solicitado realice un redirect.&lt;br /&gt;
&amp;nbsp; - continue: en muchos casos, no se retorna todo el contenido en un sólo request. Cuando esto sucede, MediaWiki incluye la variable continue en su respuesta para indicar que hay más contenido por retornar. Para estos casos, se puede utilizar el parámetro continue (sin ningún valor) y así obtener la continuación del último request.&lt;br /&gt;
&lt;br /&gt;
Ya con la teoría, ahora podemos ver como todo esto funciona en la práctica. Como comenté anteriormente, las URLs que armaremos buscan obtener información en formato json, por lo que los parámetros format=json y action=query estarán en ellas.&lt;br /&gt;
&lt;br /&gt;
Como caso de ejemplo tomemos la wiki en español de Mahatma Gandhi. Como no sabemos el ID de la página, podemos buscar usar el título. Para empezar, debemos normalizar el título antes de poder utilizarlo en la query. En este caso, debemos reemplazar el espacio por el underscore, es decir, queda Mahatma_Gandhi.&lt;br /&gt;
La información que deseamos traer es la última revisión del artículo, así que elegimos la propiedad "revisions" y el parámetro rvprop=content, para que traiga el contenido:&lt;br /&gt;
&amp;nbsp; &lt;a href="http://es.wikipedia.org/w/api.php?format=json&amp;amp;action=query&amp;amp;titles=Mahatma_Gandhi&amp;amp;prop=revisions&amp;amp;rvprop=content"&gt;http://es.wikipedia.org/w/api.php?format=json&amp;amp;action=query&amp;amp;titles=Mahatma_Gandhi&amp;amp;prop=revisions&amp;amp;rvprop=content&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
El formato del contenido retornado es el siguiente:&lt;br /&gt;
&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; "query": información y resultado de la consulta. Es un objeto compuesto por:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "normalized": título normalizado&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "pages": lista de páginas retornadas por la consulta. Es un arreglo asociativo cuyos índices son los IDs de las páginas. Cada elemento del arreglo está compuesto por:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "ns":&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "pageid": el ID de la página.&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "revisions": arreglo que contiene todas las revisiones de la página. Está ordenado de revisión más nueva a más antigua, siendo 0 la versión actual. Cada uno de estos arreglos. Este arreglo contiene un arreglo con un solo ítem cuyo índice es el símbolo '*', y es éste el que contiene el contenido de la revisión. &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "title": el título de la página.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; "warnings": contiene warnings que arroja el servidor. Por ejemplo, cuando un título no se encuentra, se retorna un warning en este objeto.&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
Según lo visto, el contenido de la revisión se puede acceder de la siguiente manera: respuesta.query.pages[&lt;id de="" gina="" p=""&gt;].revisions[0]['*']. Si consultamos por una sola página, tendremos un sólo ID de página.&lt;br /&gt;&lt;br /&gt;El contenido retornado es texto con formato wikitext. Wikitext es un lenguaje de marcado liviano, es decir, como HTML o LaTeX, pero mucho más simple. El mismo se encuentra descripto en &lt;a href="http://en.wikipedia.org/wiki/Help:Wiki_markup"&gt;Help:Wiki markup&lt;/a&gt;. Existen parsers para este lenguaje, programados en distintos lenguajes. Una lista de parsers se puede encontrar en &lt;a href="http://www.mediawiki.org/wiki/Alternative_parsers"&gt;MediaWiki - Alternative parsers&lt;/a&gt;. &lt;br /&gt;En caso que deseen obtener texto formateado en HTML, pueden utilizar el parámetro rvparse de la siguiente manera:&lt;br /&gt;&amp;nbsp; &lt;a href="http://es.wikipedia.org/w/api.php?format=json&amp;amp;action=query&amp;amp;titles=Mahatma_Gandhi&amp;amp;prop=revisions&amp;amp;rvprop=content&amp;amp;rvparse"&gt;http://es.wikipedia.org/w/api.php?format=json&amp;amp;action=query&amp;amp;titles=Mahatma_Gandhi&amp;amp;prop=revisions&amp;amp;rvprop=content&amp;amp;rvparse&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Cuando vemos el contenido retornado en formato wikitext, observamos que las imágenes no tienen el link a donde se encuentran hosteadas, sino una referencia como "Archivo:Gandhi Nehru Indira.jpg". Si normalizamos el nombre del archivo y adherimos el contenido de lo anterior a un link de Wikipedia, encontramos que se obtiene la imagen en el sitio de Wikipedia: &lt;a href="http://es.wikipedia.org/wiki/Archivo:Gandhi_Nehru_Indira.jpg"&gt;http://es.wikipedia.org/wiki/Archivo:Gandhi_Nehru_Indira.jpg&lt;/a&gt;. Pero si queremos embeber la imagen en nuestro site, debemos conocer la URL de la imagen. Para ello se utiliza la propiedad imageinfo, el parámetro iiprop=url|size y el nombre normalizado de la siguiente manera:&lt;br /&gt;&amp;nbsp; &lt;a href="http://es.wikipedia.org/w/api.php?format=json&amp;amp;action=query&amp;amp;titles=Archivo:Gandhi_Nehru_Indira.jpg&amp;amp;prop=imageinfo&amp;amp;iiprop=url|size"&gt;http://es.wikipedia.org/w/api.php?format=json&amp;amp;action=query&amp;amp;titles=Archivo:Gandhi_Nehru_Indira.jpg&amp;amp;prop=imageinfo&amp;amp;iiprop=url|size&lt;/a&gt;&lt;br /&gt;La cual responde con un objeto similar al anterior, pero en este caso el arreglo "pages" contiene solo un ítem con índice "-1". Este ítem es un objeto que ahora contiene un atributo denominado imageinfo, que es un arreglo de imagenes. Como solicitamos sólo una imagen, tendrá un solo elemento. Cada elemento de este arreglo tiene el siguiente formato:&lt;br /&gt;&amp;nbsp; "size": el tamaño de la imagen.&lt;br /&gt;&amp;nbsp; "width": el ancho de la imagen.&lt;br /&gt;&amp;nbsp; "height": el alto.&lt;br /&gt;&amp;nbsp; "url": la URL donde la imagen se encuentra hosteada.&lt;br /&gt;Es decir, la URL se puede obtener de la siguiente manera: respuesta.query.pages[-1].imageinfo[0].url&lt;br /&gt;&lt;br /&gt;Bien, con esto ya podemos hacer consultas a Wikipedia y obtener tanto el texto como las imagenes. Formatear el texto obtenido, si lo obtienen en lenguaje wikitext, es otro tema. Estuve programando un parser en javascript, el cual interpreta parte del lenguaje, pero todo lo que se encuentra encerrado entre llaves "{}" tiene muchas variantes e interpretarlo todo no es tan simple. Algún día publicaré el código si es que lo termino. Entre los parsers que se encuentran en la página que cité, implementan parte de lenguaje, no se si hay alguno que interprete todo.&lt;br /&gt;&lt;br /&gt;Espero que les resulte útil la información, ya que me costó un par de días interpretar e implementar lo básico de lo que provee esta API.&lt;/id&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihI7iozUtlCeWLfHhXkQgmwWwtY2zY8Wy0WTdDYGgw3vO2kNZQgoU-JYJFkIDQRpNNYqUJxLkfpwQ0rasvctbRZit6c_bnyy04tvv0svK63rJJuOjnV_UwR8lilYzFQgCT_-VI0XsLxiEx/s72-c/Wiki.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">3</thr:total></item><item><title>Herramientas de Seguridad (scanners, sniffers, spoofers, IDS, web hacking, auditoría, exploitation y más!)</title><link>http://itfreekzone.blogspot.com/2013/11/herramientas-de-seguridad-scanners.html</link><category>auditoria</category><category>exploits</category><category>GNU/Linux</category><category>hacking</category><category>herramientas</category><category>IDS</category><category>links</category><category>listas</category><category>Networking</category><category>programas</category><category>seguridad</category><category>sniffing</category><category>spoofing</category><category>Tools</category><category>windows</category><author>noreply@blogger.com (V3kt0r)</author><pubDate>Thu, 14 Nov 2013 05:02:00 -0300</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-271207292388274566.post-7606357614233321253</guid><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimFOm_zvyUieWjRxNPEuC717ZtbFELWU3DlYrN2AClNVBMBxbJTq606A78A2ACN0B05L7aCAiz3xke1dkdDkfwDGXz25lFWohMJ-Gc-onnSXvBhTrtHV3y6ptDUvomKRfYCW2pXRZFAMwk/s1600/social-media-tools-swiss-knife.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="130" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimFOm_zvyUieWjRxNPEuC717ZtbFELWU3DlYrN2AClNVBMBxbJTq606A78A2ACN0B05L7aCAiz3xke1dkdDkfwDGXz25lFWohMJ-Gc-onnSXvBhTrtHV3y6ptDUvomKRfYCW2pXRZFAMwk/s200/social-media-tools-swiss-knife.jpg" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;
Cuantos meses sin publicar nada! pero, aunque no lo crean, el blog sigue vivo!&lt;br /&gt;
Para compensar la prolongada ausencia y conmemorar que llegamos a los &lt;u&gt;200&lt;/u&gt; posts, decidí postear algo groso, algo que venía prometiendo hace rato y que por fiaca de ponerme a editar, no publiqué antes: el listado de aplicaciones de seguridad.&lt;br /&gt;
Este listado es el resultado de 4 años de recopilación, trabajando en seguridad, y a ojo contiene más de 150 herramientas! Ahora que dejé la seguridad un poco de lado para concentrarme más en redes y comunicaciones, creo que es un buen momento para publicarlo.&lt;br /&gt;
Todas las herramientas están con sus respectivos links oficiales y una breve descripción.&lt;br /&gt;
&lt;br /&gt;
Antes de pasar al listado, les dejo algunas aclaraciones:&lt;br /&gt;
- Hay muchas herramientas que nunca utilicé. Armé el listado a partir de leer muchos artículos y descripciones de programas, e incluí todos los que me parecían útiles para distintas tareas.&lt;br /&gt;
- Emiliano (quien publicó varios artículos en este blog) colaboró en su momento con varias entradas de la lista. Ahora Emi administra su propio blog denominado &lt;a href="http://linuxito.com.ar/"&gt;linuxito.com.ar&lt;/a&gt;&lt;br /&gt;
- Agrupé las herramientas en base a distintos criterios. Varias encajan en más de un criterio, pero obviamente no iba a repetirlas en cada uno, así que están en el que me parece las describe mejor.&lt;br /&gt;
- El orden en que se encuentran las herramientas no tienen ningún significado, se fueron agregando aleatoriamente. Si bien traté de dejar las más importantes en los primeros lugares, pueden aparecer en cualquier posición.&lt;br /&gt;
- Como el listado se empezó a armar hace 4 años, puede que algunos links estén rotos, o que la herramienta no tenga más soporte.&lt;br /&gt;
- Hay varias herramientas que no se vinculan directamente a seguridad, pero sirven para realizar tests de seguridad.&lt;br /&gt;
- La gran mayoría de las aplicaciones listadas son libres y para 
GNU/Linux, pero hay algunas que son cerradas y pagas, y algunas que funcionan sólo en Windows.&lt;br /&gt;
- El listado no es completo y existen muchas y muy importantes herramientas que no se encuentran en él. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Live-CDs/DVDs&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.backtrack-linux.org/"&gt;BackTrack Linux&lt;/a&gt; - Linux-based 
penetration testing arsenal that aids security professionals in the 
ability to perform assessments in a purely native environment dedicated 
to hacking&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.wifislax.com/"&gt;Wifislax&lt;/a&gt; - distribución GNU/Linux (LiveCD) diseñada para la auditoría de seguridad del estándar 802.11. (WiFi, BlueTooth y RFID).&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.deftlinux.net/"&gt;DEFT&lt;/a&gt; - includes an excellent hardware detection and the best free and open source applications dedicated to Incident Response, Cyber Intelligence and Computer Forensics.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.pentoo.ch/"&gt;Pentoo&lt;/a&gt; - un Live CD/USB desarrollado para llevar a cabo procesos de Test de Penetración y/o Ethical Hacking. Esta distribución está basada en Gentoo Linux (kernel 2.6.31.6), gestor de ventanas Enlightenment e incluye una amplia colección de herramientas debidamente organizadas por categorías.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.securityonion.net/"&gt;Security Onion&lt;/a&gt; - Security Onion is a Linux distro for IDS, NSM, and log management.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://vipervast.sourceforge.net/"&gt;VAST&lt;/a&gt; - a VIPER Lab live distribution that contains VIPER developed tools such as UCsniff, videojak, videosnarf and more. Along with VIPER tools and other essential VoIP security tools, it also contains tools penetration testers utilize such as Metasploit, Nmap, and Hydra.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.networksecuritytoolkit.org/nst/index.html"&gt;Network Security Toolkit&lt;/a&gt; - The main intent of developing this toolkit was to provide the network security administrator with a comprehensive set of Open Source Network Security Tools.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.hackfromacave.com/katana.html"&gt;Katana&lt;/a&gt; - includes distributions which focus on Penetration Testing, Auditing, Password Cracking, Forensics and Honey Pots. Katana comes with over 100 portable Windows applications such as Wireshark, HiJackThis, Unstoppable Copier, and OllyDBG.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.matriux.com/download.html"&gt;Matriux&lt;/a&gt; - fully featured security distribution consisting of a bunch of powerful, open source and free tools that can be used for various purposes including, but not limited to, penetration testing, ethical hacking, system and network administration, cyber forensics investigations, security testing, vulnerability analysis, and much more.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://samurai.inguardians.com/"&gt;Samurai&lt;/a&gt; - The Samurai Web Testing Framework is a live linux environment that has been pre-configured to function as a web pen-testing environment. The CD contains the best of the open source and free tools that focus on testing and attacking websites.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://zeltser.com/remnux/"&gt;REMnux&lt;/a&gt; - lightweight Linux distribution for assisting malware analysts in reverse-engineering malicious software.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.plainsight.info/"&gt;PlainSight&lt;/a&gt; - versatile computer forensics environment that allows inexperienced forensic practitioners perform common tasks using powerful open source tools.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://weaknetlabs.com/main/?page_id=18"&gt;WeakNet Linux&lt;/a&gt; - designed primarily for penetration testing, forensic analysis and other security tasks.&lt;br /&gt;
The tools selected are those that the developer feels are used most often in pen-tests. A sample of those included are: BRuWRT-FORSSE v2.0, Easy-SSHd, Web-Hacking-Portal v2.0, Perlwd, Netgh0st v3.0, YouTube-Thief!, Netgh0st v2.2, DomainScan, ADtrace, Admin-Tool, Tartarus v0.1.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://h.ackerz.com/index.php?p=/projects#"&gt;Puck&lt;/a&gt; - GNU/Linux distribution distributed as a Live CD based on TinyCoreLinux. It contains top penetration testing tools.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://blog.metasploit.com/2010/05/introducing-metasploitable.html"&gt;Metasploitable&lt;/a&gt; - an Ubuntu server install on a VMWare image. A number of vulnerable packages are included, including an install of tomcat 5.5 (with weak credentials), distcc, tikiwiki, twiki, and an older mysql.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Scanners&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://nmap.org/"&gt;Nmap&lt;/a&gt; - free and open source utility for network discovery and security auditing. Many systems and network administrators also find it useful for tasks such as network inventory, managing service upgrade schedules, and monitoring host or service uptime.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://netcat.sourceforge.net/"&gt;Netcat&lt;/a&gt; - networking utility which reads and writes data across network connections, using the TCP/IP protocol.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.hping.org/"&gt;hping&lt;/a&gt; - command-line oriented TCP/IP packet assembler/analyzer. The interface is inspired to the ping(8) unix command, but hping isn't only able to send ICMP echo requests. It supports TCP, UDP, ICMP and RAW-IP protocols, has a traceroute mode, the ability to send files between a covered channel, and many other features.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://code.google.com/p/haraldscan/"&gt;haraldscan&lt;/a&gt; - Bluetooth discovery scanner.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://code.google.com/p/natprobe/"&gt;Natprobe&lt;/a&gt; - This little, but very usefull program, try to sends ICMP packet out the LAN, and detect all the host that allow it. Whit this you can find bugs in your (company?) network (or others), for example hosts that allow p2p connections.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.cqure.net/wp/mssqlscan/"&gt;MSSQLScan&lt;/a&gt; - A small multi-threaded tool that scans for Microsoft SQL Servers. The tool does it’s discovery by using UDP and returns a list of all detected instances with there respective protocols and ports.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://hostmap.sourceforge.net/"&gt;hostmap&lt;/a&gt; - enumerate all hostnames and configured virtual hosts on an IP address.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://code.google.com/p/finddomains/"&gt;FindDomains&lt;/a&gt; - multithreaded search engine discovery tool that will be very useful for penetration testers dealing with discovering domain names/web sites/virtual hosts which are located on too many IP addresses.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://code.google.com/p/keimpx/"&gt;keimpx&lt;/a&gt; - It can be used to quickly check for the usefulness of credentials across a network over SMB. Credentials can be: Combination of user / plain-text password, Combination of user / NTLM hash, Combination of user / NTLM logon session token.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.rootkitanalytics.com/tools/streamarmor.php"&gt;StreamArmor&lt;/a&gt; - sophisticated tool for discovering hidden alternate data streams (ADS) as well as clean them completely from the system.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://halberd.superadditive.com/"&gt;Halberd&lt;/a&gt; - a tool aimed at discovering real servers behind virtual IPs.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.nosec-inc.com/en/tools/2010/1015/42.html"&gt;NSDECODER&lt;/a&gt; - automated website malware detection tools. It can be used to decode and analyze weather the URL exist malware. Also, NSDECODER will analyze which vulnerability been exploit and the original source address of malware.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://code.google.com/p/sslyze/"&gt;sslyze&lt;/a&gt; - Cross-platform tool to analyze the configuration of SSL servers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Sniffers&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.wireshark.org/"&gt;wireshark&lt;/a&gt; - world's foremost network protocol analyzer. It lets you see what's happening on your network at a microscopic level. It is the de facto (and often de jure) standard across many industries and educational institutions.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.tcpdump.org/"&gt;tcpdump&lt;/a&gt; - prints out a description of the contents of packets on a network interface that match the boolean expression.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://ee.lbl.gov/"&gt;arpwatch&lt;/a&gt; - thernet monitor program; for keeping track of ethernet/ip address pairings.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://ucsniff.sourceforge.net/"&gt;ucsniff&lt;/a&gt; - VoIP &amp;amp; IP Video Security Assessment tool that integrates existing open source software into several useful features, allowing VoIP and IP Video owners and security professionals to rapidly test for the threat of unauthorized VoIP and Video Eavesdropping.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.irongeek.com/i.php?page=backtrack-3-man/webmitm"&gt;webmitm&lt;/a&gt; - transparently proxies and sniffs HTTP / HTTPS traffic redirected by dnsspoof, capturing most "secure" SSL-encrypted webmail logins and form submissions.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://monkey.org/~dugsong/dsniff/"&gt;dsniff&lt;/a&gt; - collection of tools for network auditing and penetration testing. dsniff, filesnarf, mailsnarf, msgsnarf, urlsnarf, and webspy passively monitor a network for interesting data (passwords, e-mail, files, etc.). arpspoof, dnsspoof, and macof facilitate the interception of network traffic normally unavailable to an attacker (e.g, due to layer-2 switching). sshmitm and webmitm implement active monkey-in-the-middle attacks against redirected SSH and HTTPS sessions by exploiting weak bindings in ad-hoc PKI.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.netresec.com/?page=RawCap"&gt;RawCap&lt;/a&gt; - RawCap is a free command line network sniffer for Windows that uses raw sockets.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://comax.fr/yamas.php"&gt;Yamas&lt;/a&gt; - a tool that aims at facilitating mitm attacks by automating the whole process from setting up ip forwarding and modifying iptables, to the ARP cache poisoning&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Spoofing&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://arpspoof.sourceforge.net/"&gt;arpspoof&lt;/a&gt; - may allow an attacker to sniff data frames on a local area network (LAN), modify the traffic, or stop the traffic altogether.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.monkey.org/~dugsong/dsniff/"&gt;dnsspoof&lt;/a&gt; - forges replies to arbitrary DNS address / pointer queries on the internal LAN. This is useful in bypassing host name based access controls, or in implementing a variety of efficient network controls.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;IDS&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.snort.org/"&gt;snort&lt;/a&gt; - open source network intrusion prevention and detection system (IDS/IPS).&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.ossec.net/main/"&gt;OSSEC&lt;/a&gt; - scalable, multi-platform, open source Host-based Intrusion Detection System (HIDS). It has a powerful correlation and analysis engine, integrating log analysis, file integrity checking, Windows registry monitoring, centralized policy enforcement, rootkit detection, real-time alerting and active response.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.la-samhna.de/samhain/"&gt;Samhain&lt;/a&gt; - open source host-based intrusion detection system (HIDS) provides file integrity checking and logfile monitoring/analysis, as well as rootkit detection, port monitoring, detection of rogue SUID executables, and hidden processes.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://nebula.carnivore.it/"&gt;Nebula&lt;/a&gt; - network intrusion signature generator. It can help securing a network by automatically deriving and installing filter rules from attack traces. In a common setup, nebula runs as a daemon and receives attacks from honeypots. Signatures are currently published in Snort format.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://openinfosecfoundation.org/index.php/downloads"&gt;suricata&lt;/a&gt; - The Suricata Engine is an Open Source Next Generation Intrusion Detection and Prevention Engine. This engine is not intended to just replace or emulate the existing tools in the industry, but will bring new ideas and technologies to the field.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://osiris.shmoo.com/"&gt;Osiris&lt;/a&gt; - Host Integrity Monitoring System that periodically monitors one or more hosts for change. Osiris keeps an administrator apprised of possible attacks and/or nasty little trojans. The purpose here is to isolate changes that indicate a break-in or a compromised system.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://sagan.softwink.com/"&gt;Sagan&lt;/a&gt; - multi-threaded, real time system and event log monitoring system, but with a twist. Sagan uses a "Snort" like rule set for detecting bad things happening on your network and/or computer systems. If Sagan detects a "bad thing" happening, that event can be stored to a Snort database (MySQL/PostgreSQL) and Sagan will attempt to correlate the event with your Snort Intrusion Detection/Intrusion Prevention (IDS/IPS) system.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://snorby.org/"&gt;Snorby&lt;/a&gt; - new and modern Snort IDS front-end. The basic fundamental concepts behind snorby are simplicity and power.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://bailey.st/blog/smooth-sec/"&gt;Smooth-sec&lt;/a&gt; - ready to-go&amp;nbsp; IDS/IPS (Intrusion Detection/Prevention System) linux distribution based on the multi threaded Suricata IDS/IPS engine and Snorby, the top notch web application for network security monitoring.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://arpon.sourceforge.net/"&gt;ArpON&lt;/a&gt; - portable handler daemon that make ARP secure in order to avoid the Man In The Middle (MITM) through ARP Spoofing/Poisoning attacks. It detects and blocks also derived attacks by it for more complex attacks, as: DHCP Spoofing, DNS Spoofing, WEB Spoofing, Session Hijacking and SSL/TLS Hijacking &amp;amp; co attacks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Firewalls&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://kde-apps.org/content/show.php?content=124131"&gt;iQfire-wall&lt;/a&gt; - framework that implements a network firewall. It can be used in desktop systems and in simple network configurations, providing a friendly graphical interface and a simple installation procedure. Also unprivileged users can personalize.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.fs-security.com/docs/introduction.php"&gt;Firestarter&lt;/a&gt; - Open Source visual firewall program. The software aims to combine ease of use with powerful features, therefore serving both Linux desktop users and system administrators.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.ipcop.org/"&gt;IPCop&lt;/a&gt; - Linux firewall distribution.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.fwbuilder.org/"&gt;Firewall Builder&lt;/a&gt; - Firewall Builder is a GUI firewall configuration and management tool that supports iptables (netfilter), ipfilter, pf, ipfw, Cisco PIX (FWSM, ASA) and Cisco routers extended access lists.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.greensql.net/"&gt;GreenSQL&lt;/a&gt; - Open Source database firewall used to protect databases from SQL injection attacks. GreenSQL works as a proxy and has built in support for MySQL. The logic is based on evaluation of SQL commands using a risk scoring matrix as well as blocking known db administrative commands (DROP, CREATE, etc). GreenSQL provides MySQL database security solution.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://runplaybook.com/p/11"&gt;Flint&lt;/a&gt; - examines firewalls, quickly computes the effect of all the configuration rules, and then spots problems so you can: CLEAN UP RUSTY CONFIGURATIONS that are crudded up with rules that can't match traffic; ERADICATE LATENT SECURITY PROBLEMS lurking in overly-permissive rules; SANITY CHECK CHANGES to see if new rules create problems.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Honeypots&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://sourceforge.net/projects/honeydrive/"&gt;HoneyDrive&lt;/a&gt; - virtual hard disk drive (VMDK format) with Ubuntu Server. It contains various honeypot systems such as Kippo SSH honeypot, Dionaea malware honeypot and Honeyd. Additionally it includes useful scripts and utilities to analyze and visualize the data it captures. Lastly, other helpful tools like tshark (command-line Wireshark), pdftools, etc. are also present.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Auditory&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.tenable.com/products/nessus"&gt;Nessus&lt;/a&gt; - vulnerability scanner. Provides patch, configuration, and compliance auditing; mobile, malware, and botnet discovery; sensitive data identification; and many other features.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.openvas.org/"&gt;OpenVAS&lt;/a&gt; - Open Vulnerability Assessment System and is a network security scanner with associated tools like a graphical user front-end. The core component is a server with a set of network vulnerability tests (NVTs) to detect security problems in remote systems and applications.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.saintcorporation.com/index.html"&gt;SAINT&lt;/a&gt; - Vulnerability Scanning, Penetration Testing, Social Engineering, Configuration Assessments, Reporting.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.pentbox.net/"&gt;PenTBox&lt;/a&gt; - Security Suite with programs like Password Crackers, Denial of Service testing tools (DoS and DDoS), Secure Password Generators, Honeypots and much more.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.seccubus.com/"&gt;Seccubus&lt;/a&gt; - runs Nessus scans at regular intervals and compares the findings of the last scan with the findings of the previous scan. The delta of this scan is presented in a web GUI when findingscan be easily marked as either real findings or non-issues. Non issues get ignored untill they change. This causes a dramaticreduction a analysis time.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://projects.sentinelchicken.org/grokevt/"&gt;GrokEVT&lt;/a&gt; - collection of scripts built for reading Windows® NT/2K/XP/2K3 event log files. GrokEVT is released under the GNU GPL, and is implemented in Python.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.dwheeler.com/flawfinder/"&gt;Flawfinder&lt;/a&gt; - program that examines source code and reports possible security weaknesses (``flaws'') sorted by risk level. It's very useful for quickly finding and removing at least some potential security problems before a program is widely released to the public.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.cqure.net/wp/krbguess/"&gt;KrbGuess&lt;/a&gt; - small and simple tool which can be used during security testing to guess valid usernames against a Kerberos environment.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.webfwlog.net/"&gt;Webfwlog&lt;/a&gt; - flexible web-based firewall log analyzer and reporting tool. It supports standard system logs for linux, FreeBSD, OpenBSD, NetBSD, Solaris, Irix, OS X, etc. as well as Windows XP. Supported log file formats are netfilter, ipfilter, ipfw, ipchains and Windows XP. Webfwlog also supports logs saved in a database using the ULOGD target of the linux netfilter project.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://yasat.sourceforge.net/"&gt;YASAT&lt;/a&gt; - (Yet Another Stupid Audit Tool) is a simple stupid audit tool. It do many tests for checking security configuration issue or others good practice.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.security-database.com/toolswatch/FireCAT-1-5-released.html"&gt;FireCAT (Firefox Catalog of Auditing exTension)&lt;/a&gt; - mindmap collection of the most efficient and useful firefox extensions oriented application security auditing and assessment.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://code.google.com/p/keimpx/"&gt;keimpx&lt;/a&gt; - keimpx is an open source tool, released under a modified version of Apache License 1.1. It can be used to quickly check for the usefulness of credentials across a network over SMB.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://buck-security.sourceforge.net/buck-security.html"&gt;Buck Security&lt;/a&gt; - collection of security checks for Linux. It was designed for Debian and Ubuntu servers, but can be useful for any Linux system.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://securityxploded.com/dllhijackauditor.php"&gt;DllHijackAuditor&lt;/a&gt; - smart tool to Audit against the Dll Hijacking Vulnerability in any Windows application.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.getmantra.com/"&gt;Mantra&lt;/a&gt; - a collection of free and open source tools integrated into a web browser, which can become handy for students, penetration testers, web application developers, security professionals etc.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://securityxploded.com/mysql-password-auditor.php"&gt;MysqlPasswordAuditor&lt;/a&gt; - FREE Mysql password recovery and auditing software. Mysql is one of the popular and powerful database software used by most of the web based and server side applications.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;PDFs&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://security-labs.org/origami/"&gt;origami&lt;/a&gt; - Ruby framework designed to parse, analyze, and forge PDF documents. This is NOT a PDF rendering library. It aims at providing a scripting tool to generate and analyze malicious PDF files. As well, it can be used to create on-the-fly customized PDFs, or to inject (evil) code into already existing documents.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://code.google.com/p/pdfinjector/"&gt;pdfinjector&lt;/a&gt; - Script to inject javascript code into existing pdf files.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.757labs.com/projects/pdfresurrect/"&gt;PDFResurrect&lt;/a&gt; - tool aimed at analyzing PDF documents. The PDF format allows for previous document changes to be retained in a more recent version of the document, thereby creating a running history of changes for the document.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;File vulnerabilities checkers&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.snort.org/vrt/vrt-resources/officecat"&gt;OfficeCat&lt;/a&gt;) - command line utility that can be used to process Microsoft Office Documents for the presence of potential exploit conditions in the file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Exploitation&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.metasploit.com/"&gt;Metasploit&lt;/a&gt; - penetration testing software. Helps verify vulnerabilities and manage security assessments.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://epinna.github.com/Weevely/"&gt;Weevely&lt;/a&gt; - stealth PHP web shell that provides a telnet-like console. It is an essential tool for web application post exploitation, and can be used as stealth backdoor or as a web shell to manage legit web accounts, even free hosted ones.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://code.google.com/p/xlsinjector/"&gt;XLSInjector&lt;/a&gt; - Injects meterpreter shell to excel xls files (Port 4444).&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.fastandeasyhacking.com/manual"&gt;Armitage&lt;/a&gt; - graphical cyber attack management tool for Metasploit that visualizes your targets, recommends exploits, and exposes the advanced capabilities of the framework.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.immunitysec.com/products-canvas.shtml"&gt;Canvas&lt;/a&gt; - Immunity's CANVAS makes available hundreds of exploits, an automated exploitation system, and a comprehensive, reliable exploit development framework to penetration testers and security professionals worldwide.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.coresecurity.com/content/core-impact-overview"&gt;Core Impact&lt;/a&gt; - the most comprehensive software solution for assessing the real-world security of: web applications, network systems, endpoint systems and email users, wireless networks, network devices.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Wireless&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.metageek.net/products/inssider"&gt;inSSIDer&lt;/a&gt; - award-winning free Wi-Fi network scanner for Windows Vista and Windows XP.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.kismetwireless.net/"&gt;Kismet&lt;/a&gt; - an 802.11 layer2 wireless network detector, sniffer, and intrusion detection system. Kismet will work with any wireless card which supports raw monitoring (rfmon) mode, and (with appropriate hardware) can sniff 802.11b, 802.11a, 802.11g, and 802.11n traffic.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://code.google.com/p/wifite/"&gt;wifite&lt;/a&gt; - attack multiple WEP and WPA encrypted networks at the same time. this tool is customizable to be automated with only a few arguments. can be trusted to run without supervision.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Networking&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.yersinia.net/"&gt;Yersinia&lt;/a&gt; - network tool designed to take advantage of some weakeness in different network protocols. It pretends to be a solid framework for analyzing and testing the deployed networks and systems.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://monkey.org/~dugsong/dsniff/"&gt;macof&lt;/a&gt; - flood a switched LAN with random MAC addresses&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.packetfence.org/home.html"&gt;PacketFence&lt;/a&gt; - a fully supported, trusted, Free and Open Source network access control (NAC) system.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.vulnerabilityassessment.co.uk/eigrp.htm"&gt;Eigrp-tools&lt;/a&gt; - custom EIGRP packet generator and sniffer combined. It was developed to test the security and overall operation quality of the EIGRP routing protocol.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.gns3.net/"&gt;GNS3&lt;/a&gt; - graphical network simulator that allows simulation of complex networks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Vulnerabilidades Web&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.cirt.net/nikto2"&gt;Nikto&lt;/a&gt; - Open Source (GPL) web server scanner which performs comprehensive tests against web servers for multiple items, including over 6500 potentially dangerous files/CGIs, checks for outdated versions of over 1250 servers, and version specific problems on over 270 servers.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://wapiti.sourceforge.net/"&gt;Wapiti&lt;/a&gt; - It performs "black-box" scans, i.e. it does not study the source code of the application but will scans the webpages of the deployed webapp, looking for scripts and forms where it can inject data.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="https://addons.mozilla.org/En-us/firefox/addon/tamper-data/"&gt;Tamperdata&lt;/a&gt; - Firefox add-on to view and modify HTTP/HTTPS headers and post parameters.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.edge-security.com/wfuzz.php"&gt;Wfuzz&lt;/a&gt; - is a tool designed for bruteforcing Web Applications, it can be used for finding resources not linked (directories, servlets, scripts, etc), bruteforce GET and POST parameters for checking different kind of injections (SQL, XSS, LDAP,etc), bruteforce Forms parameters (User/Password), Fuzzing, etc.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.owasp.org/index.php/Category:OWASP_Webslayer_Project"&gt;WebSlayer&lt;/a&gt; - tool designed for bruteforcing Web Applications, it can be used for finding not linked resources (directories, servlets, scripts, etc), bruteforce GET and POST parameters, bruteforce Forms parameters (User/Password), Fuzzing, etc. The tools has a payload generator and a easy and powerful results analyzer.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://wtr.rubyforge.org/"&gt;Watir&lt;/a&gt; - drives browsers the same way people do. It clicks links, fills in forms, presses buttons. Watir also checks results, such as whether expected text appears on the page.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.grendel-scan.com/"&gt;Grendel-Scan&lt;/a&gt; - open-source web application security testing tool. It has automated testing module for detecting common web application vulnerabilities, and features geared at aiding manual penetration tests.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://noptrix.net/codes.html"&gt;uwss&lt;/a&gt; - web security scanner and used for testing security holes in web applications. It can act as a fuzzer whose objective is to probe the application with various crafted attack strings. uwss is built upon a modular concept.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://doit.sourceforge.net/"&gt;Doit&lt;/a&gt; - scripting tool and language for testing web applications that use forms. Doit can generate random or sequenced form fill-in information, report results (into a database, file, or stdout), filter HTML results, and compare results to previous results.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.bindshell.net/tools/beef/"&gt;BeEF&lt;/a&gt; - browser exploitation framework. A professional tool to demonstrate the real-time impact of browser vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://net-square.com/httprint/index.shtml"&gt;httprint&lt;/a&gt; - Web server fingerprinting tool.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.netcraft.com/"&gt;Netcraft&lt;/a&gt; - Escanea servidores web, se utiliza para determinar qué sitios web aloja un servidor.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://curl.haxx.se/"&gt;curl&lt;/a&gt; - curl is a command line tool for transferring files with URL syntax, supporting FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS and FILE. curl supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form based upload, proxies, cookies, user+password authentication (Basic, Digest, NTLM, Negotiate, kerberos...), file transfer resume, proxy tunneling and a busload of other useful tricks.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://portswigger.net/intruder/"&gt;Burp Intruder&lt;/a&gt; - Burp Intruder is a tool for automating customised attacks against web applications. You can use Burp Intruder to perform many kinds of tasks, including enumerating identifiers, harvesting useful data, and fuzzing for vulnerabilities. It can be used to test for flaws such as SQL injection, cross-site scripting, buffer overflows and path traversal; perform brute force attacks against authentication schemes; manipulate request parameters; trawl for hidden content and functionality; exploit session token predictability; mine for interesting data; and perform concurrency attacks and application-layer denial-of-service attacks.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="https://addons.mozilla.org/firefox/573/"&gt;Add N Edit Cookies&lt;/a&gt; - Firefox extension to edit cookies.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.foundstone.com/us/resources/proddesc/cookiedigger.htm"&gt;CookieDigger&lt;/a&gt; - CookieDigger helps identify weak cookie generation and insecure implementations of session management by web applications.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://xss-proxy.sourceforge.net/"&gt;XSS-Proxy&lt;/a&gt; - XSS-Proxy is an advanced Cross-Site-Scripting (XSS) attack tool.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://code.google.com/p/ratproxy/"&gt;ratproxy&lt;/a&gt; - Passive web application security audit tool.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.businessinfo.co.uk/labs/hackvertor/hackvertor.php"&gt;Hackvertor&lt;/a&gt; - Herramienta Web para convertir strings de texto a diferentes codificaciones, útil para inyectar código en las URLs.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.gnucitizen.org/projects/backframe/"&gt;Backframe&lt;/a&gt; - Backframe is a full-featured attack console for exploiting WEB browsers, WEB users and WEB applications.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.websecurify.com/"&gt;WebSecurity&lt;/a&gt; Websecurify is a web and web2.0 security initiative specializing in researching security issues and building the next generation of tools to defeat and protect web technologies (viene para Win/Linux/Mac!).&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="https://labs.portcullis.co.uk/application/xssshell/"&gt;XSS Tunnelling&lt;/a&gt; - the tunnelling of HTTP traffic through an XSS Channel to use virtually any application that supports HTTP proxies.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.digininja.org/projects/cewl.php"&gt;CeWL&lt;/a&gt; - ruby app which spiders a given url to a specified depth, optionally following external links, and returns a list of words which can then be used for password crackers such as John the Ripper.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://code.google.com/p/fimap/"&gt;fimap&lt;/a&gt; - little python tool which can find, prepare, audit, exploit and even google automatically for local and remote file inclusion bugs in webapps.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://w3af.sourceforge.net/"&gt;w3af&lt;/a&gt; - Web Application Attack and Audit Framework. The project's goal is to create a framework to find and exploit web application vulnerabilities that is easy to use and extend.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://mytty.org/wafp/wafp-0.01-26c3.tar.gz"&gt;WAFP&lt;/a&gt; - WAFP fetches the files given by the Finger Prints from a webserver and checks if the checksums of those files are matching to the given checksums from the Finger Prints. This way it is able to detect the detailed version and even the build number of a Web Application.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://sahi.co.in/w/"&gt;Sahi&lt;/a&gt; - automation and testing tool for web applications, with the facility to record and playback scripts. Sahi runs on any modern browser which supports javascript.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://code.google.com/p/skipfish/"&gt;skipfish&lt;/a&gt; - A fully automated, active web application security reconnaissance tool.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://code.google.com/p/davtest/"&gt;DAVTest&lt;/a&gt; - tests WebDAV enabled servers by uploading test executable files, and then (optionally) uploading files which allow for command execution or other actions directly on the target.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://iscanner.isecur1ty.org/"&gt;iScanner&lt;/a&gt; - free open source tool lets you detect and remove malicious codes and web pages viruses from your Linux/Unix server easily and automatically.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://labs.idefense.com/software/fuzzing.php#more_comraider"&gt;COMRaider&lt;/a&gt; - a tool designed to fuzz COM Object Interfaces (ActiveX).&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://github.com/Zapotek/arachni"&gt;Arachni&lt;/a&gt; - feature-full and modular Ruby framework that allows penetration testers and administrators to evaluate the security of web applications. Arachni is smart, it trains itself with every HTTP response it receives during the audit process.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://scriptjunkie1.wordpress.com/2010/07/17/sessionthief/"&gt;sessionthief&lt;/a&gt; - performs HTTP session cloning by cookie stealing. It integrates automatically with Firefox, dynamically creating a temporary profile for each attack performed. The program will start a new instance of firefox for each session hacked, and let you control the login of all of them at once.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://sourceforge.net/projects/xsser/"&gt;XSSer&lt;/a&gt; - automatic tool for pentesting XSS attacks against different applications.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://code.google.com/p/sqlinject-finder/"&gt;sqlinject-finder&lt;/a&gt; - Simple python script that parses through a pcap and looks at the GET and POST request data for suspicious and possible SQL injects.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="https://dominator.mindedsecurity.com/"&gt;DOMinator&lt;/a&gt; - Firefox based software for analysis and identification of DOM Based Cross Site Scripting issues (DOM XSS).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Fingerprinting and Web Frameworks Scanners&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://sourceforge.net/projects/joomscan/"&gt;Joomscan&lt;/a&gt; - Yet Another Joomla Vulnerability Scanner that can detects file inclusion, sql injection, command execution vulnerabilities of a target Joomla! web site.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.randomstorm.com/wpscan-security-tool.php"&gt;WPScan&lt;/a&gt; - black box WordPress Security Scanner written in Ruby which attempts to find known security weaknesses within WordPress installations.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://blindelephant.sourceforge.net/"&gt;BlindElephant&lt;/a&gt; - The BlindElephant Web Application Fingerprinter attempts to discover the version of a (known) web application by comparing static files at known locations against precomputed hashes for versions of those files in all all available releases. The technique is fast, low-bandwidth, non-invasive, generic, and highly automatable.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://mytty.org/wafp/"&gt;WPAF&lt;/a&gt; - Web Application Finger Printer written in ruby using a SQLite3 DB.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Web Shells&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="https://github.com/SpiderLabs/jboss-autopwn"&gt;JBoss Autopwn&lt;/a&gt; - This JBoss script deploys a JSP shell on the target JBoss AS server.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Proxies&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.owasp.org/index.php/Category:OWASP_WebScarab_Project"&gt;WebScarab&lt;/a&gt; - WebScarab is a framework for analysing applications that communicate using the HTTP and HTTPS protocols. It is written in Java, and is thus portable to many platforms. WebScarab has several modes of operation, implemented by a number of plugins. In its most common usage, WebScarab operates as an intercepting proxy, allowing the operator to review and modify requests created by the browser before they are sent to the server, and to review and modify responses returned from the server before they are received by the browser. WebScarab is able to intercept both HTTP and HTTPS communication. The operator can also review the conversations (requests and responses) that have passed through WebScarab.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://portswigger.net/proxy/"&gt;Burp proxy&lt;/a&gt; - Burp Proxy is an interactive HTTP/S proxy server for attacking and testing web applications. It operates as a man-in-the-middle between the end browser and the target web server, and allows the user to intercept, inspect and modify the raw traffic passing in both directions. Burp Proxy allows you to find and exploit application vulnerabilities by monitoring and manipulating critical parameters and other data transmitted by the application. By modifying browser requests in various malicious ways, Burp Proxy can be used to perform attacks such as SQL injection, cookie subversion, privilege escalation, session hijacking, directory traversal and buffer overflows.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.parosproxy.org/index.shtml"&gt;Paros Proxy&lt;/a&gt; - Through Paros's proxy nature, all HTTP and HTTPS data between server and client, including cookies and form fields, can be intercepted and modified.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.bindshell.net/tools/odysseus"&gt;Odysseus&lt;/a&gt; - proxy server, which acts as a man-in-the-middle during an HTTP session. A typical HTTP proxy will relay packets to and from a client browser and a web server. Odysseus will intercept an HTTP session's data in either direction and give the user the ability to alter the data before transmission.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.immunitysec.com/resources-freesoftware.shtml"&gt;SPIKE Proxy&lt;/a&gt; - professional-grade tool for looking for application-level vulnerabilities in web applications. SPIKE Proxy covers the basics, such as SQL Injection and cross-site-scripting, but it's completely open Python infrastructure allows advanced users to customize it for web applications that other tools fall apart on.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://cat.contextis.com/cat/explanation.htm"&gt;CAT (Context App Tool)&lt;/a&gt; - an application to facilitate manual web application penetration testing. CAT provides a richer feature set and greater performance, combined with a more intuitive user interface to aid a professional manual penetration tester.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://sourceforge.net/apps/mediawiki/watobo/index.php?title=Main_Page"&gt;WATOBO&lt;/a&gt; - intended to enable security professionals to perform highly efficient (semi-automated ) web application security audits. WATOBO works like a local proxy, similar to Webscarab, Paros or BurpSuite.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://intrepidusgroup.com/insight/mallory/"&gt;Mallory&lt;/a&gt; - transparent TCP and UDP proxy. It can be used to get at those hard to intercept network streams, assess those tricky mobile web applications, or maybe just pull a prank on your friend.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.edge-security.com/proxystrike.php"&gt;ProxyStrike&lt;/a&gt; - an active Web Application Proxy, is a tool designed to find vulnerabilities while browsing an application.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="https://www.owasp.org/index.php/OWASP_Zed_Attack_Proxy_Project"&gt;Zed Attack Proxy (ZAP)&lt;/a&gt; - an easy to use integrated penetration testing tool for finding vulnerabilities in web applications. It is designed to be used by people with a wide range of security experience and as such is ideal for developers and functional testers who are new to penetration testing. ZAP provides automated scanners as well as a set of tools that allow you to find security vulnerabilities manually.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.subgraph.com/products.html"&gt;Vega&lt;/a&gt; - open source platform to test the security of web applications. Vega can help you find and validate SQL Injections, Cross-Site Scripting (XSS), inadvertently disclosed sensitive information, and other vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Pentesting&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.gremwell.com/what_is_magictree"&gt;MagicTree&lt;/a&gt; - MagicTree is a penetration tester productivity tool, it allows easy and straightforward data consolidation, querying, external command execution, and report generation.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://dradisframework.org/"&gt;dradis&lt;/a&gt; - open source framework to enable effective information sharing.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://code.google.com/p/inguma/"&gt;Inguma&lt;/a&gt; - penetration testing toolkit entirely written in python. The framework includes modules to discover hosts, gather information about, fuzz targets, brute force user names and passwords and, of course, exploits.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Flash&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.owasp.org/index.php/Category:SWFIntruder"&gt;SWFIntruder&lt;/a&gt; - SWFIntruder (pronounced Swiff Intruder) is the first tool specifically developed for analyzing and testing security of Flash applications at runtime.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.nowrap.de/flare.html"&gt;Flare&lt;/a&gt; - Flare is a free ActionScript decompiler. It decompiles SWFs produced by Macromedia Flash, including Flash MX 2004 and Flash 8.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.mtasc.org/"&gt;MTASC&lt;/a&gt; - MTASC is the first ActionScript 2 Open Source free compiler.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://flasm.sourceforge.net/"&gt;Flasm&lt;/a&gt; - Flasm is a free command line assembler/disassembler of Flash ActionScript bytecode. It lets you make changes to any SWF. Flasm fully supports SWFs produced by Macromedia Flash 8 and earlier Flash versions.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://swfmill.org/"&gt;swfmill&lt;/a&gt; - swfmill is an xml2swf and swf2xml processor with import functionalities.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.swftools.org/"&gt;swftools&lt;/a&gt; - Collection of utilities for SWF file manipulation/creation.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="https://h30406.www3.hp.com/campaigns/2009/wwcampaign/1-5TUVE/index.php?key=swf"&gt;SwfScan&lt;/a&gt; - HP SWFScan, a free tool developed by HP Web Security Research Group, will automatically find security vulnerabilities in applications built on the Flash platform.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Tracers&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.traceroute.org/"&gt;Traceroute&lt;/a&gt; - computer network diagnostic tool for displaying the route (path) and measuring transit delays of packets across an Internet Protocol (IP) network.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.bitwizard.nl/mtr/"&gt;MTR&lt;/a&gt; - combines the functionality of the traceroute and ping programs in a single network diagnostic tool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Cryptography&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://utils.kde.org/projects/kgpg/"&gt;KGpg&lt;/a&gt; - simple interface for GnuPG, a powerful encryption utility..&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://es.getfiregpg.org/s/home"&gt;FireGPG&lt;/a&gt; - Firefox extension under MPL that provides an integrated interface to apply GnuPG operations to the text of any web page, including encryption, decryption, signing, and signature verification..&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.foundstone.com/us/resources/proddesc/ssldigger.htm"&gt;SSLDigger&lt;/a&gt; - SSLDigger v1.02 is a tool to assess the strength of SSL servers by testing the ciphers supported. Some of these ciphers are known to be insecure.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://freeworld.thc.org/root/tools/"&gt;THCSSLCheck&lt;/a&gt; - Windows tool that checks the remote ssl stack for supported ciphers and version.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://sourceforge.net/projects/sslscan/files/sslscan/sslscan-1.8.2.tgz/download"&gt;sslscan&lt;/a&gt; - queries SSL services, such as HTTPS, in order to determine the ciphers that are supported.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.thoughtcrime.org/software/sslstrip/"&gt;SSLStrip&lt;/a&gt; - This tool provides a demonstration of the HTTPS stripping attacks that I presented at Black Hat DC 2009.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.taddong.com/en/lab.html#TLSSLED"&gt;TLSSLed&lt;/a&gt; - Linux shell script whose purpose is to evaluate the security of a target SSL/TLS (HTTPS) web server implementation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Crackers&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.openwall.com/john/"&gt;John the Ripper&lt;/a&gt; - fast password cracker, currently available for many flavors of Unix, Windows, DOS, BeOS, and OpenVMS. Its primary purpose is to detect weak Unix passwords.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://ophcrack.sourceforge.net/"&gt;Ophcrack&lt;/a&gt; - Windows password cracker based on rainbow tables.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.thc.org/thc-hydra/"&gt;Hydra&lt;/a&gt; - very fast network logon cracker which support many different services.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://code.google.com/p/patator/"&gt;patator&lt;/a&gt; - multi-purpose brute-forcer, with a modular design and a flexible usage.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.aircrack-ng.org/9"&gt;Aircrack-ng&lt;/a&gt; - an 802.11 WEP and WPA-PSK 
keys cracking program that can recover keys once enough data packets 
have been captured.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://ikecrack.sourceforge.net/"&gt;IKECrack&lt;/a&gt; - open source IKE/IPSec authentication crack tool. This tool is designed to bruteforce or dictionary attack the key/password used with Pre-Shared-Key [PSK] IKE authentication.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://exploit.co.il/hacking/wophcrack-ophcrack-web-interface/"&gt;Wophcrack&lt;/a&gt; - PHP based web frontend for Ophcrack&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://sourceforge.net/projects/worawita/files/"&gt;Bruter&lt;/a&gt; - parallel network login brute-forcer on Win32. This tool is intended to demonstrate the importance of choosing strong passwords. The goal of Bruter is to support a variety of services that allow remote authentication.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.golubev.com/hashgpu.htm"&gt;IGHASHGPU&lt;/a&gt; - Program to recover/crack SHA1, MD5 &amp;amp; MD4 hashes.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.foofus.net/jmk/medusa/medusa.html"&gt;Medusa&lt;/a&gt; - intended to be a speedy, massively parallel, modular, login brute-forcer. The goal is to support as many services which allow remote authentication as possible.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://nmap.org/ncrack/"&gt;Ncrack&lt;/a&gt; - high-speed network authentication cracking tool. It was built to help companies secure their networks by proactively testing all their hosts and networking devices for poor passwords.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://linux.softpedia.com/progDownload/authforce-Download-14904.html"&gt;authforce&lt;/a&gt; - Authforce is an HTTP authentication brute forcer. Using various methods, it attempts brute force username and password pairs for a site.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.randomstorm.com/rsmangler-security-tool.php"&gt;RSMangler&lt;/a&gt; - take a wordlist and perform various manipulations on it similar to those done by John the Ripper with a few extras.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.cgsecurity.org/wiki/CmosPwd"&gt;CmosPwd&lt;/a&gt; - decrypts password stored in cmos used to access BIOS SETUP.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Phishing&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.andlabs.org/tools/imposter/imposter.html"&gt;Imposter&lt;/a&gt; - flexible framework to perform Browser Phishing attacks. Once the system running Imposter is configured as the DNS server to the victims, the internal DNS server of Imposter resolves all DNS queries to itself. When the victim tries to access any website the domain resolves to the system running Imposter and Imposter’s internal web server serves content to the victim.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.secmaniac.com/download/"&gt;Social-Engineering Toolkit (SET)&lt;/a&gt; - python-driven suite of custom tools which solely focuses on attacking the human element of pentesting. It's main purpose is to augment and simulate social-engineering attacks and allow the tester to effectively test how a targeted attack may succeed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Security Defense&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://wiki.apparmor.net/index.php/Main_Page"&gt;AppArmor&lt;/a&gt; - effective and easy-to-use Linux application security system. AppArmor proactively protects the operating system and applications from external or internal threats, even zero-day attacks, by enforcing good behavior and preventing even unknown application flaws from being exploited.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.untangle.com/"&gt;Untangle Gateway&lt;/a&gt; - Debian-based network gateway with pluggable modules for network applications like spam blocking, web filtering, anti-virus, anti-spyware, intrusion prevention, VPN, SSL VPN, firewall, and more.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Network Administration&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.nagios.org/"&gt;Nagios&lt;/a&gt; - monitors your entire IT infrastructure to ensure systems, applications, services, and business processes are functioning properly. In the event of a failure, Nagios can alert technical staff of the problem, allowing them to begin remediation processes before outages affect business processes, end-users, or customers.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.ntop.org/"&gt;ntop&lt;/a&gt; - network traffic probe that shows the network usage, similar to what the popular top Unix command does.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="https://www.samba.org/"&gt;nmblookup&lt;/a&gt; - NetBIOS over TCP/IP client used to lookup NetBIOS names.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.samba.org/"&gt;findsmb&lt;/a&gt; - list info about machines that respond to SMB name queries on a subnet.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.agroman.net/corkscrew/"&gt;Corkscrew&lt;/a&gt; - tool for tunneling SSH through HTTP proxies&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.nothink.org/perl/snmpcheck/"&gt;snmpcheck&lt;/a&gt; - free open source utility to get information via SNMP protocols.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.snmpsoft.com/freetools/snmpwalk.html"&gt;snmpwalk&lt;/a&gt; - retrieve a subtree of management values using SNMP GETNEXT requests.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://iptraf.seul.org/"&gt;IPTraf&lt;/a&gt; - console-based network statistics utility for Linux. It gathers a variety of figures such as TCP connection packet and byte counts, interface statistics and activity indicators, TCP/UDP traffic breakdowns, and LAN station packet and byte counts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Databases&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://sourceforge.net/projects/safe3si/"&gt;Safe3 SQL Injector&lt;/a&gt; - one of the most powerful penetration testing tool that automates the process of detecting and exploiting SQL injection flaws and taking over of back-end database servers.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.clapper.org/software/python/sqlcmd/"&gt;sqlcmd&lt;/a&gt; - herramienta para conexión a bases de datos Oracle, SQL Server, MySQL y Postgress&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://sqlmap.sourceforge.net/"&gt;sqlmap&lt;/a&gt; - open source penetration testing tool that automates the process of detecting and exploiting SQL injection flaws and taking over of back-end database servers.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="https://www.owasp.org/index.php/Category:OWASP_SQLiX_Project"&gt;SQLiX&lt;/a&gt; - SQL Injection scanner, able to crawl, detect SQL injection vectors, identify the back-end database and grab function call/UDF results (even execute system commands for MS-SQL).&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://sqlninja.sourceforge.net/"&gt;sqlninja&lt;/a&gt; - tool targeted to exploit SQL Injection vulnerabilities on a web application that uses Microsoft SQL Server as its back-end.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="https://code.google.com/p/mysqloit/"&gt;MySqloit&lt;/a&gt; - SQL Injection takeover tool focused on LAMP (Linux, Apache,MySql,PHP) and WAMP (Windows, Apache,MySql,PHP) platforms. It has the ability to upload and execute metasploit shellcodes through the MySql SQL Injection vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.jammed.com/~jwa/hacks/security/tnscmd/tnscmd-doc.html"&gt;TNS Listener tool&lt;/a&gt; - tnscmd can be used to speak, on a very simple level, with Oracle's TNS listener.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.databasesecurity.com/sql-injector.htm"&gt;SQLInjector&lt;/a&gt; - SQLInjector uses inference techniques to extract data and determine the backend database server.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.greensql.net/download"&gt;GreenSQL&lt;/a&gt; - designed to protect databases (PostgreSQL/MySQL) against SQL injection attacks and other unauthorised changes, in a similar fashion to a firewall protecting a network against TCP/IP outside attacks. The new version also provides a graphical user interface for monitoring the database firewall.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.freetds.org/"&gt;FreeTDS&lt;/a&gt; - Microsoft SQL Server client.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.cqure.net/wp/mssqlscan/"&gt;MSSQLScan&lt;/a&gt; - A small multi-threaded tool that scans for Microsoft SQL Servers.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.integrigy.com/security-resources/downloads/lsnrcheck-tool"&gt;AppSentry Listener Security Check&lt;/a&gt; - Check the security configuration of the Oracle Database Listener and listeners for Oracle Applications 11i.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Code analyzers&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=b2307ca4-638f-4641-9946-dc0a5abe8513"&gt;MS MiniFuzz&lt;/a&gt; - very simple fuzzer designed to ease adoption of fuzz testing by non-security people who are unfamiliar with file fuzzing tools or have never used them in their current software development processes.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=90e6181c-5905-4799-826a-772eafd4440a"&gt;MS BinScope&lt;/a&gt; - Microsoft verification tool that analyzes binaries on a project-wide level to ensure that they have been built in compliance with Microsoft’s Security Development Lifecycle (SDL) requirements and recommendations.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=9aeaa970-f281-4fb0-aba1-d59d7ed09772&amp;amp;displaylang=en"&gt;MS FxCop&lt;/a&gt; - code analysis tool that checks .NET managed code assemblies for conformance to the Microsoft .NET Framework Design Guidelines.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.fortify.com/security-resources/rats.jsp"&gt;RATS&lt;/a&gt; - tool for scanning C, C++, Perl, PHP and Python source code and flagging common security related programming errors such as buffer overflows and TOCTOU (Time Of Check, Time Of Use) race conditions.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://github.com/wireghoul/graudit/"&gt;Graudit&lt;/a&gt; - simple script and signature sets that allows you to find potential security flaws in source code using the GNU utility grep. Graudit supports scanning code written in several languages; asp, jsp, perl, php and python.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;DNS&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://code.google.com/p/dnsmap/"&gt;dnsmap&lt;/a&gt; - Subdomain bruteforce.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Forensics Analysis&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.digital-forensic.org/home-en.html"&gt;Digital Forensics Analysis&lt;/a&gt; - a simple but powerful open source tool with a flexible module system which will help you in your digital forensics works, including files recovery due to error or crash, evidence research and analysis, etc.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.guidancesoftware.com/forensic.htm"&gt;EnCase Forensic Tool&lt;/a&gt; - From the simplest requirements to the most complex, EnCase Forensic is the premier computer forensic application on the market.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Bypass&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://oss.coresecurity.com/projects/pshtoolkit.htm"&gt;Pass-The-Hash&lt;/a&gt; - The Pass-The-Hash Toolkit contains utilities to manipulate the Windows Logon Sessions mantained by the LSA (Local Security Authority) component. These tools allow you to list the current logon sessions with its corresponding NTLM credentials (e.g.: users remotely logged in thru Remote Desktop/Terminal Services), and also change in runtime the current username, domain name, and NTLM hashes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Documentation&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://sourceforge.net/projects/agnitiotool/"&gt;Agnitio&lt;/a&gt; - A tool to help developers and security professionals conduct manual security code reviews in a consistent and repeatable way. Agnitio aims to replace the adhoc nature of manual security code review documentation, create an audit trail and reporting.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Educational&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.dvwa.co.uk/download.php"&gt;Damn Vulnerable Web App (DVWA)&lt;/a&gt; - PHP/MySQL web application that is damn vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, help web developers better understand the processes of securing web applications and aid teachers/students to teach/learn web application security in a class room environment.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.irongeek.com/i.php?page=security/mutillidae-deliberately-vulnerable-php-owasp-top-10"&gt;Mutillidae&lt;/a&gt; - Deliberately Vulnerable Set Of PHP Scripts That Implement The OWASP Top 10&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.owasp.org/index.php/Category:OWASP_WebGoat_Project"&gt;WebGoat&lt;/a&gt; - deliberately insecure J2EE web application maintained by OWASP designed to teach web application security lessons.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.bonsai-sec.com/en/research/moth.php"&gt;moth&lt;/a&gt; - VMware image with a set of vulnerable Web Applications and scripts, that you may use for Testing Web Application Security Scanners, Testing Static Code Analysis tools (SCA) and Giving an introductory course to Web Application Security.&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.mavensecurity.com/dojo.php"&gt;Web Security Dojo&lt;/a&gt; - A free open-source self-contained training environment for Web Application Security penetration testing. Tools + Targets = Dojo&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Programming&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://jode.sourceforge.net/"&gt;JODE&lt;/a&gt; is a java package containing a decompiler and an optimizer for java&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;File Managers&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://www.webdav.org/cadaver/"&gt;cadaver&lt;/a&gt; - is a command-line WebDAV client for Unix. It supports file upload, download, on-screen display, namespace operations (move/copy), collection creation and deletion, and locking operations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;NAT&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://samy.pl/pwnat/"&gt;pwnat&lt;/a&gt; - pronounced "poe-nat", is a tool that allows any number of clients behind NATs to communicate with a server behind a separate NAT with *no* port forwarding and *no* DMZ setup on any routers in order to directly communicate with each other.</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimFOm_zvyUieWjRxNPEuC717ZtbFELWU3DlYrN2AClNVBMBxbJTq606A78A2ACN0B05L7aCAiz3xke1dkdDkfwDGXz25lFWohMJ-Gc-onnSXvBhTrtHV3y6ptDUvomKRfYCW2pXRZFAMwk/s72-c/social-media-tools-swiss-knife.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><enclosure length="22176" type="application/octet-stream" url="http://sourceforge.net/projects/sslscan/files/sslscan/sslscan-1.8.2.tgz/download"/><itunes:explicit>no</itunes:explicit><itunes:subtitle>Cuantos meses sin publicar nada! pero, aunque no lo crean, el blog sigue vivo! Para compensar la prolongada ausencia y conmemorar que llegamos a los 200 posts, decidí postear algo groso, algo que venía prometiendo hace rato y que por fiaca de ponerme a editar, no publiqué antes: el listado de aplicaciones de seguridad. Este listado es el resultado de 4 años de recopilación, trabajando en seguridad, y a ojo contiene más de 150 herramientas! Ahora que dejé la seguridad un poco de lado para concentrarme más en redes y comunicaciones, creo que es un buen momento para publicarlo. Todas las herramientas están con sus respectivos links oficiales y una breve descripción. Antes de pasar al listado, les dejo algunas aclaraciones: - Hay muchas herramientas que nunca utilicé. Armé el listado a partir de leer muchos artículos y descripciones de programas, e incluí todos los que me parecían útiles para distintas tareas. - Emiliano (quien publicó varios artículos en este blog) colaboró en su momento con varias entradas de la lista. Ahora Emi administra su propio blog denominado linuxito.com.ar - Agrupé las herramientas en base a distintos criterios. Varias encajan en más de un criterio, pero obviamente no iba a repetirlas en cada uno, así que están en el que me parece las describe mejor. - El orden en que se encuentran las herramientas no tienen ningún significado, se fueron agregando aleatoriamente. Si bien traté de dejar las más importantes en los primeros lugares, pueden aparecer en cualquier posición. - Como el listado se empezó a armar hace 4 años, puede que algunos links estén rotos, o que la herramienta no tenga más soporte. - Hay varias herramientas que no se vinculan directamente a seguridad, pero sirven para realizar tests de seguridad. - La gran mayoría de las aplicaciones listadas son libres y para GNU/Linux, pero hay algunas que son cerradas y pagas, y algunas que funcionan sólo en Windows. - El listado no es completo y existen muchas y muy importantes herramientas que no se encuentran en él. Live-CDs/DVDs - BackTrack Linux - Linux-based penetration testing arsenal that aids security professionals in the ability to perform assessments in a purely native environment dedicated to hacking - Wifislax - distribución GNU/Linux (LiveCD) diseñada para la auditoría de seguridad del estándar 802.11. (WiFi, BlueTooth y RFID). - DEFT - includes an excellent hardware detection and the best free and open source applications dedicated to Incident Response, Cyber Intelligence and Computer Forensics. - Pentoo - un Live CD/USB desarrollado para llevar a cabo procesos de Test de Penetración y/o Ethical Hacking. Esta distribución está basada en Gentoo Linux (kernel 2.6.31.6), gestor de ventanas Enlightenment e incluye una amplia colección de herramientas debidamente organizadas por categorías. - Security Onion - Security Onion is a Linux distro for IDS, NSM, and log management. - VAST - a VIPER Lab live distribution that contains VIPER developed tools such as UCsniff, videojak, videosnarf and more. Along with VIPER tools and other essential VoIP security tools, it also contains tools penetration testers utilize such as Metasploit, Nmap, and Hydra. - Network Security Toolkit - The main intent of developing this toolkit was to provide the network security administrator with a comprehensive set of Open Source Network Security Tools. - Katana - includes distributions which focus on Penetration Testing, Auditing, Password Cracking, Forensics and Honey Pots. Katana comes with over 100 portable Windows applications such as Wireshark, HiJackThis, Unstoppable Copier, and OllyDBG. - Matriux - fully featured security distribution consisting of a bunch of powerful, open source and free tools that can be used for various purposes including, but not limited to, penetration testing, ethical hacking, system and network administration, cyber forensics investigations, security testing, vulnerability analysis, and much more. - Samurai - The Samurai Web Testing Framework is a live linux environment that has been pre-configured to function as a web pen-testing environment. The CD contains the best of the open source and free tools that focus on testing and attacking websites. - REMnux - lightweight Linux distribution for assisting malware analysts in reverse-engineering malicious software. - PlainSight - versatile computer forensics environment that allows inexperienced forensic practitioners perform common tasks using powerful open source tools. - WeakNet Linux - designed primarily for penetration testing, forensic analysis and other security tasks. The tools selected are those that the developer feels are used most often in pen-tests. A sample of those included are: BRuWRT-FORSSE v2.0, Easy-SSHd, Web-Hacking-Portal v2.0, Perlwd, Netgh0st v3.0, YouTube-Thief!, Netgh0st v2.2, DomainScan, ADtrace, Admin-Tool, Tartarus v0.1. - Puck - GNU/Linux distribution distributed as a Live CD based on TinyCoreLinux. It contains top penetration testing tools. - Metasploitable - an Ubuntu server install on a VMWare image. A number of vulnerable packages are included, including an install of tomcat 5.5 (with weak credentials), distcc, tikiwiki, twiki, and an older mysql. Scanners - Nmap - free and open source utility for network discovery and security auditing. Many systems and network administrators also find it useful for tasks such as network inventory, managing service upgrade schedules, and monitoring host or service uptime. - Netcat - networking utility which reads and writes data across network connections, using the TCP/IP protocol. - hping - command-line oriented TCP/IP packet assembler/analyzer. The interface is inspired to the ping(8) unix command, but hping isn't only able to send ICMP echo requests. It supports TCP, UDP, ICMP and RAW-IP protocols, has a traceroute mode, the ability to send files between a covered channel, and many other features. - haraldscan - Bluetooth discovery scanner. - Natprobe - This little, but very usefull program, try to sends ICMP packet out the LAN, and detect all the host that allow it. Whit this you can find bugs in your (company?) network (or others), for example hosts that allow p2p connections. - MSSQLScan - A small multi-threaded tool that scans for Microsoft SQL Servers. The tool does it’s discovery by using UDP and returns a list of all detected instances with there respective protocols and ports. - hostmap - enumerate all hostnames and configured virtual hosts on an IP address. - FindDomains - multithreaded search engine discovery tool that will be very useful for penetration testers dealing with discovering domain names/web sites/virtual hosts which are located on too many IP addresses. - keimpx - It can be used to quickly check for the usefulness of credentials across a network over SMB. Credentials can be: Combination of user / plain-text password, Combination of user / NTLM hash, Combination of user / NTLM logon session token. - StreamArmor - sophisticated tool for discovering hidden alternate data streams (ADS) as well as clean them completely from the system. - Halberd - a tool aimed at discovering real servers behind virtual IPs. - NSDECODER - automated website malware detection tools. It can be used to decode and analyze weather the URL exist malware. Also, NSDECODER will analyze which vulnerability been exploit and the original source address of malware. - sslyze - Cross-platform tool to analyze the configuration of SSL servers. Sniffers - wireshark - world's foremost network protocol analyzer. It lets you see what's happening on your network at a microscopic level. It is the de facto (and often de jure) standard across many industries and educational institutions. - tcpdump - prints out a description of the contents of packets on a network interface that match the boolean expression. - arpwatch - thernet monitor program; for keeping track of ethernet/ip address pairings. - ucsniff - VoIP &amp;amp; IP Video Security Assessment tool that integrates existing open source software into several useful features, allowing VoIP and IP Video owners and security professionals to rapidly test for the threat of unauthorized VoIP and Video Eavesdropping. - webmitm - transparently proxies and sniffs HTTP / HTTPS traffic redirected by dnsspoof, capturing most "secure" SSL-encrypted webmail logins and form submissions. - dsniff - collection of tools for network auditing and penetration testing. dsniff, filesnarf, mailsnarf, msgsnarf, urlsnarf, and webspy passively monitor a network for interesting data (passwords, e-mail, files, etc.). arpspoof, dnsspoof, and macof facilitate the interception of network traffic normally unavailable to an attacker (e.g, due to layer-2 switching). sshmitm and webmitm implement active monkey-in-the-middle attacks against redirected SSH and HTTPS sessions by exploiting weak bindings in ad-hoc PKI. - RawCap - RawCap is a free command line network sniffer for Windows that uses raw sockets. - Yamas - a tool that aims at facilitating mitm attacks by automating the whole process from setting up ip forwarding and modifying iptables, to the ARP cache poisoning Spoofing - arpspoof - may allow an attacker to sniff data frames on a local area network (LAN), modify the traffic, or stop the traffic altogether. - dnsspoof - forges replies to arbitrary DNS address / pointer queries on the internal LAN. This is useful in bypassing host name based access controls, or in implementing a variety of efficient network controls. IDS - snort - open source network intrusion prevention and detection system (IDS/IPS). - OSSEC - scalable, multi-platform, open source Host-based Intrusion Detection System (HIDS). It has a powerful correlation and analysis engine, integrating log analysis, file integrity checking, Windows registry monitoring, centralized policy enforcement, rootkit detection, real-time alerting and active response. - Samhain - open source host-based intrusion detection system (HIDS) provides file integrity checking and logfile monitoring/analysis, as well as rootkit detection, port monitoring, detection of rogue SUID executables, and hidden processes. - Nebula - network intrusion signature generator. It can help securing a network by automatically deriving and installing filter rules from attack traces. In a common setup, nebula runs as a daemon and receives attacks from honeypots. Signatures are currently published in Snort format. - suricata - The Suricata Engine is an Open Source Next Generation Intrusion Detection and Prevention Engine. This engine is not intended to just replace or emulate the existing tools in the industry, but will bring new ideas and technologies to the field. - Osiris - Host Integrity Monitoring System that periodically monitors one or more hosts for change. Osiris keeps an administrator apprised of possible attacks and/or nasty little trojans. The purpose here is to isolate changes that indicate a break-in or a compromised system. - Sagan - multi-threaded, real time system and event log monitoring system, but with a twist. Sagan uses a "Snort" like rule set for detecting bad things happening on your network and/or computer systems. If Sagan detects a "bad thing" happening, that event can be stored to a Snort database (MySQL/PostgreSQL) and Sagan will attempt to correlate the event with your Snort Intrusion Detection/Intrusion Prevention (IDS/IPS) system. - Snorby - new and modern Snort IDS front-end. The basic fundamental concepts behind snorby are simplicity and power. - Smooth-sec - ready to-go&amp;nbsp; IDS/IPS (Intrusion Detection/Prevention System) linux distribution based on the multi threaded Suricata IDS/IPS engine and Snorby, the top notch web application for network security monitoring. - ArpON - portable handler daemon that make ARP secure in order to avoid the Man In The Middle (MITM) through ARP Spoofing/Poisoning attacks. It detects and blocks also derived attacks by it for more complex attacks, as: DHCP Spoofing, DNS Spoofing, WEB Spoofing, Session Hijacking and SSL/TLS Hijacking &amp;amp; co attacks. Firewalls - iQfire-wall - framework that implements a network firewall. It can be used in desktop systems and in simple network configurations, providing a friendly graphical interface and a simple installation procedure. Also unprivileged users can personalize. - Firestarter - Open Source visual firewall program. The software aims to combine ease of use with powerful features, therefore serving both Linux desktop users and system administrators. - IPCop - Linux firewall distribution. - Firewall Builder - Firewall Builder is a GUI firewall configuration and management tool that supports iptables (netfilter), ipfilter, pf, ipfw, Cisco PIX (FWSM, ASA) and Cisco routers extended access lists. - GreenSQL - Open Source database firewall used to protect databases from SQL injection attacks. GreenSQL works as a proxy and has built in support for MySQL. The logic is based on evaluation of SQL commands using a risk scoring matrix as well as blocking known db administrative commands (DROP, CREATE, etc). GreenSQL provides MySQL database security solution. - Flint - examines firewalls, quickly computes the effect of all the configuration rules, and then spots problems so you can: CLEAN UP RUSTY CONFIGURATIONS that are crudded up with rules that can't match traffic; ERADICATE LATENT SECURITY PROBLEMS lurking in overly-permissive rules; SANITY CHECK CHANGES to see if new rules create problems. Honeypots - HoneyDrive - virtual hard disk drive (VMDK format) with Ubuntu Server. It contains various honeypot systems such as Kippo SSH honeypot, Dionaea malware honeypot and Honeyd. Additionally it includes useful scripts and utilities to analyze and visualize the data it captures. Lastly, other helpful tools like tshark (command-line Wireshark), pdftools, etc. are also present. Auditory - Nessus - vulnerability scanner. Provides patch, configuration, and compliance auditing; mobile, malware, and botnet discovery; sensitive data identification; and many other features. - OpenVAS - Open Vulnerability Assessment System and is a network security scanner with associated tools like a graphical user front-end. The core component is a server with a set of network vulnerability tests (NVTs) to detect security problems in remote systems and applications. - SAINT - Vulnerability Scanning, Penetration Testing, Social Engineering, Configuration Assessments, Reporting. - PenTBox - Security Suite with programs like Password Crackers, Denial of Service testing tools (DoS and DDoS), Secure Password Generators, Honeypots and much more. - Seccubus - runs Nessus scans at regular intervals and compares the findings of the last scan with the findings of the previous scan. The delta of this scan is presented in a web GUI when findingscan be easily marked as either real findings or non-issues. Non issues get ignored untill they change. This causes a dramaticreduction a analysis time. - GrokEVT - collection of scripts built for reading Windows® NT/2K/XP/2K3 event log files. GrokEVT is released under the GNU GPL, and is implemented in Python. - Flawfinder - program that examines source code and reports possible security weaknesses (``flaws'') sorted by risk level. It's very useful for quickly finding and removing at least some potential security problems before a program is widely released to the public. - KrbGuess - small and simple tool which can be used during security testing to guess valid usernames against a Kerberos environment. - Webfwlog - flexible web-based firewall log analyzer and reporting tool. It supports standard system logs for linux, FreeBSD, OpenBSD, NetBSD, Solaris, Irix, OS X, etc. as well as Windows XP. Supported log file formats are netfilter, ipfilter, ipfw, ipchains and Windows XP. Webfwlog also supports logs saved in a database using the ULOGD target of the linux netfilter project. - YASAT - (Yet Another Stupid Audit Tool) is a simple stupid audit tool. It do many tests for checking security configuration issue or others good practice. - FireCAT (Firefox Catalog of Auditing exTension) - mindmap collection of the most efficient and useful firefox extensions oriented application security auditing and assessment. - keimpx - keimpx is an open source tool, released under a modified version of Apache License 1.1. It can be used to quickly check for the usefulness of credentials across a network over SMB. - Buck Security - collection of security checks for Linux. It was designed for Debian and Ubuntu servers, but can be useful for any Linux system. - DllHijackAuditor - smart tool to Audit against the Dll Hijacking Vulnerability in any Windows application. - Mantra - a collection of free and open source tools integrated into a web browser, which can become handy for students, penetration testers, web application developers, security professionals etc. - MysqlPasswordAuditor - FREE Mysql password recovery and auditing software. Mysql is one of the popular and powerful database software used by most of the web based and server side applications. PDFs - origami - Ruby framework designed to parse, analyze, and forge PDF documents. This is NOT a PDF rendering library. It aims at providing a scripting tool to generate and analyze malicious PDF files. As well, it can be used to create on-the-fly customized PDFs, or to inject (evil) code into already existing documents. - pdfinjector - Script to inject javascript code into existing pdf files. - PDFResurrect - tool aimed at analyzing PDF documents. The PDF format allows for previous document changes to be retained in a more recent version of the document, thereby creating a running history of changes for the document. File vulnerabilities checkers - OfficeCat) - command line utility that can be used to process Microsoft Office Documents for the presence of potential exploit conditions in the file. Exploitation - Metasploit - penetration testing software. Helps verify vulnerabilities and manage security assessments. - Weevely - stealth PHP web shell that provides a telnet-like console. It is an essential tool for web application post exploitation, and can be used as stealth backdoor or as a web shell to manage legit web accounts, even free hosted ones. - XLSInjector - Injects meterpreter shell to excel xls files (Port 4444). - Armitage - graphical cyber attack management tool for Metasploit that visualizes your targets, recommends exploits, and exposes the advanced capabilities of the framework. - Canvas - Immunity's CANVAS makes available hundreds of exploits, an automated exploitation system, and a comprehensive, reliable exploit development framework to penetration testers and security professionals worldwide. - Core Impact - the most comprehensive software solution for assessing the real-world security of: web applications, network systems, endpoint systems and email users, wireless networks, network devices. Wireless - inSSIDer - award-winning free Wi-Fi network scanner for Windows Vista and Windows XP. - Kismet - an 802.11 layer2 wireless network detector, sniffer, and intrusion detection system. Kismet will work with any wireless card which supports raw monitoring (rfmon) mode, and (with appropriate hardware) can sniff 802.11b, 802.11a, 802.11g, and 802.11n traffic. - wifite - attack multiple WEP and WPA encrypted networks at the same time. this tool is customizable to be automated with only a few arguments. can be trusted to run without supervision. Networking - Yersinia - network tool designed to take advantage of some weakeness in different network protocols. It pretends to be a solid framework for analyzing and testing the deployed networks and systems. - macof - flood a switched LAN with random MAC addresses - PacketFence - a fully supported, trusted, Free and Open Source network access control (NAC) system. - Eigrp-tools - custom EIGRP packet generator and sniffer combined. It was developed to test the security and overall operation quality of the EIGRP routing protocol. - GNS3 - graphical network simulator that allows simulation of complex networks. Vulnerabilidades Web - Nikto - Open Source (GPL) web server scanner which performs comprehensive tests against web servers for multiple items, including over 6500 potentially dangerous files/CGIs, checks for outdated versions of over 1250 servers, and version specific problems on over 270 servers. - Wapiti - It performs "black-box" scans, i.e. it does not study the source code of the application but will scans the webpages of the deployed webapp, looking for scripts and forms where it can inject data. - Tamperdata - Firefox add-on to view and modify HTTP/HTTPS headers and post parameters. - Wfuzz - is a tool designed for bruteforcing Web Applications, it can be used for finding resources not linked (directories, servlets, scripts, etc), bruteforce GET and POST parameters for checking different kind of injections (SQL, XSS, LDAP,etc), bruteforce Forms parameters (User/Password), Fuzzing, etc. - WebSlayer - tool designed for bruteforcing Web Applications, it can be used for finding not linked resources (directories, servlets, scripts, etc), bruteforce GET and POST parameters, bruteforce Forms parameters (User/Password), Fuzzing, etc. The tools has a payload generator and a easy and powerful results analyzer. - Watir - drives browsers the same way people do. It clicks links, fills in forms, presses buttons. Watir also checks results, such as whether expected text appears on the page. - Grendel-Scan - open-source web application security testing tool. It has automated testing module for detecting common web application vulnerabilities, and features geared at aiding manual penetration tests. - uwss - web security scanner and used for testing security holes in web applications. It can act as a fuzzer whose objective is to probe the application with various crafted attack strings. uwss is built upon a modular concept. - Doit - scripting tool and language for testing web applications that use forms. Doit can generate random or sequenced form fill-in information, report results (into a database, file, or stdout), filter HTML results, and compare results to previous results. - BeEF - browser exploitation framework. A professional tool to demonstrate the real-time impact of browser vulnerabilities. - httprint - Web server fingerprinting tool. - Netcraft - Escanea servidores web, se utiliza para determinar qué sitios web aloja un servidor. - curl - curl is a command line tool for transferring files with URL syntax, supporting FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS and FILE. curl supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form based upload, proxies, cookies, user+password authentication (Basic, Digest, NTLM, Negotiate, kerberos...), file transfer resume, proxy tunneling and a busload of other useful tricks. - Burp Intruder - Burp Intruder is a tool for automating customised attacks against web applications. You can use Burp Intruder to perform many kinds of tasks, including enumerating identifiers, harvesting useful data, and fuzzing for vulnerabilities. It can be used to test for flaws such as SQL injection, cross-site scripting, buffer overflows and path traversal; perform brute force attacks against authentication schemes; manipulate request parameters; trawl for hidden content and functionality; exploit session token predictability; mine for interesting data; and perform concurrency attacks and application-layer denial-of-service attacks. - Add N Edit Cookies - Firefox extension to edit cookies. - CookieDigger - CookieDigger helps identify weak cookie generation and insecure implementations of session management by web applications. - XSS-Proxy - XSS-Proxy is an advanced Cross-Site-Scripting (XSS) attack tool. - ratproxy - Passive web application security audit tool. - Hackvertor - Herramienta Web para convertir strings de texto a diferentes codificaciones, útil para inyectar código en las URLs. - Backframe - Backframe is a full-featured attack console for exploiting WEB browsers, WEB users and WEB applications. - WebSecurity Websecurify is a web and web2.0 security initiative specializing in researching security issues and building the next generation of tools to defeat and protect web technologies (viene para Win/Linux/Mac!). - XSS Tunnelling - the tunnelling of HTTP traffic through an XSS Channel to use virtually any application that supports HTTP proxies. - CeWL - ruby app which spiders a given url to a specified depth, optionally following external links, and returns a list of words which can then be used for password crackers such as John the Ripper. - fimap - little python tool which can find, prepare, audit, exploit and even google automatically for local and remote file inclusion bugs in webapps. - w3af - Web Application Attack and Audit Framework. The project's goal is to create a framework to find and exploit web application vulnerabilities that is easy to use and extend. - WAFP - WAFP fetches the files given by the Finger Prints from a webserver and checks if the checksums of those files are matching to the given checksums from the Finger Prints. This way it is able to detect the detailed version and even the build number of a Web Application. - Sahi - automation and testing tool for web applications, with the facility to record and playback scripts. Sahi runs on any modern browser which supports javascript. - skipfish - A fully automated, active web application security reconnaissance tool. - DAVTest - tests WebDAV enabled servers by uploading test executable files, and then (optionally) uploading files which allow for command execution or other actions directly on the target. - iScanner - free open source tool lets you detect and remove malicious codes and web pages viruses from your Linux/Unix server easily and automatically. - COMRaider - a tool designed to fuzz COM Object Interfaces (ActiveX). - Arachni - feature-full and modular Ruby framework that allows penetration testers and administrators to evaluate the security of web applications. Arachni is smart, it trains itself with every HTTP response it receives during the audit process. - sessionthief - performs HTTP session cloning by cookie stealing. It integrates automatically with Firefox, dynamically creating a temporary profile for each attack performed. The program will start a new instance of firefox for each session hacked, and let you control the login of all of them at once. - XSSer - automatic tool for pentesting XSS attacks against different applications. - sqlinject-finder - Simple python script that parses through a pcap and looks at the GET and POST request data for suspicious and possible SQL injects. - DOMinator - Firefox based software for analysis and identification of DOM Based Cross Site Scripting issues (DOM XSS). Fingerprinting and Web Frameworks Scanners - Joomscan - Yet Another Joomla Vulnerability Scanner that can detects file inclusion, sql injection, command execution vulnerabilities of a target Joomla! web site. - WPScan - black box WordPress Security Scanner written in Ruby which attempts to find known security weaknesses within WordPress installations. - BlindElephant - The BlindElephant Web Application Fingerprinter attempts to discover the version of a (known) web application by comparing static files at known locations against precomputed hashes for versions of those files in all all available releases. The technique is fast, low-bandwidth, non-invasive, generic, and highly automatable. - WPAF - Web Application Finger Printer written in ruby using a SQLite3 DB. Web Shells - JBoss Autopwn - This JBoss script deploys a JSP shell on the target JBoss AS server. Proxies - WebScarab - WebScarab is a framework for analysing applications that communicate using the HTTP and HTTPS protocols. It is written in Java, and is thus portable to many platforms. WebScarab has several modes of operation, implemented by a number of plugins. In its most common usage, WebScarab operates as an intercepting proxy, allowing the operator to review and modify requests created by the browser before they are sent to the server, and to review and modify responses returned from the server before they are received by the browser. WebScarab is able to intercept both HTTP and HTTPS communication. The operator can also review the conversations (requests and responses) that have passed through WebScarab. - Burp proxy - Burp Proxy is an interactive HTTP/S proxy server for attacking and testing web applications. It operates as a man-in-the-middle between the end browser and the target web server, and allows the user to intercept, inspect and modify the raw traffic passing in both directions. Burp Proxy allows you to find and exploit application vulnerabilities by monitoring and manipulating critical parameters and other data transmitted by the application. By modifying browser requests in various malicious ways, Burp Proxy can be used to perform attacks such as SQL injection, cookie subversion, privilege escalation, session hijacking, directory traversal and buffer overflows. - Paros Proxy - Through Paros's proxy nature, all HTTP and HTTPS data between server and client, including cookies and form fields, can be intercepted and modified. - Odysseus - proxy server, which acts as a man-in-the-middle during an HTTP session. A typical HTTP proxy will relay packets to and from a client browser and a web server. Odysseus will intercept an HTTP session's data in either direction and give the user the ability to alter the data before transmission. - SPIKE Proxy - professional-grade tool for looking for application-level vulnerabilities in web applications. SPIKE Proxy covers the basics, such as SQL Injection and cross-site-scripting, but it's completely open Python infrastructure allows advanced users to customize it for web applications that other tools fall apart on. - CAT (Context App Tool) - an application to facilitate manual web application penetration testing. CAT provides a richer feature set and greater performance, combined with a more intuitive user interface to aid a professional manual penetration tester. - WATOBO - intended to enable security professionals to perform highly efficient (semi-automated ) web application security audits. WATOBO works like a local proxy, similar to Webscarab, Paros or BurpSuite. - Mallory - transparent TCP and UDP proxy. It can be used to get at those hard to intercept network streams, assess those tricky mobile web applications, or maybe just pull a prank on your friend. - ProxyStrike - an active Web Application Proxy, is a tool designed to find vulnerabilities while browsing an application. - Zed Attack Proxy (ZAP) - an easy to use integrated penetration testing tool for finding vulnerabilities in web applications. It is designed to be used by people with a wide range of security experience and as such is ideal for developers and functional testers who are new to penetration testing. ZAP provides automated scanners as well as a set of tools that allow you to find security vulnerabilities manually. - Vega - open source platform to test the security of web applications. Vega can help you find and validate SQL Injections, Cross-Site Scripting (XSS), inadvertently disclosed sensitive information, and other vulnerabilities. Pentesting - MagicTree - MagicTree is a penetration tester productivity tool, it allows easy and straightforward data consolidation, querying, external command execution, and report generation. - dradis - open source framework to enable effective information sharing. - Inguma - penetration testing toolkit entirely written in python. The framework includes modules to discover hosts, gather information about, fuzz targets, brute force user names and passwords and, of course, exploits. Flash - SWFIntruder - SWFIntruder (pronounced Swiff Intruder) is the first tool specifically developed for analyzing and testing security of Flash applications at runtime. - Flare - Flare is a free ActionScript decompiler. It decompiles SWFs produced by Macromedia Flash, including Flash MX 2004 and Flash 8. - MTASC - MTASC is the first ActionScript 2 Open Source free compiler. - Flasm - Flasm is a free command line assembler/disassembler of Flash ActionScript bytecode. It lets you make changes to any SWF. Flasm fully supports SWFs produced by Macromedia Flash 8 and earlier Flash versions. - swfmill - swfmill is an xml2swf and swf2xml processor with import functionalities. - swftools - Collection of utilities for SWF file manipulation/creation. - SwfScan - HP SWFScan, a free tool developed by HP Web Security Research Group, will automatically find security vulnerabilities in applications built on the Flash platform. Tracers - Traceroute - computer network diagnostic tool for displaying the route (path) and measuring transit delays of packets across an Internet Protocol (IP) network. - MTR - combines the functionality of the traceroute and ping programs in a single network diagnostic tool. Cryptography - KGpg - simple interface for GnuPG, a powerful encryption utility.. - FireGPG - Firefox extension under MPL that provides an integrated interface to apply GnuPG operations to the text of any web page, including encryption, decryption, signing, and signature verification.. - SSLDigger - SSLDigger v1.02 is a tool to assess the strength of SSL servers by testing the ciphers supported. Some of these ciphers are known to be insecure. - THCSSLCheck - Windows tool that checks the remote ssl stack for supported ciphers and version. - sslscan - queries SSL services, such as HTTPS, in order to determine the ciphers that are supported. - SSLStrip - This tool provides a demonstration of the HTTPS stripping attacks that I presented at Black Hat DC 2009. - TLSSLed - Linux shell script whose purpose is to evaluate the security of a target SSL/TLS (HTTPS) web server implementation. Crackers - John the Ripper - fast password cracker, currently available for many flavors of Unix, Windows, DOS, BeOS, and OpenVMS. Its primary purpose is to detect weak Unix passwords. - Ophcrack - Windows password cracker based on rainbow tables. - Hydra - very fast network logon cracker which support many different services. - patator - multi-purpose brute-forcer, with a modular design and a flexible usage. - Aircrack-ng - an 802.11 WEP and WPA-PSK keys cracking program that can recover keys once enough data packets have been captured. - IKECrack - open source IKE/IPSec authentication crack tool. This tool is designed to bruteforce or dictionary attack the key/password used with Pre-Shared-Key [PSK] IKE authentication. - Wophcrack - PHP based web frontend for Ophcrack - Bruter - parallel network login brute-forcer on Win32. This tool is intended to demonstrate the importance of choosing strong passwords. The goal of Bruter is to support a variety of services that allow remote authentication. - IGHASHGPU - Program to recover/crack SHA1, MD5 &amp;amp; MD4 hashes. - Medusa - intended to be a speedy, massively parallel, modular, login brute-forcer. The goal is to support as many services which allow remote authentication as possible. - Ncrack - high-speed network authentication cracking tool. It was built to help companies secure their networks by proactively testing all their hosts and networking devices for poor passwords. - authforce - Authforce is an HTTP authentication brute forcer. Using various methods, it attempts brute force username and password pairs for a site. - RSMangler - take a wordlist and perform various manipulations on it similar to those done by John the Ripper with a few extras. - CmosPwd - decrypts password stored in cmos used to access BIOS SETUP. Phishing - Imposter - flexible framework to perform Browser Phishing attacks. Once the system running Imposter is configured as the DNS server to the victims, the internal DNS server of Imposter resolves all DNS queries to itself. When the victim tries to access any website the domain resolves to the system running Imposter and Imposter’s internal web server serves content to the victim. - Social-Engineering Toolkit (SET) - python-driven suite of custom tools which solely focuses on attacking the human element of pentesting. It's main purpose is to augment and simulate social-engineering attacks and allow the tester to effectively test how a targeted attack may succeed. Security Defense - AppArmor - effective and easy-to-use Linux application security system. AppArmor proactively protects the operating system and applications from external or internal threats, even zero-day attacks, by enforcing good behavior and preventing even unknown application flaws from being exploited. - Untangle Gateway - Debian-based network gateway with pluggable modules for network applications like spam blocking, web filtering, anti-virus, anti-spyware, intrusion prevention, VPN, SSL VPN, firewall, and more. Network Administration - Nagios - monitors your entire IT infrastructure to ensure systems, applications, services, and business processes are functioning properly. In the event of a failure, Nagios can alert technical staff of the problem, allowing them to begin remediation processes before outages affect business processes, end-users, or customers. - ntop - network traffic probe that shows the network usage, similar to what the popular top Unix command does. - nmblookup - NetBIOS over TCP/IP client used to lookup NetBIOS names. - findsmb - list info about machines that respond to SMB name queries on a subnet. - Corkscrew - tool for tunneling SSH through HTTP proxies - snmpcheck - free open source utility to get information via SNMP protocols. - snmpwalk - retrieve a subtree of management values using SNMP GETNEXT requests. - IPTraf - console-based network statistics utility for Linux. It gathers a variety of figures such as TCP connection packet and byte counts, interface statistics and activity indicators, TCP/UDP traffic breakdowns, and LAN station packet and byte counts. Databases - Safe3 SQL Injector - one of the most powerful penetration testing tool that automates the process of detecting and exploiting SQL injection flaws and taking over of back-end database servers. - sqlcmd - herramienta para conexión a bases de datos Oracle, SQL Server, MySQL y Postgress - sqlmap - open source penetration testing tool that automates the process of detecting and exploiting SQL injection flaws and taking over of back-end database servers. - SQLiX - SQL Injection scanner, able to crawl, detect SQL injection vectors, identify the back-end database and grab function call/UDF results (even execute system commands for MS-SQL). - sqlninja - tool targeted to exploit SQL Injection vulnerabilities on a web application that uses Microsoft SQL Server as its back-end. - MySqloit - SQL Injection takeover tool focused on LAMP (Linux, Apache,MySql,PHP) and WAMP (Windows, Apache,MySql,PHP) platforms. It has the ability to upload and execute metasploit shellcodes through the MySql SQL Injection vulnerabilities. - TNS Listener tool - tnscmd can be used to speak, on a very simple level, with Oracle's TNS listener. - SQLInjector - SQLInjector uses inference techniques to extract data and determine the backend database server. - GreenSQL - designed to protect databases (PostgreSQL/MySQL) against SQL injection attacks and other unauthorised changes, in a similar fashion to a firewall protecting a network against TCP/IP outside attacks. The new version also provides a graphical user interface for monitoring the database firewall. - FreeTDS - Microsoft SQL Server client. - MSSQLScan - A small multi-threaded tool that scans for Microsoft SQL Servers. - AppSentry Listener Security Check - Check the security configuration of the Oracle Database Listener and listeners for Oracle Applications 11i. Code analyzers - MS MiniFuzz - very simple fuzzer designed to ease adoption of fuzz testing by non-security people who are unfamiliar with file fuzzing tools or have never used them in their current software development processes. - MS BinScope - Microsoft verification tool that analyzes binaries on a project-wide level to ensure that they have been built in compliance with Microsoft’s Security Development Lifecycle (SDL) requirements and recommendations. - MS FxCop - code analysis tool that checks .NET managed code assemblies for conformance to the Microsoft .NET Framework Design Guidelines. - RATS - tool for scanning C, C++, Perl, PHP and Python source code and flagging common security related programming errors such as buffer overflows and TOCTOU (Time Of Check, Time Of Use) race conditions. - Graudit - simple script and signature sets that allows you to find potential security flaws in source code using the GNU utility grep. Graudit supports scanning code written in several languages; asp, jsp, perl, php and python. DNS - dnsmap - Subdomain bruteforce. Forensics Analysis - Digital Forensics Analysis - a simple but powerful open source tool with a flexible module system which will help you in your digital forensics works, including files recovery due to error or crash, evidence research and analysis, etc. - EnCase Forensic Tool - From the simplest requirements to the most complex, EnCase Forensic is the premier computer forensic application on the market. Bypass - Pass-The-Hash - The Pass-The-Hash Toolkit contains utilities to manipulate the Windows Logon Sessions mantained by the LSA (Local Security Authority) component. These tools allow you to list the current logon sessions with its corresponding NTLM credentials (e.g.: users remotely logged in thru Remote Desktop/Terminal Services), and also change in runtime the current username, domain name, and NTLM hashes Documentation - Agnitio - A tool to help developers and security professionals conduct manual security code reviews in a consistent and repeatable way. Agnitio aims to replace the adhoc nature of manual security code review documentation, create an audit trail and reporting. Educational - Damn Vulnerable Web App (DVWA) - PHP/MySQL web application that is damn vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, help web developers better understand the processes of securing web applications and aid teachers/students to teach/learn web application security in a class room environment. - Mutillidae - Deliberately Vulnerable Set Of PHP Scripts That Implement The OWASP Top 10 - WebGoat - deliberately insecure J2EE web application maintained by OWASP designed to teach web application security lessons. - moth - VMware image with a set of vulnerable Web Applications and scripts, that you may use for Testing Web Application Security Scanners, Testing Static Code Analysis tools (SCA) and Giving an introductory course to Web Application Security. - Web Security Dojo - A free open-source self-contained training environment for Web Application Security penetration testing. Tools + Targets = Dojo Programming - JODE is a java package containing a decompiler and an optimizer for java File Managers - cadaver - is a command-line WebDAV client for Unix. It supports file upload, download, on-screen display, namespace operations (move/copy), collection creation and deletion, and locking operations. NAT - pwnat - pronounced "poe-nat", is a tool that allows any number of clients behind NATs to communicate with a server behind a separate NAT with *no* port forwarding and *no* DMZ setup on any routers in order to directly communicate with each other.</itunes:subtitle><itunes:author>noreply@blogger.com (V3kt0r)</itunes:author><itunes:summary>Cuantos meses sin publicar nada! pero, aunque no lo crean, el blog sigue vivo! Para compensar la prolongada ausencia y conmemorar que llegamos a los 200 posts, decidí postear algo groso, algo que venía prometiendo hace rato y que por fiaca de ponerme a editar, no publiqué antes: el listado de aplicaciones de seguridad. Este listado es el resultado de 4 años de recopilación, trabajando en seguridad, y a ojo contiene más de 150 herramientas! Ahora que dejé la seguridad un poco de lado para concentrarme más en redes y comunicaciones, creo que es un buen momento para publicarlo. Todas las herramientas están con sus respectivos links oficiales y una breve descripción. Antes de pasar al listado, les dejo algunas aclaraciones: - Hay muchas herramientas que nunca utilicé. Armé el listado a partir de leer muchos artículos y descripciones de programas, e incluí todos los que me parecían útiles para distintas tareas. - Emiliano (quien publicó varios artículos en este blog) colaboró en su momento con varias entradas de la lista. Ahora Emi administra su propio blog denominado linuxito.com.ar - Agrupé las herramientas en base a distintos criterios. Varias encajan en más de un criterio, pero obviamente no iba a repetirlas en cada uno, así que están en el que me parece las describe mejor. - El orden en que se encuentran las herramientas no tienen ningún significado, se fueron agregando aleatoriamente. Si bien traté de dejar las más importantes en los primeros lugares, pueden aparecer en cualquier posición. - Como el listado se empezó a armar hace 4 años, puede que algunos links estén rotos, o que la herramienta no tenga más soporte. - Hay varias herramientas que no se vinculan directamente a seguridad, pero sirven para realizar tests de seguridad. - La gran mayoría de las aplicaciones listadas son libres y para GNU/Linux, pero hay algunas que son cerradas y pagas, y algunas que funcionan sólo en Windows. - El listado no es completo y existen muchas y muy importantes herramientas que no se encuentran en él. Live-CDs/DVDs - BackTrack Linux - Linux-based penetration testing arsenal that aids security professionals in the ability to perform assessments in a purely native environment dedicated to hacking - Wifislax - distribución GNU/Linux (LiveCD) diseñada para la auditoría de seguridad del estándar 802.11. (WiFi, BlueTooth y RFID). - DEFT - includes an excellent hardware detection and the best free and open source applications dedicated to Incident Response, Cyber Intelligence and Computer Forensics. - Pentoo - un Live CD/USB desarrollado para llevar a cabo procesos de Test de Penetración y/o Ethical Hacking. Esta distribución está basada en Gentoo Linux (kernel 2.6.31.6), gestor de ventanas Enlightenment e incluye una amplia colección de herramientas debidamente organizadas por categorías. - Security Onion - Security Onion is a Linux distro for IDS, NSM, and log management. - VAST - a VIPER Lab live distribution that contains VIPER developed tools such as UCsniff, videojak, videosnarf and more. Along with VIPER tools and other essential VoIP security tools, it also contains tools penetration testers utilize such as Metasploit, Nmap, and Hydra. - Network Security Toolkit - The main intent of developing this toolkit was to provide the network security administrator with a comprehensive set of Open Source Network Security Tools. - Katana - includes distributions which focus on Penetration Testing, Auditing, Password Cracking, Forensics and Honey Pots. Katana comes with over 100 portable Windows applications such as Wireshark, HiJackThis, Unstoppable Copier, and OllyDBG. - Matriux - fully featured security distribution consisting of a bunch of powerful, open source and free tools that can be used for various purposes including, but not limited to, penetration testing, ethical hacking, system and network administration, cyber forensics investigations, security testing, vulnerability analysis, and much more. - Samurai - The Samurai Web Testing Framework is a live linux environment that has been pre-configured to function as a web pen-testing environment. The CD contains the best of the open source and free tools that focus on testing and attacking websites. - REMnux - lightweight Linux distribution for assisting malware analysts in reverse-engineering malicious software. - PlainSight - versatile computer forensics environment that allows inexperienced forensic practitioners perform common tasks using powerful open source tools. - WeakNet Linux - designed primarily for penetration testing, forensic analysis and other security tasks. The tools selected are those that the developer feels are used most often in pen-tests. A sample of those included are: BRuWRT-FORSSE v2.0, Easy-SSHd, Web-Hacking-Portal v2.0, Perlwd, Netgh0st v3.0, YouTube-Thief!, Netgh0st v2.2, DomainScan, ADtrace, Admin-Tool, Tartarus v0.1. - Puck - GNU/Linux distribution distributed as a Live CD based on TinyCoreLinux. It contains top penetration testing tools. - Metasploitable - an Ubuntu server install on a VMWare image. A number of vulnerable packages are included, including an install of tomcat 5.5 (with weak credentials), distcc, tikiwiki, twiki, and an older mysql. Scanners - Nmap - free and open source utility for network discovery and security auditing. Many systems and network administrators also find it useful for tasks such as network inventory, managing service upgrade schedules, and monitoring host or service uptime. - Netcat - networking utility which reads and writes data across network connections, using the TCP/IP protocol. - hping - command-line oriented TCP/IP packet assembler/analyzer. The interface is inspired to the ping(8) unix command, but hping isn't only able to send ICMP echo requests. It supports TCP, UDP, ICMP and RAW-IP protocols, has a traceroute mode, the ability to send files between a covered channel, and many other features. - haraldscan - Bluetooth discovery scanner. - Natprobe - This little, but very usefull program, try to sends ICMP packet out the LAN, and detect all the host that allow it. Whit this you can find bugs in your (company?) network (or others), for example hosts that allow p2p connections. - MSSQLScan - A small multi-threaded tool that scans for Microsoft SQL Servers. The tool does it’s discovery by using UDP and returns a list of all detected instances with there respective protocols and ports. - hostmap - enumerate all hostnames and configured virtual hosts on an IP address. - FindDomains - multithreaded search engine discovery tool that will be very useful for penetration testers dealing with discovering domain names/web sites/virtual hosts which are located on too many IP addresses. - keimpx - It can be used to quickly check for the usefulness of credentials across a network over SMB. Credentials can be: Combination of user / plain-text password, Combination of user / NTLM hash, Combination of user / NTLM logon session token. - StreamArmor - sophisticated tool for discovering hidden alternate data streams (ADS) as well as clean them completely from the system. - Halberd - a tool aimed at discovering real servers behind virtual IPs. - NSDECODER - automated website malware detection tools. It can be used to decode and analyze weather the URL exist malware. Also, NSDECODER will analyze which vulnerability been exploit and the original source address of malware. - sslyze - Cross-platform tool to analyze the configuration of SSL servers. Sniffers - wireshark - world's foremost network protocol analyzer. It lets you see what's happening on your network at a microscopic level. It is the de facto (and often de jure) standard across many industries and educational institutions. - tcpdump - prints out a description of the contents of packets on a network interface that match the boolean expression. - arpwatch - thernet monitor program; for keeping track of ethernet/ip address pairings. - ucsniff - VoIP &amp;amp; IP Video Security Assessment tool that integrates existing open source software into several useful features, allowing VoIP and IP Video owners and security professionals to rapidly test for the threat of unauthorized VoIP and Video Eavesdropping. - webmitm - transparently proxies and sniffs HTTP / HTTPS traffic redirected by dnsspoof, capturing most "secure" SSL-encrypted webmail logins and form submissions. - dsniff - collection of tools for network auditing and penetration testing. dsniff, filesnarf, mailsnarf, msgsnarf, urlsnarf, and webspy passively monitor a network for interesting data (passwords, e-mail, files, etc.). arpspoof, dnsspoof, and macof facilitate the interception of network traffic normally unavailable to an attacker (e.g, due to layer-2 switching). sshmitm and webmitm implement active monkey-in-the-middle attacks against redirected SSH and HTTPS sessions by exploiting weak bindings in ad-hoc PKI. - RawCap - RawCap is a free command line network sniffer for Windows that uses raw sockets. - Yamas - a tool that aims at facilitating mitm attacks by automating the whole process from setting up ip forwarding and modifying iptables, to the ARP cache poisoning Spoofing - arpspoof - may allow an attacker to sniff data frames on a local area network (LAN), modify the traffic, or stop the traffic altogether. - dnsspoof - forges replies to arbitrary DNS address / pointer queries on the internal LAN. This is useful in bypassing host name based access controls, or in implementing a variety of efficient network controls. IDS - snort - open source network intrusion prevention and detection system (IDS/IPS). - OSSEC - scalable, multi-platform, open source Host-based Intrusion Detection System (HIDS). It has a powerful correlation and analysis engine, integrating log analysis, file integrity checking, Windows registry monitoring, centralized policy enforcement, rootkit detection, real-time alerting and active response. - Samhain - open source host-based intrusion detection system (HIDS) provides file integrity checking and logfile monitoring/analysis, as well as rootkit detection, port monitoring, detection of rogue SUID executables, and hidden processes. - Nebula - network intrusion signature generator. It can help securing a network by automatically deriving and installing filter rules from attack traces. In a common setup, nebula runs as a daemon and receives attacks from honeypots. Signatures are currently published in Snort format. - suricata - The Suricata Engine is an Open Source Next Generation Intrusion Detection and Prevention Engine. This engine is not intended to just replace or emulate the existing tools in the industry, but will bring new ideas and technologies to the field. - Osiris - Host Integrity Monitoring System that periodically monitors one or more hosts for change. Osiris keeps an administrator apprised of possible attacks and/or nasty little trojans. The purpose here is to isolate changes that indicate a break-in or a compromised system. - Sagan - multi-threaded, real time system and event log monitoring system, but with a twist. Sagan uses a "Snort" like rule set for detecting bad things happening on your network and/or computer systems. If Sagan detects a "bad thing" happening, that event can be stored to a Snort database (MySQL/PostgreSQL) and Sagan will attempt to correlate the event with your Snort Intrusion Detection/Intrusion Prevention (IDS/IPS) system. - Snorby - new and modern Snort IDS front-end. The basic fundamental concepts behind snorby are simplicity and power. - Smooth-sec - ready to-go&amp;nbsp; IDS/IPS (Intrusion Detection/Prevention System) linux distribution based on the multi threaded Suricata IDS/IPS engine and Snorby, the top notch web application for network security monitoring. - ArpON - portable handler daemon that make ARP secure in order to avoid the Man In The Middle (MITM) through ARP Spoofing/Poisoning attacks. It detects and blocks also derived attacks by it for more complex attacks, as: DHCP Spoofing, DNS Spoofing, WEB Spoofing, Session Hijacking and SSL/TLS Hijacking &amp;amp; co attacks. Firewalls - iQfire-wall - framework that implements a network firewall. It can be used in desktop systems and in simple network configurations, providing a friendly graphical interface and a simple installation procedure. Also unprivileged users can personalize. - Firestarter - Open Source visual firewall program. The software aims to combine ease of use with powerful features, therefore serving both Linux desktop users and system administrators. - IPCop - Linux firewall distribution. - Firewall Builder - Firewall Builder is a GUI firewall configuration and management tool that supports iptables (netfilter), ipfilter, pf, ipfw, Cisco PIX (FWSM, ASA) and Cisco routers extended access lists. - GreenSQL - Open Source database firewall used to protect databases from SQL injection attacks. GreenSQL works as a proxy and has built in support for MySQL. The logic is based on evaluation of SQL commands using a risk scoring matrix as well as blocking known db administrative commands (DROP, CREATE, etc). GreenSQL provides MySQL database security solution. - Flint - examines firewalls, quickly computes the effect of all the configuration rules, and then spots problems so you can: CLEAN UP RUSTY CONFIGURATIONS that are crudded up with rules that can't match traffic; ERADICATE LATENT SECURITY PROBLEMS lurking in overly-permissive rules; SANITY CHECK CHANGES to see if new rules create problems. Honeypots - HoneyDrive - virtual hard disk drive (VMDK format) with Ubuntu Server. It contains various honeypot systems such as Kippo SSH honeypot, Dionaea malware honeypot and Honeyd. Additionally it includes useful scripts and utilities to analyze and visualize the data it captures. Lastly, other helpful tools like tshark (command-line Wireshark), pdftools, etc. are also present. Auditory - Nessus - vulnerability scanner. Provides patch, configuration, and compliance auditing; mobile, malware, and botnet discovery; sensitive data identification; and many other features. - OpenVAS - Open Vulnerability Assessment System and is a network security scanner with associated tools like a graphical user front-end. The core component is a server with a set of network vulnerability tests (NVTs) to detect security problems in remote systems and applications. - SAINT - Vulnerability Scanning, Penetration Testing, Social Engineering, Configuration Assessments, Reporting. - PenTBox - Security Suite with programs like Password Crackers, Denial of Service testing tools (DoS and DDoS), Secure Password Generators, Honeypots and much more. - Seccubus - runs Nessus scans at regular intervals and compares the findings of the last scan with the findings of the previous scan. The delta of this scan is presented in a web GUI when findingscan be easily marked as either real findings or non-issues. Non issues get ignored untill they change. This causes a dramaticreduction a analysis time. - GrokEVT - collection of scripts built for reading Windows® NT/2K/XP/2K3 event log files. GrokEVT is released under the GNU GPL, and is implemented in Python. - Flawfinder - program that examines source code and reports possible security weaknesses (``flaws'') sorted by risk level. It's very useful for quickly finding and removing at least some potential security problems before a program is widely released to the public. - KrbGuess - small and simple tool which can be used during security testing to guess valid usernames against a Kerberos environment. - Webfwlog - flexible web-based firewall log analyzer and reporting tool. It supports standard system logs for linux, FreeBSD, OpenBSD, NetBSD, Solaris, Irix, OS X, etc. as well as Windows XP. Supported log file formats are netfilter, ipfilter, ipfw, ipchains and Windows XP. Webfwlog also supports logs saved in a database using the ULOGD target of the linux netfilter project. - YASAT - (Yet Another Stupid Audit Tool) is a simple stupid audit tool. It do many tests for checking security configuration issue or others good practice. - FireCAT (Firefox Catalog of Auditing exTension) - mindmap collection of the most efficient and useful firefox extensions oriented application security auditing and assessment. - keimpx - keimpx is an open source tool, released under a modified version of Apache License 1.1. It can be used to quickly check for the usefulness of credentials across a network over SMB. - Buck Security - collection of security checks for Linux. It was designed for Debian and Ubuntu servers, but can be useful for any Linux system. - DllHijackAuditor - smart tool to Audit against the Dll Hijacking Vulnerability in any Windows application. - Mantra - a collection of free and open source tools integrated into a web browser, which can become handy for students, penetration testers, web application developers, security professionals etc. - MysqlPasswordAuditor - FREE Mysql password recovery and auditing software. Mysql is one of the popular and powerful database software used by most of the web based and server side applications. PDFs - origami - Ruby framework designed to parse, analyze, and forge PDF documents. This is NOT a PDF rendering library. It aims at providing a scripting tool to generate and analyze malicious PDF files. As well, it can be used to create on-the-fly customized PDFs, or to inject (evil) code into already existing documents. - pdfinjector - Script to inject javascript code into existing pdf files. - PDFResurrect - tool aimed at analyzing PDF documents. The PDF format allows for previous document changes to be retained in a more recent version of the document, thereby creating a running history of changes for the document. File vulnerabilities checkers - OfficeCat) - command line utility that can be used to process Microsoft Office Documents for the presence of potential exploit conditions in the file. Exploitation - Metasploit - penetration testing software. Helps verify vulnerabilities and manage security assessments. - Weevely - stealth PHP web shell that provides a telnet-like console. It is an essential tool for web application post exploitation, and can be used as stealth backdoor or as a web shell to manage legit web accounts, even free hosted ones. - XLSInjector - Injects meterpreter shell to excel xls files (Port 4444). - Armitage - graphical cyber attack management tool for Metasploit that visualizes your targets, recommends exploits, and exposes the advanced capabilities of the framework. - Canvas - Immunity's CANVAS makes available hundreds of exploits, an automated exploitation system, and a comprehensive, reliable exploit development framework to penetration testers and security professionals worldwide. - Core Impact - the most comprehensive software solution for assessing the real-world security of: web applications, network systems, endpoint systems and email users, wireless networks, network devices. Wireless - inSSIDer - award-winning free Wi-Fi network scanner for Windows Vista and Windows XP. - Kismet - an 802.11 layer2 wireless network detector, sniffer, and intrusion detection system. Kismet will work with any wireless card which supports raw monitoring (rfmon) mode, and (with appropriate hardware) can sniff 802.11b, 802.11a, 802.11g, and 802.11n traffic. - wifite - attack multiple WEP and WPA encrypted networks at the same time. this tool is customizable to be automated with only a few arguments. can be trusted to run without supervision. Networking - Yersinia - network tool designed to take advantage of some weakeness in different network protocols. It pretends to be a solid framework for analyzing and testing the deployed networks and systems. - macof - flood a switched LAN with random MAC addresses - PacketFence - a fully supported, trusted, Free and Open Source network access control (NAC) system. - Eigrp-tools - custom EIGRP packet generator and sniffer combined. It was developed to test the security and overall operation quality of the EIGRP routing protocol. - GNS3 - graphical network simulator that allows simulation of complex networks. Vulnerabilidades Web - Nikto - Open Source (GPL) web server scanner which performs comprehensive tests against web servers for multiple items, including over 6500 potentially dangerous files/CGIs, checks for outdated versions of over 1250 servers, and version specific problems on over 270 servers. - Wapiti - It performs "black-box" scans, i.e. it does not study the source code of the application but will scans the webpages of the deployed webapp, looking for scripts and forms where it can inject data. - Tamperdata - Firefox add-on to view and modify HTTP/HTTPS headers and post parameters. - Wfuzz - is a tool designed for bruteforcing Web Applications, it can be used for finding resources not linked (directories, servlets, scripts, etc), bruteforce GET and POST parameters for checking different kind of injections (SQL, XSS, LDAP,etc), bruteforce Forms parameters (User/Password), Fuzzing, etc. - WebSlayer - tool designed for bruteforcing Web Applications, it can be used for finding not linked resources (directories, servlets, scripts, etc), bruteforce GET and POST parameters, bruteforce Forms parameters (User/Password), Fuzzing, etc. The tools has a payload generator and a easy and powerful results analyzer. - Watir - drives browsers the same way people do. It clicks links, fills in forms, presses buttons. Watir also checks results, such as whether expected text appears on the page. - Grendel-Scan - open-source web application security testing tool. It has automated testing module for detecting common web application vulnerabilities, and features geared at aiding manual penetration tests. - uwss - web security scanner and used for testing security holes in web applications. It can act as a fuzzer whose objective is to probe the application with various crafted attack strings. uwss is built upon a modular concept. - Doit - scripting tool and language for testing web applications that use forms. Doit can generate random or sequenced form fill-in information, report results (into a database, file, or stdout), filter HTML results, and compare results to previous results. - BeEF - browser exploitation framework. A professional tool to demonstrate the real-time impact of browser vulnerabilities. - httprint - Web server fingerprinting tool. - Netcraft - Escanea servidores web, se utiliza para determinar qué sitios web aloja un servidor. - curl - curl is a command line tool for transferring files with URL syntax, supporting FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS and FILE. curl supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form based upload, proxies, cookies, user+password authentication (Basic, Digest, NTLM, Negotiate, kerberos...), file transfer resume, proxy tunneling and a busload of other useful tricks. - Burp Intruder - Burp Intruder is a tool for automating customised attacks against web applications. You can use Burp Intruder to perform many kinds of tasks, including enumerating identifiers, harvesting useful data, and fuzzing for vulnerabilities. It can be used to test for flaws such as SQL injection, cross-site scripting, buffer overflows and path traversal; perform brute force attacks against authentication schemes; manipulate request parameters; trawl for hidden content and functionality; exploit session token predictability; mine for interesting data; and perform concurrency attacks and application-layer denial-of-service attacks. - Add N Edit Cookies - Firefox extension to edit cookies. - CookieDigger - CookieDigger helps identify weak cookie generation and insecure implementations of session management by web applications. - XSS-Proxy - XSS-Proxy is an advanced Cross-Site-Scripting (XSS) attack tool. - ratproxy - Passive web application security audit tool. - Hackvertor - Herramienta Web para convertir strings de texto a diferentes codificaciones, útil para inyectar código en las URLs. - Backframe - Backframe is a full-featured attack console for exploiting WEB browsers, WEB users and WEB applications. - WebSecurity Websecurify is a web and web2.0 security initiative specializing in researching security issues and building the next generation of tools to defeat and protect web technologies (viene para Win/Linux/Mac!). - XSS Tunnelling - the tunnelling of HTTP traffic through an XSS Channel to use virtually any application that supports HTTP proxies. - CeWL - ruby app which spiders a given url to a specified depth, optionally following external links, and returns a list of words which can then be used for password crackers such as John the Ripper. - fimap - little python tool which can find, prepare, audit, exploit and even google automatically for local and remote file inclusion bugs in webapps. - w3af - Web Application Attack and Audit Framework. The project's goal is to create a framework to find and exploit web application vulnerabilities that is easy to use and extend. - WAFP - WAFP fetches the files given by the Finger Prints from a webserver and checks if the checksums of those files are matching to the given checksums from the Finger Prints. This way it is able to detect the detailed version and even the build number of a Web Application. - Sahi - automation and testing tool for web applications, with the facility to record and playback scripts. Sahi runs on any modern browser which supports javascript. - skipfish - A fully automated, active web application security reconnaissance tool. - DAVTest - tests WebDAV enabled servers by uploading test executable files, and then (optionally) uploading files which allow for command execution or other actions directly on the target. - iScanner - free open source tool lets you detect and remove malicious codes and web pages viruses from your Linux/Unix server easily and automatically. - COMRaider - a tool designed to fuzz COM Object Interfaces (ActiveX). - Arachni - feature-full and modular Ruby framework that allows penetration testers and administrators to evaluate the security of web applications. Arachni is smart, it trains itself with every HTTP response it receives during the audit process. - sessionthief - performs HTTP session cloning by cookie stealing. It integrates automatically with Firefox, dynamically creating a temporary profile for each attack performed. The program will start a new instance of firefox for each session hacked, and let you control the login of all of them at once. - XSSer - automatic tool for pentesting XSS attacks against different applications. - sqlinject-finder - Simple python script that parses through a pcap and looks at the GET and POST request data for suspicious and possible SQL injects. - DOMinator - Firefox based software for analysis and identification of DOM Based Cross Site Scripting issues (DOM XSS). Fingerprinting and Web Frameworks Scanners - Joomscan - Yet Another Joomla Vulnerability Scanner that can detects file inclusion, sql injection, command execution vulnerabilities of a target Joomla! web site. - WPScan - black box WordPress Security Scanner written in Ruby which attempts to find known security weaknesses within WordPress installations. - BlindElephant - The BlindElephant Web Application Fingerprinter attempts to discover the version of a (known) web application by comparing static files at known locations against precomputed hashes for versions of those files in all all available releases. The technique is fast, low-bandwidth, non-invasive, generic, and highly automatable. - WPAF - Web Application Finger Printer written in ruby using a SQLite3 DB. Web Shells - JBoss Autopwn - This JBoss script deploys a JSP shell on the target JBoss AS server. Proxies - WebScarab - WebScarab is a framework for analysing applications that communicate using the HTTP and HTTPS protocols. It is written in Java, and is thus portable to many platforms. WebScarab has several modes of operation, implemented by a number of plugins. In its most common usage, WebScarab operates as an intercepting proxy, allowing the operator to review and modify requests created by the browser before they are sent to the server, and to review and modify responses returned from the server before they are received by the browser. WebScarab is able to intercept both HTTP and HTTPS communication. The operator can also review the conversations (requests and responses) that have passed through WebScarab. - Burp proxy - Burp Proxy is an interactive HTTP/S proxy server for attacking and testing web applications. It operates as a man-in-the-middle between the end browser and the target web server, and allows the user to intercept, inspect and modify the raw traffic passing in both directions. Burp Proxy allows you to find and exploit application vulnerabilities by monitoring and manipulating critical parameters and other data transmitted by the application. By modifying browser requests in various malicious ways, Burp Proxy can be used to perform attacks such as SQL injection, cookie subversion, privilege escalation, session hijacking, directory traversal and buffer overflows. - Paros Proxy - Through Paros's proxy nature, all HTTP and HTTPS data between server and client, including cookies and form fields, can be intercepted and modified. - Odysseus - proxy server, which acts as a man-in-the-middle during an HTTP session. A typical HTTP proxy will relay packets to and from a client browser and a web server. Odysseus will intercept an HTTP session's data in either direction and give the user the ability to alter the data before transmission. - SPIKE Proxy - professional-grade tool for looking for application-level vulnerabilities in web applications. SPIKE Proxy covers the basics, such as SQL Injection and cross-site-scripting, but it's completely open Python infrastructure allows advanced users to customize it for web applications that other tools fall apart on. - CAT (Context App Tool) - an application to facilitate manual web application penetration testing. CAT provides a richer feature set and greater performance, combined with a more intuitive user interface to aid a professional manual penetration tester. - WATOBO - intended to enable security professionals to perform highly efficient (semi-automated ) web application security audits. WATOBO works like a local proxy, similar to Webscarab, Paros or BurpSuite. - Mallory - transparent TCP and UDP proxy. It can be used to get at those hard to intercept network streams, assess those tricky mobile web applications, or maybe just pull a prank on your friend. - ProxyStrike - an active Web Application Proxy, is a tool designed to find vulnerabilities while browsing an application. - Zed Attack Proxy (ZAP) - an easy to use integrated penetration testing tool for finding vulnerabilities in web applications. It is designed to be used by people with a wide range of security experience and as such is ideal for developers and functional testers who are new to penetration testing. ZAP provides automated scanners as well as a set of tools that allow you to find security vulnerabilities manually. - Vega - open source platform to test the security of web applications. Vega can help you find and validate SQL Injections, Cross-Site Scripting (XSS), inadvertently disclosed sensitive information, and other vulnerabilities. Pentesting - MagicTree - MagicTree is a penetration tester productivity tool, it allows easy and straightforward data consolidation, querying, external command execution, and report generation. - dradis - open source framework to enable effective information sharing. - Inguma - penetration testing toolkit entirely written in python. The framework includes modules to discover hosts, gather information about, fuzz targets, brute force user names and passwords and, of course, exploits. Flash - SWFIntruder - SWFIntruder (pronounced Swiff Intruder) is the first tool specifically developed for analyzing and testing security of Flash applications at runtime. - Flare - Flare is a free ActionScript decompiler. It decompiles SWFs produced by Macromedia Flash, including Flash MX 2004 and Flash 8. - MTASC - MTASC is the first ActionScript 2 Open Source free compiler. - Flasm - Flasm is a free command line assembler/disassembler of Flash ActionScript bytecode. It lets you make changes to any SWF. Flasm fully supports SWFs produced by Macromedia Flash 8 and earlier Flash versions. - swfmill - swfmill is an xml2swf and swf2xml processor with import functionalities. - swftools - Collection of utilities for SWF file manipulation/creation. - SwfScan - HP SWFScan, a free tool developed by HP Web Security Research Group, will automatically find security vulnerabilities in applications built on the Flash platform. Tracers - Traceroute - computer network diagnostic tool for displaying the route (path) and measuring transit delays of packets across an Internet Protocol (IP) network. - MTR - combines the functionality of the traceroute and ping programs in a single network diagnostic tool. Cryptography - KGpg - simple interface for GnuPG, a powerful encryption utility.. - FireGPG - Firefox extension under MPL that provides an integrated interface to apply GnuPG operations to the text of any web page, including encryption, decryption, signing, and signature verification.. - SSLDigger - SSLDigger v1.02 is a tool to assess the strength of SSL servers by testing the ciphers supported. Some of these ciphers are known to be insecure. - THCSSLCheck - Windows tool that checks the remote ssl stack for supported ciphers and version. - sslscan - queries SSL services, such as HTTPS, in order to determine the ciphers that are supported. - SSLStrip - This tool provides a demonstration of the HTTPS stripping attacks that I presented at Black Hat DC 2009. - TLSSLed - Linux shell script whose purpose is to evaluate the security of a target SSL/TLS (HTTPS) web server implementation. Crackers - John the Ripper - fast password cracker, currently available for many flavors of Unix, Windows, DOS, BeOS, and OpenVMS. Its primary purpose is to detect weak Unix passwords. - Ophcrack - Windows password cracker based on rainbow tables. - Hydra - very fast network logon cracker which support many different services. - patator - multi-purpose brute-forcer, with a modular design and a flexible usage. - Aircrack-ng - an 802.11 WEP and WPA-PSK keys cracking program that can recover keys once enough data packets have been captured. - IKECrack - open source IKE/IPSec authentication crack tool. This tool is designed to bruteforce or dictionary attack the key/password used with Pre-Shared-Key [PSK] IKE authentication. - Wophcrack - PHP based web frontend for Ophcrack - Bruter - parallel network login brute-forcer on Win32. This tool is intended to demonstrate the importance of choosing strong passwords. The goal of Bruter is to support a variety of services that allow remote authentication. - IGHASHGPU - Program to recover/crack SHA1, MD5 &amp;amp; MD4 hashes. - Medusa - intended to be a speedy, massively parallel, modular, login brute-forcer. The goal is to support as many services which allow remote authentication as possible. - Ncrack - high-speed network authentication cracking tool. It was built to help companies secure their networks by proactively testing all their hosts and networking devices for poor passwords. - authforce - Authforce is an HTTP authentication brute forcer. Using various methods, it attempts brute force username and password pairs for a site. - RSMangler - take a wordlist and perform various manipulations on it similar to those done by John the Ripper with a few extras. - CmosPwd - decrypts password stored in cmos used to access BIOS SETUP. Phishing - Imposter - flexible framework to perform Browser Phishing attacks. Once the system running Imposter is configured as the DNS server to the victims, the internal DNS server of Imposter resolves all DNS queries to itself. When the victim tries to access any website the domain resolves to the system running Imposter and Imposter’s internal web server serves content to the victim. - Social-Engineering Toolkit (SET) - python-driven suite of custom tools which solely focuses on attacking the human element of pentesting. It's main purpose is to augment and simulate social-engineering attacks and allow the tester to effectively test how a targeted attack may succeed. Security Defense - AppArmor - effective and easy-to-use Linux application security system. AppArmor proactively protects the operating system and applications from external or internal threats, even zero-day attacks, by enforcing good behavior and preventing even unknown application flaws from being exploited. - Untangle Gateway - Debian-based network gateway with pluggable modules for network applications like spam blocking, web filtering, anti-virus, anti-spyware, intrusion prevention, VPN, SSL VPN, firewall, and more. Network Administration - Nagios - monitors your entire IT infrastructure to ensure systems, applications, services, and business processes are functioning properly. In the event of a failure, Nagios can alert technical staff of the problem, allowing them to begin remediation processes before outages affect business processes, end-users, or customers. - ntop - network traffic probe that shows the network usage, similar to what the popular top Unix command does. - nmblookup - NetBIOS over TCP/IP client used to lookup NetBIOS names. - findsmb - list info about machines that respond to SMB name queries on a subnet. - Corkscrew - tool for tunneling SSH through HTTP proxies - snmpcheck - free open source utility to get information via SNMP protocols. - snmpwalk - retrieve a subtree of management values using SNMP GETNEXT requests. - IPTraf - console-based network statistics utility for Linux. It gathers a variety of figures such as TCP connection packet and byte counts, interface statistics and activity indicators, TCP/UDP traffic breakdowns, and LAN station packet and byte counts. Databases - Safe3 SQL Injector - one of the most powerful penetration testing tool that automates the process of detecting and exploiting SQL injection flaws and taking over of back-end database servers. - sqlcmd - herramienta para conexión a bases de datos Oracle, SQL Server, MySQL y Postgress - sqlmap - open source penetration testing tool that automates the process of detecting and exploiting SQL injection flaws and taking over of back-end database servers. - SQLiX - SQL Injection scanner, able to crawl, detect SQL injection vectors, identify the back-end database and grab function call/UDF results (even execute system commands for MS-SQL). - sqlninja - tool targeted to exploit SQL Injection vulnerabilities on a web application that uses Microsoft SQL Server as its back-end. - MySqloit - SQL Injection takeover tool focused on LAMP (Linux, Apache,MySql,PHP) and WAMP (Windows, Apache,MySql,PHP) platforms. It has the ability to upload and execute metasploit shellcodes through the MySql SQL Injection vulnerabilities. - TNS Listener tool - tnscmd can be used to speak, on a very simple level, with Oracle's TNS listener. - SQLInjector - SQLInjector uses inference techniques to extract data and determine the backend database server. - GreenSQL - designed to protect databases (PostgreSQL/MySQL) against SQL injection attacks and other unauthorised changes, in a similar fashion to a firewall protecting a network against TCP/IP outside attacks. The new version also provides a graphical user interface for monitoring the database firewall. - FreeTDS - Microsoft SQL Server client. - MSSQLScan - A small multi-threaded tool that scans for Microsoft SQL Servers. - AppSentry Listener Security Check - Check the security configuration of the Oracle Database Listener and listeners for Oracle Applications 11i. Code analyzers - MS MiniFuzz - very simple fuzzer designed to ease adoption of fuzz testing by non-security people who are unfamiliar with file fuzzing tools or have never used them in their current software development processes. - MS BinScope - Microsoft verification tool that analyzes binaries on a project-wide level to ensure that they have been built in compliance with Microsoft’s Security Development Lifecycle (SDL) requirements and recommendations. - MS FxCop - code analysis tool that checks .NET managed code assemblies for conformance to the Microsoft .NET Framework Design Guidelines. - RATS - tool for scanning C, C++, Perl, PHP and Python source code and flagging common security related programming errors such as buffer overflows and TOCTOU (Time Of Check, Time Of Use) race conditions. - Graudit - simple script and signature sets that allows you to find potential security flaws in source code using the GNU utility grep. Graudit supports scanning code written in several languages; asp, jsp, perl, php and python. DNS - dnsmap - Subdomain bruteforce. Forensics Analysis - Digital Forensics Analysis - a simple but powerful open source tool with a flexible module system which will help you in your digital forensics works, including files recovery due to error or crash, evidence research and analysis, etc. - EnCase Forensic Tool - From the simplest requirements to the most complex, EnCase Forensic is the premier computer forensic application on the market. Bypass - Pass-The-Hash - The Pass-The-Hash Toolkit contains utilities to manipulate the Windows Logon Sessions mantained by the LSA (Local Security Authority) component. These tools allow you to list the current logon sessions with its corresponding NTLM credentials (e.g.: users remotely logged in thru Remote Desktop/Terminal Services), and also change in runtime the current username, domain name, and NTLM hashes Documentation - Agnitio - A tool to help developers and security professionals conduct manual security code reviews in a consistent and repeatable way. Agnitio aims to replace the adhoc nature of manual security code review documentation, create an audit trail and reporting. Educational - Damn Vulnerable Web App (DVWA) - PHP/MySQL web application that is damn vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, help web developers better understand the processes of securing web applications and aid teachers/students to teach/learn web application security in a class room environment. - Mutillidae - Deliberately Vulnerable Set Of PHP Scripts That Implement The OWASP Top 10 - WebGoat - deliberately insecure J2EE web application maintained by OWASP designed to teach web application security lessons. - moth - VMware image with a set of vulnerable Web Applications and scripts, that you may use for Testing Web Application Security Scanners, Testing Static Code Analysis tools (SCA) and Giving an introductory course to Web Application Security. - Web Security Dojo - A free open-source self-contained training environment for Web Application Security penetration testing. Tools + Targets = Dojo Programming - JODE is a java package containing a decompiler and an optimizer for java File Managers - cadaver - is a command-line WebDAV client for Unix. It supports file upload, download, on-screen display, namespace operations (move/copy), collection creation and deletion, and locking operations. NAT - pwnat - pronounced "poe-nat", is a tool that allows any number of clients behind NATs to communicate with a server behind a separate NAT with *no* port forwarding and *no* DMZ setup on any routers in order to directly communicate with each other.</itunes:summary><itunes:keywords>auditoria, exploits, GNU/Linux, hacking, herramientas, IDS, links, listas, Networking, programas, seguridad, sniffing, spoofing, Tools, windows</itunes:keywords></item><item><title>Tips (PHP): Escribir en la sesión de otro usuario</title><link>http://itfreekzone.blogspot.com/2013/04/tips-php-escribir-en-la-sesion-de-otro.html</link><category>codigo</category><category>php</category><category>programacion</category><category>Tips</category><author>noreply@blogger.com (V3kt0r)</author><pubDate>Wed, 10 Apr 2013 10:08:00 -0300</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-271207292388274566.post-4538069708638191955</guid><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCtrzlPDYSbJYqd2JQXboizL4WElGFSTZOtcWScR9wuZ8DgJsnH3urlDsGox7UbT1o72yPYnXAjrfeM4IYwtKlU7qiIzCZs3aEtSG5QsuavxtpqcJO7oG6ANpBsxRM0A6jMvKyneKNPnK7/s1600/php.gif" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCtrzlPDYSbJYqd2JQXboizL4WElGFSTZOtcWScR9wuZ8DgJsnH3urlDsGox7UbT1o72yPYnXAjrfeM4IYwtKlU7qiIzCZs3aEtSG5QsuavxtpqcJO7oG6ANpBsxRM0A6jMvKyneKNPnK7/s1600/php.gif" /&gt;&lt;/a&gt;&lt;/div&gt;
Mientras desarrollaba una nueva funcionalidad para el framework PHP en el que estoy trabajando, me encontré con la necesidad de realizar una acción no muy común: escribir valores en la sesión de otro usuario.&lt;br /&gt;
&lt;br /&gt;
Como todo desarrollador PHP sabe (o debería...), es posible almacenar valores que persisten entre requests en una misma sesión, utilizando el arreglo súper global $_SESSION. Cada sesión se asocia a un usuario, por lo que los valores almacenados para un dado usuario son accesibles sólo para él. Ahora, y si desde la sesión de un usuario, deseamos acceder valores de la sesión de otro usuario?&lt;br /&gt;
Muchos se preguntarán, para qué querría hacer esto? Bueno, en mi caso particular me sirvió para actualizar la configuración de un usuario desde un usuario administrador, sin la necesidad que el primero se loguee nuevamente para ver los cambios. Por ejemplo, si un usuario administrador A cambia el theme de un usuario B que ya está logueado, quiero que B vea los cambios al instante. Podría hacer esto mismo almacenando un valor en la base de datos y chequeando desde la sesión de B el registro en cada acceso, pero esto me pareció muy ineficiente. Mi solución fue escribir un flag en el arreglo de sesión de B, y luego desde B chequear el valor en el arreglo para ver si hay cambios.&lt;br /&gt;
Como me resultó una funcionalidad interesante, decidí compartirla.&lt;br /&gt;
&lt;br /&gt;
Para que el siguiente código funcione, es necesario almacenar los IDs de sesión de cada usuario logueado. Lo pueden hacer guardando los IDs en una tabla cada vez que un usuario se loguea en el sistema. Asumo que la función "get_user_session_id($user)" ya está implementada y me permite obtener el ID del usuario que le envío por parámetro; cada uno verá como almacenar y obtener el ID.&lt;br /&gt;
Traté de dejar el código lo más genérico posible, con lo que deberán cambiar sólo la línea que asigna el valor en la sesión del otro usuario, la cual marqué con el comentario "CAMBIAR AQUI!".&lt;br /&gt;
Espero que les resulte útil!&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="php" name="code"&gt;//guardar el session id actual para poder restaurarlo luego
$current_id = session_id();

if(($sid = user_get_session_id($user)) === FALSE)
{
  throw new Exception("user ID not found");
}

//guardar los valores de la sessión actual antes de cambiar de sessión
session_write_close();

//abrir la sessión del otro usuario
session_id($sid);
session_start();

//almacenar el valor deseado en la sessión del otro usuario
$_SESSION['some_value'] = $value;   // CAMBIAR AQUI!

//guardar los cambios hechos en la sessión del otro usuario
session_write_close();

//volver a la sessión del usuario actual
session_id($current_id);
session_start();
&lt;/pre&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCtrzlPDYSbJYqd2JQXboizL4WElGFSTZOtcWScR9wuZ8DgJsnH3urlDsGox7UbT1o72yPYnXAjrfeM4IYwtKlU7qiIzCZs3aEtSG5QsuavxtpqcJO7oG6ANpBsxRM0A6jMvKyneKNPnK7/s72-c/php.gif" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Shortcuts: comandos OpenSSL para generar claves, certificados y testear conexiones</title><link>http://itfreekzone.blogspot.com/2013/04/shortcuts-comandos-openssl-para-generar.html</link><category>administracion</category><category>GNU/Linux</category><category>openssl</category><category>shortcuts</category><category>ssl</category><author>noreply@blogger.com (V3kt0r)</author><pubDate>Wed, 3 Apr 2013 09:02:00 -0300</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-271207292388274566.post-6087491564558906708</guid><description>&lt;br /&gt;
&lt;a href="http://www.openssl.org/"&gt;OpenSSL&lt;/a&gt;&amp;nbsp;es una herramienta extremadamente potente, la cual permite hacer todo tipo de manejos relacionados a TLS/SSL, desde creación de claves y certificados, realizar conexiones tipo telnet a servicios que se ejecutan sobre SSL, hasta generar hashes de archivos, entre otras cosas.&lt;br /&gt;
A continuación les dejo un listado de comandos útiles a realizar con OpenSSL. La mayoría se centran en la creación y manipulación de claves y certificados, algo que todo administrador ha tenido que hacer alguna vez.&lt;br /&gt;
Ya había escrito sobre la creación de certificados en el artículo &lt;a href="http://itfreekzone.blogspot.com.ar/2009/05/certificados-digitales.html"&gt;Certificados Digitales&lt;/a&gt;, donde podrán encontrar una explicación más detallada sobre ello. En éste la idea es dejar un acceso rápido a comandos que nos serán muy útiles, además de proveer varios comandos adicionales a los descriptos anteriormente.&lt;br /&gt;
Cabe mencionar que muchos de estos comandos los aprendí gracias al artículo &lt;a href="http://www.sslshopper.com/article-most-common-openssl-commands.html"&gt;The Most Common OpenSSL Commands&lt;/a&gt;&amp;nbsp;y los completé con el excelente &lt;a href="http://www.madboa.com/geek/openssl/"&gt;OpenSSL Command-Line HOWTO&lt;/a&gt;&amp;nbsp;y &lt;a href="http://www.freebsdmadeeasy.com/tutorials/freebsd/create-a-ca-with-openssl.php"&gt;Creating an SSL Certificate of Authority&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Claves&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Generar clave RSA de 4096 bits encriptada con 3des:&lt;br /&gt;
&amp;nbsp; $ openssl genrsa -des3 -out superkey.key 4096&lt;br /&gt;
&lt;br /&gt;
Desencriptar la clave privada&lt;br /&gt;
&amp;nbsp; $ openssl rsa -in superkey.key -out super-decrypted.key&lt;br /&gt;
&lt;br /&gt;
Extraer la clave privada de un archivo en formato PKCS#12:&lt;br /&gt;
&amp;nbsp; $ openssl pkcs12 -in certificad.pfx -out clave.pem -nodes -nocerts&lt;br /&gt;
&lt;br /&gt;
Verificar clave RSA:&lt;br /&gt;
&amp;nbsp; $ openssl rsa -in interbankingtestmil-open.pkcs -check&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&lt;b&gt;Convertir formatos&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Convertir clave de formato tradicional a pkcs8:&lt;br /&gt;
&amp;nbsp; $ openssl pkcs8 -in key.pem -topk8 -out pkcskey.pkcs&lt;br /&gt;
&lt;br /&gt;
Convertir un certificado PEM y una clave privada en un archivo formato PKCS#12 (.pfx o p12)&lt;br /&gt;
&amp;nbsp; $ openssl pkcs12 -export -out certificado.pfx -inkey clave.pem -in certificado.crt -certfile certificadoCA.crt&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&lt;b&gt;Certificados&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Crear una CA Propia con validez de 10 años y clave RSA de 4096 bits:&lt;br /&gt;
&amp;nbsp; $ openssl req -new -x509 -days 3650 -extensions v3_ca -newkey rsa:4096 -keyout private/newca.pem -out newca.crt //-config /etc/ssl/openssl.cnf&lt;br /&gt;
&lt;br /&gt;
Generar un request de certificado:&lt;br /&gt;
&amp;nbsp; $ openssl req -new -key superkey.key -out certrequest.csr&lt;br /&gt;
&lt;br /&gt;
Autofirmar request de certificado (CSR):&lt;br /&gt;
&amp;nbsp; $ openssl x509 -req -days 3650 -in cert-request.csr -signkey ca.key -out certificado.crt&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
Firmar request con CA:&lt;br /&gt;
&amp;nbsp; $ openssl ca -in cert-request.csr -out certificado.crt -days 3650&lt;br /&gt;
&lt;br /&gt;
Crear clave y certificado autofirmado en un solo paso:&lt;br /&gt;
&amp;nbsp; $ openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout privateKey.key -out certificate.crt&lt;br /&gt;
&lt;br /&gt;
Extraer el certificado incluído en un contenedor PKCS#12:&lt;br /&gt;
&amp;nbsp; $ openssl pkcs12 -in certificad.pfx -out certificado.crt -nodes -nokeys&lt;br /&gt;
&lt;br /&gt;
Ver los campos de un request de certificado:&lt;br /&gt;
&amp;nbsp; $ openssl req -noout -text -in certrequest.csr&lt;br /&gt;
&lt;br /&gt;
Ver campos del certificado:&lt;br /&gt;
&amp;nbsp; $ openssl x509 -in certificado.crt -text -noout&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
Ver campos de un contenedor PKCS#12:&lt;br /&gt;
&amp;nbsp; $ openssl pkcs12 -info -in certificado.pfx&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Otras utilidades&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Conectar a un servicio que se ejecuta sobre SSL (por ejemplo HTTPS):&lt;br /&gt;
&amp;nbsp; $ openssl s_client -connect servidor:443&lt;br /&gt;
&lt;br /&gt;
Calcular el hash MD5, SHA1, SHA2, etc de un archivo y de un texto&lt;br /&gt;
&amp;nbsp; $ openssl dgst [-md5|-md4|-md2|-sha1|-sha|-mdc2|-ripemd160|-dss1] archivo&lt;br /&gt;
&amp;nbsp; $ echo "texto" | openssl dgst [-md5|-md4|-md2|-sha1|-sha|-mdc2|-ripemd160|-dss1]&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Nagios: monitoreo remoto de dispositivos + agentes Linux + agentes Windows</title><link>http://itfreekzone.blogspot.com/2013/03/nagios-monitoreo-remoto-de-dispositivos.html</link><category>administracion</category><category>articulos</category><category>GNU/Linux</category><category>monitoreo</category><category>Nagios</category><category>OSSIM</category><category>redes</category><category>windows</category><author>noreply@blogger.com (V3kt0r)</author><pubDate>Tue, 26 Mar 2013 12:05:00 -0300</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-271207292388274566.post-5835080513994271215</guid><description>&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEje6bUAygsfCPgnwU8EJtCmdc33UKUpk5C8s27WlPRkvCpfl6OLaZxmQs0XWRvcyAMw8vrbhbPd2rVgh6fTuGGHZwvyQiCOORVlGj_LoT7Df3YR9XuHEfQkLbJPL7sj5TWLVg-lsVFfWM0K/s1600/nagios-logo.png" imageanchor="1" style="clear: right; float: right;"&gt;&lt;/a&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEje6bUAygsfCPgnwU8EJtCmdc33UKUpk5C8s27WlPRkvCpfl6OLaZxmQs0XWRvcyAMw8vrbhbPd2rVgh6fTuGGHZwvyQiCOORVlGj_LoT7Df3YR9XuHEfQkLbJPL7sj5TWLVg-lsVFfWM0K/s1600/nagios-logo.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEje6bUAygsfCPgnwU8EJtCmdc33UKUpk5C8s27WlPRkvCpfl6OLaZxmQs0XWRvcyAMw8vrbhbPd2rVgh6fTuGGHZwvyQiCOORVlGj_LoT7Df3YR9XuHEfQkLbJPL7sj5TWLVg-lsVFfWM0K/s1600/nagios-logo.png" /&gt;&lt;/a&gt;Desde hace un par de semanas vengo trabajando con Nagios para tener, al instante, el estado de los &lt;br /&gt;
servicios de la red (i.e. monitoreo).&lt;br /&gt;
Existen varias herramientas para este tipo de trabajo, estando entre las mejores (según he leído y por recomendaciones) &lt;a href="http://www.cacti.net/"&gt;Cacti&lt;/a&gt;&amp;nbsp;y &lt;a href="http://www.zabbix.com/"&gt;Zabbix&lt;/a&gt;. Mi elección de Nagios se debe a su integración con &lt;a href="http://itfreekzone.blogspot.com.ar/search/label/OSSIM"&gt;OSSIM&lt;/a&gt;, y a que ya había trabajado con ella en otra ocasión y me resultó muy buena. Esto no implica que Nagios sea la mejor herramienta, pero sí una excelente. Una comparación interesante que encontré sobre herramientas de monitoreo libres es &lt;a href="http://workaround.org/try-zabbix"&gt;Tired of Nagios and Cacti? Try Zabbix&lt;/a&gt;, la cual, obviamente se enfoca en Zabbix, pero nombra los pro y los contra de cada herramienta.&lt;br /&gt;
&lt;br /&gt;
Las características que encuentro más importantes en Nagios, son:&lt;br /&gt;
- Compatibilidad. Existen agentes tanto para Linux como para Windows que permiten monitorear una gran variedad de recursos.&lt;br /&gt;
- Flexibilidad. Se pueden definir comandos nuevos para chequeos que no estén incluidos, o para mejorar alguno existente.&lt;br /&gt;
- Extendibilidad. El protocolo de comunicación entre agentes y servidor es abierto y está documentado para que cualquiera pueda desarrollar sus propios agentes. Además, como veremos, es posible utilizar varios protocolos.&lt;br /&gt;
- Configuración a través de archivos de texto. Si bien algunos no les gusta, para mi es mucho más rápido definir hosts y servicios a chequear mediante simples archivos de texto, que haciendo muchos clicks en una interfaz web.&lt;br /&gt;
- Visualización del estado de la red en una sola pantalla. Es fácil y rápido detectar cuando algo anda mal.&lt;br /&gt;
- Intervalos para chequear un host/servicio configurables.&lt;br /&gt;
- Reporte de alertas por mail y SMSs.&lt;br /&gt;
- Sistema de detección de cambios de estado (flapping). Si un host se detecta caído, al minuto normal, al minuto caído, no está bueno recibir 300 alertas, dado que el host está en un estado inestable. Nagios detecta esto y previene futuras alertas hasta que se estabilice.&lt;br /&gt;
- Variedad de plugins predefinidos.&lt;br /&gt;
- Hay una gran comunidad detrás, así como mucha documentación.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;What's all about?&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
La idea de este artículo no es hablar de las bondades o puntos bajos de Nagios, sino explicar la forma de armar una configuración básica que permita chequear el estado de hosts y servicios remotamente, así como chequear recursos mediante agentes tanto en Windows como en Linux.&lt;br /&gt;
Información de Nagios hay mucha, este artículo pretende aportar una explicación resumida del funcionamiento básico y una configuración que abarca la mayoría de los chequeos típicos. Añadir chequeos no debería ser mayor problema una vez conocida las bases.&lt;br /&gt;
Para completar esta información, recomiendo leer la documentación oficial en &lt;a href="http://nagios.sourceforge.net/docs/3_0/toc.html"&gt;Nagios Core Documentation&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Definición de objetos&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Nagios se configura mediante archivos de texto, los cuales deben tener la extensión .cfg. La configuración se basa en objetos, que son los elementos involucrados en la logística de monitoreo y notificación.&lt;br /&gt;
Los objetos básicos son:&lt;br /&gt;
&amp;nbsp; - comandos: definen qué programas ejecutar.&lt;br /&gt;
&amp;nbsp; - servicios: son los recursos a testear (CPU, disco, protocolos de red, etc)&lt;br /&gt;
&amp;nbsp; - hosts: definen los hosts que se van a monitorear.&lt;br /&gt;
&amp;nbsp; - contactos: son las personas a las que se va a notificar cuando ocurre una alerta.&lt;br /&gt;
&amp;nbsp; - tiemeperiods: definen en qué horarios se puede chequear un host y en qué horarios se puede notificar a un contacto.&lt;br /&gt;
Estos objetos se pueden agrupar mediante los siguientes objetos:&lt;br /&gt;
&amp;nbsp; - hostgroups: permiten agrupar hosts.&lt;br /&gt;
&amp;nbsp; - servicegroups: agrupan servicios.&lt;br /&gt;
&amp;nbsp; - contactgroups: agrupan contactos.&lt;br /&gt;
&lt;br /&gt;
Como se puede observar en la sección de definición de objetos del &lt;a href="http://nagios.sourceforge.net/docs/3_0/objectdefinitions.html"&gt;manual de Nagios&lt;/a&gt;, cada objeto puede tener definidos varios atributos, aunque sólo unos pocos (sobre todo si utilizamos la herencia) son obligatorios. Los objetos se definen mediante la cláusula "define" y sus atributos se encierran entre llaves.&lt;br /&gt;
Los atributos que utilizaremos para cada tipo de objeto, y que les servirán para la gran mayoría de los casos, son los siguientes:&lt;br /&gt;
&amp;nbsp; &lt;u&gt;comandos&lt;/u&gt;:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; - command_name: nombre del comando (por ej check_http)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; - command_line: la línea de comando que se ejecutará para el chequeo (ejemplo: /usr/lib/nagios/plugins/check_http -I $HOSTADDRESS$ -p $ARG1$)&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Como se puede observar en el ejemplo, existen variables predefinidas que se pueden utilizar como argumentos pasados al programa en la línea de comandos (Nagios las denomina macros). La lista completa de macros se encuentra &lt;a href="http://nagios.sourceforge.net/docs/3_0/macrolist.html"&gt;aquí&lt;/a&gt;. En el ejemplo $HOSTADDRESS$ es la dirección del host que se está chequeando. También es posible utilizar variables cuyo valor será reemplazado cuando se llame el comando desde la definición de un servicio (o host), las cuales se denominan a partir de $ARG1$ hasta $ARGN$.&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &lt;u&gt;servicios&lt;/u&gt;:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; - use: directiva que permite heredar atributos de servicios definidos previamente. Es posible definir un servicio base y luego extenderlo mediante esta directiva. En las definiciones de servicios, se suele heredar de "generic-service".&lt;br /&gt;
&amp;nbsp; &amp;nbsp; - service_description: una breve descripción del servicio.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; - hostgroup_name/host_name: asigna el servicio a un grupo de hosts o a hosts específicos. No es mandatorio utilizar este parámetro, dado que se pueden asignar servicios a hosts desde la misma definición de los hosts. Es posible asignar más de un hostgroup o host separándolos con comas.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; - check_command: el nombre del comando, previamente definido, que se utilizará para chequear el servicio. Algo a tener en cuenta es que cuando se llama al comando, los parámetros se pasan separados con signos de admiración. Estos luego se reemplazarán en $ARG1$... $ARGN$, según se definió en el comando.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Por ejemplo, en la definición de check_tcp encontramos que el comando ejecutado es el siguiente:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; /usr/lib/nagios/plugins/check_tcp -H $HOSTADDRESS$ -p '$ARG1$' -4&lt;br /&gt;
&amp;nbsp; &amp;nbsp; donde $ARG1$ se reemplazará por el puerto TCP que se desea chequear cuando se llame el comando.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; La forma de llamar el comando es la siguiente:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; check_command&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;check_tcp!50000&lt;br /&gt;
&amp;nbsp; &amp;nbsp; donde 50000 es el parámetro utilizado para el puerto.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;i&gt;NOTA&lt;/i&gt;: si no se hereda la definición de generic-service, deberán definirse otros atributos adicionales que son mandatorios (max_check_attempts, check_interval, retry_interval, check_period, notification_interval, notification_period, contacts, contact_groups).&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &lt;u&gt;hosts&lt;/u&gt;:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; - use: al igual que en los servicios, esta directiva permite heredar los atributos de un host previamente definido. El caso más común es heredar la definición de "generic-host"&lt;br /&gt;
&amp;nbsp; &amp;nbsp; - host_name: es lo que el nombre indica, el hostname del host.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; - address: dirección IP del host.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; - alias: una breve descripción de la funcionalidad del host.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; - hostgroups: listado de hostgroups a los que el host pertenece. Este atributo no es mandatorio, además es posible asignar los hosts a un hostgroup desde la misma definición del hostgroup.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; - check_command: tiene la misma utilidad que cuando se define un servicio, con la diferencia que se utiliza para chequear si un host está online. Por defecto se utiliza ping (definido en generic-host) como chequeo, pero se puede reemplazar por otro si es que el host no admite pings.&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;i&gt;NOTA&lt;/i&gt;: si no se hereda la definición de generic-host, deberán definirse otros atributos adicionales que son mandatorios (max_check_attempts, check_period, notification_interval, notification_period, contacts, contact_groups).&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &lt;u&gt;hostgroups&lt;/u&gt;:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; - hostgroup_name: el nombre del hostgroup que estamos definiendo.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; - alias: una breve descripción de la funcionalidad del hostgroup.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; - members: listado de hosts, separados por coma, que pertenecen a este hostgroup. Este atributo es opcional.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &lt;u&gt;contactos&lt;/u&gt;:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; - contact_name: nombre del contacto.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; - alias: un alias para el mismo.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; - service_notification_period: indica en qué horarios se puede contactar en caso de caída de servicios.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; - host_notification_period: indica en qué horarios se puede contactar en caso de caída del host.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; - service_notification_options: listado de estados de servicio que deben reportarse. Los estados se definen con letras y se separan con comas: u (UNKNOWN), c (CRITICAL), r (RECOVERY - OK), f (FLAPPING), y n (NONE).&lt;br /&gt;
&amp;nbsp; &amp;nbsp; - host_notification_options: listado de estados de host que deben reportarse. También se definen con letras separadas por coma: d (DOWN), u (UNREACHABLE), r (RECOVERY - UP), f (FLAPPING), s (comienza el downtime programado), n (NONE).&lt;br /&gt;
&amp;nbsp; &amp;nbsp; - service_notification_commands: cómo notificar al contacto en caso de servicio caído (email, sms, etc).&lt;br /&gt;
&amp;nbsp; &amp;nbsp; host_notification_commands: cómo notificar al contacto en caso de host caído (email, sms, etc).&lt;br /&gt;
&amp;nbsp; &amp;nbsp; - email: dirección de email del contacto.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; - contactgroups: grupo al que pertenece el contacto.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&lt;b&gt;Agentes Nagios&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Una gran parte del monitoreo se puede hacer remotamente. Todo servicio publicado en la red, se puede monitorear sin necesidad de instalar nada en el host monitoreado. Sin embargo hay recursos que no se pueden monitorear remotamente, como por ejemplo:&lt;br /&gt;
- espacio libre en disco&lt;br /&gt;
- memoria en uso&lt;br /&gt;
- carga de CPU&lt;br /&gt;
- servicios activos&lt;br /&gt;
- cantidad de usuarios logueados&lt;br /&gt;
Para ello es necesario instalar agentes. Estos agentes, mediante plugins, chequean el estado de los recursos y envían los datos al servidor Nagios. El tipo de conexión es pull, es decir, el servidor Nagios contacta cada cierto intervalo de tiempo a los agentes, les indica qué comandos ejecutar y obtiene los resultados.&lt;br /&gt;
Existen varios protocolos utilizados para la comunicación entre agentes y Nagios:&lt;br /&gt;
- NRPE - Nagios Remote plugin Executor. Es el protocolo más utilizado y recomendado por Nagios. Se accede mediante el plugin check_nrpe.&lt;br /&gt;
- NSCA - Nagios Service Check Acceptor.&lt;br /&gt;
- NSCP: protocolo nativo de NSClient++&lt;br /&gt;
- NRDP: reemplazo NSCA.&lt;br /&gt;
- Syslog: protocolo estándar para transmisión de logs en Unix.&lt;br /&gt;
- SNMP: Simple Network Management Protocol. Protocolo estándar para administración y monitoreo de dispositivos de red.&lt;br /&gt;
&lt;br /&gt;
En este artículo se utilizará el protocolo NRPE, para lo cual se instalarán agentes en Linux y Windows que lo soporten.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Instalación del servidor&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Instalar el servidor de Nagios es muy simple, está en los repositorios de la mayoría de las distribuciones.&lt;br /&gt;
Por ejemplo, en debian, basta con ejecutar:&lt;br /&gt;
&amp;nbsp; # apt-get install nagios3 nagios-nrpe-plugin&lt;br /&gt;
&lt;br /&gt;
La instalación en debian solicita que se introduzca una clave de administración web (usuario nagiosadmin). Pueden elegir no ingresar clave, e ingresarla después. Lo más cómodo es asignarla en esta instancia, aunque queda a elección. La autenticación de la interfaz web la realiza Apache, así que agregar o quitar usuarios se puede realizar con la utilidad htpasswd. También instalamos aquí los plugins para comunicarnos con los agentes mediante NRPE (ver más adelante).&lt;br /&gt;
&lt;br /&gt;
El servicio de Nagios se ejecutará, por defecto, a nombre del usuario nagios y grupo nagios. Esto es para limitar los privilegios, dado que el sistema no necesita permisos de root para ejecutarse, y sería muy riesgoso.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Si utilizan debian, otros datos interesantes acerca de la instalación son:&lt;br /&gt;
&amp;nbsp; - Los plugins default de Nagios (paquete nagios-plugins) se instalan en /usr/lib/nagios/plugins&lt;br /&gt;
&amp;nbsp; - Los comandos (ver más adelante que son) default están definidos en /etc/nagios-plugins/config&lt;br /&gt;
&amp;nbsp; - Por defecto, nagios carga toda la configuración incluida en /etc/nagios3/conf.d, así que lo más conveniente es incluir los archivos con las definiciones de hosts, servicios, comandos, etc, allí.&lt;br /&gt;
&amp;nbsp; - El archivo de configuración de apache para la interfaz web de Nagios se encuentra en /etc/apache2/conf.d/nagios3.conf&lt;br /&gt;
&amp;nbsp; - Por defecto la interfaz web se accede mediante la URL http://&lt;ip del="" servidor=""&gt;/nagios3. Este alias se puede cambiar en el archivo citado en el punto anterior.&lt;/ip&gt;&lt;br /&gt;
&amp;nbsp; - El archivo de autenticación para la interfaz se encuentra en /etc/nagios3/htpasswd.users&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Arquitectura de ejemplo&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Para poder explicar la configuración de Nagios de forma más didáctica, utilizaremos la siguiente arquitectura de red como ejemplo:&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgg9t3Dxe9SknQirAmzf-4WrYt1zuX_T81FlmH6mMxQjE3VpeF1QKxLo1Vtp7hhhr2uieEafPR6L_HGf-bmZdFhHKIpaw8PxF4H8jF0sKC6IO6Kv-3Awf0DSwZd2XXoiPIY0LXGSYGj1lMk/s1600/nagios-example.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgg9t3Dxe9SknQirAmzf-4WrYt1zuX_T81FlmH6mMxQjE3VpeF1QKxLo1Vtp7hhhr2uieEafPR6L_HGf-bmZdFhHKIpaw8PxF4H8jF0sKC6IO6Kv-3Awf0DSwZd2XXoiPIY0LXGSYGj1lMk/s400/nagios-example.png" height="175" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
En esta simple estructura traté de cubrir los casos más frecuentes, al menos cubre todos los casos con los que me he topado. La red cuenta con:&lt;br /&gt;
&amp;nbsp; - un servidor Nagios que monitoreará todo (192.168.0.100).&lt;br /&gt;
&amp;nbsp; - un servidor Linux (linuxagent - 192.168.0.3) con el agente de Nagios instalado, que posee un servicio Web (puerto 80).&lt;br /&gt;
&amp;nbsp; - un servidor Windows (winagent - 192.168.0.4) con el agente de Nagios instalado, que presta servicio de fileserver (CIFS puerto 445), y Web service en el puerto 81. En este servidor chequearemos que el servicio de Firewall de Windows esté iniciado (MpsSvc).&lt;br /&gt;
&amp;nbsp; - un servidor al cual no se le instaló agente (noagent - 192.168.0.20), pero que presta un servicio no estándar en el puerto 4444.&lt;br /&gt;
&amp;nbsp; - un servidor web colocado en internet (itfreekzone - 10.0.0.10, claro está que la IP no es una IP de internet válida, sólo se usa de ejemplo).&lt;br /&gt;
Los hosts de la red interna son alcanzables mediante ping, mientras que el servidor Web de internet no.&lt;br /&gt;
&lt;br /&gt;
Si tienen algún caso que no entre en alguna de estos posibles, dejen su comentario y trato de añadirlo :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Servidor Linux con agente&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Arranquemos con la configuración del monitoreo de un servidor linux para el cual utilizamos un agente. Como se indicó anteriormente, NRPE es el protocolo elegido para la ejecución remota de comandos, así que el agente a instalar debe soportarlo. En debian existe un paquete denominado nagios-nrpe-server.&lt;br /&gt;
&lt;br /&gt;
En el servidor Linux, instalaremos entonces los siguientes paquetes (buscar equivalentes en distribuciones no debian):&lt;br /&gt;
&amp;nbsp; # apt-get --no-install-recommends&amp;nbsp;install nagios-nrpe-server nagios-plugins-basic&lt;br /&gt;
El paquete nagios-plugins-basic provee el set básico de plugins para los chequeos.&lt;br /&gt;
&lt;br /&gt;
La configuración del agente NRPE se realiza desde el archivo /etc/nagios/nrpe.cfg. Las variables a tener en cuenta en este archivo son:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
server_port=5666 #define en qué puerto (TCP) escuchará el agente. Por defecto es el 5666, pero se puede setear cualquiera.&lt;br /&gt;
&lt;br /&gt;
server_address=192.168.0.3 # indica en qué dirección IP escuchará el agente, en caso que el servidor posea más de una IP.&lt;br /&gt;
&lt;br /&gt;
allowed_hosts=192.168.0.100 # define qué IPs tienen permitido conectarse al agente en busca de datos. Es un parámetro de seguridad mínimo para limitar desde qué máquinas se conectan al agente.&lt;br /&gt;
&lt;br /&gt;
dont_blame_nrpe=0 # mi variable favorita (por su nombre, claro). Esta variable indica si se permite que el agente reciba comandos con parámetros (por ejemplo, en la ejecución "check_disk -w 20%" el parámetro es "-w 20%"). Es muy mala idea permitir que hosts remotos envíen al agente parámetros, dado que podrían utilizarse para explotar alguna vulnerabilidad (qué pasa si se recibe "check_disk -w &amp;lt;muchos bytes...=""&amp;gt;" ???). Por ello, se recomienda crear alias de comandos, como por ejemplo "command[check_disk]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -x sda", donde el servidor sólo necesitará llamar "check_disk" (sin parámetros) para obtener los datos de espacio libre y alertas.&lt;br /&gt;
&lt;br /&gt;
command[check_users]=/usr/lib/nagios/plugins/check_users -w 5 -c 10 # alias check_user para obtener la cantidad de usuarios logueados y alertar si hay más de 5 logueados al mismo tiempo.&lt;br /&gt;
command[check_load]=/usr/lib/nagios/plugins/check_load -w 15,10,5 -c 30,25,20 #alias check_load para obtener la carga de CPU&lt;br /&gt;
command[check_disk]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -x sda #alias check_disk para obtener el espacio disponible en el disco /dev/sda y alertar si queda menos de 20% de espacio en alguna partición.&lt;/blockquote&gt;
Como se ve, los alias son muy importantes, y se pueden agregar tantos como se desee. Estos definen un acceso a información con parámetros predefinidos, de modo que el servidor sólo debe llamar el comando sin parámetros, y disminuir el riesgo (el atributo lo dice, no le eches la culpa a NRPE si se te rompe todo por usar parámetros - dont_blame_nrpe). Sólo listé tres (check_disk, check_load, y check_users) pero podría haber creado todos los que quisiera.&lt;br /&gt;
&lt;br /&gt;
Una vez configurado el agente, reiniciarlo para que tome los cambios:&lt;br /&gt;
&amp;nbsp; # /etc/init.d/nagios-nrpe-server restart&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Servidor Windows con Agente&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Para monitorear recursos en Windows, existe el demonio NSClient++ (http://www.nsclient.org). El demonio soporta todos los protocolos mencionados anteriormente, pero como comenté, utilizaremos NRPE.&lt;br /&gt;
La instalación es muy simple, bajan la última versión del instalador y la ejecutan. Pueden elegir la instalación típica y dar todo next, sin chequear nada, dado que luego reemplazaremos el archivo nsclient.ini con la información que les dejo a continuación. Si desean utilizar las opciones del instalador, verán que permite habilitar algunas cosas, como si utilizar NSCP (check_nt) y/o NRPE (check_nrpe), un password de acceso para el caso de check_nt (el cual no utilizaremos), los hosts que tienen permitido acceder a la información (allowed_hosts), checks WMI, y los check plugins.&lt;br /&gt;
&lt;br /&gt;
Toda la configuración se guarda en el archivo C:\Program Files\NSClient++\nsclient.ini (o C:\Archivos de Programas\NSClient++\nsclient.ini). Si no tildaron nada durante la instalación, verán que está vacío, a excepción de unos comentarios.&lt;br /&gt;
NSClient no utiliza el mismo formato de configuración que el visto en el host Linux, es más, varía bastante. Para empezar, la configuración se divide en secciones (formato estándar de los .ini). Por otra parte, los plugins se deben habilitar antes de ser utilizados. Además los plugins se llaman con ejecutables diferentes (CheckCpu. CheckDriveSize, etc), y los alias se definen de otra manera. Para estandarizar, en la configuración utilicé los mismos alias que en el host Linux, así es posible realizar grupos de hosts que incluyan tanto servidores Linux como Windows, y ejecutar los mismos comandos en ambos.&lt;br /&gt;
La configuración que utilizaremos será la siguiente:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
[/modules]&lt;br /&gt;
; habilitamos el uso de NRPE&lt;br /&gt;
NRPEServer = 1&lt;br /&gt;
&lt;br /&gt;
; habilitamos plugins a utilizar. Como se ve, los plugins se agrupan por tipo.&lt;br /&gt;
CheckSystem=1&lt;br /&gt;
CheckDisk=1&lt;br /&gt;
CheckExternalScripts=1&lt;br /&gt;
&lt;br /&gt;
; creamos los mismos alias que en la definición del host Linux, y agregamos un alias para chequear servicios&lt;br /&gt;
[/settings/external scripts/alias]&lt;br /&gt;
check_load=CheckCpu MaxWarn=80 time=5m ; alias para chequear la carga de CPU. Si sobrepasa el 80% en un intervalo de 5 minutos, nos alertará.&lt;br /&gt;
check_disk=CheckDriveSize ShowAll MinWarnFree=10% MinCritFree=5% ; alias para chequear el espacio en todos los discos del servidor&lt;br /&gt;
check_firewall_service=CheckServiceState MpsSvc; alias para chequear el servicio del firewall de Windows (llamado MpsSvc).&lt;br /&gt;
&lt;br /&gt;
[/settings/default]&lt;br /&gt;
; permitimos el acceso al servidor Nagios para las consultas.&lt;br /&gt;
allowed hosts = 192.168.0.100&lt;/blockquote&gt;
&lt;br /&gt;
&lt;b&gt;Configuración de los checks en el servidor Nagios&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Bien, con los agentes instalados y configurados, volvemos al servidor Nagios. Utilizamos el directorio /etc/nagios3/conf.d para poner nuestra configuración, tal vez adentro de un directorio nuevo, para que quede más ordenado y no se mezcle con el resto.&lt;br /&gt;
&lt;br /&gt;
Observando el directorio conf.d encontramos varias definiciones, como las citadas generic-host y generic-service. También se agrega por defecto la definición de los servicios a chequear en localhost, algo que nos puede servir como ejemplo. En /etc/nagios-plugins/config encontramos la definición de varios comandos, que nos servirán para la mayoría de los casos, aunque habrá algunos que tendremos que definir nosotros.&lt;br /&gt;
&lt;br /&gt;
Para comenzar, definimos un comando nuevo que utilice check_http, pero que nos permita chequear servicios Web en cualquier puerto. En /etc/nagios-plugins/config/http.cfg existen varios comandos predefinidos para llamar a check_http, pero no encontré ninguno que permita hacer un simple check a un puerto diferente al 80. Si quieren ser prolijos, podríamos incluir los comandos en un archivo commands.cfg dentro de nuestro directorio de configuración.&lt;br /&gt;
El comando se define de la siguiente manera:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
define command {&lt;br /&gt;
&amp;nbsp; command_name&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;check_http_port&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;command_line&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;/usr/lib/nagios/plugins/check_http -I $HOSTADDRESS$ -p $ARG1$&lt;br /&gt;
}&lt;/blockquote&gt;
Cuando se llame el comando, deberá entregarse un puerto como argumento y realizará el chequeo HTTP.&lt;br /&gt;
&lt;br /&gt;
A continuación me parece bien definir un grupo de hosts para agrupar los hosts que tienen instalado el agente, lo denominaremos remote-agent.&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
define hostgroup {&lt;br /&gt;
&amp;nbsp; hostgroup_name&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;remote-agent&lt;br /&gt;
&amp;nbsp; alias&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;Hosts que tienen el agente de Nagios instalado&lt;br /&gt;
}&lt;/blockquote&gt;
De esta forma, podemos definir servicios que se chequeen en todos los host que tengan el agente instalado, tan solo agregando los hosts al grupo remote-agent y asignando los servicios al mismo.&lt;br /&gt;
Para los checks remotos, debemos utilizar el comando check_nrpe_1arg (/etc/nagios-plugins/config/check_nrpe.cfg), al cual se le entrega como parámetro el nombre del comando a ejecutar en el host remoto. El “1arg” indica que se le entrega un parámetro (el nombre del comando a ejecutar). Los comandos que llamaremos son los alias que definimos en cada host anteriormente.&lt;br /&gt;
En los hosts con el agente realizaremos checks de CPU y disco:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
#checkear CPU&lt;br /&gt;
&amp;nbsp; define service {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; use&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;generic-service&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;# hereda los atributos de generic-service&lt;br /&gt;
&amp;nbsp; &amp;nbsp; hostgroup_name&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;remote-agent&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;# indicamos que se aplica al hostgroup remote-agent&lt;br /&gt;
&amp;nbsp; &amp;nbsp; service_description&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;Load average&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;# describimos lo que se testea&lt;br /&gt;
&amp;nbsp; &amp;nbsp; check_command&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;check_nrpe_1arg!check_load&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;#llamamos a check_nrpe_1arg y le indicamos que debe ejecutar check_load&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; #checkear discos&lt;br /&gt;
&amp;nbsp; 
define service{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; use &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; generic-service&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;# heredamos&lt;br /&gt;
&amp;nbsp; &amp;nbsp; hostgroup_name &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;remote-agent&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;# aplicamos al grupo remote-agent&lt;br /&gt;
&amp;nbsp; &amp;nbsp; service_description &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Disk Space&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;# describimos lo que testeamos&lt;br /&gt;
&amp;nbsp; &amp;nbsp; check_command &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; check_nrpe_1arg!check_disk&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;# indicamos que debe ejecutarse el alias check_disk&lt;br /&gt;
&amp;nbsp; }&lt;/blockquote&gt;
Ya tenemos los checks genéricos que haremos en los hosts con agentes.&lt;br /&gt;
Dado que el resto de los servicios los chequearemos por host, pasemos a la definición de los hosts.&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
# host linux con agente&lt;br /&gt;
define host {&lt;br /&gt;
&amp;nbsp; use&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;generic-host&lt;br /&gt;
&amp;nbsp; host_name&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;linuxagent&lt;br /&gt;
&amp;nbsp; alias&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;Web Server Linux con agente instalado&lt;br /&gt;
&amp;nbsp; address&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;192.168.0.3&lt;br /&gt;
&amp;nbsp; hostgroups&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;remote-agent,http-servers&lt;br /&gt;
}&lt;/blockquote&gt;
Acá aparece el grupo predefinido http-servers. El mismo se encuentra definido en /etc/nagios3/conf.d/hostgroups_nagios2.cfg y nos permite chequear Web servers que escuchen en el puerto 80.&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
# host windows con agente&lt;br /&gt;
define host {&lt;br /&gt;
&amp;nbsp; use&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;generic-host&lt;br /&gt;
&amp;nbsp; host_name&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;winagent&lt;br /&gt;
&amp;nbsp; alias&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;Windows Server, File Server y Web service&lt;br /&gt;
&amp;nbsp; address&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;192.168.0.4&lt;br /&gt;
&amp;nbsp; hostgroups&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;remote-agent&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# host sin agente&lt;br /&gt;
define host {&lt;br /&gt;
&amp;nbsp; use&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;generic-host&lt;br /&gt;
&amp;nbsp; host_name&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;noagent&lt;br /&gt;
&amp;nbsp; alias&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;Servidor sin agente&lt;br /&gt;
&amp;nbsp; address&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;192.168.0.20&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# host en internet&lt;br /&gt;
define host {&lt;br /&gt;
&amp;nbsp; use&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;generic-host&lt;br /&gt;
&amp;nbsp; host_name&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;itfreekzone&lt;br /&gt;
&amp;nbsp; alias&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;Web server en internet&lt;br /&gt;
&amp;nbsp; address&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;10.0.0.10&lt;br /&gt;
&amp;nbsp; hostgroups&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;http-servers&lt;br /&gt;
&amp;nbsp; check_command&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;check_http&lt;br /&gt;
&amp;nbsp; check_interval&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;5&lt;br /&gt;
}&lt;/blockquote&gt;
Nótese que en el servidor itfreekzone agregué el atributo check_command. Dado que el firewall no nos permite realizar pings a internet, es necesario encontrar una alternativa para detectar que el host está online, por ello utilicé check_http. También definí un nuevo intervalo de chequeos (por defecto era 1), para incrementar la distancia entre sucesivos checks y así no estar enviando requests continuamente a Internet.&lt;br /&gt;
&lt;br /&gt;
La definición anterior ya nos alcanza para los chequeos en linuxagent e itfreekzone, pero todavía nos queda trabajo por hacer para monitorear al resto. Pasemos a definir los servicios que nos faltan.&lt;br /&gt;
&lt;br /&gt;
Como comenté anteriormente, en winagent deseamos chequear que el servicio MpsSvc está levantado. Agregamos entonces la siguiente definición:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
define service {&lt;br /&gt;
&amp;nbsp; use&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;generic-service&lt;br /&gt;
&amp;nbsp; service_description&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;Check Firewall Windows&lt;br /&gt;
&amp;nbsp; check_command&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;check_nrpe_1arg!check_firewall_service&lt;br /&gt;
&amp;nbsp; host_name&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;winagent&lt;br /&gt;
}&lt;/blockquote&gt;
En la definición se ve que el servicio se aplica solamente al host winagent, y se llama el alias predefinido check_firewall_service.&lt;br /&gt;
Ahora, en el host windows, resta chequear CIFS y el Web Service:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
define service {&lt;br /&gt;
&amp;nbsp; use&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;generic-service&lt;br /&gt;
&amp;nbsp; service_description&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;Check Web service en puerto 81&lt;br /&gt;
&amp;nbsp; check_command&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;check_http_port!81&lt;br /&gt;
&amp;nbsp; host_name&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;winagent&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
define service {&lt;br /&gt;
&amp;nbsp; use&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;generic-service&lt;br /&gt;
&amp;nbsp; service_description&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;Check CIFS&lt;br /&gt;
&amp;nbsp; check_command&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;check_tcp!445&lt;br /&gt;
&amp;nbsp; host_name&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;winagent&lt;br /&gt;
}&lt;/blockquote&gt;
Como se observa, para chequear el web service utilizamos el comando que definimos anteriormente (check_http_port), mientras que para chequear CIFS, simplemente realizamos una conexión TCP al puerto 445. Existen plugins específicos para un chequeo más a fondo del servicio CIFS, pero para nuestro ejemplo alcanza.&lt;br /&gt;
&lt;br /&gt;
Qué resta? chequear el serivicio NN en el host noagent. En este caso también utilizaremos check_tcp, nada mágico:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
define service {&lt;br /&gt;
&amp;nbsp; use&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;generic-service&lt;br /&gt;
&amp;nbsp; service_description&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;Check Servicio NN&lt;br /&gt;
&amp;nbsp; check_command&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;check_tcp!4444&lt;br /&gt;
&amp;nbsp; host_name&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;noagent&lt;br /&gt;
}&lt;/blockquote&gt;
Ok, tenemos los hosts y los servicios a chequear. Ahora, a quién y cómo enviamos las alertas?&lt;br /&gt;
Por defecto las alertas se envían al grupo admins (ver /etc/nagios3/conf.d/generic-host_nagios2.cfg), el cual las envía por mail al contacto root@localhost (ver /etc/nagios3/conf.d/contacts_nagios2.cfg). Definamos un nuevo contacto que pertenezca al grupo admins, pero al cual se le envíen solamente estados críticos y recoveries:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
define contact {&lt;br /&gt;
&amp;nbsp; contact_name&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;demasiadovivo&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;# mi nombre&lt;br /&gt;
&amp;nbsp; alias&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;d3m4s1@d0v1v0&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;# mi alias&lt;br /&gt;
&amp;nbsp; service_notification_period&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;24x7&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;# indico que ante caída de servicios me notifique en cualquier momento de la semana&lt;br /&gt;
&amp;nbsp; host_notification_period&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;24x7&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;# indico que ante caída del host me notifique en cualquier momento de la semana&lt;br /&gt;
&amp;nbsp; service_notification_options&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;c,r&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;# solo notificarme servicios en estados críticos (c) y recoveries (r)&lt;br /&gt;
&amp;nbsp; host_notification_options&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;d,r&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;# solo notificarme host caído (d) y recoveries (r)&lt;br /&gt;
&amp;nbsp; service_notification_commands&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;notify-service-by-email&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;# notificarme cambios en los servicios por mail&lt;br /&gt;
&amp;nbsp; host_notification_commands&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;notify-host-by-email&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;# notificarme cambios en el host por mail&lt;br /&gt;
&amp;nbsp; email&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;demasiadovivo@itfreekzone.com &lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;# mi dirección de mail&lt;br /&gt;
&amp;nbsp; contactgroups&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;admins&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;# me agrego al grupo de contacto admins.&lt;br /&gt;
}&lt;/blockquote&gt;
Con esto terminamos la definición. Un restart del servicio Nagios para que tome la nueva configuración y ya estamos:&lt;br /&gt;
&amp;nbsp; # /etc/init.d/nagios3 restart&lt;br /&gt;
&lt;br /&gt;
En caso que algo haya quedado mal definido, Nagios lo indicará con un error y el servicio no iniciará.&lt;br /&gt;
&lt;br /&gt;
Fue difícil? bueno, hasta que aprendemos la terminología, la estructura de objetos y la forma de definir todo, puede que si. Luego es tan simple como agregar definiciones. Por suerte es bastante intuitivo =)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Referencias&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
- &lt;a href="http://nagios.sourceforge.net/docs/3_0/toc.html"&gt;Nagios Core Documentation&lt;/a&gt;&lt;br /&gt;
- &lt;a href="http://www.nsclient.org/nscp/wiki/doc/about"&gt;about NSClient++&lt;/a&gt;&lt;br /&gt;
- &lt;a href="http://www.nsclient.org/nscp/wiki/doc/usage/nagios/nrpe"&gt;Using NSClient++ from nagios with check_nrpe&lt;/a&gt;&lt;br /&gt;
- &lt;a href="http://www.howtoforge.com/installing-nagios-on-debian-lenny-and-monitoring-a-debian-lenny-server"&gt;Installing Nagios On Debian Lenny And Monitoring A Debian Lenny Server&lt;/a&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEje6bUAygsfCPgnwU8EJtCmdc33UKUpk5C8s27WlPRkvCpfl6OLaZxmQs0XWRvcyAMw8vrbhbPd2rVgh6fTuGGHZwvyQiCOORVlGj_LoT7Df3YR9XuHEfQkLbJPL7sj5TWLVg-lsVFfWM0K/s72-c/nagios-logo.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total></item><item><title>Tips: recibir mensajes SMS online</title><link>http://itfreekzone.blogspot.com/2012/11/tips-recibir-mensajes-sms-online.html</link><category>links</category><category>SMS</category><category>Tips</category><author>noreply@blogger.com (V3kt0r)</author><pubDate>Thu, 29 Nov 2012 09:15:00 -0300</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-271207292388274566.post-4974795624044718878</guid><description>Desde hace tiempo, la mayoría de los sites requieren una dirección de email válida para poder registrar un usuario, a la cual envían un código de confirmación para terminar la validación. Si bien esto sigue siendo igual en la mayoría de los casos, cada vez más sitios empiezan a requerir algo más... un número de celular. Estos sites envían al número ingresado un código de confirmación, el cual hay que ingresar para validar al usuario.&lt;div&gt;
En diferentes sites el número de celular es opcional y permite autenticación de dos vías, lo cual refuerza el sistema de autenticación, pero en otros es mandatorio colocar el número.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Los paranoicos como yo (o los usuarios que todavía desean poseer un mínimo de privacidad), no deseamos colocar el condenado número para que después la página pueda, como mínimo, enviarnos SPAM. Por ello me puse a buscar alguna alternativa que me permita recibir mensajes en un número online. Así fue como llegué al excelente artículo&amp;nbsp;&lt;a href="http://www.thelacunablog.com/receive-sms-online-bypass-sms-verification.html"&gt;How to receive SMS online to bypass SMS verification?&lt;/a&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
El artículo resume cuáles páginas permiten la recepción de SMSs online. Las mismas proveen una serie de números, controlados por ellos, los cuales están aptos para recibir SMSs internacionales. Cuando se recibe un mensaje, el mismo es agregado en la web para que pueda ser leído.&lt;/div&gt;
&lt;div&gt;
Las alternativas más simples de utilizar (digo simples porque no necesitan creación de usuario) son &lt;a href="http://receive-sms-online.com/"&gt;Receive-SMS-Online&lt;/a&gt; y &lt;a href="http://receivesmsonline.com/freephonenumber/"&gt;ReceiveSMSOnline&lt;/a&gt;. De estas, la que a mi me funcionó es la primera, utilizando los números de Noruega. En el resto de los números no pude recibir mensajes. La ventaja adicional de la primera es que separa los SMS recibidos en cada número en páginas diferentes.&lt;/div&gt;
&lt;div&gt;
La tercer página citada en el artículo es &lt;a href="http://pinger.com/textfree/"&gt;Pinger&lt;/a&gt;, la cual pintaba bien en su descripción, pero tampoco pude recibir mensajes. La cuarta requiere justamente lo que no quería originalmente, un número de celular. No se por qué el autor colocó ésta en la lista, siendo que no es la idea del artículo. La última citada es para recibir faxes y mensajes de voz, ya alejandose de los SMS, así que no la probé.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Adicionalmente a las del articulo, encontré &lt;a href="http://receive-sms.com/"&gt;Receive-SMS&lt;/a&gt;, similar a ReceiveSMSOnline en la cual se muestran los mensajes de todos los números en una misma págna.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Estas páginas son de mucha utilidad, pero no siempre servirán, dado que los sites no son tontos (bueno, no todos) y muchos controlan los números de cel que ya validaron códigos y no permiten que sean utilizados nuevamente.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Me pareció interesante listar estas páginas porque, si bien existen cientos de páginas para el envío de mensajes online, no existen muchas para recibirlos.&lt;/div&gt;
</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">9</thr:total></item></channel></rss>