[GTER] Script remoção virus UBNT

Antonio Carlos Sanches asanches at omni.net.br
Sun May 15 09:56:12 -03 2016


Bom dia.

Será que não é possivel rodar um script como esse para fazer a atualizacao
da antena dos clientes ? Assim não precisariamos rodar o aircontrol, não
tenho conhecimento de programação para fazer isso, mas imagino que se tiver
como dar um GREP na versao que XM ou XW que esta rodando na antena,
mandamos fazer um download do firmware, como estou fazendo desse arquivo
para remover o "virus" e atualizar a antena, alguem saberia fazer ?

Em 14 de maio de 2016 14: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
>



--



More information about the gter mailing list