|
|
|
tonel - basic stats checks for stunnel |
Si vous voulez bloquer ce service sur vos fils RSS
Si vous voulez nous contacter ou nous proposer un fil RSS
Menu > Articles de la revue de presse : - l'ensemble [ tous | francophone] - par mots clé [ tous] - par site [ tous] - le tagwall [ voir] - Top bi-hebdo de la revue de presse [ Voir]
tonel - basic stats checks for stunnel Par Unix Cisco Hacks Le [2013-02-23] à 12:16:27
Présentation : bin bash die echo exit LOG_FILE var log stunnel.log ROOT_UID 0 VERBOSE 0 TODAY date pourcentsu if TODAY 1 then Today is Monday BEGIN_DATE date -dmonday-7days pourcentsY.pourcentsm.pourcentsd END_DATE date -dmonday pourcentsY.pourcentsm.pourcentsd WRITE_END_DATE date -dmonday-1day pourcentsY.pourcentsm.pourcentsd dirty hack else BEGIN_DATE date -dlast-monday-7days pourcentsY.pourcentsm.pourcentsd END_DATE date -dlast-monday pourcentsY.pourcentsm.pourcentsd WRITE_END_DATE date -dlast-monday-1day pourcentsY.pourcentsm.pourcentsd dirty hack fi Run as root, of course. UID -eq ROOT_UID die Bad luck, only root can run this code echo -e nTonel v0.4c echo Basic stats checks for stunnel echo 4-II-2013, vlan7 Parse arguments while getopts vhHfd opt do case opt in v echo -e n -v detected. Ok, let's verbose VERBOSE 1 h echo -e n-v verbose output echo -e n-f specify your stunnel logfile DEFAULT LOG_FILE echo -e n-d Up to 9999 days DEFAULT one week ago from last monday echo -e n-h Welcome to help echo -e n-H Help Long description exit H echo -e nEl script acepta varios switches. Esto es la ayuda larga. La ayuda corta es -h echo -e nEsta desarrollado de tal forma que sin ningun parametro, calcula estadisticas de la toda la semana anterior a la que nos encontramos. Es totalmente transparente al dia actual, sea lunes, jueves, domingo o cualquier dia. echo -e nEs decir, si estamos en cualquier dia de la semana del 10 al 16-2-2013, asi calcula estadisticas del 28-1-2013 al 3-2-2013, ambos inclusive echo -e n tbash tonel4c.sh echo -e nSi necesitamos especificar rangos seria echo -e n tbash tonel4c.sh -d 20130114 15 echo -e nAsi calcularia desde 20130114 hasta 20130129, ambos inclusive echo -e nSi deseamos especificar el archivo de log de stunnel por defecto var log stunnel.log , el script permite que le pasemos el switch -f seguido del archivo de log deseado. echo -e nSi deseamos mas nivel de Verbose, podemos pasar al script el parametro -v exit f echo -e n -f detected so logfile is now OPTARG LOG_FILE OPTARG d DATE OPTARG 0 8 DAYS OPTARG 9 4 INC_OR_DEC OPTARG 8 1 Basic parse of -d argument Valid basic DATE regexp DATE 1-9 0-9 0-9 0-9 0 1-9 1 012 0 1-9 12 0-9 3 01 die ERROR DATE date detected. Must be YYYMMDD format Exiting now... INC_OR_DEC Only implemented INC_OR_DEC die ERROR INC_OR_DEC inc_char detected. Must be BEGIN_DATE date -d DATE pourcentsY.pourcentsm.pourcentsd END_DATE date -d DATE INC_OR_DEC DAYS 1 days pourcentsY.pourcentsm.pourcentsd WRITE_END_DATE date -d DATE INC_OR_DEC DAYS days pourcentsY.pourcentsm.pourcentsd dirty hack DEBUG line- echo DATE DATE INC_ORD_DEC INC_OR_DEC DAYS DAYS BEGIN_DATE BEGIN_DATE END_DATE END_DATE WRITE_END_DATE WRITE_END_DATE echo -e n -d detected so date range is now n t from BEGIN_DATE to WRITE_END_DATE esac done echo -e n t t t Now running some basic checks... echo -e t t t echo -e n Checking runnin' stunnel processes... ps -ef grep s tunnel die ERROR stunnel is NOT running Exiting now... echo -e n t OK Let's continue... echo -e n Checking stunnel LISTEN sockets... netstat -tnl grep LISTEN egrep ' 110 143 993 995' netstat -tnl grep LISTEN grep 110 die ERROR POP3 is NOT listening Exiting now... netstat -tnl grep LISTEN grep 143 die ERROR IMAP is NOT listening Exiting now... netstat -tnl grep LISTEN grep 995 die ERROR POP3S is NOT listening Exiting now... netstat -tnl grep LISTEN grep 993 die ERROR IMAPS is NOT listening Exiting now... echo -e n t OK Let's continue... echo -e n t t t Now parsing logfile LOG_FILE ... echo -e t t t -f LOG_FILE die Fatal ERROR log LOG_FILE NOT found. Exiting now... echo -e n stunnel outtages from BEGIN_DATE to WRITE_END_DATE awk ' ' END_DATE' i 0 ' BEGIN_DATE' i 1 i' LOG_FILE grep -c stunnel VERBOSE -eq 0 awk ' ' END_DATE' i 0 ' BEGIN_DATE' i 1 i' LOG_FILE grep stunnel cut -d -f1-7 core echo -e n Numero conexiones 1 OK IP origen from BEGIN_DATE to WRITE_END_DATE awk ' ' END_DATE' i 0 ' BEGIN_DATE' i 1 i' LOG_FILE grep 1 connected from cut -d -f7 cut -d -f1 sort uniq -c sort -rn sed -e 's ' awk ' print NR, 0 ' tr ' ' t echo -e n t Total conexiones awk ' ' END_DATE' i 0 ' BEGIN_DATE' i 1 i' LOG_FILE grep -c 1 connected from VERBOSE -eq 0 echo -e t Primera conexion n t t awk ' ' END_DATE' i 0 ' BEGIN_DATE' i 1 i' LOG_FILE grep 1 connected from head -n 1 cut -d -f1,2,4-7 echo -e t Ultima conexion n t t awk ' ' END_DATE' i 0 ' BEGIN_DATE' i 1 i' LOG_FILE grep 1 connected from tail -n 1 cut -d -f1,2,4-7 core POP3 core POP3S core IMAP core IMAPS echo -e n t t t Now checking bad guys... echo -e t t t echo -e n Numero intentos conexion rechazados IP origen from BEGIN_DATE to WRITE_END_DATE awk ' ' END_DATE' i 0 ' BEGIN_DATE' i 1 i' LOG_FILE grep REFUSED cut -d -f6 cut -d -f1 sort uniq -c sort -rn sed -e 's ' awk ' print NR, 0 ' tr ' ' t echo -e n t Total rechazados awk ' ' END_DATE' i 0 ' BEGIN_DATE' i 1 i' LOG_FILE grep -c REFUSED n echo -e nLast run on hostname at date . Now exiting - Have a nice day... n VERBOSE -eq 0 echo Do you wanna verbose output just rerun me with -v switch exit
Les derniers articles du site " Unix Cisco Hacks " :
- tonel - basic stats checks for stunnel - Publicada lista de ponentes RootedCON 2013 - Ventanas con Grupo de delitos telemáticos de la Guardia Civil - NX ASLR Linux x64 Bypass - Mensaje de Hugo Castellano en RootedCON 2012 - blog2pdf re-uploaded - como puedo hacer que la victima ejecute netcat sin engañarle para que lo haga de forma manual - have a nice sunday - Capture the flag 2013 - Illiterate Ethiopian kids hack OLPCs in 5 months with zero instruction
Menu > Articles de la revue de presse : - l'ensemble [ tous | francophone] - par mots clé [ tous] - par site [ tous] - le tagwall [ voir] - Top bi-hebdo de la revue de presse [ Voir]
Si vous voulez bloquer ce service sur vos fils RSS :
- avec iptables "iptables -A INPUT -s 88.190.17.190 --dport 80 -j DROP"
- avec ipfw et wipfw "ipfw add deny from 88.190.17.190 to any 80"
- Nous contacter par mail
| Mini-Tagwall des articles publiés sur SecuObs : | | | | sécurité, exploit, windows, attaque, outil, microsoft, réseau, audit, metasploit, vulnérabilité, système, virus, internet, usbsploit, données, source, linux, protocol, présentation, scanne, réseaux, scanner, bluetooth, conférence, reverse, shell, meterpreter, vista, rootkit, détection, mobile, security, malicieux, engineering, téléphone, paquet, trames, https, noyau, utilisant, intel, wishmaster, google, sysun, libre |
| Mini-Tagwall de l'annuaire video : | | | | curit, security, biomet, metasploit, biometric, cking, password, windows, botnet, defcon, tutorial, crypt, xploit, exploit, lockpicking, linux, attack, wireshark, vmware, rootkit, conference, network, shmoocon, backtrack, virus, conficker, elcom, etter, elcomsoft, server, meterpreter, openvpn, ettercap, openbs, iphone, shell, openbsd, iptables, securitytube, deepsec, source, office, systm, openssh, radio |
| Mini-Tagwall des articles de la revue de presse : | | | | security, microsoft, windows, hacker, attack, network, vulnerability, google, exploit, malware, internet, remote, iphone, server, inject, patch, apple, twitter, mobile, virus, ebook, facebook, vulnérabilité, crypt, source, linux, password, intel, research, virtual, phish, access, tutorial, trojan, social, privacy, firefox, adobe, overflow, office, cisco, conficker, botnet, pirate, sécurité |
| Mini-Tagwall des Tweets de la revue Twitter : | | | | security, linux, botnet, attack, metasploit, cisco, defcon, phish, exploit, google, inject, server, firewall, network, twitter, vmware, windows, microsoft, compliance, vulnerability, python, engineering, source, kernel, crypt, social, overflow, nessus, crack, hacker, virus, iphone, patch, virtual, javascript, malware, conficker, pentest, research, email, password, adobe, apache, proxy, backtrack |
|
|
|
|
|