SlideShare une entreprise Scribd logo
1  sur  23
Télécharger pour lire hors ligne
Web Security
● Jose Mato Mariño
3/5/15 - 12:52:45 AM
Who am I?
● Web Developer
● Web security as hobby
● http://josemato.name
● @security4dev
3/5/15 - 12:52:46 AM
Is mandatory know web security to do a web?
● YES, If someone hacks your your server... you,
developer, are screwed
– Read logs, …, a lot of logs
– Sometimes is difficult know what was happening
– Web security is easier than computer forensic
● Your client
– Angry
– Lost branding and reputation
3/5/15 - 12:52:46 AM
Why cybercriminals want
my server ???
● SPAM
● BitCoins
● Phishing
● Botnet
● Ransomware
● Data theft
3/5/15 - 12:52:46 AM
● Online community dedicated to web application security
● Guide practices and recommendations to be considered
secure application development
● OWASP TOP 10
3/5/15 - 12:52:46 AM
OWASP TOP 10 – From 2010 to 2013
3/5/15 - 12:52:46 AM
A3 – Cross Site Scripting (XSS)
● Problem: User injects code ( ActiveX, Java, VBScript,
Flash, HTML but typically javascript) into webpage
● Attacks:
– Access user session (session hijacking)
– Redirect user to exploit kit (blackhole)
– Defacement. Phishing.
– Network ip + ports scanner
● We have 5 contexts to exploit XSS
● There are two types of XSS
3/5/15 - 12:52:46 AM
A3 – XSS Context
● Context (by Ashar Javed @soaj1664ashar):
"Context is an environment where user supplied input or input
from other application(s) eventually ends-up or start living"
● Type of contexts:
– HTML context (<title>XXS</title>)
– Attribute context (input value=”XSS”)
– Script context (<script>var a = “<?php echo XSS ?>”</script>)
– URL context (write server variable to src, href, data flash, etc)
– Style context (div style=”XSS” => custom editors)
3/5/15 - 12:52:46 AM
● Reflective
– Code is not store on any database or database repo
– Payload must be on get parameter (discussion)
– User needs to click on a malicious link
● Persistent
– Code is store on a persistent store (database)
– When user enter on a hacked page, he will exec the
xploit
A3 – XSS Types
3/5/15 - 12:52:46 AM
● http://www.elmundo.es/elmundo/2010/01/04/union_europea/1262
610678.html
A3 – Famous XSS
“Mr. Bean 'se cuela' en la web oficial de la presidencia
española”
3/5/15 - 12:52:47 AM
XSS DEMO I
● Check if there is
some XSS
● Get access to user
account
3/5/15 - 12:52:47 AM
● Never trust on user input (inbound & outbound)
● Sanitize all inputs
● Enable flag httpOnly on cookies
● Content Security Policy (CSP)
A3 – XSS Mitigation
3/5/15 - 12:52:47 AM
● Access to not allowed resources
● Application fail to check if user is authorized to access to
the resource
● Common scenario:
– http://websecurity-demo.local/transcript.php?student=1536
● Attacker see a parameter and know that “1536” is his
student id
● Attacker change this student id and get the content of
another student
● This parameter could be anywhere (get, post, cookie, …)
A4 – Insecure Direct Object References
3/5/15 - 12:52:47 AM
● Technique to alter
queries into engine
store through
vulnerable
application
● Mysql, MSQL,
Postgres, LDAP,
Access, Oracle, …
● We are going to
focus on SQLi in this
talk
● Many kind of SQLi
A1 – Injection
3/5/15 - 12:52:47 AM
● Access personal data. Dump database
● Dump local users (/etc/passwd)
● Access organization CMS
● Site infection
– malware propagation
– Click abuse
A1 – SQL Injection Goals
3/5/15 - 12:52:47 AM
● Lilupophilupop SQL Injection Attack Tops 1 Million
Infected URLs
– Search SQL Injection on ASP or ColdFusion pages
with Microsoft SQL Server
– More than one million url infected
– the attackers used XSS Persistent to redirect users to
pages showing fake computer issues to buy a fake
AV
● http://threatpost.com/lilupophilupop-sql-injection-attack
-tops-1-million-infected-urls-010412/76054
A1 – Famous SQL Injection I
3/5/15 - 12:52:47 AM
● Barr’s claims that he would unmask and extinguish Anonymous
proved to be the proverbial last straw on the camel’s back.
● Anonymous find a SQL Injection:
– http://www.hbgaryfederal.com/pages.php?pageNav=2&page=
27
● Passwords were hashed but Aaron just used lower case and
numbers.
● Access CMS. Social engineer to reset email password and
access SSH. (Aaron used same password for many services!)
● http://arstechnica.com/tech-policy/2011/02/anonymous-speaks-the
-inside-story-of-the-hbgary-hack/
A1 – Famous SQL Injection II
3/5/15 - 12:52:47 AM
● SQL Injection
● Blind SQLi
– We only can use queries that retrieve a boolean value
(true or false).
– It's very slow
– Binary search to enhance performance
● Time based SQLi
– Based on heavy queries (sleep)
– Very slow
A1 – SQL Injection Types
3/5/15 - 12:52:47 AM
● Database engine has a metadata, catalog, schema or
something like that
● This catalog stores all database metainformation (table
relations, database exists, columns names with length +
datatype, …)
● Is mandatory know the catalog of the vulnerable app to
perform a pentesting
A1 – SQL Injection Walkthrough I
3/5/15 - 12:52:47 AM
● Search vulnerability (test app request and check
params)
– Number of columns
– Database names
● table names
– Column names
● Dump or insert data
● Download files
● Upload webshell
A1 – SQL Injection Walkthrough II
3/5/15 - 12:52:47 AM
● MySQL Catalog
– Retrieve databases: SELECT schema_name FROM
information_schema.SCHEMATA;
– Retrieve tables from specific database: SELECT
table_schema, table_name FROM
information_schema.TABLES WHERE table_schema =
'DATABASE';
– Retrieve columns from specific table: SELECT
column_name, column_type FROM
information_schema.columns WHERE table_name =
'TABLE' AND table_schema = 'DATABASE';
A1 – SQL Injection Walkthrough III
3/5/15 - 12:52:47 AM
A1 – SQL Injection Hacking Time :)
3/5/15 - 12:52:47 AM
Some Question??
THANKS!!
● Jose Mato
– http://josemato.name
– @security4dev
– https://github.com/josemato/
– https://www.linkedin.com/in/josematomarino

