PHP-security Software lifecycle General Security Webserver security PHP security. Security Summary. Server-Side Web Languages

Similar documents
Web insecurity Security strategies General security Listing of server-side risks Language specific security. Web Security.

AURA ACADEMY Training With Expertised Faculty Call Us On For Free Demo

CNIT 129S: Securing Web Applications. Ch 10: Attacking Back-End Components

ANTIVIRUS SITE PROTECTION (by SiteGuarding.com)

INF3700 Informasjonsteknologi og samfunn. Application Security. Audun Jøsang University of Oslo Spring 2015

Extensions. Server-Side Web Languages. Uta Priss School of Computing Napier University, Edinburgh, UK. Libraries Databases Graphics

ANTIVIRUS SITE PROTECTION (by SiteGuarding.com)

sottotitolo System Security Introduction Milano, XX mese 20XX A.A. 2016/17 Federico Reghenzani

Threat Modeling. Bart De Win Secure Application Development Course, Credits to

CompTIA Security+ Malware. Threats and Vulnerabilities Vulnerability Management

ACS / Computer Security And Privacy. Fall 2018 Mid-Term Review

Web Penetration Testing

Developing Web Applications

Copyright

Web Application Security. Philippe Bogaerts

epldt Web Builder Security March 2017

Web Application & Web Server Vulnerabilities Assessment Pankaj Sharma

Exam : JK Title : CompTIA E2C Security+ (2008 Edition) Exam. Version : Demo

Ethical Hacking and Prevention

Security+ Guide to Network Security Fundamentals, Third Edition. Chapter 3 Protecting Systems

Attacks Against Websites. Tom Chothia Computer Security, Lecture 11

SECURE CODING PART 1 MAGDA LILIA CHELLY ENTREPRENEUR CISO ADVISOR CYBERFEMINIST PEERLYST BRAND AMBASSADOR TOP 50 CYBER CYBER

NETWORK THREATS DEMAN

Web Application Security GVSAGE Theater

Welcome to the OWASP TOP 10

Security issues. Unit 27 Web Server Scripting Extended Diploma in ICT 2016 Lecture: Phil Smith

Unit 2 Assignment 2. Software Utilities?

CSE361 Web Security. Attacks against the server-side of web applications. Nick Nikiforakis

ANATOMY OF AN ATTACK!

COPYRIGHTED MATERIAL. Contents. Part I: The Basics in Depth 1. Chapter 1: Windows Attacks 3. Chapter 2: Conventional and Unconventional Defenses 51

WEB SECURITY WORKSHOP TEXSAW Presented by Solomon Boyd and Jiayang Wang

Application vulnerabilities and defences

Advanced Ethical Hacking & Penetration Testing. Ethical Hacking

Accounting Information Systems

Security and Authentication

INF3510 Information Security. Lecture 12: Development and Operations Security. Audun Jøsang University of Oslo Spring 2014

SINGLE COURSE. NH9000 Certified Ethical Hacker 104 Total Hours. COURSE TITLE: Certified Ethical Hacker

LECT 8 WEB SECURITY BROWSER SECURITY. Repetition Lect 7. WEB Security

Access Controls. CISSP Guide to Security Essentials Chapter 2

1 About Web Security. What is application security? So what can happen? see [?]

Web Application Security Evaluation

MIRO DIETIKER Founder

Cyber Security & Ethical Hacking Training. Introduction to Cyber Security Introduction to Cyber Security. Linux Operating System and Networking: LINUX

Excerpts of Web Application Security focusing on Data Validation. adapted for F.I.S.T. 2004, Frankfurt

Bank Infrastructure - Video - 1

A Security Model for Space Based Communication. Thom Stone Computer Sciences Corporation

Advanced Web Application Defense with ModSecurity. Daniel Fernández Bleda & Christian Martorella

Attacks Against Websites 3 The OWASP Top 10. Tom Chothia Computer Security, Lecture 14

Curso: Ethical Hacking and Countermeasures

shortcut Tap into learning NOW! Visit for a complete list of Short Cuts. Your Short Cut to Knowledge

Ethical Hacking and Countermeasures: Web Applications, Second Edition. Chapter 3 Web Application Vulnerabilities

Secure Programming and! Common Errors! PART II"

Sair 3X Linux Security, Privacy and Ethics (Level 1)

