[ --- The Bug! Magazine _____ _ ___ _ /__ \ |__ ___ / __\_ _ __ _ / \ / /\/ '_ \ / _ \ /__\// | | |/ _` |/ / / / | | | | __/ / \/ \ |_| | (_| /\_/ \/ |_| |_|\___| \_____/\__,_|\__, \/ |___/ [ M . A . G . A . Z . I . N . E ] [ Numero 0x04 <---> Revisao 0x01 <---> Artigo 0x07 ] .> 23 de Junho de 2009, .> The Bug! Magazine < staff [at] thebugmagazine [dot] org > +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Bug! Magazine entrevista: Felipe Andres Manzano +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ .> 19 de Junho de 2009, .> The Bug! Magazine < staff [at] thebugmagazine [dot] org > Dessa vez tivemos a oportunidade de entrevistar Felipe Andres Manzano, argenti- no, Engenheiro de software da Nimbuzz.com, que apresentou a palestra Exploiting PDF Readers na uCon 2009. PS: The original interview in English can be found after the translated version. (*) Versao traduzida (portugues) The Bug!: Fale um pouco sobre voce. Apresente-se. Manzano: Eu sou um pesquisador independente de seguranca em tempo integral. Eu me foco em vulnerabilidades de softwares e vulnerabilidades client- side. No passado tive a agradavel experiencia de ser parte da Equipe de Es- critores de Exploit na CORE Security Technologies, e antes disso eu era (e ainda sou) um ninja do nmap na flowgate.net. Antes de obter meu Bacharelado (Oi mae!!) em Ciencia da Computacao na Universidad Nacional de Rosario, Argentina, eu trilhei meus primeiros passos em seguranca adicionando MLS a um sistema de arquivos do kernel Linux para um projeto de P&D hospedado pela universidade. Yara yara, eu sou basicamente ninguem... acontece que eu posso ler SEU email! >) Nao exatamente, eu nunca bh-pwnei ninguem na vida. Isso e' ilegal. TB!: Quais sao os seus interesses nao-relacionados a computadores? M: Sem computadores? Wow essa e' dura. Eu amo qualquer coisa que flutue, eu tenho um caiaque e uma prancha de surf... mas nao ha' rio nem oceano em Cordoba onde eu vivo entao.. voce pode ver porque eu continuo voltando aos computadores.. hehe TB!: Como voce se interessou por hacking? M: Eu estou sempre passando dos limites impostos em tudo desde que eu posso lembrar (o que significa quebrar brinquedos ou nao prestar atencao nos pro- fessores.. ). E' isso que 'interesse em hacking' significa? Eu nunca fui um cara underground e nunca escrevi em l33t perfeitamente nem tenho uma assinatura de email em ascii art ou brain-fuck. Eu dificilmente poderia dizer que ao menos li 2600 alguma vez!!. Eu sou tecnologicamente promiscuo tanto que durante a universidade eu tentei me alimentar de qual- quer coisa tecnica que tinha `a mao. Eu fui recrutado para me envolver em um projeto relacionados `a seguranca do kernel linux, O que? Eu hackeando o kernel por dinheiro? Claro! Eu aprendi algumas merdas de modelos de segu- ranca antigos de escola, que ficaram desviando meu caminho da vida hakz0r recheada de computadores e sobretudos longos e escuros que estou vivendo agora. hu?? Mas como provavelmente acontece com muitos (pelo menos na minha faixa de idade) o momento de transformacao e' desencadeado ao ler ''Smashing the stack for fun and profit" or algum de seus derivados. Nao, seriamente! Eu realmente me viciei quando eu fiz funcionar pela primeira vez um pouco desse voodoo. Isso me faz pensar no que eu estava fazendo en- quanto esses caras estavam hackeando o mundo... jogando ghost-gobbling no c64? provavelmente. lame. Tambem a minha linha do tempo e' fodida. TB!: Qual foi o seu primeiro exploit? Como foi a experiencia? M: Eu nao tenho ideia. Provavelmente alguma coisa para a Core. Eu nao sei se posso falar sobre isso. Provavelmente algum desses bugs de stack de brin- quedo. TB!: Qual foi o exploit mais dificil que voce ja escreveu, e por que? M: Eu estou longe de dominar coisas realmente hardcore, mas olhando por cima, o do poppler que usa a tecnica "House of mind" (OCERT-2008-007) Ele pegava um valor de uma parte nao-inicializada da heap e passava ao free. Era isso. Procure por "House of mind" Malloc_malleficarum.txt > exploit. Eu tive que massagear a heap de forma que pudesse controlar o valor passado ao free, e colocar os chunks falsos de malloc para o "house of mind" em algum lugar. Um pouco dessa massagem que eu fiz foi com um PDF-Array de numeros. Esses numeros eram interpretados pelo leitor como nu- meros de ponto flutuante com uma rotina ad-hoc bastante bugada de leitura de pontos flutuantes. Entao para conseguir a imagem de memoria que eu que- ria eu tive que representa-la como uma sequencia de numeros de ponto flu- tuante e coloca-los em um arquivo pdf, e alguns dos valores nao eram pos- siveis.. voce entendeu a situacao. Por que Mr Anderson, POR QUE? Eu ouvi que isso era possivel, mas por algu- ma razao eu precisava Saber que isso era possivel. Apesar de que ninguem da a minima para bugs client-side no linux nem se eles puderem ser remotiza- dos, como esse, usando o cups.. bem, muito poucos se importam. Falando nisso, o artigo recente da phrak sobre exploitacao malloc- malleficarum e' otimo! TB!: Como foi a experiencia de trabalhar na Core, com gera, t0p0 e outras estrelas dos exploits? M: Eu definitivamente teria esse dois na minha capsula de escape hacker do fim do mundo, com certeza! Eu tambem nao deixaria o planeta sem Alfr3d, aLs, Marito e Nico-el antiguo- . Eu Amo meus dias ali. Voce aprende em velocida- de maxima com esses caras. *A maioria* das pessoas que encontrei ali foram amigaveis e nao tiveram problemas em me tirar da minha "cegueira n00b" mi- lhoes de vezes. TB!: Qual a sua opiniao sobre a cena na Argentina? M: Ela esta' mudando com os anos e definitivamente crescendo. Eu nunca fui um rockstar da cena h4ckz0r e nem ao menos um consumidor dela, mas eu acho que varias pessoas envolvidas com hacking que antes nao tinham contato agora estao conectadas entre si gracas `as conferencias locais. Nos temos a EkoParty aqui, nao temos? TB!: Que dica voce daria para quem esta comecando? M: Eu acho que nesse assunto voce nunca para de comecar. Eu estou comecando! Sem duvida! Eu acho que simplesmente ha' diferentes niveis de "n00bice". Encare isso! (se voce tem 11 anos ou mais) ha' sempre um cara 10 anos mais novo, mais sexy, com mais dinheiro que voce jamais vai ganhar na sua vida toda, que pode exploitar o que voce nao pode, mas ele consegue fazer isso em meia hora. Entao como atenuar isso. Leia muito. A Internet e' infinita! Nao e'? Pegue livros eletronicos, fique nas mailing lists, va' a conferencias e sempre saiba que existem pessoas melhores que voce, das quais voce pode aprender, em vez de achar que voce e' o rei do mundo. TB!: Qual sua opiniao sobre o formato PDF? O que voce mudaria se voce fosse o criador? M: Ele e' lindamente bem documentado e J! isto e' BIG 2!. Eu nao sou um especialista em PDF. Eu apenas li a especificacao procurando por partes que poderiam envolver lidar com offsets, e adivinha? Ha' bastan- te dessas! Ela tem 10000 paginas e tem referencias para um punhado de ou- tros documentos para lidar com formatos embutidos. Me parece que escrever um leitor completamente compativel do zero e' praticamente impossivel. Ele tem um monte de funcionalidade legada (agora depreciada) que realmente nao faz sentido nenhum, a nao ser pela retrocompatibilidade. Eu tenho cer- teza que os engenheiros por tras da especificacao possuem um modelo formal dela e provaram matematicamente funcionalidades nao redundantes e outros parametros do documento ??, De qualquer forma, eu estou bem longe de ser um engenheiro de formatos, que provavelmente diria a voce para se esquivar e usar xml. Pode ser que, do ponto de vista de seguranca, adicionar checksums obrigatorios em tudo que e' lugar tornasse o fuzzing um pouco mais dificil para os fuzzers casuais. Apenas um pensamento... alguem ja' viu um PDF com as palavras-chave /MAC /UNIX /WIN dentro dele? Essas palavras-chave podem ajudar a iniciativa "1 pdf to rule them all". TB!: Qual a sua opiniao a respeito da Adobe? M: EU SEI que ha' um numero incontavel de pessoas fazendo dinheiro usando tec- nologia que eles produzem. Eu fui contactado por eles ao fim da minha apresentacao na uCon. Eles pare- cem legais. Eles nao pagariam por sua pesquisa em vulnerabilidades, entre- tanto. Ultimas Palavras: -- Pense em um numero. Agora suponha que eu imagine um numero e aconteca de ser o mesmo numero que o seu... eu li a sua mente? Agora abra o vi e digite alguma coisa e salve em um txt no seu drive. Agora suponha que eu tenho um arquivo no meu HD com o mesmo conteudo... eu li o seu arquivo? Do you think that's air you r breathing ? What a fuck r u doing!? f/ (*) English version The Bug!: Talk about You. Introduce yourself. Manzano: I'm a full time independent security researcher. I'm focused on software vulnerabilities and client side vulns. In the past I enjoyed being part of the Exploit Writers Team at CORE Security Technologies and before that I was (still am) a nmap ninja at flowgate.net. Previous to obtain my BSc (Hi mom!!) in Computer Science at Universidad Nacional de Rosario, Argentina, I took my first steps in security adding MLS to a Linux kernel FS for a university-hosted R+d Project. Yara yara, I'm basically nobody... it just happened I can read YOUR email! >) Not quite, I haven't bh-pwn anyone in my life. That's ilegal. TB!: Which were your non-computer-related interests? M: No computers? Wow this is a tuff one. I love everything that floats, I have a kayak and a surfboard... but no river nor ocean in Cordoba where I live so.. you see why I keep coming back to computers.. hehe TB!: How did you begin with hacking? M: I'm always pushing the imposed limits in everything since I can remember (meaning breaking toys and don't paying attention to the teachers.. ). That's what 'interesting in hacking' means? I've never been an underground guy and I've never speak a perfect l33t or have an ascii art or brain-fuck email signature. I hardly ever read 2600!!. I'm technologically promiscuous though so during university I tried to feed me with every techy thing I had at hand. I was recruited to get involved in a linux kernel security related project, What? Me hacking into the kernel for money? Hell yeah! I learned some old school security models shit, that kept biasing my path to the hakz0r life filled with computers and dark long overcoats I'm living now. hu?? But as probably happen to many (at least on my age range) the moment of transformation is triggered by reading ''Smashing the stack for fun and profit" or some of its spin off. No seriously! I got really hooked when I first made work some of that voodoo. It makes me think what I was doing when these guys were hacking the world... playing ghost- gobbling on the c64? probably. lame. Also my time line is fucked up. TB!: What was your first exploit? How was the experience? M: I don't have a clue. Probably something for Core. I don't know if I can talk about it. Probably one of those toy stack bugs. TB!: What was the hardest exploit you have written, and why? M: I'm far from mastering real hardcore shit but from the top of my head, the poppler one that uses "House of mind" technique (OCERT-2008-007) It took a value from a uninitialized part of the heap and passed it to free. That's it. Grep "House of mind" Malloc_malleficarum.txt > exploit, I needed to massage the heap so I can control the value passed to free and put the fake malloc chuncks for the "house of mind" somewhere. Some of that massaging I did was with a PDF-Array of numbers. This numbers where parsed by the reader as float numbers with an ad-hoc rather buggy float parsing routine. So for getting the memory image I wanted I needed to represent it as a sequence of float numbers and put it on a pdf file and some of the values weren't possible.. you get the picture. Why Mr Anderson, WHY? I heard it was possible but for some reason I needed to Know that it was possible. Although nobody gives a shit about linux client side bugs not even if they could be remotized like this one using cups.. well very few do care. Btw, the recent phrak article on malloc-malleficarum (des-\1) exploitation is neat! TB!: How was the experience of work at CORE, with gera, t0p0 and other exploit stars? M: I definitively would have those two on my end-of-the-world hacker's escape capsule for sure! I'd rather wont leave the planet without Alfr3d, aLs, Marito and Nico-el antiguo- . I Love my days there. You learn at your maximum speed with those guys. *Most* of people I meet there were kind and have no trouble taking me out of my "n00b blindness" million times. TB!: What is your opinion about the scene on Argentina? M: It is changing with the years and definitively growing. I was never a hackz0r scene rockstar not even a consumer of that, but I think lots of previously unlinked hackerish people are now connected thanks to the proliferation of locals confs. We have EkoParty down here, don't we? TB!: What tips would you share with the begginers? M: I think with this matters you never stop starting. I'm starting! No doubt! I think there are just different levels of "n00bity". Face it! (if you are 11 or more years old) there is always a 10 years younger guy, sexier with more money than you will earn in a life time that can exploit what you couldn't but he do it in half an hour. So how to mitigate this. Read a lot. Interenet is infinite! Isnt it? Get electronic books, stay in mailing lists, go to confs and always know that there are people better than you from which you could learn instead of thinking that you are the king of the world. TB!: What is your opinion about PDF format? What would you change on a standard you've created? M: It is beautifully well documented and J! it is BIG 2!. I'm not a PDF expert I just read the specification looking for parts that may involve dealing with offsets and guess what? There are plenty of those! It is 10000 pages long and have references to a bunch of other documents for handling embedded formats. It seems to me that coding a complete conforming reader from scratch is almost imposible. It has a lot of legacy functionality (now superseeded) that really make no sense there besides the backward compatibility point. I'm sure the engineers behind the specification have a formal model of it and have mathematically proof non redundant functionality and other document parameters ??. Anyway I'm far from being a document engineer, who probably will tell you to dodge it and use xml. Maybe from the security point of view adding a mandatory checksums all over the place could make the fuzzing a tiny bit harder for casual fuzzers. Just a thought... does anyone saw a PDF with /MAC /UNIX /WIN keywords on it? Those keywords may help the "1 pdf to rule them all" initiative. TB!: What is your opinion about Adobe? M: I KNOW there are an uncountable number of people making money using technology they produce. I have been contacted by them at the end of my presentation at uCon. They seem cool. They won't pay for your vuln research though. Last Words: -- Think a number. Now supouse I also picture a number on mi mind and it happens to be the same number... have I read your mind? Now open vi and type something and save it on a txt file on your drive. Now suppouse I have a file on mi HD with the same content... have I read your file? Do you think that's air you r breathing ? What a fuck r u doing!? f/