We are Web Technology Experts Team who provide you Important information on Web Development, Interview Questions and Answers, live project problem and their solution and online free tutorials.
Friday, 16 September 2016
Tuesday, 6 September 2016
How to add Security in Website?
Server Signature invisible
Whatever technology you are using PHP, .Net, ASP etc you should not let to know other.Hide the Server Signature.
Open php.ini file.
expose_php = onto
expose_php = off
Add Following code in .htaccess
ServerSignature Off
XSS Protection header Enabled
Cross-site scripting (XSS) is a type of computer security vulnerability found in web applications. XSS enables attackers to inject client-side script into webpages.We can add Protection layer to XSS attack by adding this on header.
Add Following code in .htaccess
Header set X-XSS-Protection "1; mode=block"
Content Security Policy (CSP)
It is an added layer of security that helps to detect and mitigate certain types of attacks, including Cross Site Scripting and data injection attacks.This header is designed to specify how content interacts with your website.
Add Following code in .htaccess
Header set X-Content-Security-Policy "allow 'self';"
X-Content-Type-Options
This header prevents "mime" based attacks. Add Following code in .htaccessHeader set X-Content-Type-Options "nosniff"
Protection From libwww-perl
LWP is a Perl modules that give Perl programming easy access to sending requests to the website. We can protect our website from thisAdd Following code in .htaccess
RewriteCond %{HTTP_USER_AGENT} libwww-perl.*
RewriteRule .* ? [F,L]
Always Use Https over http
An extra security layer because of SSL (Encryption, Data Integrity, Authentication ) X-Frame-Options
The X-Frame-Options HTTP response header can be used to indicate whether or not a browser should be allowed to render a page in a frame or iframe. Add Following code in .htaccessHeader set X-Frame-Options SAMEORIGIN
Best Related Posts are Following:
- How to hide web server information from the headers?.
- How to enable the XSS Protection header?.
- AES Encryption and Decryption in PHP See example.
- XMLRPC Wordpress Attack.
- How can I read request-headers in PHP.
- How can I prevent SQL-injection in PHP?.
- Shared Server Security Risk open_basedir disable_functions disable_classes.
- What is Best method for sanitizing user input with PHP?.
- Difference between Notice and warning and fatal error.
- How can I prevent SQL-injection in PHP [SOLVED].
- PHP Register Globals.
- PHP Sessions and Cookie and Security.
- PHP Check Mime Type of File - Return Information About A File.
- Improve Ajax Performance.
- PHP Captcha Code Example Code Snippets.
- PHP - Secure Ajax Call from Hackers - Example.
- htaccess code snippets example.
- Manage Cron Job with PHP - SSH2 Connection.
- Spoofed Forms - Stop Spoofed Form Submissions.
- Session Fixation.
- Session Hijacking.
- openssl private encrypt.
- Cross Site Request Forgery.
- SQL Injection Attack - PHP & MySQL.
- Cross-Site Scripting - cross site scripting examples.
- PHP INI settings.
Subscribe to:
Posts
(
Atom
)