Contenu connexe

Tendances

SQL Injection 101 : It is not just about ' or '1'='1 - Pichaya Morimoto
SQL Injection 101 : It is not just about ' or '1'='1 - Pichaya MorimotoSQL Injection 101 : It is not just about ' or '1'='1 - Pichaya Morimoto
SQL Injection 101 : It is not just about ' or '1'='1 - Pichaya MorimotoPichaya Morimoto
 
SQL injection prevention techniques
SQL injection prevention techniquesSQL injection prevention techniques
SQL injection prevention techniquesSongchaiDuangpan
 
seminar report on Sql injection
seminar report on Sql injectionseminar report on Sql injection
seminar report on Sql injectionJawhar Ali
 
Defcon 17-joseph mccray-adv-sql_injection
Defcon 17-joseph mccray-adv-sql_injectionDefcon 17-joseph mccray-adv-sql_injection
Defcon 17-joseph mccray-adv-sql_injectionAhmed AbdelSatar
 
Advanced Sql Injection ENG
Advanced Sql Injection ENGAdvanced Sql Injection ENG
Advanced Sql Injection ENGDmitry Evteev
 
What is advanced SQL Injection? Infographic
What is advanced SQL Injection? InfographicWhat is advanced SQL Injection? Infographic
What is advanced SQL Injection? InfographicJW CyberNerd
 
SQL Injection: complete walkthrough (not only) for PHP developers
SQL Injection: complete walkthrough (not only) for PHP developersSQL Injection: complete walkthrough (not only) for PHP developers
SQL Injection: complete walkthrough (not only) for PHP developersKrzysztof Kotowicz
 
SQL Injection - Mozilla Security Learning Center
SQL Injection - Mozilla Security Learning CenterSQL Injection - Mozilla Security Learning Center
SQL Injection - Mozilla Security Learning CenterMichael Coates
 
XSS And SQL Injection Vulnerabilities
XSS And SQL Injection VulnerabilitiesXSS And SQL Injection Vulnerabilities
XSS And SQL Injection VulnerabilitiesMindfire Solutions
 
SQL Injection Attack Detection and Prevention Techniques to Secure Web-Site
SQL Injection Attack Detection and Prevention Techniques to Secure Web-SiteSQL Injection Attack Detection and Prevention Techniques to Secure Web-Site
SQL Injection Attack Detection and Prevention Techniques to Secure Web-Siteijtsrd
 
SQL Injections - A Powerpoint Presentation
SQL Injections - A Powerpoint PresentationSQL Injections - A Powerpoint Presentation
SQL Injections - A Powerpoint PresentationRapid Purple
 
