Ethical hacking

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

Ethical hacking

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. Ethical hacking always requires explicit permission from the system owner before testing.
A False
B True
2. Which is ethical hacking: testing a system with the owner's authorisation, or testing it without asking?
A Testing with authorisation
B Testing without asking
3. An ethical hacker should exploit found vulnerabilities for personal gain.
A False
B True
4. Which should an ethical hacker do with found vulnerabilities: report them to the owner, or keep them secret?
A Report them to the owner
B Keep them secret
5. Ethical hacking must stay within an agreed scope defined before testing begins.
A False
B True

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1findings = scan_for_vulnerabilities(target) ADisclosing discovered vulnerabilities to the system owner
2report_findings(findings, owner) BScanning a system to find security weaknesses
3Ethical hacking requires explicit permission before testing begins Cscope = get_test_scope()
4Testing should stay within an agreed scope set by the owner DThe mistake: scanning a system without authorisation
5exploit_findings(findings) EThe mistake: exploiting vulnerabilities instead of reporting them
6scan_for_vulnerabilities(target) # has_permission = False Fhas_permission = get_permission()

Definitions

Ethical hacking

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
______________ = True
2.
findings = ________________________(target)
3.
________________(findings, owner)
4.
if hasPermission __ True:
5.
def ______________():

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A has_permission = False
B scan_for_vulnerabilities(target)
C report_findings(f, owner)
Question 2
A has_permission = True
B skip_permission_check = True
C scan_for_vulnerabilities(target)
Question 3
A has_permission = True
B findings = scan(target)
C exploit_findings(findings)
Question 4
A scope = get_test_scope()
B findings = scan(out_of_scope_target)
C report_findings(findings, owner)
Question 5
A has_permission = True
B findings = scan(target)
C hide_findings = True

Answer Key

Ethical hacking
Section A: Quick Questions
Q1
B — True
Q2
A — Testing with authorisation
Q3
A — False
Q4
A — Report them to the owner
Q5
B — True
Section B: Match the Pairs
Q1
findings = scan_for_vulnerabilities(target) → Scanning a system to find security weaknesses
Q2
report_findings(findings, owner) → Disclosing discovered vulnerabilities to the system owner
Q3
Ethical hacking requires explicit permission before testing begins → has_permission = get_permission()
Q4
Testing should stay within an agreed scope set by the owner → scope = get_test_scope()
Q5
exploit_findings(findings) → The mistake: exploiting vulnerabilities instead of reporting them
Q6
scan_for_vulnerabilities(target) # has_permission = False → The mistake: scanning a system without authorisation
Section C: Definitions
Q1
Ethical hacking — Authorised testing of a system to find security vulnerabilities before malicious attackers can exploit them.
Section D: Fill in the Blanks
Q1
has_permission = True
Q2
findings = scan_for_vulnerabilities(target)
Q3
report_findings(findings, owner)
Q4
if hasPermission == True:
Q5
def get_test_scope():
Section E: Spot the Error
Q1
A — Line 1 sets has_permission to False, but the scan proceeds anyway, meaning testing happens without authorisation.
Q2
B — Line 2 skips the permission check, which goes against ethical hacking's requirement to confirm authorisation first.
Q3
C — Line 3 exploits the found vulnerabilities instead of reporting them, which is not ethical hacking behaviour.
Q4
B — Line 2 scans a target outside the agreed scope, breaking the rule of testing only what was authorised.
Q5
C — Line 3 hides the findings instead of reporting them, but ethical hacking requires disclosing results to the owner.