0
0
Testing Fundamentalstesting~20 mins

Security testing basics in Testing Fundamentals - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Security Testing Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
Understanding SQL Injection

Which of the following best describes what an SQL Injection attack is?

AAn attack where malicious SQL code is inserted into input fields to manipulate the database.
BAn attack that floods the server with too many requests to cause a denial of service.
CAn attack that intercepts data packets between client and server to steal information.
DAn attack that exploits weak passwords to gain unauthorized access.
Attempts:
2 left
💡 Hint

Think about how attackers might use input fields to harm databases.

Predict Output
intermediate
1:30remaining
Output of Security Test Log Filtering

Given the following Python code that filters security logs for failed login attempts, what will be the output?

Testing Fundamentals
logs = ["login success", "login failed", "password reset", "login failed"]
failed_attempts = [log for log in logs if "failed" in log]
print(len(failed_attempts))
A1
B3
C0
D2
Attempts:
2 left
💡 Hint

Count how many log entries contain the word 'failed'.

assertion
advanced
2:00remaining
Validating Password Complexity Assertion

Which assertion correctly checks that a password string contains at least one uppercase letter, one lowercase letter, and one digit?

Aassert all(c.isupper() or c.islower() or c.isdigit() for c in password)
Bassert password.isupper() and password.islower() and password.isdigit()
Cassert any(c.isupper() for c in password) and any(c.islower() for c in password) and any(c.isdigit() for c in password)
Dassert password.contains(uppercase) and password.contains(lowercase) and password.contains(digit)
Attempts:
2 left
💡 Hint

Check if at least one character of each type exists in the password.

🔧 Debug
advanced
2:00remaining
Debugging Authentication Test Code

What error will this Python test code raise when run?

Testing Fundamentals
def test_login():
    username = "user1"
    password = "pass123"
    assert login(username, password) == True

def login(user, pwd):
    return user == "user1" and pwd == "pass1234"
ANo error, test passes
BAssertionError
CNameError
DTypeError
Attempts:
2 left
💡 Hint

Check the password comparison in the login function.

framework
expert
2:30remaining
Choosing the Best Security Testing Framework Feature

Which feature is MOST important in a security testing framework to detect Cross-Site Scripting (XSS) vulnerabilities?

AAbility to inject and detect malicious scripts in web input fields
BCapability to perform load testing under heavy traffic
CSupport for automated UI responsiveness testing
DIntegration with version control systems for code commits
Attempts:
2 left
💡 Hint

Think about what XSS attacks do to web applications.