What is SQL Injection Attack | How to prevent SQL Injection Attacks? | Cybers...
What is SQL Injection Attack | How to prevent SQL Injection Attacks? | Cybers...What is SQL Injection Attack | How to prevent SQL Injection Attacks? | Cybers...
What is SQL Injection Attack | How to prevent SQL Injection Attacks? | Cybers...Edureka!
 
Sql Injection attacks and prevention
Sql Injection attacks and preventionSql Injection attacks and prevention
Sql Injection attacks and preventionhelloanand
 
Web application attacks using Sql injection and countermasures
Web application attacks using Sql injection and countermasuresWeb application attacks using Sql injection and countermasures
Web application attacks using Sql injection and countermasuresCade Zvavanjanja
 
A Brief Introduction in SQL Injection
A Brief Introduction in SQL InjectionA Brief Introduction in SQL Injection
A Brief Introduction in SQL InjectionSina Manavi
 
Advanced SQL Injection
Advanced SQL InjectionAdvanced SQL Injection
Advanced SQL Injectionamiable_indian
 

Tendances (20)

SQL Injection 101 : It is not just about ' or '1'='1 - Pichaya Morimoto
SQL Injection 101 : It is not just about ' or '1'='1 - Pichaya MorimotoSQL Injection 101 : It is not just about ' or '1'='1 - Pichaya Morimoto
SQL Injection 101 : It is not just about ' or '1'='1 - Pichaya Morimoto
 
SQL injection prevention techniques
SQL injection prevention techniquesSQL injection prevention techniques
SQL injection prevention techniques
 
SQL Injection Defense in Python
SQL Injection Defense in PythonSQL Injection Defense in Python
SQL Injection Defense in Python
 
seminar report on Sql injection
seminar report on Sql injectionseminar report on Sql injection
seminar report on Sql injection
 
Defcon 17-joseph mccray-adv-sql_injection
Defcon 17-joseph mccray-adv-sql_injectionDefcon 17-joseph mccray-adv-sql_injection
Defcon 17-joseph mccray-adv-sql_injection
 
Advanced Sql Injection ENG
Advanced Sql Injection ENGAdvanced Sql Injection ENG
Advanced Sql Injection ENG
 
What is advanced SQL Injection? Infographic
What is advanced SQL Injection? InfographicWhat is advanced SQL Injection? Infographic
What is advanced SQL Injection? Infographic
 
SQL Injection: complete walkthrough (not only) for PHP developers
SQL Injection: complete walkthrough (not only) for PHP developersSQL Injection: complete walkthrough (not only) for PHP developers
SQL Injection: complete walkthrough (not only) for PHP developers
 
SQL Injection - Mozilla Security Learning Center
SQL Injection - Mozilla Security Learning CenterSQL Injection - Mozilla Security Learning Center
SQL Injection - Mozilla Security Learning Center
 
XSS And SQL Injection Vulnerabilities
XSS And SQL Injection VulnerabilitiesXSS And SQL Injection Vulnerabilities
XSS And SQL Injection Vulnerabilities
 
SQL Injection Attack Detection and Prevention Techniques to Secure Web-Site
SQL Injection Attack Detection and Prevention Techniques to Secure Web-SiteSQL Injection Attack Detection and Prevention Techniques to Secure Web-Site
SQL Injection Attack Detection and Prevention Techniques to Secure Web-Site
 
SQL Injections - A Powerpoint Presentation
SQL Injections - A Powerpoint PresentationSQL Injections - A Powerpoint Presentation
SQL Injections - A Powerpoint Presentation
 
What is SQL Injection Attack | How to prevent SQL Injection Attacks? | Cybers...
What is SQL Injection Attack | How to prevent SQL Injection Attacks? | Cybers...What is SQL Injection Attack | How to prevent SQL Injection Attacks? | Cybers...
What is SQL Injection Attack | How to prevent SQL Injection Attacks? | Cybers...
 
Sql Injection attacks and prevention
Sql Injection attacks and preventionSql Injection attacks and prevention
Sql Injection attacks and prevention
 
Sql injection
Sql injectionSql injection
Sql injection
 
Web application attacks using Sql injection and countermasures
Web application attacks using Sql injection and countermasuresWeb application attacks using Sql injection and countermasures
Web application attacks using Sql injection and countermasures
 
A Brief Introduction in SQL Injection
A Brief Introduction in SQL InjectionA Brief Introduction in SQL Injection
A Brief Introduction in SQL Injection
 
SQL Injection
SQL Injection SQL Injection
SQL Injection
 
Advanced SQL Injection
Advanced SQL InjectionAdvanced SQL Injection
Advanced SQL Injection
 
How To Detect Xss
How To Detect XssHow To Detect Xss
How To Detect Xss
 

En vedette

