SlideShare a Scribd company logo
Security Guidelines for
Secure Web Development
Kumar Gaurav
k10gaurav@gmail.com
Agenda
 Input/output Encoding
 Input Validation
 Cache Control
 Usage of Tokens
 Proper Session Management
 Database Level Security
 File Upload Security
 Human/Robot Identification
Agenda
 Security Configuration
 Transport Layer Protection
 User Authorization and Access Period
 Password Policy
 HTTP TRACE Methods
 Iframe Security
 Cookies Security
Input/output Encoding
 It is recommended to encode output based on input parameters and
encode data that is received as input when you write it out as HTML.
 This technique is effective on data that was not validated for some reason
during input.
 By using techniques such as URL Encode and HTML Encode, you can
prevent malicious script from executing.
 Input should be validated as strictly as possible on arrival, given the kind of
content which it is expected to contain.
 All HTML Meta characters, including <> " ' and =, should be replaced with
the corresponding HTML entities (&lt; &gt; etc).
Input Validation
 The application should strictly validate all user inputs at the server level and
display customized error.
 All user input and output should be checked to ensure it is both
appropriate and expected.
 Input validation should be done on the client-side as well as on the server-
side because a secure web application can’t rely on client side validation.
Cache Control
 It is recommended to use all cache control tags.
 Improper cache control may lead an attacker to gain access the
authenticated page of another user from the history of the browser.
 Logging out from an application obviously does not clear the browser
cache of any sensitive information that might have been stored.
Usage of Tokens
 Attackers can create forged HTTP requests and tricks a victim into
submitting them via images tags, XSS or numerous other technologies.
 It is recommended to include an unpredictable token in the body or URL
of each HTTP request especially when using forms or making asynchronous
request.
 Cross-site request forgery can be prevented using the security tokens.
Proper Session Management
 It is recommended that every page should have a logout link.
 Logout should destroy all server side session state and client side cookies.
 Attacker uses leaks or flaws in the authentication or session management
functions (e.g., exposed accounts, passwords, session IDs) to impersonate
users.
Database Level Security
 An attacker can steal data from the database by asking a series of True
and False questions through SQL statements.
 It is advised that Proper Authorization mechanism should be implemented
to restrict unauthorized users.
 The two recommended complementary and successful methods of
mitigating SQL Injection attacks:
 Parameterized queries using bound, typed parameters
 Careful use of parameterized stored procedures.
File Upload Security
 An attacker can upload malicious files which may lead to Remote Code
Execution and the total defacement of the Web Application.
 It is recommended to restrict file types accepted for upload: check the file
extension and only allow certain files to be uploaded.
 Use a white list approach instead of a blacklist.
 Change the permissions on the upload folder so the files within it are not
executable. If possible, rename the files that are uploaded.
Human/Robot Identification
 Attackers can consume web application resources to a point where other
legitimate users can no longer access or use the application.
 Attackers can also lock users out of their accounts or even cause the
entire application to fail. Even attacker can make the server unavailable.
 It is recommended to implement CAPTCHA's in the Form for carrying out
transactions.
Security Configuration
 It is recommended to disable or limit detailed error handling.
 In particular, don’t displays debug information to end users.
 The error messages should not contain any relative or absolute file path .
 Direct access to any physical directories that contains image/ JavaScript/
media should not be allowed to list respective directory contents.
Transport Layer Protection
 It is recommended to deploy the web application on https to maintain the
confidentiality of user credentials and authentication token, to prevent
MiTM attacks.
 it provides a digitally signed certificate for website/web application
security from malicious attacks.
 This is subject to the business requirement of SSL (Secure Socket Layer)
deployments of respective application.
User Authorization and Access Period
 An attacker could perform malicious activity on behalf of a user without
his/her knowledge just by luring a victim to click on an evil page
containing invisible iframe of the victim domain.
 Apply a lockout period for respective user i.e. automatic logout for being
idle for a certain time period for logged in users and account to be locked
after certain login attempts.
Password Policy
 It is recommended to use a complex password so that it could not be
guessed easily. Also the password cracking algorithms like Brute force
attack could not crack the user password.
 Password should be at least 8 chars long containing at least 1 Uppercase,
