[GTER] Script remoção virus UBNT

Rogerio Alves rogerioapedroso at gmail.com
Sun May 15 08:22:25 -03 2016


Aqui deu o erro:
line 26: sshpass: comando não encontrado


Em 15 de maio de 2016 00:33, Tiago Matias <tiagomatias at linuxap.com.br>
escreveu:

> Show, testei aqui e rodou liso. Mas mesmo assim tem que acessar a antena
> uma por uma e atualizar o firmware né?
>
> Em 14 de maio de 2016 13:11, Alexandre J. Correa (Onda) <
> alexandre at onda.net.br> escreveu:
>
> > Hospede este script em um webserver interno:
> >
> > #!/bin/sh
> >
> > /bin/sed -ir '/mcad/ c ' /etc/inittab
> > /bin/sed -ir '/mcuser/ c ' /etc/passwd
> > /bin/rm -rf /etc/persistent/mcuser
> > /bin/rm -rf /etc/persistent/mf.tar
> > /bin/rm -rf /etc/persistent/.mf
> > /bin/rm -rf /etc/persistent/rc.poststart
> > /bin/rm -rf /etc/persistent/rc.prestart
> > /bin/kill -HUP `/bin/pidof init`
> > /bin/kill -9 `/bin/pidof mcad`
> > /bin/kill -9 `/bin/pidof init`
> > /bin/kill -9 `/bin/pidof search`
> > /bin/kill -9 `/bin/pidof mother`
> > /bin/kill -9 `/bin/pidof sleep`
> > /bin/cfgmtd -w -p /etc/
> > reboot
> >
> >
> > e adaptando um script que postaram para fazer o scan na rede, execute o
> > script em uma maquina linux que tenha acesso aos ips dos rádios:
> >
> > #!/bin/bash
> >
> > pass=$1
> > user=$2
> > network=$3
> > ip=$4
> >
> > if [ -z "$1" ]; then
> >         pass=YOURPASS
> > fi
> > if [ -z "$2" ]; then
> >         user=YOURUSER
> > fi
> > if [ -z "$3" ]; then
> >         #Network
> >         network="10.0.0."
> > fi
> > if [ -z "$4" ]; then
> >         #Initial IP
> >         ip=1
> > fi
> >
> > while [ $ip -lt 255 ]; do
> >         echo "Verificando $network$ip ..."
> >         FILE=/etc/persistent/mf.tar
> >         sshpass -p $pass ssh -o StrictHostKeyChecking=no $user@
> $network$ip
> > "wget -qO- http://seu.servidor.com.br/arquivo.sh | sh"
> >         ip=`expr $ip + 1`
> >         echo "......"
> > done
> >
> >
> > assim ele vai varrer um range e remover o virus... e tambem remover o
> > acesso 'mcuser' utilizado pelo Aircontrol da Ubiquiti...
> >
> >
> > --
> > Sds.
> >
> > Alexandre Jeronimo Correa
> > Onda Internet
> > Office: +55 34 3351 3077
> > www.onda.net.br
> >
> > --
> > gter list    https://eng.registro.br/mailman/listinfo/gter
> >
>
>
>
> --
> Att.
> ______________________________________
> Tiago Matias dos Santos
> LinuxAp - Router & Wireless
> Instrutor Wi-Fi e Linux
> Tel.: (69) 3225-0957 / 9288-4114
> www.linuxap.com.br
> email: tiagomatias @ linuxap.com.br
> Serviços: Linux, Mikrotik e Wireless LAN
> ______________________________________
> LINUXAP TELECOM & CONSULTING
> --
> gter list    https://eng.registro.br/mailman/listinfo/gter
>



More information about the gter mailing list