Evolution Of Web Security
Evolution Of Web SecurityEvolution Of Web Security
Evolution Of Web SecurityChris Shiflett
 
Discovering the Value of Verifying Web Application Security Using IBM Rationa...
Discovering the Value of Verifying Web Application Security Using IBM Rationa...Discovering the Value of Verifying Web Application Security Using IBM Rationa...
Discovering the Value of Verifying Web Application Security Using IBM Rationa...Alan Kan
 
WEB APPLICATION VULNERABILITIES: DAWN, DETECTION, EXPLOITATION AND DEFENSE
WEB APPLICATION VULNERABILITIES: DAWN, DETECTION, EXPLOITATION AND DEFENSEWEB APPLICATION VULNERABILITIES: DAWN, DETECTION, EXPLOITATION AND DEFENSE
WEB APPLICATION VULNERABILITIES: DAWN, DETECTION, EXPLOITATION AND DEFENSEAjith Kp
 
Web Security
Web SecurityWeb Security
Web SecurityTripad M
 
IBM Security Software Solutions - Powerpoint
 IBM Security Software Solutions - Powerpoint IBM Security Software Solutions - Powerpoint
IBM Security Software Solutions - PowerpointThierry Matusiak
 

En vedette (7)

Evolution Of Web Security
Evolution Of Web SecurityEvolution Of Web Security
Evolution Of Web Security
 
Discovering the Value of Verifying Web Application Security Using IBM Rationa...
Discovering the Value of Verifying Web Application Security Using IBM Rationa...Discovering the Value of Verifying Web Application Security Using IBM Rationa...
Discovering the Value of Verifying Web Application Security Using IBM Rationa...
 
WEB APPLICATION VULNERABILITIES: DAWN, DETECTION, EXPLOITATION AND DEFENSE
WEB APPLICATION VULNERABILITIES: DAWN, DETECTION, EXPLOITATION AND DEFENSEWEB APPLICATION VULNERABILITIES: DAWN, DETECTION, EXPLOITATION AND DEFENSE
WEB APPLICATION VULNERABILITIES: DAWN, DETECTION, EXPLOITATION AND DEFENSE
 
Web Security
Web SecurityWeb Security
Web Security
 
NTXISSACSC4 - Layered Security / Defense in Depth
NTXISSACSC4 - Layered Security / Defense in DepthNTXISSACSC4 - Layered Security / Defense in Depth
NTXISSACSC4 - Layered Security / Defense in Depth
 
Application Security: Last Line of Defense
Application Security: Last Line of DefenseApplication Security: Last Line of Defense
Application Security: Last Line of Defense
 
IBM Security Software Solutions - Powerpoint
 IBM Security Software Solutions - Powerpoint IBM Security Software Solutions - Powerpoint
IBM Security Software Solutions - Powerpoint
 

Similaire à Web Security attacks and defense

Security .NET.pdf
Security .NET.pdfSecurity .NET.pdf
Security .NET.pdfAbhi Jain
 
Mr. Mohammed Aldoub - A case study of django web applications that are secur...
Mr. Mohammed Aldoub  - A case study of django web applications that are secur...Mr. Mohammed Aldoub  - A case study of django web applications that are secur...
Mr. Mohammed Aldoub - A case study of django web applications that are secur...nooralmousa
 
Case Study of Django: Web Frameworks that are Secure by Default
Case Study of Django: Web Frameworks that are Secure by DefaultCase Study of Django: Web Frameworks that are Secure by Default
Case Study of Django: Web Frameworks that are Secure by DefaultMohammed ALDOUB
 
Security Best Practices for Bot Builders
Security Best Practices for Bot BuildersSecurity Best Practices for Bot Builders
Security Best Practices for Bot BuildersMax Feldman
 
WordPress Security 101 – WordCamp Finland 2016 presentation by Otto Kekäläine...
WordPress Security 101 – WordCamp Finland 2016 presentation by Otto Kekäläine...WordPress Security 101 – WordCamp Finland 2016 presentation by Otto Kekäläine...
WordPress Security 101 – WordCamp Finland 2016 presentation by Otto Kekäläine...Otto Kekäläinen
 
Django (Web Applications that are Secure by Default)
Django �(Web Applications that are Secure by Default�)Django �(Web Applications that are Secure by Default�)
Django (Web Applications that are Secure by Default)Kishor Kumar
 
CiNPA Security SIG - Exploiting the Tiredful API
CiNPA Security SIG - Exploiting the Tiredful APICiNPA Security SIG - Exploiting the Tiredful API
CiNPA Security SIG - Exploiting the Tiredful APIThreatReel Podcast
 
