Wireshark / Tshark. Filtros XML / RSS y Estadísticas.

Me preguntaban, hace algunos días por email, si había forma de filtrar la información relativa a los RSS. Como bien sabeis RSS es un formato para la sindicación de contenidos de nuestros sitios web. De esta forma, podemos distribuir contenidos actualizados sin la necesidad de disponder de un navegador web. Al ser RSS un miembro de la familia del formato XML, le permite estructurar de manera muy efectiva y ordenada la información que pretende mostrar.

xml rss filtros wireshark tshark filters

Es precisamente la forma de estructurar los contenidos mediante retiquetas, lo que nos permitirar filtrar de forma más eficaz mediante Wireshark / Tshark.

Veremos entonces una serie de filtros RSS y lo aplicaremos a Wireshark para obtener los datos que necesitamos. Usaremos también estadisticas Tshark.

Filtros RSS para Wireshark / Tshark.

Wireshark / Tshark disponen de una serie de filtros de visualización para manejar las capturas XML / RSS.

Lo más siemple sería aplicar directamente rss:

rss xml filtros wireshark tshark

Obtendremos información de todos los paquetes HTTP/XML. Vemos que XML «viaja» dentro del protocolo HTTP.

Bien, ahora vamos a deplegar la información relativa a XML/RSS. Primero aplicamos el filtro: xml and xml contains nauscopio (también podríamos haberlo realizado con el filtro rss):

http xml rss filtros wireshark tshark

Bien, ya empezamos a ver algo, que ademas, es lo mas importante. La estructura RSS y los datos. A partir de aquí ya podemos configurar nuestros filtros de forma más eficiente.

Por ejemplo. Observad la estructura de etiquetas o tags. Dentro del tag rss/channel tenemos:

  • title
  • link
  • description
  • pubDate
  • image
    • title
    • url
    • link
  • generator
  • item
    • title
    • ..
  • ….

Conociendo la estructura, podremos aplicar filtros tales como:

rss.channel.title contains «Nauscopio Scipiorum»

rss.channel.item.title contains «Adblock»

Lo vemos en los ejemplos:

xml rss filtros wireshark tshark

xml rss filtros wireshark tshark

Otros filtros que podemos aplicar son:

  • rss.channel.language
  • rss.autor

Ejemplos:

xml rss filtros wireshark tshark filters

  • rss.channel.item.link contains «daboweb.com»

xml rss filtros wireshark tshark filters

.

Estadísticas RSS con Tshark.

Podemos usando las estadisticas Tshark, contar las veces que aparece Daboweb.com en una determinada captura de tráfico RSS. Para ello usaremos COUNT() (lo veremos en un prósimo artículo con detalle):

  • tshark -r rss_2.pcap -nqzio,stat,20,»COUNT(rss.channel.item.link)rss.channel.item.link contains «daboweb.com»

tshark estadisticas RSS COUNT filtros

Vamos ahora a realizar una estadística para el tag channel/language (rss.channel.language). Vamos a contar los correspondientes a:

language=en y language=es-es

  • tshark -r rss_2.pcap -nqzio,stat,20,»COUNT(rss.channel.languag
    e)rss.channel.language contains «en»»,»COUNT(rss.channel.language)rss.channel.language contains «es-
    es»»

xml rss filtros wireshark tshark

——-

Esta entrada fue publicada en Seguridad y redes, Wireshark . Tshark. Guarda el enlace permanente.

Una respuesta a Wireshark / Tshark. Filtros XML / RSS y Estadísticas.

  1. Pingback: Tshark. Follow TCP Stream en modo CLI mediante estadísticas tshark. | Seguridad y Redes

Deja un comentario