Web Application Vulnerabilities: OWASP Top 10 Revisited

The Weakest Link: Mitigating Web Application Vulnerabilities. webscurity White Paper. webscurity Inc. Minneapolis, Minnesota USA

Question No: 2 Which identifier is used to describe the application or process that submitted a log message?

SECURE CODING ESSENTIALS

Using Threat Modeling To Find Design Flaws

CS System Security 2nd-Half Semester Review

Kishin Fatnani. Founder & Director K-Secure. Workshop : Application Security: Latest Trends by Cert-In, 30 th Jan, 2009

Ethics and Information Security. 10 주차 - 경영정보론 Spring 2014

Chapter 10: Security. 2. What are the two types of general threats to computer security? Give examples of each.

CSCE 813 Internet Security Case Study II: XSS

OWASP Top 10 Risks. Many thanks to Dave Wichers & OWASP

CTS2134 Introduction to Networking. Module 08: Network Security

Secure Programming Lecture 8++: SQL Injection

DreamFactory Security Guide

Whatever it takes. Fixing SQLIA and XSS in the process. Diploma Thesis Outline Presentation, Florian Thiel

WEB HOSTING SERVICE OPERATING PROCEDURES AND PROCESSES UNIVERSITY COMPUTER CENTER UNIVERSITY OF THE PHILIPPINES DILIMAN

Malware, , Database Security

Fighting Phishing I: Get phish or die tryin.

Sichere Software vom Java-Entwickler

Distributed Systems. Lecture 14: Security. Distributed Systems 1

ETHICAL HACKING & COMPUTER FORENSIC SECURITY

John Coggeshall Copyright 2006, Zend Technologies Inc.

(CNS-301) Citrix NetScaler 11 Advance Implementation

1. Oracle mod_plsql v in Oracle9i Application Server v1.0.2.x (Oracle9iAS v1.0.2.x)

Distributed Systems. Lecture 14: Security. 5 March,

Strategic Infrastructure Security

GUI based and very easy to use, no security expertise required. Reporting in both HTML and RTF formats - Click here to view the sample report.

PHP & My SQL Duration-4-6 Months

Avoiding Web Application Flaws In Embedded Devices. Jake Edge LWN.net URL for slides:

Guide to Network Security First Edition. Chapter One Introduction to Information Security

Module 1: Penetration Testing Planning and Scoping. Module 2: Basic Usage of Linux and its services

Hacker Academy Ltd COURSES CATALOGUE. Hacker Academy Ltd. LONDON UK

Lecture 17 Browser Security. Stephen Checkoway University of Illinois at Chicago CS 487 Fall 2017 Some slides from Bailey's ECE 422

Drone /12/2018. Threat Model. Description. Threats. Threat Source Risk Status Date Created

Security Course. WebGoat Lab sessions

Configuring User Defined Patterns

INF3510 Information Security. Lecture 12: Application and Development Security. Audun Jøsang University of Oslo Spring 2015

Protect Your Application with Secure Coding Practices. Barrie Dempster & Jason Foy JAM306 February 6, 2013

Application and Development Security

CLOUD COMPUTING SECURITY THE SOFT SPOT Security by Application Development Quality Assurance

Security: A year of Red Hat Enterprise Linux 4. Mark J Cox

Language-Based Protection

A (sample) computerized system for publishing the daily currency exchange rates

CIH

Fundamentals of Information Systems Security Lesson 8 Mitigation of Risk and Threats to Networks from Attacks and Malicious Code

Overview. Handling Security Incidents. Attack Terms and Concepts. Types of Attacks

Application Security through a Hacker s Eyes James Walden Northern Kentucky University

Transcription:

Security Summary Server-Side Web Languages Uta Priss School of Computing Napier University, Edinburgh, UK Copyright Napier University Security Summary Slide 1/15

Outline PHP-security Software lifecycle General Security Webserver security PHP security Copyright Napier University Security Summary Slide 2/15

PHP-security information on the web Quotes from an on-line forum: Copyright Napier University Security Summary Slide 3/15

PHP-security information on the web Quotes from an on-line forum: Perl/CGI scripts are very insecure. A PHP programmer does not have to worry about security. Copyright Napier University Security Summary Slide 3/15