PwnSchool: Exploiting Web APIs
PwnSchool: Exploiting Web APIsPwnSchool: Exploiting Web APIs
PwnSchool: Exploiting Web APIsThreatReel Podcast
 
13.02 Network Security
13.02   Network Security13.02   Network Security
13.02 Network SecurityAnjan Mahanta
 
Insecurity-In-Security version.1 (2010)
Insecurity-In-Security version.1 (2010)Insecurity-In-Security version.1 (2010)
Insecurity-In-Security version.1 (2010)Abhishek Kumar
 
Andrews whitakrer lecture18-security.ppt
Andrews whitakrer lecture18-security.pptAndrews whitakrer lecture18-security.ppt
Andrews whitakrer lecture18-security.pptSilverGold16
 
Awareness Guide For Social Media Influencers - Influencers Meetup - CyberForg...
Awareness Guide For Social Media Influencers - Influencers Meetup - CyberForg...Awareness Guide For Social Media Influencers - Influencers Meetup - CyberForg...
Awareness Guide For Social Media Influencers - Influencers Meetup - CyberForg...cyberforgeacademy
 
Introduction To ICT Security Audit OWASP Day Malaysia 2011
Introduction To ICT Security Audit OWASP Day Malaysia 2011Introduction To ICT Security Audit OWASP Day Malaysia 2011
Introduction To ICT Security Audit OWASP Day Malaysia 2011Linuxmalaysia Malaysia
 
Alexey Sintsov. Honeypot that Can Bite: Reverse Penetration.
Alexey Sintsov. Honeypot that Can Bite: Reverse Penetration.Alexey Sintsov. Honeypot that Can Bite: Reverse Penetration.
Alexey Sintsov. Honeypot that Can Bite: Reverse Penetration.Positive Hack Days
 

Similaire à Web Security attacks and defense (20)

Owasp top 10 2013
Owasp top 10 2013Owasp top 10 2013
Owasp top 10 2013
 
Security .NET.pdf
Security .NET.pdfSecurity .NET.pdf
Security .NET.pdf
 
SecureWV: Exploiting Web APIs
SecureWV: Exploiting Web APIsSecureWV: Exploiting Web APIs
SecureWV: Exploiting Web APIs
 
Mr. Mohammed Aldoub - A case study of django web applications that are secur...
Mr. Mohammed Aldoub  - A case study of django web applications that are secur...Mr. Mohammed Aldoub  - A case study of django web applications that are secur...
Mr. Mohammed Aldoub - A case study of django web applications that are secur...
 
Case Study of Django: Web Frameworks that are Secure by Default
Case Study of Django: Web Frameworks that are Secure by DefaultCase Study of Django: Web Frameworks that are Secure by Default
Case Study of Django: Web Frameworks that are Secure by Default
 
Security Best Practices for Bot Builders
Security Best Practices for Bot BuildersSecurity Best Practices for Bot Builders
Security Best Practices for Bot Builders
 
Flipping the script
Flipping the scriptFlipping the script
Flipping the script
 
WordPress Security 101 – WordCamp Finland 2016 presentation by Otto Kekäläine...
WordPress Security 101 – WordCamp Finland 2016 presentation by Otto Kekäläine...WordPress Security 101 – WordCamp Finland 2016 presentation by Otto Kekäläine...
WordPress Security 101 – WordCamp Finland 2016 presentation by Otto Kekäläine...
 
Django (Web Applications that are Secure by Default)
Django �(Web Applications that are Secure by Default�)Django �(Web Applications that are Secure by Default�)
Django (Web Applications that are Secure by Default)
 
CiNPA Security SIG - Exploiting the Tiredful API
CiNPA Security SIG - Exploiting the Tiredful APICiNPA Security SIG - Exploiting the Tiredful API
CiNPA Security SIG - Exploiting the Tiredful API
 
Password Pusher Media Resources
Password Pusher Media ResourcesPassword Pusher Media Resources
Password Pusher Media Resources
 
Sql securitytesting
Sql  securitytestingSql  securitytesting
Sql securitytesting
 
PwnSchool: Exploiting Web APIs
PwnSchool: Exploiting Web APIsPwnSchool: Exploiting Web APIs
PwnSchool: Exploiting Web APIs
 
13.02 Network Security
13.02   Network Security13.02   Network Security
13.02 Network Security
 
Insecurity-In-Security version.1 (2010)
Insecurity-In-Security version.1 (2010)Insecurity-In-Security version.1 (2010)
Insecurity-In-Security version.1 (2010)
 
How to hack or what is ethical hacking
How to hack or what is ethical hackingHow to hack or what is ethical hacking
How to hack or what is ethical hacking
 