1 Lowercase, 1 Number and 1 special character e.g. Rex@(4*91
 Also for forgot password feature, there should be a process where user
submit his/her email id and a link should be sent to respective email with
expiration period.
HTTP TRACE Methods
 TRACE method can bypass HTTP Only Protection on the cookie and an
attacker can steal cookies. It is recommended to disable all unnecessary
HTTP Methods on the Server side.
Iframe Security
 An attacker could perform malicious activity on behalf of a user without
his/her knowledge just by luring a victim to click on an evil page
containing invisible iframe of the victim domain. It is recommended to use
x-frame-options having the following two possible values:
 Same origin - The document will be rendered (shown) in a frame only if the
frame and its parent have the same origin.
 Deny - The document may not be rendered inside a frame.
Cookies Security
 The attacker can access the cookies in a non-encrypted method or
access the cookies via non HTTP methods like JavaScript or if the user has
not logged out of his account then the attacker may be able to access
the account.
 It is recommended to encrypt cookies and set HttpOnly attribute for them.
Also secure flag should be set for all cookies. This can be done on
application level and server level.
Is your web application secure?
Working in web doesn’t guarantee 100% security since the
web & malwares are expanding day by day but the
above guidelines will definitely help in securing your
application from most common security vulnerabilities.
Thank you!

More Related Content

What's hot

Secure Code Warrior - Fail securely
Secure Code Warrior - Fail securelySecure Code Warrior - Fail securely
Secure Code Warrior - Fail securely
Secure Code Warrior
 
Secure Code Warrior - Cookies and sessions
Secure Code Warrior - Cookies and sessionsSecure Code Warrior - Cookies and sessions
Secure Code Warrior - Cookies and sessions
Secure Code Warrior
 
Secure Code Warrior - Issues with origins
Secure Code Warrior - Issues with originsSecure Code Warrior - Issues with origins
Secure Code Warrior - Issues with origins
Secure Code Warrior
 
Report on xss and do s
Report on xss and do sReport on xss and do s
Report on xss and do smehr77
 
Application Security Part 1 Threat Defense In Client Server Applications ...
Application Security   Part 1   Threat Defense In Client Server Applications ...Application Security   Part 1   Threat Defense In Client Server Applications ...
Application Security Part 1 Threat Defense In Client Server Applications ...
Greg Sohl
 
Url filtration
Url filtrationUrl filtration
Url filtration
ronpoul
 
Web Application Security
Web Application SecurityWeb Application Security
Web Application Security
Colin English
 
Deep understanding on Cross-Site Scripting and SQL Injection
Deep understanding on Cross-Site Scripting and SQL InjectionDeep understanding on Cross-Site Scripting and SQL Injection
Deep understanding on Cross-Site Scripting and SQL Injection
Vishal Kumar
 
Cross site scripting (xss)
Cross site scripting (xss)Cross site scripting (xss)
Cross site scripting (xss)Manish Kumar
 
Web Application Security
Web Application SecurityWeb Application Security
Web Application Security
Chris Hillman
 
Session Fixation, Reflected XSS and Store XSS Attack (Code Examples)
Session Fixation, Reflected XSS and Store XSS Attack (Code Examples)Session Fixation, Reflected XSS and Store XSS Attack (Code Examples)
Session Fixation, Reflected XSS and Store XSS Attack (Code Examples)
Barrel Software
 
Step by step guide for web application security testing
Step by step guide for web application security testingStep by step guide for web application security testing
Step by step guide for web application security testing
Avyaan, Web Security Company in India
 
Web security
Web securityWeb security
Web security
rakesh bandaru
 
Secure Code Warrior - Cross site scripting
Secure Code Warrior - Cross site scriptingSecure Code Warrior - Cross site scripting
Secure Code Warrior - Cross site scripting
Secure Code Warrior
 
Security 101
Security 101Security 101
Security 101
George V. Reilly
 
Secure Code Warrior - Secure by default
Secure Code Warrior - Secure by defaultSecure Code Warrior - Secure by default
Secure Code Warrior - Secure by default
Secure Code Warrior
 
Phishing with Super Bait
Phishing with Super BaitPhishing with Super Bait
Phishing with Super Bait
Jeremiah Grossman
 
Web application vulnerability assessment
Web application vulnerability assessmentWeb application vulnerability assessment
Web application vulnerability assessment
Ravikumar Paghdal
 
Cross Site Scripting ( XSS)
Cross Site Scripting ( XSS)Cross Site Scripting ( XSS)
Cross Site Scripting ( XSS)
Amit Tyagi
 
XSS-Alert-Pentration testing tool
XSS-Alert-Pentration testing toolXSS-Alert-Pentration testing tool
XSS-Alert-Pentration testing tool
Arjun Jain
 

What's hot (20)

Secure Code Warrior - Fail securely
Secure Code Warrior - Fail securelySecure Code Warrior - Fail securely
Secure Code Warrior - Fail securely
 
Secure Code Warrior - Cookies and sessions
Secure Code Warrior - Cookies and sessionsSecure Code Warrior - Cookies and sessions
Secure Code Warrior - Cookies and sessions
 
Secure Code Warrior - Issues with origins
Secure Code Warrior - Issues with originsSecure Code Warrior - Issues with origins
Secure Code Warrior - Issues with origins
 
Report on xss and do s
Report on xss and do sReport on xss and do s
Report on xss and do s
 
Application Security Part 1 Threat Defense In Client Server Applications ...
Application Security   Part 1   Threat Defense In Client Server Applications ...Application Security   Part 1   Threat Defense In Client Server Applications ...
Application Security Part 1 Threat Defense In Client Server Applications ...
 
Url filtration
Url filtrationUrl filtration
Url filtration
 
Web Application Security
Web Application SecurityWeb Application Security
Web Application Security
 
Deep understanding on Cross-Site Scripting and SQL Injection
Deep understanding on Cross-Site Scripting and SQL InjectionDeep understanding on Cross-Site Scripting and SQL Injection
Deep understanding on Cross-Site Scripting and SQL Injection
 
Cross site scripting (xss)
Cross site scripting (xss)Cross site scripting (xss)
Cross site scripting (xss)
 
Web Application Security
Web Application SecurityWeb Application Security
Web Application Security
 
Session Fixation, Reflected XSS and Store XSS Attack (Code Examples)
Session Fixation, Reflected XSS and Store XSS Attack (Code Examples)Session Fixation, Reflected XSS and Store XSS Attack (Code Examples)
Session Fixation, Reflected XSS and Store XSS Attack (Code Examples)
 
Step by step guide for web application security testing
Step by step guide for web application security testingStep by step guide for web application security testing
Step by step guide for web application security testing
 
Web security
Web securityWeb security
Web security
 
Secure Code Warrior - Cross site scripting
Secure Code Warrior - Cross site scriptingSecure Code Warrior - Cross site scripting
Secure Code Warrior - Cross site scripting
 
Security 101
Security 101Security 101
Security 101
 
Secure Code Warrior - Secure by default
Secure Code Warrior - Secure by defaultSecure Code Warrior - Secure by default
Secure Code Warrior - Secure by default
 
Phishing with Super Bait
Phishing with Super BaitPhishing with Super Bait
Phishing with Super Bait
 
Web application vulnerability assessment
Web application vulnerability assessmentWeb application vulnerability assessment
Web application vulnerability assessment
 
Cross Site Scripting ( XSS)
Cross Site Scripting ( XSS)Cross Site Scripting ( XSS)
Cross Site Scripting ( XSS)
 
XSS-Alert-Pentration testing tool
XSS-Alert-Pentration testing toolXSS-Alert-Pentration testing tool
XSS-Alert-Pentration testing tool
 

Similar to Security guidelines for web development

Security In PHP Applications
Security In PHP ApplicationsSecurity In PHP Applications
Security In PHP Applications
Aditya Mooley
 
Intro to Web Application Security
Intro to Web Application SecurityIntro to Web Application Security
Intro to Web Application Security
Rob Ragan
 
logout.php Session Data after Logout Username Email . $_.docx
logout.php Session Data after Logout  Username  Email  . $_.docxlogout.php Session Data after Logout  Username  Email  . $_.docx
logout.php Session Data after Logout Username Email . $_.docx
smile790243
 
Application Security
Application SecurityApplication Security
Application Securitynirola
 
Ceh v5 module 12 web application vulnerabilities
Ceh v5 module 12 web application vulnerabilitiesCeh v5 module 12 web application vulnerabilities
Ceh v5 module 12 web application vulnerabilities
Vi Tính Hoàng Nam
 
Module 13 (web based password cracking techniques)
Module 13 (web based password cracking techniques)Module 13 (web based password cracking techniques)
Module 13 (web based password cracking techniques)
Wail Hassan
 
Magento security best practices magento's approach to pci compliance
Magento security best practices  magento's approach to pci complianceMagento security best practices  magento's approach to pci compliance
Magento security best practices magento's approach to pci compliance
Ritwik Das
 
Cross Site Scripting Defense Presentation
Cross Site Scripting Defense Presentation Cross Site Scripting Defense Presentation
Cross Site Scripting Defense Presentation
Ikhade Maro Igbape
 
Why You Need A Web Application Firewall
Why You Need A Web Application FirewallWhy You Need A Web Application Firewall
Why You Need A Web Application Firewall
Port80 Software
 
Security Testing Training With Examples
Security Testing Training With ExamplesSecurity Testing Training With Examples
Security Testing Training With Examples
Alwin Thayyil
 
Website hacking and prevention (All Tools,Topics & Technique )
Website hacking and prevention (All Tools,Topics & Technique )Website hacking and prevention (All Tools,Topics & Technique )
Website hacking and prevention (All Tools,Topics & Technique )
Jay Nagar
 
Web Application Security - "In theory and practice"
Web Application Security - "In theory and practice"Web Application Security - "In theory and practice"
Web Application Security - "In theory and practice"Jeremiah Grossman
 
Defcon9 Presentation2001
Defcon9 Presentation2001Defcon9 Presentation2001
Defcon9 Presentation2001Miguel Ibarra
 
A security note for web developers
A security note for web developersA security note for web developers
A security note for web developers
John Ombagi
 
Owasp web security
Owasp web securityOwasp web security
Owasp web security
Pankaj Kumar Sharma
 
Andrews whitakrer lecture18-security.ppt
Andrews whitakrer lecture18-security.pptAndrews whitakrer lecture18-security.ppt
Andrews whitakrer lecture18-security.ppt
SilverGold16
 

Similar to Security guidelines for web development (20)

Security In PHP Applications
Security In PHP ApplicationsSecurity In PHP Applications
Security In PHP Applications
 
Intro to Web Application Security
Intro to Web Application SecurityIntro to Web Application Security
Intro to Web Application Security
 
logout.php Session Data after Logout Username Email . $_.docx
logout.php Session Data after Logout  Username  Email  . $_.docxlogout.php Session Data after Logout  Username  Email  . $_.docx
logout.php Session Data after Logout Username Email . $_.docx
 
Application Security
Application SecurityApplication Security
Application Security
 
Ceh v5 module 12 web application vulnerabilities
Ceh v5 module 12 web application vulnerabilitiesCeh v5 module 12 web application vulnerabilities
Ceh v5 module 12 web application vulnerabilities
 
Module 13 (web based password cracking techniques)
Module 13 (web based password cracking techniques)Module 13 (web based password cracking techniques)
Module 13 (web based password cracking techniques)
 
Advanced xss
Advanced xssAdvanced xss
Advanced xss
 
Magento security best practices magento's approach to pci compliance
Magento security best practices  magento's approach to pci complianceMagento security best practices  magento's approach to pci compliance
Magento security best practices magento's approach to pci compliance
 
Cross Site Scripting Defense Presentation
Cross Site Scripting Defense Presentation Cross Site Scripting Defense Presentation
Cross Site Scripting Defense Presentation
 
Why You Need A Web Application Firewall
Why You Need A Web Application FirewallWhy You Need A Web Application Firewall
Why You Need A Web Application Firewall
 
Security Testing Training With Examples
Security Testing Training With ExamplesSecurity Testing Training With Examples
Security Testing Training With Examples
 
Secure Software Engineering
Secure Software EngineeringSecure Software Engineering
Secure Software Engineering
 
Website hacking and prevention (All Tools,Topics & Technique )
Website hacking and prevention (All Tools,Topics & Technique )Website hacking and prevention (All Tools,Topics & Technique )
Website hacking and prevention (All Tools,Topics & Technique )
 
Web Application Security - "In theory and practice"
Web Application Security - "In theory and practice"Web Application Security - "In theory and practice"
Web Application Security - "In theory and practice"
 
Defcon9 Presentation2001
Defcon9 Presentation2001Defcon9 Presentation2001
Defcon9 Presentation2001
 
A security note for web developers
A security note for web developersA security note for web developers
A security note for web developers
 
Xssandcsrf
XssandcsrfXssandcsrf
Xssandcsrf
 
Owasp web security
Owasp web securityOwasp web security
Owasp web security
 
Andrews whitakrer lecture18-security.ppt
Andrews whitakrer lecture18-security.pptAndrews whitakrer lecture18-security.ppt
Andrews whitakrer lecture18-security.ppt
 
Joomla web application development vulnerabilities
Joomla web application development vulnerabilitiesJoomla web application development vulnerabilities
Joomla web application development vulnerabilities
 

More from kumar gaurav

Need Of Enterprise Integration
Need Of Enterprise IntegrationNeed Of Enterprise Integration
Need Of Enterprise Integration
kumar gaurav
 
Mulesoft file connector
Mulesoft file connectorMulesoft file connector
Mulesoft file connector
kumar gaurav
 
Mulesoft http connector
Mulesoft http connectorMulesoft http connector
Mulesoft http connector
kumar gaurav
 
Reason to connect with Mulesoft
Reason to connect with MulesoftReason to connect with Mulesoft
Reason to connect with Mulesoft
kumar gaurav
 
Mulesoft idempotent Message Filter
Mulesoft idempotent Message FilterMulesoft idempotent Message Filter
Mulesoft idempotent Message Filter
kumar gaurav
 
Mulesoft Using Groovy Component
Mulesoft Using Groovy ComponentMulesoft Using Groovy Component
Mulesoft Using Groovy Component
kumar gaurav
 
Mulesoft vm transport reference
Mulesoft vm transport referenceMulesoft vm transport reference
Mulesoft vm transport reference
kumar gaurav
 
Mulesoft Calling Flow of Other Applications
Mulesoft Calling Flow of Other ApplicationsMulesoft Calling Flow of Other Applications
Mulesoft Calling Flow of Other Applications
kumar gaurav
 
Mulesoft Solutions for Mobile
Mulesoft Solutions for MobileMulesoft Solutions for Mobile
Mulesoft Solutions for Mobile
kumar gaurav
 
Mulesoft Solutions for SOA
Mulesoft Solutions for SOAMulesoft Solutions for SOA
Mulesoft Solutions for SOA
kumar gaurav
 
Mulesoft Solutions for IoT
Mulesoft Solutions for IoTMulesoft Solutions for IoT
Mulesoft Solutions for IoT
kumar gaurav
 
Mulesoft Anypoint platform for APIs
Mulesoft Anypoint platform for APIsMulesoft Anypoint platform for APIs
Mulesoft Anypoint platform for APIs
kumar gaurav
 
Oracle Managed Files Transfer- Key based authentication
Oracle Managed Files Transfer- Key based authenticationOracle Managed Files Transfer- Key based authentication
Oracle Managed Files Transfer- Key based authentication
kumar gaurav
 
Java collections concept
Java collections conceptJava collections concept
Java collections concept
kumar gaurav
 
Struggle that counts
Struggle that countsStruggle that counts
Struggle that counts
kumar gaurav
 
Team Work
Team WorkTeam Work
Team Work
kumar gaurav
 
MySQL index optimization techniques
MySQL index optimization techniquesMySQL index optimization techniques
MySQL index optimization techniques
kumar gaurav
 
Java web services
Java web servicesJava web services
Java web services
kumar gaurav
 
Oracle web center suit
Oracle web center suitOracle web center suit
Oracle web center suit
kumar gaurav
 
jQuery Beginner
jQuery BeginnerjQuery Beginner
jQuery Beginner
kumar gaurav
 

More from kumar gaurav (20)

Need Of Enterprise Integration
Need Of Enterprise IntegrationNeed Of Enterprise Integration
Need Of Enterprise Integration
 
Mulesoft file connector
Mulesoft file connectorMulesoft file connector
Mulesoft file connector
 
Mulesoft http connector
Mulesoft http connectorMulesoft http connector
Mulesoft http connector
 
Reason to connect with Mulesoft
Reason to connect with MulesoftReason to connect with Mulesoft
Reason to connect with Mulesoft
 
Mulesoft idempotent Message Filter
Mulesoft idempotent Message FilterMulesoft idempotent Message Filter
Mulesoft idempotent Message Filter
 
Mulesoft Using Groovy Component
Mulesoft Using Groovy ComponentMulesoft Using Groovy Component
Mulesoft Using Groovy Component
 
Mulesoft vm transport reference
Mulesoft vm transport referenceMulesoft vm transport reference
Mulesoft vm transport reference
 
Mulesoft Calling Flow of Other Applications
Mulesoft Calling Flow of Other ApplicationsMulesoft Calling Flow of Other Applications
Mulesoft Calling Flow of Other Applications
 
Mulesoft Solutions for Mobile
Mulesoft Solutions for MobileMulesoft Solutions for Mobile
Mulesoft Solutions for Mobile
 
Mulesoft Solutions for SOA
Mulesoft Solutions for SOAMulesoft Solutions for SOA
Mulesoft Solutions for SOA
 
Mulesoft Solutions for IoT
Mulesoft Solutions for IoTMulesoft Solutions for IoT
Mulesoft Solutions for IoT
 
Mulesoft Anypoint platform for APIs
Mulesoft Anypoint platform for APIsMulesoft Anypoint platform for APIs
Mulesoft Anypoint platform for APIs
 
Oracle Managed Files Transfer- Key based authentication
Oracle Managed Files Transfer- Key based authenticationOracle Managed Files Transfer- Key based authentication
Oracle Managed Files Transfer- Key based authentication
 
Java collections concept
Java collections conceptJava collections concept
Java collections concept
 
Struggle that counts
Struggle that countsStruggle that counts
Struggle that counts
 
Team Work
Team WorkTeam Work
Team Work
 
MySQL index optimization techniques
MySQL index optimization techniquesMySQL index optimization techniques
MySQL index optimization techniques
 
Java web services
Java web servicesJava web services
Java web services
 
Oracle web center suit
Oracle web center suitOracle web center suit
Oracle web center suit
 
jQuery Beginner
jQuery BeginnerjQuery Beginner
jQuery Beginner
 

Recently uploaded

How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 

Recently uploaded (20)

How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 

Security guidelines for web development

  • 1. Security Guidelines for Secure Web Development Kumar Gaurav k10gaurav@gmail.com
  • 2. Agenda  Input/output Encoding  Input Validation  Cache Control  Usage of Tokens  Proper Session Management  Database Level Security  File Upload Security  Human/Robot Identification
  • 3. Agenda  Security Configuration  Transport Layer Protection  User Authorization and Access Period  Password Policy  HTTP TRACE Methods  Iframe Security  Cookies Security
  • 4. Input/output Encoding  It is recommended to encode output based on input parameters and encode data that is received as input when you write it out as HTML.  This technique is effective on data that was not validated for some reason during input.  By using techniques such as URL Encode and HTML Encode, you can prevent malicious script from executing.  Input should be validated as strictly as possible on arrival, given the kind of content which it is expected to contain.  All HTML Meta characters, including <> " ' and =, should be replaced with the corresponding HTML entities (&lt; &gt; etc).
  • 5. Input Validation  The application should strictly validate all user inputs at the server level and display customized error.  All user input and output should be checked to ensure it is both appropriate and expected.  Input validation should be done on the client-side as well as on the server- side because a secure web application can’t rely on client side validation.
  • 6. Cache Control  It is recommended to use all cache control tags.  Improper cache control may lead an attacker to gain access the authenticated page of another user from the history of the browser.  Logging out from an application obviously does not clear the browser cache of any sensitive information that might have been stored.
  • 7. Usage of Tokens  Attackers can create forged HTTP requests and tricks a victim into submitting them via images tags, XSS or numerous other technologies.  It is recommended to include an unpredictable token in the body or URL of each HTTP request especially when using forms or making asynchronous request.  Cross-site request forgery can be prevented using the security tokens.
  • 8. Proper Session Management  It is recommended that every page should have a logout link.  Logout should destroy all server side session state and client side cookies.  Attacker uses leaks or flaws in the authentication or session management functions (e.g., exposed accounts, passwords, session IDs) to impersonate users.
  • 9. Database Level Security  An attacker can steal data from the database by asking a series of True and False questions through SQL statements.  It is advised that Proper Authorization mechanism should be implemented to restrict unauthorized users.  The two recommended complementary and successful methods of mitigating SQL Injection attacks:  Parameterized queries using bound, typed parameters  Careful use of parameterized stored procedures.
  • 10. File Upload Security  An attacker can upload malicious files which may lead to Remote Code Execution and the total defacement of the Web Application.  It is recommended to restrict file types accepted for upload: check the file extension and only allow certain files to be uploaded.  Use a white list approach instead of a blacklist.  Change the permissions on the upload folder so the files within it are not executable. If possible, rename the files that are uploaded.
  • 11. Human/Robot Identification  Attackers can consume web application resources to a point where other legitimate users can no longer access or use the application.  Attackers can also lock users out of their accounts or even cause the entire application to fail. Even attacker can make the server unavailable.  It is recommended to implement CAPTCHA's in the Form for carrying out transactions.
  • 12. Security Configuration  It is recommended to disable or limit detailed error handling.  In particular, don’t displays debug information to end users.  The error messages should not contain any relative or absolute file path .  Direct access to any physical directories that contains image/ JavaScript/ media should not be allowed to list respective directory contents.
  • 13. Transport Layer Protection  It is recommended to deploy the web application on https to maintain the confidentiality of user credentials and authentication token, to prevent MiTM attacks.  it provides a digitally signed certificate for website/web application security from malicious attacks.  This is subject to the business requirement of SSL (Secure Socket Layer) deployments of respective application.
  • 14. User Authorization and Access Period  An attacker could perform malicious activity on behalf of a user without his/her knowledge just by luring a victim to click on an evil page containing invisible iframe of the victim domain.  Apply a lockout period for respective user i.e. automatic logout for being idle for a certain time period for logged in users and account to be locked after certain login attempts.
  • 15. Password Policy  It is recommended to use a complex password so that it could not be guessed easily. Also the password cracking algorithms like Brute force attack could not crack the user password.  Password should be at least 8 chars long containing at least 1 Uppercase, 1 Lowercase, 1 Number and 1 special character e.g. Rex@(4*91  Also for forgot password feature, there should be a process where user submit his/her email id and a link should be sent to respective email with expiration period.
  • 16. HTTP TRACE Methods  TRACE method can bypass HTTP Only Protection on the cookie and an attacker can steal cookies. It is recommended to disable all unnecessary HTTP Methods on the Server side.
  • 17. Iframe Security  An attacker could perform malicious activity on behalf of a user without his/her knowledge just by luring a victim to click on an evil page containing invisible iframe of the victim domain. It is recommended to use x-frame-options having the following two possible values:  Same origin - The document will be rendered (shown) in a frame only if the frame and its parent have the same origin.  Deny - The document may not be rendered inside a frame.
  • 18. Cookies Security  The attacker can access the cookies in a non-encrypted method or access the cookies via non HTTP methods like JavaScript or if the user has not logged out of his account then the attacker may be able to access the account.  It is recommended to encrypt cookies and set HttpOnly attribute for them. Also secure flag should be set for all cookies. This can be done on application level and server level.
  • 19. Is your web application secure? Working in web doesn’t guarantee 100% security since the web & malwares are expanding day by day but the above guidelines will definitely help in securing your application from most common security vulnerabilities.