Scripting means writing a sequence of instructions for system utilities or applications to perform tasks. It can automate routine work, but attackers can also use scripts to exploit software flaws and misconfigurations. section 12.3.2
A common web attack is cross-site scripting (XSS). When an application fails to validate or sanitize input, an attacker’s script may be included in a page and run by a visitor’s browser. Possible harms include stolen session cookies, account hijacking, phishing redirects, and malware delivery. section 12.3.2
A script in a web form
The example payload <script>alert('XSS')</script> produces a popup when an application returns it without proper validation. The popup is harmless, but the same weakness can enable more serious attacks. section 12.3.2
SQL and user data
A query such as SELECT * FROM users WHERE username = 'Alice' asks a database to return rows matching that username. Web applications’ use of SQL can introduce security risks. section 12.3.2
Figure 12.2 Illustration of a Cross-Site Scripting (XSS) attack.

See the illustration of an XSS attack. section 12.3.2
Figure 12.3 Illustration of an SQL Injection (SQLi) attack.

See the illustration of an SQL injection attack. section 12.3.2







