wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Web Enum and XSS

Total questions: 28

Worksheet time: 14mins

Name
Class
Date
1.

What is the primary role of a web server?

a)

To store website code only

b)

To process HTTP requests and serve web pages

c)

To handle front-end design

d)

To generate random website traffic

2.

Which component of a website handles user interaction?

a)

Web Server

b)

Back-End

c)

Database

d)

Front-End

3.

What protocol is primarily used to transfer web pages?

a)

FTP

b)

SSH

c)

HTTP

d)

SMTP

4.

What happens when you enter a URL in a browser?

a)

The browser sends a request to the DNS server to resolve the domain

b)

The browser directly contacts the website's database

c)

The browser creates a local copy of the website

d)

The browser executes JavaScript first

5.

What type of website component is MySQL?

a)

Front-End

b)

Web Server

c)

Database

d)

Web Framework

6.

Which of the following is NOT a back-end programming language?

a)

PHP

b)

Python

c)

JavaScript

d)

HTML

7.

What is the main purpose of a client in a web application?

a)

To process server requests

b)

To request and use resources from a server

c)

To store website data permanently

d)

To manage database storage

8.

Apache and Nginx are examples of:

a)

Web Browsers

b)

Web Servers

c)

Databases

d)

Back-End frameworks

9.

Which language is commonly used for front-end development?

a)

Python

b)

PHP

c)

JavaScript

d)

MySQL

10.

What is the purpose of the `robots.txt` file?

a)

To store website passwords

b)

To block unauthorized users

c)

To control search engine crawling

d)

To log user activities

11.

How can you view the source code of a webpage?

a)

Open Developer Tools and go to the Elements tab

b)

Right-click on the page and select "View Page Source"

c)

Both a & b

d)

You cannot view source code

12.

Which of the following tools is used for directory brute forcing?

a)

Hydra

b)

Gobuster

c)

Wireshark

d)

Netcat

13.

What does directory brute-forcing help find?

a)

Open ports

b)

Hidden or unlisted directories

c)

SQL vulnerabilities

d)

Web server versions

14.

What is the correct command to use `gobuster` for directory enumeration?

a)

`gobuster scan -u http://example.com`

b)

`gobuster dir -u http://example.com -w /path/to/wordlist.txt -x php -t 100`

c)

`gobuster find -u example.com`

d)

`gobuster brute -u example.com`

15.

Where can you commonly find sensitive information left exposed on a website?

a)

robots.txt

b)

Page source code

c)

Configuration files

d)

All of the above

16.

What should you check first when performing website enumeration?

a)

Database tables

b)

Open source intelligence (OSINT)

c)

robots.txt, source code, and directory brute-forcing

d)

Front-end design

17.

What command will find subdomains using Gobuster?

a)

`gobuster subdomain -u http://example.com -w /path/to/wordlist.txt`

b)

`gobuster dns -d example.com -w /path/to/wordlist.txt`

c)

`gobuster host -u example.com`

d)

`gobuster fuzz -u example.com`

18.

What is the purpose of viewing a webpage’s source code?

a)

To modify the website's back-end

b)

To analyze HTML, CSS, and JavaScript for vulnerabilities

c)

To see the database content

d)

To interact with server logs

19.

What is Cross-Site Scripting (XSS)?

a)

A SQL injection attack

b)

A type of phishing attack

c)

An attack where an attacker injects malicious scripts into webpages

d)

A denial-of-service attack

20.

Which of the following is NOT an XSS type?

a)

Stored

b)

Reflected

c)

Blind

d)

DOM-based

21.

Which input would trigger an alert in a vulnerable website?

a)

alert('XSS')

b)

alert'XSS'

c)

XSS

d)

`XSS`

22.

How can you mitigate XSS attacks?

a)

Input validation

b)

Encoding user input

c)

Using Content Security Policy (CSP)

d)

All of the above

23.

Which security measure helps prevent XSS?

a)

Using HTTPS

b)

Escaping user input

c)

Hiding the robots.txt file

d)

Allowing JavaScript execution

24.

What is a common real-world impact of XSS?

a)

Data loss

b)

Session hijacking

c)

Website defacement

d)

All of the above

25.

Which header helps protect against XSS attacks?

a)

`Content-Type`

b)

`Content-Security-Policy`

c)

`User-Agent`

d)

`Accept-Language`

26.

What is the main difference between Stored and Reflected XSS?

a)

Stored XSS executes on the victim’s browser, while Reflected XSS is stored in the database

b)

Reflected XSS requires user interaction, while Stored XSS is automatically executed

c)

Stored XSS affects only admin users

d)

Reflected XSS affects only databases

27.

What payload would test for Reflected XSS?

a)

`http://example.com/search?q=<script>alert(1)</script>`

b)

`

c)

`SELECT * FROM users WHERE name='admin'--`

d)

`../etc/passwd`

28.

Why should developers encode user input?

a)

To make the website faster

b)

To prevent injection attacks like XSS

c)

To improve SEO

d)

To make JavaScript execution faster