Python › Module 3 › Lesson 5
Quiz — Automation
10-question quiz on security automation, secrets, and log parsing
Opening
Automation — Module Quiz
You treated repetition as a script candidate — same input, same rule, same output — not as permission to attack. SOC and admin toil you listed in toil-inventory.txt was counting Failed password on a copy you created, generating YOUR vault secrets, hashing YOUR files. It was not Hydra, not a live-login spray, not a production scrape, not a cron job that retargets Module 2’s scanner at the WAN. Change control still applies: dry-run by hand, fail loud, keep API keys out of source. Humans still isolate and disclose. secrets.choice is the password primitive; random.random is a game PRNG; print once; manager; never git; never a login POST. Parsers loop YOUR fictional sample_auth.log with documentation IPs. Counter ranks labels, not people. chmod 600 locks cyberlium-lab. Ten APPLY items. No crackers. No sprays. No unauthorized logs. No deanonymization. Next — Regex for Security Logs — still on sample lines you own, then secrets/ethics and a hash integrity lab.
Knowledge Check
APPLY: Every morning you count Failed password on an exported copy you created in $HOME/cyberlium-lab. A friend wants a cron job that sprays secrets.choice output at a public SSH “so the SOC chore is fully automated,” and says Python plus a scheduler is implied authorization. What is script-shaped, and what is an attack?
Multiple choice
Knowledge Check
APPLY: gen_password.py must pick 20 characters from letters, digits, and a small symbol set for YOUR password manager. A classmate used random.choice, seeded with time.time(), wrote every result to passwords.log, and wants to git add it. Correct primitive and handling?
Multiple choice
Knowledge Check
APPLY: True or False: random.random is ideal for security tokens and passwords because the numbers “look messy,” and you should POST candidates to a live login — or rainbow-table the string — to prove strength before storing it.
True or False
Knowledge Check
APPLY: count_failures.py walks sample_auth.log line-by-line with if "Failed password" in line. A classmate offers their employer’s /var/log/auth.log “for realism,” then wants you to nmap every from-address so the counts “mean something.” What do you parse, and what stays out?
Multiple choice
Knowledge Check
APPLY: You are about to schedule a checker. Select the safe automation pair that matches this module’s change-control and ethics. (Select 2)
Select all that apply
Knowledge Check
APPLY: log_analyzer.py uses collections.Counter after a Failed password substring filter, then ip_re.search and fails[m.group(1)] += 1. On YOUR fictional sample, 203.0.113.10 ranks first. What did Counter do, and what must you not do with that rank?
Multiple choice
Knowledge Check
APPLY: True or False: A spike of Failed password lines from one documentation IP in YOUR sample can illustrate spray-shaped traffic, and that illustration authorizes you to scan, lock out, or Hydra the address on the internet.
True or False
Knowledge Check
APPLY: You printed a 20-character secrets password to your own terminal. Where does the string go, what do the chmod 600 notes contain, and what is forbidden?
Multiple choice
Knowledge Check
APPLY: Before you point a parser at a file — including the lab analyzer — which habit matches copy → parse → report, and which failure modes did this module ban?
Multiple choice
Knowledge Check
APPLY: After this quiz, Module 4 starts with Regex for Security Logs, then ethics/scope and a SHA-256 integrity lab. What still needs a human, what is the next lesson’s object, and which gray zone stays closed?
Multiple choice
Answer all 10 knowledge checks to continue. (0/10 answered)