Saturday 17 June 2017

What happen when you visit statics website?

What happen when you visit dynamic website
(facebook,twitter,commentic system) 1. You enter http://server.com into your browser’s address bar. 2. Your browser looks up the IP address for server.com. 3. Your browser issues a request to that address for the web server’s home page. 4. The request crosses the Internet and arrives at the server.com web server. 5. The web server, having received the request, fetches the home page from its hard disk. 6. With the home page now in memory, the web server notices that it is a file incorporating PHP scripting and passes the page to the PHP interpreter. 7. The PHP interpreter executes the PHP code. 8. Some of the PHP contains MySQL statements, which the PHP interpreter now passes to the MySQL database engine. 9. The MySQL database returns the results of the statements to the PHP interpreter. 10. The PHP interpreter returns the results of the executed PHP code, along with the results from the MySQL database, to the web server. 11. The web server returns the page to the requesting client, which displays it.

What is XSS Attack?

Cross-Site Scripting (XSS) attacks are a type of injection, in which malicious scripts are injected into otherwise benign and trusted web sites. XSS attacks occur when an attacker uses a web application to send malicious code, generally in the form of a browser side script, to a different end user. Flaws that allow these attacks to succeed are quite widespread and occur anywhere a web application uses input from a user within the output it generates without validating or encoding it. An attacker can use XSS to send a malicious script to an unsuspecting user. The end user’s browser has no way to know that the script should not be trusted, and will execute the script. Because it thinks the script came from a trusted source, the malicious script can access any cookies, session tokens, or other sensitive information retained by the browser and used with that site. These scripts can even rewrite the content of the HTML page