Andrews whitakrer lecture18-security.ppt
Andrews whitakrer lecture18-security.pptAndrews whitakrer lecture18-security.ppt
Andrews whitakrer lecture18-security.ppt
 
Awareness Guide For Social Media Influencers - Influencers Meetup - CyberForg...
Awareness Guide For Social Media Influencers - Influencers Meetup - CyberForg...Awareness Guide For Social Media Influencers - Influencers Meetup - CyberForg...
Awareness Guide For Social Media Influencers - Influencers Meetup - CyberForg...
 
Introduction To ICT Security Audit OWASP Day Malaysia 2011
Introduction To ICT Security Audit OWASP Day Malaysia 2011Introduction To ICT Security Audit OWASP Day Malaysia 2011
Introduction To ICT Security Audit OWASP Day Malaysia 2011
 
Alexey Sintsov. Honeypot that Can Bite: Reverse Penetration.
Alexey Sintsov. Honeypot that Can Bite: Reverse Penetration.Alexey Sintsov. Honeypot that Can Bite: Reverse Penetration.
Alexey Sintsov. Honeypot that Can Bite: Reverse Penetration.
 

Dernier

The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdfThe workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdfSenaatti-kiinteistöt
 
Causes of poverty in France presentation.pptx
Causes of poverty in France presentation.pptxCauses of poverty in France presentation.pptx
Causes of poverty in France presentation.pptxCamilleBoulbin1
 
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...amilabibi1
 
Dreaming Marissa Sánchez Music Video Treatment
Dreaming Marissa Sánchez Music Video TreatmentDreaming Marissa Sánchez Music Video Treatment
Dreaming Marissa Sánchez Music Video Treatmentnswingard
 
Thirunelveli call girls Tamil escorts 7877702510
Thirunelveli call girls Tamil escorts 7877702510Thirunelveli call girls Tamil escorts 7877702510
Thirunelveli call girls Tamil escorts 7877702510Vipesco
 
Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...
Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...
Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...Delhi Call girls
 
Aesthetic Colaba Mumbai Cst Call girls 📞 7738631006 Grant road Call Girls ❤️-...
Aesthetic Colaba Mumbai Cst Call girls 📞 7738631006 Grant road Call Girls ❤️-...Aesthetic Colaba Mumbai Cst Call girls 📞 7738631006 Grant road Call Girls ❤️-...
Aesthetic Colaba Mumbai Cst Call girls 📞 7738631006 Grant road Call Girls ❤️-...Pooja Nehwal
 
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptxChiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptxraffaeleoman
 
My Presentation "In Your Hands" by Halle Bailey
My Presentation "In Your Hands" by Halle BaileyMy Presentation "In Your Hands" by Halle Bailey
My Presentation "In Your Hands" by Halle Baileyhlharris
 
Dreaming Music Video Treatment _ Project & Portfolio III
Dreaming Music Video Treatment _ Project & Portfolio IIIDreaming Music Video Treatment _ Project & Portfolio III
Dreaming Music Video Treatment _ Project & Portfolio IIINhPhngng3
 
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdfAWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdfSkillCertProExams
 
If this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New NigeriaIf this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New NigeriaKayode Fayemi
 
Uncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac FolorunsoUncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac FolorunsoKayode Fayemi
 
lONG QUESTION ANSWER PAKISTAN STUDIES10.
lONG QUESTION ANSWER PAKISTAN STUDIES10.lONG QUESTION ANSWER PAKISTAN STUDIES10.
lONG QUESTION ANSWER PAKISTAN STUDIES10.lodhisaajjda
 
Digital collaboration with Microsoft 365 as extension of Drupal
Digital collaboration with Microsoft 365 as extension of DrupalDigital collaboration with Microsoft 365 as extension of Drupal
Digital collaboration with Microsoft 365 as extension of DrupalFabian de Rijk
 
Report Writing Webinar Training
Report Writing Webinar TrainingReport Writing Webinar Training
Report Writing Webinar TrainingKylaCullinane
 
Sector 62, Noida Call girls :8448380779 Noida Escorts | 100% verified
Sector 62, Noida Call girls :8448380779 Noida Escorts | 100% verifiedSector 62, Noida Call girls :8448380779 Noida Escorts | 100% verified
Sector 62, Noida Call girls :8448380779 Noida Escorts | 100% verifiedDelhi Call girls
 

Dernier (18)

ICT role in 21st century education and it's challenges.pdf
ICT role in 21st century education and it's challenges.pdfICT role in 21st century education and it's challenges.pdf
ICT role in 21st century education and it's challenges.pdf
 
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdfThe workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
 
