SlideShare a Scribd company logo
1 of 28
To be Hacked
or
not to be Hacked!
Vincci Kwong and Gary Browning
Indiana University South Bend
Indiana Library Federation Annual Conference

October 22, 2013
https://www.youtube.com/watch?v=lw7dt0AhXXI

2013 ILF Annual Conference

October 22, 2013
What are Web Applications?

2013 ILF Annual Conference

October 22, 2013
What is PHP?
• A server-side scripting language
designed for web development
• Open source programming language
• Powering over 80% of all websites
• PHP code is as secure as the
programmer writes it

2013 ILF Annual Conference

October 22, 2013
Why hack web applications?
•
•
•
•
•
•
•
•

Stealing sensitive information
Defacement
Planting malware
Deceit
Blackmail
Link Spam
Worms
Phishing

2013 ILF Annual Conference

October 22, 2013
Why secure web applications?
• Everyone can touch web applications!
• It is hard to secure!!!

2013 ILF Annual Conference

October 22, 2013
Am I being hacked?
•
•
•
•

Check your server access logs
Look for recently modified files
Look for files that shouldn’t be there
Scan through your files

2013 ILF Annual Conference

October 22, 2013
Top 10 security issues for web
applications
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.

Injection
Broken authentication and session management
Cross site scripting (XSS)
Insecure direct object references
Security misconfiguration
Sensitive data exposure
Missing function level access control
Cross site request forgeries (CSFR)
Using known vulnerable components
Unvalidated redirects and forwards

2013 ILF Annual Conference

October 22, 2013
What can I do?
• Write secure code!!
• Use PHP Security Cheat Sheet
• Use a web application scanner

2013 ILF Annual Conference

October 22, 2013
Writing Secure Code
•
•
•
•
•
•

Do not trust visitors to your website
Understand Register Globals
Error messages
SQL Injections
File Manipulation
XSS

2013 ILF Annual Conference

October 22, 2013
Register Globals
• Feature removed as of PHP 5.4.0 !!!! 
• Variables from HTML forms were injected
into code automatically
• Remember, PHP does not require
variable initialization

2013 ILF Annual Conference

October 22, 2013
Example: Misuse with
register_globals = on
<?php
// define $authorized = true only if user is authenticated
if (authenticated_user()) {
$authorized = true;
}

if ($authorized) {
include "/highly/sensitive/data.php";
}
?>

2013 ILF Annual Conference

October 22, 2013
Example: Misuse with
register_globals = on
<?php
// define $authorized = true only if user is authenticated
if (authenticated_user()) {
$authorized = true;
}

// Because we didn't first initialize $authorized as false, this might be
// defined through register_globals, like from GET auth.php?authorized=1
// So, anyone can be seen as authenticated!
if ($authorized) {
include "/highly/sensitive/data.php";
}
?>

2013 ILF Annual Conference

October 22, 2013
SQL Injections
SQL injection is a code injection technique,
used to attack data driven applications, in
which malicious SQL statements are
inserted into an entry field for execution
(e.g. to dump the database contents to the
attacker). ...
http://en.wikipedia.org/wiki/SQL_injection

2013 ILF Annual Conference

