Prev Next

Tools / Cyber Security Interview Questions

What is Cross-Site Scripting (XSS)?

Cross-Site Scripting is a web vulnerability where an attacker injects malicious JavaScript into a page viewed by other users, letting the script run in their browser under the trust of the vulnerable site.

TypeDescription
Stored XSSMalicious script is saved on the server, e.g. in a comment, and served to every visitor
Reflected XSSScript is embedded in a request, e.g. a URL parameter, and reflected back in the response
DOM-based XSSScript executes purely through client-side JavaScript manipulating the page's DOM

Because the script runs as the victim in their own browser, it can steal session cookies, log keystrokes, or redirect the page. Escaping output and setting a strict Content Security Policy are the main defenses.

What can XSS allow an attacker to steal from a victim's browser?
Which XSS type saves the malicious script permanently on the server?

More Related questions...

What is CyberSecurity? What is a Firewall? What are the types of Firewalls? Different Types of Cybersecurity. What is Network Security? What is Cryptography? What is Malware? Explain Information Security. What is Endpoint Security? What are the common types of Malware? What are examples of endpoints in Endpoint security? What is Phishing? What are the three main types of endpoint security? What is Ransomware? What is a Virtual Private Network (VPN)? What are the 5 C's of Cyber Security? What is Multi-Factor Authentication (MFA)? What is a Digital Signature? What is Hashing in Cyber Security? What is a Zero-Day Vulnerability? What is Social Engineering? Define Denial-of-Service (DoS) Attack? What is the purpose of an Intrusion Detection System (IDS)? What is a Honeypot? Describe the CIA Triad in Cyber Security? What is Two-Factor Authentication? What are the types of Access Control models? What is a Security Information and Event Management (SIEM) system? List common types of Cyber Attacks? What is Public Key Infrastructure (PKI)? What is a Man-in-the-Middle (MITM) Attack? What is SQL Injection? What is Cross-Site Scripting (XSS)? What is the difference between IDS and IPS? What is the difference between Symmetric and Asymmetric Encryption? How does SSL/TLS secure communication over the network? Why is the Principle of Least Privilege important? What is the difference between Vulnerability Assessment and Penetration Testing? How does a Firewall differ from a Proxy Server? What is the difference between Authentication and Authorization? When should you use a Web Application Firewall (WAF)? What is the difference between DAC, MAC, and RBAC? Why do we use Salting in password hashing? What happens when a Buffer Overflow attack occurs? How does a Distributed Denial-of-Service (DDoS) Attack differ from a DoS Attack? What is the difference between a Vulnerability, a Threat, and a Risk? How does Zero Trust Architecture change traditional network security? Why should you rotate encryption keys periodically? Explain the lifecycle of an Incident Response process? Explain the internal working of the TLS Handshake? Explain the execution flow of a SQL Injection attack? How can you optimize a SIEM system to reduce alert fatigue? How do you troubleshoot a suspected data breach in its early stages? Which is better and why: Signature-based or Behavior-based Malware Detection? Explain the lifecycle of a Digital Certificate in PKI? Explain the internal working of Kerberos Authentication?
Show more question and Answers...


Comments & Discussions