Causes of poverty in France presentation.pptx
Causes of poverty in France presentation.pptxCauses of poverty in France presentation.pptx
Causes of poverty in France presentation.pptx
 
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
 
Dreaming Marissa Sánchez Music Video Treatment
Dreaming Marissa Sánchez Music Video TreatmentDreaming Marissa Sánchez Music Video Treatment
Dreaming Marissa Sánchez Music Video Treatment
 
Thirunelveli call girls Tamil escorts 7877702510
Thirunelveli call girls Tamil escorts 7877702510Thirunelveli call girls Tamil escorts 7877702510
Thirunelveli call girls Tamil escorts 7877702510
 
Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...
Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...
Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...
 
Aesthetic Colaba Mumbai Cst Call girls 📞 7738631006 Grant road Call Girls ❤️-...
Aesthetic Colaba Mumbai Cst Call girls 📞 7738631006 Grant road Call Girls ❤️-...Aesthetic Colaba Mumbai Cst Call girls 📞 7738631006 Grant road Call Girls ❤️-...
Aesthetic Colaba Mumbai Cst Call girls 📞 7738631006 Grant road Call Girls ❤️-...
 
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptxChiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
 
My Presentation "In Your Hands" by Halle Bailey
My Presentation "In Your Hands" by Halle BaileyMy Presentation "In Your Hands" by Halle Bailey
My Presentation "In Your Hands" by Halle Bailey
 
Dreaming Music Video Treatment _ Project & Portfolio III
Dreaming Music Video Treatment _ Project & Portfolio IIIDreaming Music Video Treatment _ Project & Portfolio III
Dreaming Music Video Treatment _ Project & Portfolio III
 
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdfAWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
 
If this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New NigeriaIf this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New Nigeria
 
Uncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac FolorunsoUncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac Folorunso
 
lONG QUESTION ANSWER PAKISTAN STUDIES10.
lONG QUESTION ANSWER PAKISTAN STUDIES10.lONG QUESTION ANSWER PAKISTAN STUDIES10.
lONG QUESTION ANSWER PAKISTAN STUDIES10.
 
Digital collaboration with Microsoft 365 as extension of Drupal
Digital collaboration with Microsoft 365 as extension of DrupalDigital collaboration with Microsoft 365 as extension of Drupal
Digital collaboration with Microsoft 365 as extension of Drupal
 
Report Writing Webinar Training
Report Writing Webinar TrainingReport Writing Webinar Training
Report Writing Webinar Training
 
Sector 62, Noida Call girls :8448380779 Noida Escorts | 100% verified
Sector 62, Noida Call girls :8448380779 Noida Escorts | 100% verifiedSector 62, Noida Call girls :8448380779 Noida Escorts | 100% verified
Sector 62, Noida Call girls :8448380779 Noida Escorts | 100% verified
 

