liveBook · Manning

Shell script

As explained in Fundamentals of Cybersecurity

Scripting is the writing of instruction sequences for system utilities or applications to perform tasks.

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

How Fundamentals of Cybersecurity covers it

How deep it goes
Defines scripting and traces an XSS payload from weak input validation to browser execution, without detailing remediation.
Examples
Uses a JavaScript alert payload and a sample SQL query to illustrate web scripting and database use.
What you can do after
Understand how weak input validation can let scripts run in a web page and create security risks.
How it connects
Connects scripting with cross-site scripting, SQL injection, web applications, input validation, and security controls.

Also explained in

Compare how 8 books explain shell script →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Fundamentals of Cybersecurity. The section links point to the parts of the book it draws on.