October 22, 2013
Example: SQL Injection
$proceed = mysql_query("SELECT
Username, Password, AccessLVL FROM Users WHERE Username
= '".$_POST['username']."' and Password =
'".$_POST['password']."'");
From a web form, someone inputs the following:
USERNAME: ' OR 1=1 #

2013 ILF Annual Conference

October 22, 2013
Example: SQL Injection
$proceed = mysql_query("SELECT Username, Password,
AccessLVL FROM Users WHERE Username =
'".$_POST['username']."' and Password = '".$_POST['password']."'");

SQL Query:
SELECT Username, Password, AccessLVL FROM Users WHERE
Username = ’’ OR 1=1 #’ and Password = ’’

2013 ILF Annual Conference

October 22, 2013
Example: SQL Injection
$proceed = mysql_query("SELECT Username, Password, AccessLVL
FROM Users WHERE Username = '".$_POST['username']."' and
Password = '".$_POST['password']."'");
SQL Query:
SELECT Username, Password, AccessLVL FROM Users WHERE
Username = ’’ OR 1=1 #’ and Password = ’’
This will return the entire list of usernames and passwords !!!!
Fix this using mysql_real_escape_string or
mysqli_real_escape_string

2013 ILF Annual Conference

October 22, 2013
File Manipulation
some.web.address/index.php?index.html

2013 ILF Annual Conference

October 22, 2013
File Manipulation
some.web.address/index.php?.htaccess

2013 ILF Annual Conference

October 22, 2013
XSS
(imagine the following code in your index.php file)
<?php
$name = $_GET['name'];
echo "Welcome $name<br>";
echo "<a href="http://librarysite.org/">Click to visit</a>";
?>
If someone entered the following on a web form, what would happen?

guest<script>alert('attacked')</script>

2013 ILF Annual Conference

October 22, 2013
XSS
Would you trust this URL if you saw the link on a website (assume you are
familiar with ‘mytrustedsite.org’?
mytrustedsite.org/index.php?name=<script>window.onload = function() {var
link=document.getElementsByTagName("a");link[0].href="http://not-realtrustedsite.com/";}</script>

2013 ILF Annual Conference

October 22, 2013
XSS
Would you trust this URL if you saw the link on a website (assume you are
familiar with ‘mytrustedsite.org’?
mytrustedsite.org/index.php?name=%3c%73%63%72%69%70%74%3e%77
%69%6e%64%6f%77%2e%6f%6e%6c%6f%61%64%20%3d%20%66%75
%6e%63%74%69%6f%6e%28%29%20%7b%76%61%72%20%6c%69%6e
%6b%3d%64%6f%63%75%6d%65%6e%74%2e%67%65%74%45%6c%65
%6d%65%6e%74%73%42%79%54%61%67%4e%61%6d%65%28%22%6
1%22%29%3b%6c%69%6e%6b%5b%30%5d%2e%68%72%65%66%3d%2
2%68%74%74%70%3a%2f%2f%61%74%74%61%63%6b%65%72%2d%7
3%69%74%65%2e%63%6f%6d%2f%22%3b%7d%3c%2f%73%63%72%69
%70%74%3e

2013 ILF Annual Conference

October 22, 2013
Web Application Scanners
https://www.owasp.org/index.php/Category:
Vulnerability_Scanning_Tools
Contains a list of Open Source and
Commercial products

2013 ILF Annual Conference

October 22, 2013
It’s not in the Top 10, but…
• Unvalidated inputs

2013 ILF Annual Conference

October 22, 2013
Reporting a hacked site!
• Why do you think the website is being hacked?
• What on the website is looking unusual? Did you
clear your browser’s cache?
• Are you being redirected to another website? If
yes, note URL of the site.
• Were you being asked to provide confidential
information?
• Do patrons report receiving unusual email from
the library?
• When did it happen?
2013 ILF Annual Conference

October 22, 2013
Emergency contact list
•
•
•
•

Library IT personnel
Director/Dean of the Library
Vendors
Patrons

2013 ILF Annual Conference

October 22, 2013
Resources
• PHP Security Cheat Sheet https://www.owasp.org/index.php/PHP_S
ecurity_Cheat_Sheet
• PHP Security Guide http://phpsec.org/projects/guide/
• Securing PHP Web Applications http://www.amazon.com/Securing-PHPApplications-TriciaBallad/dp/0321534344
2013 ILF Annual Conference

October 22, 2013
Questions?
Feel free to contact us at
• Vincci Kwong
• Email: vkwong@iusb.edu
• Phone: 574-520-4444

• Gary Browning
• Email: gary@iusb.edu
• Phone: 574-520-5516

2013 ILF Annual Conference

October 22, 2013

More Related Content

What's hot

Presentation on Top 10 Vulnerabilities in Web Application
Presentation on Top 10 Vulnerabilities in Web ApplicationPresentation on Top 10 Vulnerabilities in Web Application
Presentation on Top 10 Vulnerabilities in Web ApplicationMd Mahfuzur Rahman
 
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
 
Introduction to Web Application Security - Blackhoodie US 2018
Introduction to Web Application Security - Blackhoodie US 2018Introduction to Web Application Security - Blackhoodie US 2018
Introduction to Web Application Security - Blackhoodie US 2018Niranjanaa Ragupathy
 
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
 
04. xss and encoding
04.  xss and encoding04.  xss and encoding
04. xss and encodingEoin Keary
 
ECrime presentation - A few bits about malware
ECrime presentation - A few bits about malwareECrime presentation - A few bits about malware
ECrime presentation - A few bits about malwareMichael Hendrickx
 
VodQA3_PenetrationTesting_AmitDhakkad
VodQA3_PenetrationTesting_AmitDhakkadVodQA3_PenetrationTesting_AmitDhakkad
VodQA3_PenetrationTesting_AmitDhakkadvodQA
 
Web application Security tools
Web application Security toolsWeb application Security tools
Web application Security toolsNico Penaredondo
 
Secure Code Warrior - Cookies and sessions
Secure Code Warrior - Cookies and sessionsSecure Code Warrior - Cookies and sessions
Secure Code Warrior - Cookies and sessionsSecure Code Warrior
 
Mitigate Maliciousness -- jQuery Europe 2013
Mitigate Maliciousness -- jQuery Europe 2013Mitigate Maliciousness -- jQuery Europe 2013
Mitigate Maliciousness -- jQuery Europe 2013Mike West
 
Web Security - Introduction
Web Security - IntroductionWeb Security - Introduction
Web Security - IntroductionSQALab
 
JWT Authentication with AngularJS
JWT Authentication with AngularJSJWT Authentication with AngularJS
JWT Authentication with AngularJSrobertjd
 
Web Security - Introduction v.1.3
Web Security - Introduction v.1.3Web Security - Introduction v.1.3
Web Security - Introduction v.1.3Oles Seheda
 
Django Web Application Security
Django Web Application SecurityDjango Web Application Security
Django Web Application Securitylevigross
 
When Ajax Attacks! Web application security fundamentals
When Ajax Attacks! Web application security fundamentalsWhen Ajax Attacks! Web application security fundamentals
When Ajax Attacks! Web application security fundamentalsSimon Willison
 
Web Security Overview and Demo
Web Security Overview and DemoWeb Security Overview and Demo
Web Security Overview and DemoTony Bibbs
 

What's hot (20)

Presentation on Top 10 Vulnerabilities in Web Application
Presentation on Top 10 Vulnerabilities in Web ApplicationPresentation on Top 10 Vulnerabilities in Web Application
Presentation on Top 10 Vulnerabilities in Web Application
 
Introduction to Cross Site Scripting ( XSS )
Introduction to Cross Site Scripting ( XSS )Introduction to Cross Site Scripting ( XSS )
Introduction to Cross Site Scripting ( XSS )
 
Starwest 2008
Starwest 2008Starwest 2008
Starwest 2008
 
Introduction to Web Application Security - Blackhoodie US 2018
Introduction to Web Application Security - Blackhoodie US 2018Introduction to Web Application Security - Blackhoodie US 2018
Introduction to Web Application Security - Blackhoodie US 2018
 
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)
 
04. xss and encoding
04.  xss and encoding04.  xss and encoding
04. xss and encoding
 
ECrime presentation - A few bits about malware
ECrime presentation - A few bits about malwareECrime presentation - A few bits about malware
ECrime presentation - A few bits about malware
 
PHPUG Presentation
PHPUG PresentationPHPUG Presentation
PHPUG Presentation
 
Web Security 101
Web Security 101Web Security 101
Web Security 101
 
VodQA3_PenetrationTesting_AmitDhakkad
VodQA3_PenetrationTesting_AmitDhakkadVodQA3_PenetrationTesting_AmitDhakkad
VodQA3_PenetrationTesting_AmitDhakkad
 
Web application Security tools
Web application Security toolsWeb application Security tools
Web application Security tools
 
Secure Code Warrior - Cookies and sessions
Secure Code Warrior - Cookies and sessionsSecure Code Warrior - Cookies and sessions
Secure Code Warrior - Cookies and sessions
 
Mitigate Maliciousness -- jQuery Europe 2013
Mitigate Maliciousness -- jQuery Europe 2013Mitigate Maliciousness -- jQuery Europe 2013
Mitigate Maliciousness -- jQuery Europe 2013
 
Web Security - Introduction
Web Security - IntroductionWeb Security - Introduction
Web Security - Introduction
 
JWT Authentication with AngularJS
JWT Authentication with AngularJSJWT Authentication with AngularJS
JWT Authentication with AngularJS
 
Xss
XssXss
Xss
 
Web Security - Introduction v.1.3
Web Security - Introduction v.1.3Web Security - Introduction v.1.3
Web Security - Introduction v.1.3
 
Django Web Application Security
Django Web Application SecurityDjango Web Application Security
Django Web Application Security
 
When Ajax Attacks! Web application security fundamentals
When Ajax Attacks! Web application security fundamentalsWhen Ajax Attacks! Web application security fundamentals
When Ajax Attacks! Web application security fundamentals
 
Web Security Overview and Demo
Web Security Overview and DemoWeb Security Overview and Demo
Web Security Overview and Demo
 

Viewers also liked

Responsive Web Design for Libraries
Responsive Web Design for LibrariesResponsive Web Design for Libraries
Responsive Web Design for LibrariesVincci Kwong
 
維基經濟學 第一章
維基經濟學   第一章維基經濟學   第一章
維基經濟學 第一章guest14ec67
 
Conselloescolargalicia
ConselloescolargaliciaConselloescolargalicia
Conselloescolargaliciaguest5e9eab
 
Mobile Patrons: Better Services on the Go (For Techie)
Mobile Patrons: Better Services on the Go (For Techie)Mobile Patrons: Better Services on the Go (For Techie)
Mobile Patrons: Better Services on the Go (For Techie)Vincci Kwong
 
Planning & Producing Videos: A Two-Part Workshop on Writing Scripts & Making ...
Planning & Producing Videos: A Two-Part Workshop on Writing Scripts & Making ...Planning & Producing Videos: A Two-Part Workshop on Writing Scripts & Making ...
Planning & Producing Videos: A Two-Part Workshop on Writing Scripts & Making ...Vincci Kwong
 

Viewers also liked (7)

Peer Review 101
Peer Review 101Peer Review 101
Peer Review 101
 
Responsive Web Design for Libraries
Responsive Web Design for LibrariesResponsive Web Design for Libraries
Responsive Web Design for Libraries
 
維基經濟學 第一章
維基經濟學   第一章維基經濟學   第一章
維基經濟學 第一章
 
Conselloescolargalicia
ConselloescolargaliciaConselloescolargalicia
Conselloescolargalicia
 
Mobile Patrons: Better Services on the Go (For Techie)
Mobile Patrons: Better Services on the Go (For Techie)Mobile Patrons: Better Services on the Go (For Techie)
Mobile Patrons: Better Services on the Go (For Techie)
 
A Festa Da Pita
A Festa Da PitaA Festa Da Pita
A Festa Da Pita
 
Planning & Producing Videos: A Two-Part Workshop on Writing Scripts & Making ...
Planning & Producing Videos: A Two-Part Workshop on Writing Scripts & Making ...Planning & Producing Videos: A Two-Part Workshop on Writing Scripts & Making ...
Planning & Producing Videos: A Two-Part Workshop on Writing Scripts & Making ...
 

Similar to To be Hacked or not to be Hacked!

Web Application Security - Folio3
Web Application Security - Folio3Web Application Security - Folio3
Web Application Security - Folio3Folio3 Software
 
Security In PHP Applications
Security In PHP ApplicationsSecurity In PHP Applications
Security In PHP ApplicationsAditya Mooley
 
6 - Web Application Security.pptx
6 - Web Application Security.pptx6 - Web Application Security.pptx
6 - Web Application Security.pptxAlmaOraevi
 
Drupal Security Basics for the DrupalJax January Meetup
Drupal Security Basics for the DrupalJax January MeetupDrupal Security Basics for the DrupalJax January Meetup
Drupal Security Basics for the DrupalJax January MeetupChris Hales
 
Reliable and fast security audits - The modern and offensive way-Mohan Gandhi
Reliable and fast security audits - The modern and offensive way-Mohan GandhiReliable and fast security audits - The modern and offensive way-Mohan Gandhi
Reliable and fast security audits - The modern and offensive way-Mohan Gandhibhumika2108
 
Top 10 Web Security Vulnerabilities (OWASP Top 10)
Top 10 Web Security Vulnerabilities (OWASP Top 10)Top 10 Web Security Vulnerabilities (OWASP Top 10)
Top 10 Web Security Vulnerabilities (OWASP Top 10)Brian Huff
 
OWASP Top 10 vs Drupal - OWASP Benelux 2012
OWASP Top 10 vs Drupal - OWASP Benelux 2012OWASP Top 10 vs Drupal - OWASP Benelux 2012
OWASP Top 10 vs Drupal - OWASP Benelux 2012ZIONSECURITY
 
Secure coding presentation Oct 3 2020
Secure coding presentation Oct 3 2020Secure coding presentation Oct 3 2020
Secure coding presentation Oct 3 2020Moataz Kamel
 
Application and Website Security -- Fundamental Edition
Application and Website Security -- Fundamental EditionApplication and Website Security -- Fundamental Edition
Application and Website Security -- Fundamental EditionDaniel Owens
 
Become a Security Ninja
Become a Security NinjaBecome a Security Ninja
Become a Security NinjaPaul Gilzow
 
Web security for developers
Web security for developersWeb security for developers
Web security for developersSunny Neo
 
Looking for Vulnerable Code. Vlad Savitsky
Looking for Vulnerable Code. Vlad SavitskyLooking for Vulnerable Code. Vlad Savitsky
Looking for Vulnerable Code. Vlad SavitskyVlad Savitsky
 
Introduction to Usergrid - ApacheCon EU 2014
Introduction to Usergrid - ApacheCon EU 2014Introduction to Usergrid - ApacheCon EU 2014
Introduction to Usergrid - ApacheCon EU 2014David M. Johnson
 
Application Security Vulnerabilities: OWASP Top 10 -2007
Application Security Vulnerabilities: OWASP Top 10  -2007Application Security Vulnerabilities: OWASP Top 10  -2007
Application Security Vulnerabilities: OWASP Top 10 -2007Vaibhav Gupta
 
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
 
2013 OWASP Top 10
2013 OWASP Top 102013 OWASP Top 10
2013 OWASP Top 10bilcorry
 

Similar to To be Hacked or not to be Hacked! (20)

Owasp top 10 2013
Owasp top 10 2013Owasp top 10 2013
Owasp top 10 2013
 
Web Application Security - Folio3
Web Application Security - Folio3Web Application Security - Folio3
Web Application Security - Folio3
 
Security In PHP Applications
Security In PHP ApplicationsSecurity In PHP Applications
Security In PHP Applications
 
6 - Web Application Security.pptx
6 - Web Application Security.pptx6 - Web Application Security.pptx
6 - Web Application Security.pptx
 
Drupal Security Basics for the DrupalJax January Meetup
Drupal Security Basics for the DrupalJax January MeetupDrupal Security Basics for the DrupalJax January Meetup
Drupal Security Basics for the DrupalJax January Meetup
 
Reliable and fast security audits - The modern and offensive way-Mohan Gandhi
Reliable and fast security audits - The modern and offensive way-Mohan GandhiReliable and fast security audits - The modern and offensive way-Mohan Gandhi
Reliable and fast security audits - The modern and offensive way-Mohan Gandhi
 
Lets Make our Web Applications Secure
Lets Make our Web Applications SecureLets Make our Web Applications Secure
Lets Make our Web Applications Secure
 
XSS
XSSXSS
XSS
 
Top 10 Web Security Vulnerabilities (OWASP Top 10)
Top 10 Web Security Vulnerabilities (OWASP Top 10)Top 10 Web Security Vulnerabilities (OWASP Top 10)
Top 10 Web Security Vulnerabilities (OWASP Top 10)
 
OWASP Top 10 vs Drupal - OWASP Benelux 2012
OWASP Top 10 vs Drupal - OWASP Benelux 2012OWASP Top 10 vs Drupal - OWASP Benelux 2012
OWASP Top 10 vs Drupal - OWASP Benelux 2012
 
Secure coding presentation Oct 3 2020
Secure coding presentation Oct 3 2020Secure coding presentation Oct 3 2020
Secure coding presentation Oct 3 2020
 
Application and Website Security -- Fundamental Edition
Application and Website Security -- Fundamental EditionApplication and Website Security -- Fundamental Edition
Application and Website Security -- Fundamental Edition
 
Become a Security Ninja
Become a Security NinjaBecome a Security Ninja
Become a Security Ninja
 
Web security for developers
Web security for developersWeb security for developers
Web security for developers
 
Looking for Vulnerable Code. Vlad Savitsky
Looking for Vulnerable Code. Vlad SavitskyLooking for Vulnerable Code. Vlad Savitsky
Looking for Vulnerable Code. Vlad Savitsky
 
C01461422
C01461422C01461422
C01461422
 
Introduction to Usergrid - ApacheCon EU 2014
Introduction to Usergrid - ApacheCon EU 2014Introduction to Usergrid - ApacheCon EU 2014
Introduction to Usergrid - ApacheCon EU 2014
 
Application Security Vulnerabilities: OWASP Top 10 -2007
Application Security Vulnerabilities: OWASP Top 10  -2007Application Security Vulnerabilities: OWASP Top 10  -2007
Application Security Vulnerabilities: OWASP Top 10 -2007
 
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...
 
2013 OWASP Top 10
2013 OWASP Top 102013 OWASP Top 10
2013 OWASP Top 10
 

More from Vincci Kwong

Plan Your Next Plan - The Assessment Plan!
Plan Your Next Plan - The Assessment Plan!Plan Your Next Plan - The Assessment Plan!
Plan Your Next Plan - The Assessment Plan!Vincci Kwong
 
Decision Making for All: Leaders, Followers, Partners, Loners, and More!
Decision Making for All: Leaders, Followers, Partners, Loners, and More!Decision Making for All: Leaders, Followers, Partners, Loners, and More!
Decision Making for All: Leaders, Followers, Partners, Loners, and More!Vincci Kwong
 
Drones and Libraries: Is the Future Now, or Simply the Future?
Drones and Libraries: Is the Future Now, or Simply the Future?Drones and Libraries: Is the Future Now, or Simply the Future?
Drones and Libraries: Is the Future Now, or Simply the Future?Vincci Kwong
 
Life After Going Live: Up-to-date or Outdated?
Life After Going Live: Up-to-date or Outdated?Life After Going Live: Up-to-date or Outdated?
Life After Going Live: Up-to-date or Outdated?Vincci Kwong
 
How to Enhance Findability of Library Web Content via SEO
How to Enhance Findability of Library Web Content via SEOHow to Enhance Findability of Library Web Content via SEO
How to Enhance Findability of Library Web Content via SEOVincci Kwong
 
Don't Take Grants for Granted!
Don't Take Grants for Granted!Don't Take Grants for Granted!
Don't Take Grants for Granted!Vincci Kwong
 
Google Hummingbird: What do you know?
Google Hummingbird: What do you know?Google Hummingbird: What do you know?
Google Hummingbird: What do you know?Vincci Kwong
 
Take the HTML5 Tour!
Take the HTML5 Tour!Take the HTML5 Tour!
Take the HTML5 Tour!Vincci Kwong
 
Mobile Patrons: Better Services on the Go (For Novice)
Mobile Patrons: Better Services on the Go (For Novice)Mobile Patrons: Better Services on the Go (For Novice)
Mobile Patrons: Better Services on the Go (For Novice)Vincci Kwong
 
Drupal: Library Web Sites Made Easy
Drupal: Library Web Sites Made EasyDrupal: Library Web Sites Made Easy
Drupal: Library Web Sites Made EasyVincci Kwong
 
Planning & Producing Videos: A Two-Part Workshop on Writing Scripts & Making ...
Planning & Producing Videos: A Two-Part Workshop on Writing Scripts & Making ...Planning & Producing Videos: A Two-Part Workshop on Writing Scripts & Making ...
Planning & Producing Videos: A Two-Part Workshop on Writing Scripts & Making ...Vincci Kwong
 

More from Vincci Kwong (12)

Plan Your Next Plan - The Assessment Plan!
Plan Your Next Plan - The Assessment Plan!Plan Your Next Plan - The Assessment Plan!
Plan Your Next Plan - The Assessment Plan!
 
Decision Making for All: Leaders, Followers, Partners, Loners, and More!
Decision Making for All: Leaders, Followers, Partners, Loners, and More!Decision Making for All: Leaders, Followers, Partners, Loners, and More!
Decision Making for All: Leaders, Followers, Partners, Loners, and More!
 
Drones and Libraries: Is the Future Now, or Simply the Future?
Drones and Libraries: Is the Future Now, or Simply the Future?Drones and Libraries: Is the Future Now, or Simply the Future?
Drones and Libraries: Is the Future Now, or Simply the Future?
 
Life After Going Live: Up-to-date or Outdated?
Life After Going Live: Up-to-date or Outdated?Life After Going Live: Up-to-date or Outdated?
Life After Going Live: Up-to-date or Outdated?
 
How to Enhance Findability of Library Web Content via SEO
How to Enhance Findability of Library Web Content via SEOHow to Enhance Findability of Library Web Content via SEO
How to Enhance Findability of Library Web Content via SEO
 
Don't Take Grants for Granted!
Don't Take Grants for Granted!Don't Take Grants for Granted!
Don't Take Grants for Granted!
 
Google Hummingbird: What do you know?
Google Hummingbird: What do you know?Google Hummingbird: What do you know?
Google Hummingbird: What do you know?
 
Take the HTML5 Tour!
Take the HTML5 Tour!Take the HTML5 Tour!
Take the HTML5 Tour!
 
Mobile Patrons: Better Services on the Go (For Novice)
Mobile Patrons: Better Services on the Go (For Novice)Mobile Patrons: Better Services on the Go (For Novice)
Mobile Patrons: Better Services on the Go (For Novice)
 
Website Usability
Website UsabilityWebsite Usability
Website Usability
 
Drupal: Library Web Sites Made Easy
Drupal: Library Web Sites Made EasyDrupal: Library Web Sites Made Easy
Drupal: Library Web Sites Made Easy
 
Planning & Producing Videos: A Two-Part Workshop on Writing Scripts & Making ...
Planning & Producing Videos: A Two-Part Workshop on Writing Scripts & Making ...Planning & Producing Videos: A Two-Part Workshop on Writing Scripts & Making ...
Planning & Producing Videos: A Two-Part Workshop on Writing Scripts & Making ...
 

Recently uploaded

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
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
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
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
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 

Recently uploaded (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
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
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
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
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 

To be Hacked or not to be Hacked!

  • 1. To be Hacked or not to be Hacked! Vincci Kwong and Gary Browning Indiana University South Bend Indiana Library Federation Annual Conference October 22, 2013
  • 3. What are Web Applications? 2013 ILF Annual Conference October 22, 2013
  • 4. What is PHP? • A server-side scripting language designed for web development • Open source programming language • Powering over 80% of all websites • PHP code is as secure as the programmer writes it 2013 ILF Annual Conference October 22, 2013
  • 5. Why hack web applications? • • • • • • • • Stealing sensitive information Defacement Planting malware Deceit Blackmail Link Spam Worms Phishing 2013 ILF Annual Conference October 22, 2013
  • 6. Why secure web applications? • Everyone can touch web applications! • It is hard to secure!!! 2013 ILF Annual Conference October 22, 2013
  • 7. Am I being hacked? • • • • Check your server access logs Look for recently modified files Look for files that shouldn’t be there Scan through your files 2013 ILF Annual Conference October 22, 2013
  • 8. Top 10 security issues for web applications 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. Injection Broken authentication and session management Cross site scripting (XSS) Insecure direct object references Security misconfiguration Sensitive data exposure Missing function level access control Cross site request forgeries (CSFR) Using known vulnerable components Unvalidated redirects and forwards 2013 ILF Annual Conference October 22, 2013
  • 9. What can I do? • Write secure code!! • Use PHP Security Cheat Sheet • Use a web application scanner 2013 ILF Annual Conference October 22, 2013
  • 10. Writing Secure Code • • • • • • Do not trust visitors to your website Understand Register Globals Error messages SQL Injections File Manipulation XSS 2013 ILF Annual Conference October 22, 2013
  • 11. Register Globals • Feature removed as of PHP 5.4.0 !!!!  • Variables from HTML forms were injected into code automatically • Remember, PHP does not require variable initialization 2013 ILF Annual Conference October 22, 2013
  • 12. Example: Misuse with register_globals = on <?php // define $authorized = true only if user is authenticated if (authenticated_user()) { $authorized = true; } if ($authorized) { include "/highly/sensitive/data.php"; } ?> 2013 ILF Annual Conference October 22, 2013
  • 13. Example: Misuse with register_globals = on <?php // define $authorized = true only if user is authenticated if (authenticated_user()) { $authorized = true; } // Because we didn't first initialize $authorized as false, this might be // defined through register_globals, like from GET auth.php?authorized=1 // So, anyone can be seen as authenticated! if ($authorized) { include "/highly/sensitive/data.php"; } ?> 2013 ILF Annual Conference October 22, 2013
  • 14. SQL Injections SQL injection is a code injection technique, used to attack data driven applications, in which malicious SQL statements are inserted into an entry field for execution (e.g. to dump the database contents to the attacker). ... http://en.wikipedia.org/wiki/SQL_injection 2013 ILF Annual Conference October 22, 2013
  • 15. Example: SQL Injection $proceed = mysql_query("SELECT Username, Password, AccessLVL FROM Users WHERE Username = '".$_POST['username']."' and Password = '".$_POST['password']."'"); From a web form, someone inputs the following: USERNAME: ' OR 1=1 # 2013 ILF Annual Conference October 22, 2013
  • 16. Example: SQL Injection $proceed = mysql_query("SELECT Username, Password, AccessLVL FROM Users WHERE Username = '".$_POST['username']."' and Password = '".$_POST['password']."'"); SQL Query: SELECT Username, Password, AccessLVL FROM Users WHERE Username = ’’ OR 1=1 #’ and Password = ’’ 2013 ILF Annual Conference October 22, 2013
  • 17. Example: SQL Injection $proceed = mysql_query("SELECT Username, Password, AccessLVL FROM Users WHERE Username = '".$_POST['username']."' and Password = '".$_POST['password']."'"); SQL Query: SELECT Username, Password, AccessLVL FROM Users WHERE Username = ’’ OR 1=1 #’ and Password = ’’ This will return the entire list of usernames and passwords !!!! Fix this using mysql_real_escape_string or mysqli_real_escape_string 2013 ILF Annual Conference October 22, 2013
  • 20. XSS (imagine the following code in your index.php file) <?php $name = $_GET['name']; echo "Welcome $name<br>"; echo "<a href="http://librarysite.org/">Click to visit</a>"; ?> If someone entered the following on a web form, what would happen? guest<script>alert('attacked')</script> 2013 ILF Annual Conference October 22, 2013
  • 21. XSS Would you trust this URL if you saw the link on a website (assume you are familiar with ‘mytrustedsite.org’? mytrustedsite.org/index.php?name=<script>window.onload = function() {var link=document.getElementsByTagName("a");link[0].href="http://not-realtrustedsite.com/";}</script> 2013 ILF Annual Conference October 22, 2013
  • 22. XSS Would you trust this URL if you saw the link on a website (assume you are familiar with ‘mytrustedsite.org’? mytrustedsite.org/index.php?name=%3c%73%63%72%69%70%74%3e%77 %69%6e%64%6f%77%2e%6f%6e%6c%6f%61%64%20%3d%20%66%75 %6e%63%74%69%6f%6e%28%29%20%7b%76%61%72%20%6c%69%6e %6b%3d%64%6f%63%75%6d%65%6e%74%2e%67%65%74%45%6c%65 %6d%65%6e%74%73%42%79%54%61%67%4e%61%6d%65%28%22%6 1%22%29%3b%6c%69%6e%6b%5b%30%5d%2e%68%72%65%66%3d%2 2%68%74%74%70%3a%2f%2f%61%74%74%61%63%6b%65%72%2d%7 3%69%74%65%2e%63%6f%6d%2f%22%3b%7d%3c%2f%73%63%72%69 %70%74%3e 2013 ILF Annual Conference October 22, 2013
  • 23. Web Application Scanners https://www.owasp.org/index.php/Category: Vulnerability_Scanning_Tools Contains a list of Open Source and Commercial products 2013 ILF Annual Conference October 22, 2013
  • 24. It’s not in the Top 10, but… • Unvalidated inputs 2013 ILF Annual Conference October 22, 2013
  • 25. Reporting a hacked site! • Why do you think the website is being hacked? • What on the website is looking unusual? Did you clear your browser’s cache? • Are you being redirected to another website? If yes, note URL of the site. • Were you being asked to provide confidential information? • Do patrons report receiving unusual email from the library? • When did it happen? 2013 ILF Annual Conference October 22, 2013
  • 26. Emergency contact list • • • • Library IT personnel Director/Dean of the Library Vendors Patrons 2013 ILF Annual Conference October 22, 2013
  • 27. Resources • PHP Security Cheat Sheet https://www.owasp.org/index.php/PHP_S ecurity_Cheat_Sheet • PHP Security Guide http://phpsec.org/projects/guide/ • Securing PHP Web Applications http://www.amazon.com/Securing-PHPApplications-TriciaBallad/dp/0321534344 2013 ILF Annual Conference October 22, 2013
  • 28. Questions? Feel free to contact us at • Vincci Kwong • Email: vkwong@iusb.edu • Phone: 574-520-4444 • Gary Browning • Email: gary@iusb.edu • Phone: 574-520-5516 2013 ILF Annual Conference October 22, 2013