Web Security attacks and defense

  • 1. Web Security ● Jose Mato Mariño
  • 2. 3/5/15 - 12:52:45 AM Who am I? ● Web Developer ● Web security as hobby ● http://josemato.name ● @security4dev
  • 3. 3/5/15 - 12:52:46 AM Is mandatory know web security to do a web? ● YES, If someone hacks your your server... you, developer, are screwed – Read logs, …, a lot of logs – Sometimes is difficult know what was happening – Web security is easier than computer forensic ● Your client – Angry – Lost branding and reputation
  • 4. 3/5/15 - 12:52:46 AM Why cybercriminals want my server ??? ● SPAM ● BitCoins ● Phishing ● Botnet ● Ransomware ● Data theft
  • 5. 3/5/15 - 12:52:46 AM ● Online community dedicated to web application security ● Guide practices and recommendations to be considered secure application development ● OWASP TOP 10
  • 6. 3/5/15 - 12:52:46 AM OWASP TOP 10 – From 2010 to 2013
  • 7. 3/5/15 - 12:52:46 AM A3 – Cross Site Scripting (XSS) ● Problem: User injects code ( ActiveX, Java, VBScript, Flash, HTML but typically javascript) into webpage ● Attacks: – Access user session (session hijacking) – Redirect user to exploit kit (blackhole) – Defacement. Phishing. – Network ip + ports scanner ● We have 5 contexts to exploit XSS ● There are two types of XSS
  • 8. 3/5/15 - 12:52:46 AM A3 – XSS Context ● Context (by Ashar Javed @soaj1664ashar): "Context is an environment where user supplied input or input from other application(s) eventually ends-up or start living" ● Type of contexts: – HTML context (<title>XXS</title>) – Attribute context (input value=”XSS”) – Script context (<script>var a = “<?php echo XSS ?>”</script>) – URL context (write server variable to src, href, data flash, etc) – Style context (div style=”XSS” => custom editors)
  • 9. 3/5/15 - 12:52:46 AM ● Reflective – Code is not store on any database or database repo – Payload must be on get parameter (discussion) – User needs to click on a malicious link ● Persistent – Code is store on a persistent store (database) – When user enter on a hacked page, he will exec the xploit A3 – XSS Types
  • 10. 3/5/15 - 12:52:46 AM ● http://www.elmundo.es/elmundo/2010/01/04/union_europea/1262 610678.html A3 – Famous XSS “Mr. Bean 'se cuela' en la web oficial de la presidencia española”
  • 11. 3/5/15 - 12:52:47 AM XSS DEMO I ● Check if there is some XSS ● Get access to user account
  • 12. 3/5/15 - 12:52:47 AM ● Never trust on user input (inbound & outbound) ● Sanitize all inputs ● Enable flag httpOnly on cookies ● Content Security Policy (CSP) A3 – XSS Mitigation
  • 13. 3/5/15 - 12:52:47 AM ● Access to not allowed resources ● Application fail to check if user is authorized to access to the resource ● Common scenario: – http://websecurity-demo.local/transcript.php?student=1536 ● Attacker see a parameter and know that “1536” is his student id ● Attacker change this student id and get the content of another student ● This parameter could be anywhere (get, post, cookie, …) A4 – Insecure Direct Object References
  • 14. 3/5/15 - 12:52:47 AM ● Technique to alter queries into engine store through vulnerable application ● Mysql, MSQL, Postgres, LDAP, Access, Oracle, … ● We are going to focus on SQLi in this talk ● Many kind of SQLi A1 – Injection
  • 15. 3/5/15 - 12:52:47 AM ● Access personal data. Dump database ● Dump local users (/etc/passwd) ● Access organization CMS ● Site infection – malware propagation – Click abuse A1 – SQL Injection Goals
  • 16. 3/5/15 - 12:52:47 AM ● Lilupophilupop SQL Injection Attack Tops 1 Million Infected URLs – Search SQL Injection on ASP or ColdFusion pages with Microsoft SQL Server – More than one million url infected – the attackers used XSS Persistent to redirect users to pages showing fake computer issues to buy a fake AV ● http://threatpost.com/lilupophilupop-sql-injection-attack -tops-1-million-infected-urls-010412/76054 A1 – Famous SQL Injection I
  • 17. 3/5/15 - 12:52:47 AM ● Barr’s claims that he would unmask and extinguish Anonymous proved to be the proverbial last straw on the camel’s back. ● Anonymous find a SQL Injection: – http://www.hbgaryfederal.com/pages.php?pageNav=2&page= 27 ● Passwords were hashed but Aaron just used lower case and numbers. ● Access CMS. Social engineer to reset email password and access SSH. (Aaron used same password for many services!) ● http://arstechnica.com/tech-policy/2011/02/anonymous-speaks-the -inside-story-of-the-hbgary-hack/ A1 – Famous SQL Injection II
  • 18. 3/5/15 - 12:52:47 AM ● SQL Injection ● Blind SQLi – We only can use queries that retrieve a boolean value (true or false). – It's very slow – Binary search to enhance performance ● Time based SQLi – Based on heavy queries (sleep) – Very slow A1 – SQL Injection Types
  • 19. 3/5/15 - 12:52:47 AM ● Database engine has a metadata, catalog, schema or something like that ● This catalog stores all database metainformation (table relations, database exists, columns names with length + datatype, …) ● Is mandatory know the catalog of the vulnerable app to perform a pentesting A1 – SQL Injection Walkthrough I
  • 20. 3/5/15 - 12:52:47 AM ● Search vulnerability (test app request and check params) – Number of columns – Database names ● table names – Column names ● Dump or insert data ● Download files ● Upload webshell A1 – SQL Injection Walkthrough II
  • 21. 3/5/15 - 12:52:47 AM ● MySQL Catalog – Retrieve databases: SELECT schema_name FROM information_schema.SCHEMATA; – Retrieve tables from specific database: SELECT table_schema, table_name FROM information_schema.TABLES WHERE table_schema = 'DATABASE'; – Retrieve columns from specific table: SELECT column_name, column_type FROM information_schema.columns WHERE table_name = 'TABLE' AND table_schema = 'DATABASE'; A1 – SQL Injection Walkthrough III
  • 22. 3/5/15 - 12:52:47 AM A1 – SQL Injection Hacking Time :)
  • 23. 3/5/15 - 12:52:47 AM Some Question?? THANKS!! ● Jose Mato – http://josemato.name – @security4dev – https://github.com/josemato/ – https://www.linkedin.com/in/josematomarino