PHP-security information on the web Quotes from an on-line forum: Perl/CGI scripts are very insecure. A PHP programmer does not have to worry about security. At first my remote connection to Mysql did not work, but then I discovered I only had to stop my firewall and it worked fine. Copyright Napier University Security Summary Slide 3/15

PHP-security information on the web Quotes from an on-line forum: Perl/CGI scripts are very insecure. A PHP programmer does not have to worry about security. At first my remote connection to Mysql did not work, but then I discovered I only had to stop my firewall and it worked fine. You can use HTTP REFERER to make sure that your site can only be accessed from your web form. Copyright Napier University Security Summary Slide 3/15

All you need to connect to a database with PHP is something like this: <?php $db = pg pconnect( host=localhost,dbname=a,user=b ); pg exec($db, select * from $table ;);?> Copyright Napier University Security Summary Slide 4/15

To send an email with PHP back to a user, you ll need something like this: <?php $body = Hi, How are you? ; mail($user, Subject, $body)?> Copyright Napier University Security Summary Slide 5/15

Software testing Traditional approaches for software testing (functional testing, user testing,...) are useless for security validation. Security validation: no debugging, no immediate feedback no clear testing protocols different types of problems are possible: requires lateral thinking Copyright Napier University Security Summary Slide 6/15

Security Engineering see patterns & practices Security Engineering Index (msdn.microsoft.com) Security objectives Threat modeling Security design guidelines Security architecture and design reviews Security code reviews Security testing Security deployment reviews Copyright Napier University Security Summary Slide 7/15

General security risks physical security social engineering and human error (e.g. insecure passwords) eavesdropping, man-in-the-middle attacks software flaws (buffer overflows) installation of malicious software: Trojan horses, backdoors, viruses, worms denial of service (DoS) attacks Copyright Napier University Security Summary Slide 8/15

General security risks physical security social engineering and human error (e.g. insecure passwords) eavesdropping, man-in-the-middle attacks software flaws (buffer overflows) installation of malicious software: Trojan horses, backdoors, viruses, worms denial of service (DoS) attacks The most common security risk for scripting languages ( user submitted data ) is not in this list! Copyright Napier University Security Summary Slide 8/15

Security Strategies prevention Copyright Napier University Security Summary Slide 9/15

Security Strategies prevention security guidelines, advisories, common sense detection Copyright Napier University Security Summary Slide 9/15

Security Strategies prevention security guidelines, advisories, common sense detection monitor webserver logs, system activity, detection software response Copyright Napier University Security Summary Slide 9/15

Security Strategies prevention security guidelines, advisories, common sense detection monitor webserver logs, system activity, detection software response script-level, webserver, institutional policies Copyright Napier University Security Summary Slide 9/15

Apache error log: 66.147.118.70-[7/7/06] GET /phpadmin/main.php HTTP/1.1 404 66.147.118.70-[7/7/06] GET /phpmyadmin1/main.php HTTP/1.1 404 66.147.118.70-[7/7/06] GET /phpadmin-2/main.php HTTP/1.1 404 Copyright Napier University Security Summary Slide 10/15

Copyright Napier University Security Summary Slide 11/15

Webserver security Web space is often hosted externally and shared with other users. Copyright Napier University Security Summary Slide 12/15

Webserver security Web space is often hosted externally and shared with other users. disallow server-side includes disallow indexes only store files in the public html directory if they really need to be there security through obscurity Copyright Napier University Security Summary Slide 12/15

Webserver security (continued) Apache s mod security place Apache in a chroot directory POST filtering based on headers, values, IP addresses POST payload analysis restrict the use of certain HTML tags (e.g. <script>) prevent SQL injection ( delete, insert ) prevent SHELL commands etc Of course, the server will run slower and use more memory Copyright Napier University Security Summary Slide 13/15

Other server functions Email: protect against spam and phishing install email server on different machine from webserver if possible don t allow the www user to send email HTACCESS useful for group-based restriction to part of site not very useful for login/registration of users database DB security and script security need to be integrated prevent SQl injection Copyright Napier University Security Summary Slide 14/15

PHP security Use appropriate functions: htmlspecialchars(); strip tags(); add slashes(); mysql real escape string(); etc apply hardening patch to PHP before installing PHP safe mode restrict file access, executable directory, disable functions etc Copyright Napier University Security Summary Slide 15/15