Вы находитесь на странице: 1из 53

TESTING DE SEGURIDAD CON

HERRAMIENTAS DE OWASP

Mateo Martinez | mateo.martinez@owasp.org


OWASP Uruguay Chapter Leader
OWASP
16
Años de servicio a la comunidad
OPEN
INNOVATIO
N
GLOBAL
INTEGRITY

ADN OWASP
200
Proyectos Activos
250
Capítulos Activos
60,000+
Participantes en listas de correos
100+
Citaciones de gobiernos e industrias!
100+
Academic Supporters
Sobre OWASP UY
• Web: https://www.owasp.org/index.php/Uruguay
• Twitter: @owasp_uy
• Reuniones: último viernes de cada mes en FING
• 4 eventos gratuitos OWASP Day anuales
• Conferencia gratuita OWASP Latam Tour
• Entrenamientos OWASP Latam Tour
• Conferencia regional OWASP APPSEC RIO DE LA PLATA
(diciembre)
Fechas importantes de OWASP UY

2010 – 1° OWASP DAY URUGUAY (Universidad ORT Uruguay)


2012 – OWASP APPSEC LATAM 2012 (ANTEL)
2015 – OWASP APPSEC RIO DE LA PLATA 2015 (ANTEL)
2016 – OWASP APPSEC RIO DE LA PLATA 2016 (ANTEL)
Sobre el OWASP LATAM TOUR
• Conferencias Gratuitas de Seguridad
• 16 países recorridos durante el mes de abril
• Realizado en Uruguay desde el 2011
• https://www.owasp.org/index.php/LatamTour2017
• @appseclatam
• #OWASPLatamTour2017
Entrenamientos OWASP Hands on
Tipos de Proyectos OWASP (I)
Estados de Proyectos OWASP
Tipos de Proyectos OWASP (II)
DOCS

TOOLS
DOCS

CODE
- DOCs
OWASP Top Ten Project
OWASP Testing Guide Project
OWASP Software Assurance Maturity Model
OWASP ASVS
https://www.owasp.org/index.php/Category:OWASP_Top_Ten_Project
https://github.com/OWASP/Top10/issues
https://github.com/OWASP/Top10/tree/master/2017
https://github.com/OWASP/Top10/blob/master/2017/OWASP-Top-10-2017-en.pdf
https://www.owasp.org/index.php/OWASP_SAMM_Project
https://www.owasp.org/index.php/OWASP_SAMM_Project
https://www.owasp.org/index.php/OWASP_SAMM_Project
https://www.owasp.org/index.php/Web_Application_Security_Testing_Cheat_Sheet
https://www.owasp.org/index.php/Web_Application_Security_Testing_Cheat_Sheet
https://www.owasp.org/index.php/Web_Application_Security_Testing_Cheat_Sheet
- CODE
OWASP ModSecurity Core Rule Set Project
OWASP CSRFGuard Project
OWASP AppSensor Project
https://www.owasp.org/index.php/Category:OWASP_ModSecurity_Core_Rule_Set_Project
https://www.owasp.org/index.php/OWASP_AppSensor_Project
- TOOLS
OWASP Zed Attack Proxy
OWASP Web Testing Environment Project
OWASP OWTF
OWASP Dependency Check
https://www.owasp.org/index.php/OWASP_Zed_Attack_Proxy_Project
OWASP ZAP, & Jenkins
OWASP ZAP & Jenkins
import time
from pprint import pprint
from zapv2 import ZAPv2

# Here the target is defined and an instance of


ZAP is created.
target = 'http://www.target.site/'
zap = ZAPv2()
OWASP ZAP & Jenkins
# ZAP starts accessing the target.
print 'Accessing target %s' % target
zap.urlopen(target)
time.sleep(2)

# The spider starts crawling the website for


URL’s
print 'Spidering target %s' % target
zap.spider.scan(target)
OWASP ZAP & Jenkins
# The active scanning starts
print 'Scanning target %s' % target
zap.ascan.scan(target)
while (int(zap.ascan.status) < 100):
print 'Scan progress %: ' + zap.ascan.status

time.sleep(600)

print 'Scan completed'


OWASP ZAP, Selenium, & Jenkins
OWASP ZAP, Selenium, & Jenkins
API CALL
def ZAPApiCall(url, path, query) {
def ZAProxy = new HTTPBuilder(url)
data = ZAProxy.request(GET, JSON) { req ->
uri.path = path
requestContentType = JSON
uri.query = query
headers.Accept = 'application/json'

// response handler for a successful response code:


response.success = { resp, json ->
assert resp.status == 200
assert resp.contentType == JSON.toString()
return json
}
response.failure = { resp, json ->
throw new RuntimeException("${json}")
}
}
}
OWASP ZAP, Selenium, & Jenkins
Start Active scan
println "Starting Active Scan"
path = '/json/ascan/action/scan'
query = [apikey : "${apikey}", url: "${applicationURL}",
recurse: 'true', inScopeOnly: 'false']
ZAPApiCall(url, path, query)
def scanId = data.scan
println "Started Active Scan: ${scanId} on target:
${applicationURL}"
def responseText = "no responses yet"
def responseCode = 200
// 10 second wait times 6 for one minute times number of
minutes.
def maxRetries = 30 * 30
def retryNum = 0
OWASP ZAP, Selenium, & Jenkins
Start Active scan
println "Starting Active Scan"
path = '/json/ascan/action/scan'
query = [apikey : "${apikey}", url: "${applicationURL}",
recurse: 'true', inScopeOnly: 'false']
ZAPApiCall(url, path, query)
def scanId = data.scan
println "Started Active Scan: ${scanId} on target:
${applicationURL}"
def responseText = "no responses yet"
def responseCode = 200
// 10 second wait times 6 for one minute times number of
minutes.
def maxRetries = 30 * 30
def retryNum = 0
OWASP ZAP, Selenium, & Jenkins
$ java -jar selenium-server-standalone.jar -
role node -hub
http://localhost:4444/grid/register -browser
browserName=chrome,version=99

$ ./ZAP.sh -daemon -host 0.0.0.0 -config


api.key=<apikey>
OWASP ZAP, Selenium, & Jenkins
En Jenkins, agregar los tags
correspondientes a los regression tests a
probar en ZAP. Una vez finalizados los test
funcionales, lanzar groovy script a las urls
detectadas por ZAP.
Soy nuevo en esto, ¿por dónde puedo empezar?

APPSEC Tutorials son


videos para iniciarse
OWASP TOP 10, la guía
clásica
OWASP Cheat Sheets

https://www.owasp.org/index.php/OWASP_Project_Inventory
Quiero entender y analizar vulnerabilidades

Security Shepherd, juego CTF para aprender


WebGoat, sitio vulnerable Java y .Net con lecciones para
programadores
OWASP Bricks, un sitio web PHP vulnerable con lecciones
Quiero utilizar herramientas de pentesting y hacer pruebas

OWASP ZAP, es un proxy de ataque, “creme de la creme”


tool para hackear tu propio sitio
OWTF, un framework completo de pentesting alineado a
los últimos estándares de seguridad
Xenotix Exploit, para experimentar con XSS
Quiero entender y analizar vulnerabilidades
OWASP ASVS es “La Lista” para aplicar al proceso de
desarrollo. Son controles técnicos de seguridad.
Secure Coding Practices Quick Reference Guide es una
checklist para integrar en el SDLC con prácticas y
requerimientos de seguridad
Quiero Asegurar mi sitio web

APPSENSOR es un detector de intrusos en su sitio


OWASP HTML Sanitizer permite incorporar código HTML
de terceros pero manteniendo la protección contra XSS.
CRSFGuard, protege su sitio contra ataques de CRSF.
¿Cómo puedo verificar si tengo librerías vulnerables?
Dependency-Check es una herramienta que identifica
dependencias y valida si ha vulnerabilidades conocidas
Dependencias en Java, .Net y Python se encuentran
soportadas.
¿Existe alguna guía para programadores?

OWASP Developer Guide es el proyecto original de OWASP,


publicado por primera vez en 2002.
Me gustaría poder analizar código fuente con más detalle
¿Cómo puedo verificar si tengo librerías vulnerables?
CODE REVIEW GUIDELINES indican como validar y revisar
el código fuente en búsqueda de vulnerabilidades
O2 PLATFORM permite un análisis estático robusto junto
con ser una herramienta poderosa para prototipos y
desarrollo ágil en .Net
Otros proyectos de OWASP
• OWASP Application Security Guide For CISOs Project
• OWASP Cornucopia
• OWASP Proactive Controls
• OWASP Broken Web Applications Project
https://www.owasp.org/index.php/OWASP_Cornucopia
https://www.owasp.org/index.php/Application_Security_Guide_For_CISOs
¡Muchas Gracias!

Mateo Martínez
mateo.martinez@owasp.org
Capítulo OWASP Uruguay

Вам также может понравиться