Hiring Partners
Segilola Resources Operating LimitedTaviatech TechnologiesFCMBMTN NigeriaAdvans La Fayette Microfinance BankAboki AfricaFirst Bank of NigeriaOPay
โ† Fundamentals Of Cyber Security Scripting ยท Lesson 4 of 9

Module Three

๐Ÿ“– Every lesson in this course is free to read right here, no account needed. Create a free account to track your progress, take the exam, and earn your certificate.
4
๐Ÿ“˜ Module 3: Fundamentals of Cyber Security Scripting

๐Ÿ›ก๏ธ Module 3: Fundamentals of Cyber Security Scripting

Welcome back, young cyber hero! This is Module 3, the final part of our foundation course.

๐Ÿ“– Module Introduction

In Modules 1 and 2, we learned the basics of scripting โ€“ variables, conditions, loops, functions, and more. Now, in Module 3, we will put everything together. We will learn how to build real security tools that can protect computers and networks. We will also learn about networks (how computers talk to each other) and encryption (how to keep messages secret). By the end of this module, you will be able to write a script that can detect a cyber attack and stop it. Are you ready to become a true cyber hero? Letโ€™s go!

๐ŸŽฏ Learning Objectives

After reading this module, you will be able to:

  • Understand what a network is and how scripts protect it.
  • Write a script that checks if a website is safe.
  • Use encryption to keep messages secret.
  • Build a simple firewall script.
  • Create a script that logs security events.
  • Understand the concept of ethical hacking.
  • Work with APIs to get security information.
  • Put all your skills together to build a mini security system.

๐Ÿ“– Warmโ€‘up Story: The Cyber Village

Imagine a village in Nigeria called โ€œCyber Villageโ€. In this village, every house has a computer. The computers are all connected to each other by invisible roads called networks. The village has a security team that watches over the roads.

One day, a stranger came to the village. The stranger tried to send a secret message to another house, but the security team had a script that checked all messages. The script looked for bad words and stopped the message. The village was safe because the script protected the network.

Chidi, a boy from the village, wanted to learn how to write such a script. He learned about networks, encryption, and firewalls. And now, you will learn the same things in Module 3!

๐Ÿ“˜ Lesson 1: What is a Network?

Definition: A network is a group of computers that are connected to each other, like a family of computers.

Why important: Networks allow computers to share information. But they can also be attacked. Scripts protect networks.

Simple explanation: Think of a network like a telephone system. You can call your friends, but someone might eavesdrop. Scripts stop eavesdroppers.

Real-life example: The internet is a huge network of computers all over the world.

School example: The computers in your school are connected to a network so you can share files.

Home example: Your familyโ€™s computers and phones are connected to a home Wi-Fi network.

Nigerian example: A bank in Lagos has a network that connects all its branches. Scripts protect this network from hackers.

  Simple Network Diagram
  ----------------------
  [Computer 1] --- [Switch] --- [Computer 2]
        |                |
        |                |
  [Computer 3] --- [Router] --- [Internet]

Mini summary: A network is a group of connected computers.


๐Ÿ“˜ Lesson 2: How Scripts Protect Networks

Definition: Network security scripts watch the traffic on a network and block anything suspicious.

Why important: They act like guards at the gate of a village, checking who comes in and out.

Simple explanation: Imagine a security guard at a school gate. The guard checks everyone who enters. A network script does the same for data.

Real-life example: A script can block a computer that tries to send too many requests.

School example: A script can prevent students from accessing games during class.

Home example: A script can block adult content on your home Wi-Fi.

Nigerian example: A script can protect a Nigerian universityโ€™s network from hackers.

  Network Security Script Flow
  ----------------------------
  Data enters network โ†’ Script checks data โ†’ If safe, allow through
                                             โ†’ If dangerous, block and log

Mini summary: Scripts protect networks by checking data and blocking bad data.


๐Ÿ“˜ Lesson 3: Introduction to IP Addresses

Definition: An IP address is a unique number that identifies a computer on a network, like a house address.

Why important: Scripts use IP addresses to know where data is coming from and where it is going.

Simple explanation: Just like every house has a street address, every computer on a network has an IP address.

Real-life example: 192.168.1.1 is a common IP address for home routers.

School example: The school server has an IP address that computers use to find it.

Home example: Your phone and laptop have different IP addresses on your home network.

Nigerian example: A bankโ€™s website has an IP address that customers use to access it.

  IP Address Example
  ------------------
  192.168.1.10  โ†’  Computer 1
  192.168.1.11  โ†’  Computer 2
  192.168.1.1   โ†’  Router

Mini summary: IP addresses are like house addresses for computers.


๐Ÿ“˜ Lesson 4: Ports โ€“ Doors to Computers

Definition: A port is a virtual door on a computer. Different services use different ports.

Why important: Scripts can open or close ports to allow or deny access.

Simple explanation: Imagine a building with many doors. Door 80 is for web pages, door 443 is for secure web pages.

Real-life example: Port 80 is used for HTTP (websites), port 443 for HTTPS (secure websites).

School example: The schoolโ€™s file server uses port 21 for file transfers.

Home example: Your game console uses a specific port to connect to online games.

Nigerian example: A bankโ€™s website uses port 443 to keep customer data safe.

  Ports Diagram
  -------------
  [Computer] 
     |-- Port 80 (Web)
     |-- Port 443 (Secure Web)
     |-- Port 21 (File Transfer)
     |-- Port 22 (Secure Shell)

Mini summary: Ports are virtual doors that scripts can control.


๐Ÿ“˜ Lesson 5: Firewalls โ€“ The Gatekeepers

Definition: A firewall is a script or device that controls what data enters or leaves a network.

Why important: Firewalls block bad data from entering your computer.

Simple explanation: Like a bouncer at a club, a firewall decides who gets in and who stays out.

Real-life example: Your home router has a built-in firewall.

School example: The schoolโ€™s firewall blocks social media during class.

Home example: A firewall can block unknown devices from joining your Wi-Fi.

Nigerian example: A Nigerian bank uses a firewall to protect its internal network.

  Firewall Rules
  --------------
  Allow:  Port 80 (Web) from any IP
  Allow:  Port 443 (HTTPS) from any IP
  Block:  Port 23 (Telnet) from outside
  Block:  Port 21 (FTP) from outside

Mini summary: Firewalls are gatekeepers that control network traffic.


๐Ÿ“˜ Lesson 6: Encryption โ€“ Secret Codes

Definition: Encryption is the process of converting information into a secret code to prevent unauthorised access.

Why important: It keeps data safe from hackers who might intercept it.

Simple explanation: Like writing a message in a secret language that only you and your friend understand.

Real-life example: HTTPS uses encryption to secure websites.

School example: You can encrypt your homework folder so no one else can read it.

Home example: Your Wi-Fi password is used to encrypt your internet traffic.

Nigerian example: Banks use encryption to protect customer transactions.

  Encryption Process
  ------------------
  "Hello" โ†’ [Encryption] โ†’ "&*^%$#" โ†’ [Decryption] โ†’ "Hello"

Mini summary: Encryption turns readable data into secret code.


๐Ÿ“˜ Lesson 7: APIs โ€“ How Scripts Talk to Other Services

Definition: API stands for Application Programming Interface. Itโ€™s a way for scripts to talk to other services.

Why important: APIs allow scripts to get information from other websites or services.

Simple explanation: Like ordering food at a restaurant. You tell the waiter what you want, and the waiter brings it to you.

Real-life example: A script can use the Google Maps API to get directions.

School example: A script can use a weather API to get the forecast for your school.

Home example: A script can use a news API to get the latest headlines.

Nigerian example: A script can use a payment API to process transactions in a Nigerian store.

  API Communication
  -----------------
  Script โ†’ Request to API โ†’ API processes โ†’ Script receives response

Mini summary: APIs let scripts talk to other services.


๐Ÿ“˜ Lesson 8: Building a Simple Security Scanner

Definition: A security scanner is a script that checks for vulnerabilities in a system.

Why important: It helps find weaknesses before hackers can exploit them.

Simple explanation: Like a doctor checking your body for sickness.

Real-life example: A script can scan a website for common security holes.

School example: A script can check if student passwords are weak.

Home example: A script can check if your home router has default passwords.

Nigerian example: A Nigerian bank can use a scanner to check its website for vulnerabilities.

  Scanner Flow
  ------------
  Start โ†’ Check for weak passwords โ†’ Check for open ports โ†’ Report findings

Mini summary: Security scanners find weaknesses before hackers do.


๐Ÿ“˜ Lesson 9: Logging and Monitoring

Definition: Logging is recording events. Monitoring is watching these logs to detect problems.

Why important: Logs help you understand what happened during a security incident.

Simple explanation: Like a diary that records everything that happens in a day.

Real-life example: A script logs all login attempts and alerts if there are too many failed attempts.

School example: A script logs when students log in to the school system.

Home example: A script logs when someone tries to access your home computer.

Nigerian example: A bank monitors logs to detect fraud.

  Logging Example
  ---------------
  2026-06-27 10:00: User admin logged in from IP 192.168.1.10
  2026-06-27 10:05: User admin logged out
  2026-06-27 10:10: Failed login attempt from IP 10.0.0.5

Mini summary: Logging records events; monitoring watches for problems.


๐Ÿ“˜ Lesson 10: Ethical Hacking โ€“ Being a Good Guy

Definition: Ethical hacking is using hacking skills to find and fix security problems, not to cause harm.

Why important: Ethical hackers help keep people safe.

Simple explanation: Like a superhero who uses their powers to fight crime.

Real-life example: Companies hire ethical hackers to test their systems.

School example: You can be an ethical hacker by finding bugs in school websites and reporting them.

Home example: You can test your home Wi-Fi security.

Nigerian example: Nigerian banks hire ethical hackers to protect customer data.

  Ethical Hacking Process
  -----------------------
  1. Get permission
  2. Find vulnerabilities
  3. Report them
  4. Help fix them

Mini summary: Ethical hackers use their skills to protect, not harm.


๐Ÿ“˜ Lesson 11: Automating Security Updates

Definition: Automation is making scripts do repetitive tasks. Security updates are patches that fix vulnerabilities.

Why important: Automated updates ensure systems are always protected.

Simple explanation: Like a robot that waters your plants every day.

Real-life example: A script that automatically downloads and installs antivirus updates.

School example: A script that updates all school computers every night.

Home example: A script that updates your apps automatically.

Nigerian example: A script that updates a bank's security software after business hours.

  Automation Flow
  ---------------
  Schedule โ†’ Check for updates โ†’ Download โ†’ Install โ†’ Log success

Mini summary: Automation makes security updates easy and fast.


๐Ÿ“˜ Lesson 12: Handling Security Alerts

Definition: An alert is a notification that something suspicious has happened.

Why important: Alerts tell you when to take action.

Simple explanation: Like a fire alarm that rings when there is smoke.

Real-life example: A script sends an email alert when it detects a virus.

School example: A script alerts the IT team when a student tries to access a blocked website.

Home example: A script sends a notification to your phone when someone tries to access your computer.

Nigerian example: A script alerts a bankโ€™s security team about a suspicious transaction.

  Alert Handling
  --------------
  Script detects suspicious activity โ†’ Sends alert โ†’ Security team investigates

Mini summary: Alerts notify you when there is a security problem.


๐Ÿ“˜ Lesson 13: Building a Mini Firewall Script

Definition: A firewall script controls network traffic based on rules.

Why important: It blocks bad traffic and allows good traffic.

Simple explanation: Like a security guard who checks everyoneโ€™s ID.

Real-life example: A script that blocks all traffic from a specific IP address.

School example: A script that blocks access to social media during school hours.

Home example: A script that blocks devices you donโ€™t recognise.

Nigerian example: A script that blocks traffic from known hacker IP addresses.

  Firewall Script (pseudo-code)
  -----------------------------
  allowed_ips = ["192.168.1.1", "10.0.0.1"]
  if ip in allowed_ips:
      allow_traffic()
  else:
      block_traffic()
      log_event()

Mini summary: Firewall scripts allow or block traffic based on rules.


๐Ÿ“˜ Lesson 14: Secure Coding Practices

Definition: Secure coding means writing scripts that are not vulnerable to attacks.

Why important: If your script has weaknesses, hackers can exploit them.

Simple explanation: Like building a strong house that burglars canโ€™t break into.

Real-life example: Never trust user input directly; always validate it.

School example: When writing a script for students, make sure they canโ€™t access files they shouldnโ€™t.

Home example: When writing a script for home, make sure it doesnโ€™t store passwords in plain text.

Nigerian example: Banks ensure their scripts use secure coding to protect customer data.

  Secure Coding Checklist
  -----------------------
  โ˜‘ Validate all user input
  โ˜‘ Use encryption for sensitive data
  โ˜‘ Keep secrets out of code
  โ˜‘ Test for common vulnerabilities

Mini summary: Secure coding keeps your scripts safe from attacks.


๐Ÿ“˜ Lesson 15: Bringing It All Together โ€“ A Security System

Definition: A security system is a collection of scripts and tools that work together to protect a network.

Why important: A single script is good, but many scripts working together are even better.

Simple explanation: Like a sports team where each player has a different role.

Real-life example: A company uses firewalls, scanners, and monitors together.

School example: A school uses scripts for login, monitoring, and updates.

Home example: You can use scripts for Wi-Fi security, parental controls, and backups.

Nigerian example: A bank uses a suite of scripts to protect its entire network.

  Security System Overview
  ------------------------
  [Firewall] โ†’ [Scanner] โ†’ [Monitor] โ†’ [Alert] โ†’ [Respond]

Mini summary: Many scripts working together create a strong security system.


๐Ÿ“š Key Vocabulary

  • Network: A group of connected computers.
  • IP Address: A unique number for each computer.
  • Port: A virtual door on a computer.
  • Firewall: A system that controls network traffic.
  • Encryption: Turning data into secret code.
  • API: A way for scripts to talk to other services.
  • Scanner: A script that checks for vulnerabilities.
  • Logging: Recording events.
  • Monitoring: Watching logs for problems.
  • Ethical Hacking: Using hacking skills to protect.
  • Automation: Letting scripts do tasks automatically.
  • Alert: A notification of a problem.
  • Secure Coding: Writing scripts that are hard to attack.

๐Ÿง  Important Concepts

  • Networks connect computers.
  • Scripts protect networks by checking traffic.
  • IP addresses identify computers.
  • Ports are virtual doors.
  • Firewalls control access.
  • Encryption keeps data secret.
  • APIs let scripts talk to services.
  • Scanners find weaknesses.
  • Logging and monitoring help detect problems.
  • Ethical hackers are the good guys.
  • Automation saves time.
  • Alerts notify you of issues.
  • Secure coding prevents vulnerabilities.

๐Ÿงฉ Stepโ€‘byโ€‘Step: Building a Network Security Script

  1. Define the goal โ€“ What do you want to protect? (e.g., a website)
  2. Choose a scripting language โ€“ Python is a great choice.
  3. Plan the script โ€“ Write down the steps.
  4. Write the code โ€“ Use variables, conditions, loops, and functions.
  5. Test the script โ€“ Try it with different inputs.
  6. Deploy the script โ€“ Run it on the system you want to protect.
  7. Monitor and update โ€“ Watch for issues and fix them.
  Step 1: Define goal (e.g., block bad IPs)
  Step 2: Choose Python
  Step 3: Plan: Read list of bad IPs, block them
  Step 4: Write code
  Step 5: Test with sample IPs
  Step 6: Deploy on the network
  Step 7: Log events and update the list

๐ŸŒ Realโ€‘life Examples

  • Google uses scripts to block millions of attacks every day.
  • Banks use encryption to protect customer data.
  • Hospitals use firewalls to keep patient records safe.
  • Social media platforms use scanners to find hate speech.

๐Ÿ‡ณ๐Ÿ‡ฌ Nigerian Examples

  • Nigerian fintech companies use APIs to process payments securely.
  • Schools in Nigeria use firewalls to block inappropriate content.
  • MTN Nigeria uses encryption to protect customer calls.
  • Nigerian banks use security scanners to test their systems.
  • Startups in Lagos use automation to update their security software.

๐ŸŽ‰ Fun Examples Children Relate To

  • A script that blocks your little sister from using your computer.
  • A script that sends you a joke every morning.
  • A script that tells you if your favourite game is online.
  • A script that counts how many times your friend says โ€œlagโ€ in a game.

๐Ÿ  Everyday Examples

  • Your home Wi-Fi has a firewall.
  • Your phone uses encryption for messages.
  • Your email uses scripts to block spam.
  • Your bank uses APIs to process transactions.

๐Ÿง‘โ€๐Ÿซ Teacher Notes

Encourage students to think of networks as โ€œcitiesโ€ and scripts as โ€œsecurity guardsโ€. Use the warm-up story to make the concepts relatable. Emphasise the importance of ethical hacking โ€“ using skills for good. Use the Nigerian context to make it relevant. Pair programming and group discussions are highly recommended.

๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ฆ Parent Tips

Help your child by discussing how they use networks and the internet at home. Encourage them to think about security โ€“ what would happen if a hacker got into their device? Remind them that scripts are tools, and like any tool, they can be used for good or bad. Always encourage ethical behaviour.

๐Ÿ’ก Interesting Facts

  • The first firewall was created in 1988.
  • Encryption has been used for thousands of years โ€“ Julius Caesar used it!
  • The first network was created in 1969 โ€“ it was called ARPANET.
  • More than 90% of cyber attacks start with a phishing email.
  • The worldโ€™s first computer virus was called โ€œCreeperโ€.

๐Ÿค” Did You Know?

Did you know that the โ€œ@โ€ symbol was first used in emails in 1971? It was chosen because it was not used much before, so it was perfect for separating the user name from the computer name.

๐Ÿงพ Remember This

  • Networks are groups of connected computers.
  • Firewalls control what enters and leaves a network.
  • Encryption keeps data secret.
  • Ethical hackers are heroes.
  • Always write secure code.
  • Test your scripts before using them.
  • Keep your scripts and secrets safe.

โŒ Common Mistakes

  • Forgetting to validate user input โ€“ can lead to attacks.
  • Hardcoding passwords or API keys in scripts.
  • Not testing scripts before deploying.
  • Ignoring error handling โ€“ scripts can crash.
  • Using weak encryption or no encryption at all.
  • Not updating scripts when new vulnerabilities are found.

โœ… Best Practices

  • Always validate user input.
  • Store secrets in environment variables, not in code.
  • Test scripts thoroughly before deployment.
  • Use encryption for sensitive data.
  • Write clear comments and documentation.
  • Keep scripts updated with security patches.
  • Use version control to track changes.

๐Ÿ“Ÿ ASCII Diagrams

  Network with Firewall
  ---------------------
  [Internet] โ†’ [Firewall] โ†’ [Internal Network]
                      |
                 [Web Server]
                 [Email Server]
                 [User Computers]
  Encryption Process
  ------------------
  Plain Text: "HELLO"
       โ†“
  Encryption Algorithm
       โ†“
  Cipher Text: "KHOOR"
       โ†“
  Decryption Algorithm
       โ†“
  Plain Text: "HELLO"
  API Request Flow
  ----------------
  [Script] โ†’ [API] โ†’ [Service]
      |         |         |
      |         |         V
      |         |    [Returns Data]
      |         V
      |    [API Processes]
      V
  [Script Receives Data]

๐Ÿ“Š Comparison: HTTP vs HTTPS

FeatureHTTPHTTPS
EncryptionNoYes
SecurityNot secureSecure
Port80443
UseOld websitesModern websites, banking

๐Ÿ“Š Comparison: Firewall vs Antivirus

FeatureFirewallAntivirus
PurposeControls network trafficDetects and removes viruses
ScopeNetwork levelFile level
ExampleBlocks incoming connectionsScans files for malware

๐Ÿ“ Endโ€‘ofโ€‘Module Summary

Congratulations! You have completed Module 3 and the entire โ€œFundamentals of Cyber Security Scriptingโ€ course. You now know:

  • What networks are and how to protect them.
  • About IP addresses, ports, and firewalls.
  • How encryption keeps data secret.
  • How to use APIs to talk to other services.
  • How to build scanners, monitors, and alerts.
  • The importance of ethical hacking and secure coding.
  • How to bring everything together to build a security system.

You are now ready to start your journey as a cyber security expert. Keep learning, keep coding, and always use your skills for good. The world needs more heroes like you!

โ“ Frequently Asked Questions

  1. What is the difference between a network and the internet? A network is a group of connected computers. The internet is a huge network of networks.
  2. Why do I need a firewall? A firewall protects your computer from unauthorised access.
  3. Is encryption always safe? Strong encryption is very safe, but it must be implemented correctly.
  4. What is an API key? An API key is a special code that identifies you to an API.
  5. Can I be an ethical hacker? Yes! You can learn and use your skills to protect people.
  6. How do I update my scripts? You can write a script that checks for updates and installs them.
  7. What is a vulnerability? A vulnerability is a weakness in a system that can be exploited.
  8. How do I know if my script is secure? Test it, use secure coding practices, and get feedback from others.
  9. What should I learn next? You can learn about web security, mobile security, or cloud security.
  10. Is cyber security a good career? Yes, it is a very important and growing field!

๐Ÿ“‹ Review Questions

  1. What is a network?
  2. What is an IP address?
  3. What is a port?
  4. What is a firewall?
  5. What is encryption?
  6. What is an API?
  7. What is a security scanner?
  8. Why is logging important?
  9. What is ethical hacking?
  10. What is automation in security?
  11. What is an alert?
  12. What is secure coding?
  13. Give one Nigerian example of a security script.
  14. What is the difference between HTTP and HTTPS?
  15. How can you protect a network?

โœ๏ธ Fillโ€‘inโ€‘theโ€‘Blank

  1. A __________ is a group of connected computers. (network)
  2. An __________ is a unique number for each computer. (IP address)
  3. A __________ is a virtual door on a computer. (port)
  4. A __________ controls network traffic. (firewall)
  5. __________ turns data into secret code. (Encryption)
  6. An __________ lets scripts talk to other services. (API)
  7. A __________ checks for vulnerabilities. (scanner)
  8. __________ records events. (Logging)
  9. __________ is using hacking skills to protect. (Ethical hacking)
  10. __________ lets scripts do tasks automatically. (Automation)

โœ”๏ธ True or False

  1. A network is a group of connected computers. (True)
  2. An IP address is a physical address. (False)
  3. Ports are physical doors. (False)
  4. A firewall allows all traffic. (False)
  5. Encryption keeps data secret. (True)
  6. An API is a type of virus. (False)
  7. A scanner finds vulnerabilities. (True)
  8. Logging is not important. (False)
  9. Ethical hackers are criminals. (False)
  10. Automation saves time. (True)

๐Ÿ”˜ Multiple Choice Questions

  1. What is a network?
    A) A group of connected computers B) A type of virus C) A programming language D) A computer
    Answer: A
  2. What is an IP address?
    A) A unique number for a computer B) A password C) A file D) A folder
    Answer: A
  3. What is a port?
    A) A virtual door B) A physical door C) A type of virus D) A file
    Answer: A
  4. What is a firewall?
    A) A network security system B) A type of virus C) A programming language D) A computer
    Answer: A
  5. What is encryption?
    A) Turning data into secret code B) Deleting data C) Copying data D) Printing data
    Answer: A
  6. What is an API?
    A) A way for scripts to talk to services B) A type of virus C) A programming language D) A computer
    Answer: A
  7. What is a security scanner?
    A) A script that checks for vulnerabilities B) A type of virus C) A programming language D) A computer
    Answer: A
  8. Why is logging important?
    A) To record events B) To delete files C) To print documents D) To play games
    Answer: A
  9. What is ethical hacking?
    A) Using hacking skills to protect B) Hacking for fun C) Hacking for money D) Hacking to cause harm
    Answer: A
  10. What is automation?
    A) Letting scripts do tasks automatically B) Doing tasks by hand C) Writing code D) Testing code
    Answer: A
  11. What is an alert?
    A) A notification of a problem B) A type of virus C) A programming language D) A computer
    Answer: A
  12. What is secure coding?
    A) Writing scripts that are hard to attack B) Writing bad code C) Writing code quickly D) Writing code without comments
    Answer: A
  13. What is a vulnerability?
    A) A weakness in a system B) A type of virus C) A programming language D) A computer
    Answer: A
  14. What port does HTTPS use?
    A) 80 B) 443 C) 21 D) 22
    Answer: B
  15. Which of these is a good security practice?
    A) Hardcoding passwords B) Validating user input C) Ignoring errors D) Not testing code
    Answer: B

๐Ÿ”— Matching Exercises

Match the term with its description:

TermDescription
1. NetworkA. Turns data into secret code
2. FirewallB. A group of connected computers
3. EncryptionC. Controls network traffic
4. APID. A way for scripts to talk to services
5. ScannerE. Checks for vulnerabilities

Answers: 1-B, 2-C, 3-A, 4-D, 5-E

โœ๏ธ Short Answer Questions

  1. Explain what a network is in your own words.
  2. Why are firewalls important?
  3. What is the difference between encryption and hashing?
  4. Give an example of how an API can be used.
  5. Why should you never hardcode passwords in a script?
  6. What is the role of an ethical hacker?
  7. How can automation help security?
  8. What is the purpose of logging?
  9. How do you keep your scripts secure?
  10. What is the most important thing you learned in this module?

๐ŸŽญ Scenarioโ€‘based Exercises

Scenario 1: You are a security expert at a Nigerian bank. You notice that a lot of traffic is coming from a suspicious IP address. Write a simple script (pseudo-code) that blocks this IP address and logs the event.

Scenario 2: A small business in Lagos wants to protect its website. They want a script that checks if the website is up and sends an alert if itโ€™s down. Write a script (pseudo-code) that does this.

๐Ÿ‘ฅ Group Activity

In groups of 3, design a security system for a school. The system should include a firewall, a scanner, a monitor, and an alert system. Draw a diagram and write a description of how each part works. Present your design to the class.

๐Ÿง‘โ€๐ŸŽ“ Individual Activity

Write a Python script that connects to a public API (like a weather API) and prints the current weather for Lagos. Then, add a condition that prints โ€œItโ€™s hot!โ€ if the temperature is above 30ยฐC.

๐Ÿ’ฌ Classroom Discussion Questions

  1. How can scripts be used to protect personal data?
  2. What are some ethical issues with hacking?
  3. How do you think security scripts will evolve in the future?

๐Ÿ› ๏ธ Mini Project

Build a simple intrusion detection system. Write a script that monitors a log file for failed login attempts. If there are more than 3 failed attempts from the same IP address in 5 minutes, send an alert (print a message).

๐Ÿ“‚ Practical Assignment

Write a script that scans a website for common vulnerabilities. Your script should check if the website uses HTTPS, if it has a valid SSL certificate, and if any common ports (like 21, 22, 23) are open. Print a report with your findings.

๐Ÿ† Challenge Exercise

Write a script that simulates a simple firewall. The script should read a list of allowed IP addresses from a file. Then, it should check incoming traffic (simulated by user input) and allow or block it based on the list. Log all attempts.

โœ… Quiz Answers

All multiple-choice answers are indicated in the questions above (bold). Fill-in-the-blank answers: 1-network, 2-IP address, 3-port, 4-firewall, 5-Encryption, 6-API, 7-scanner, 8-Logging, 9-Ethical hacking, 10-Automation. True/False: 1-T, 2-F, 3-F, 4-F, 5-T, 6-F, 7-T, 8-F, 9-F, 10-T.

๐Ÿ”‘ Key Takeaways

  • Networks are groups of connected computers.
  • Firewalls, encryption, and scanners protect networks.
  • APIs let scripts talk to other services.
  • Ethical hackers use their skills for good.
  • Always write secure code and test your scripts.
  • Automation and logging are essential for security.
  • You now have the skills to build basic security tools.

๐Ÿš€ Preparation for Next Module

Congratulations on completing all three modules! You have a solid foundation in cyber security scripting. In the next course, we will dive deeper into web security, mobile security, and cloud security. You will learn about SQL injection, cross-site scripting, and more. Keep learning, keep coding, and always stay curious! See you in the next adventure.


End of Module 3 ยท Fundamentals of Cyber Security Scripting

This concludes the three-module foundation course. Well done, cyber hero!

๐Ÿ† Get Certified

๐Ÿ”’

Earn this certificate

Every lesson is already free to read. Sign up, finish the lessons, pass the exam (โ‚ฆ2,000 or 20,000 coins), and get a verified certificate with your name on it.

๐ŸŽ“ Sign Up to Get Certified
๐Ÿ› ๏ธ Practice Tools
Hands-on simulators & labs - subscription required.
โ†’
๐ŸŽฏ Internship Tasks
Real-world tasks to build your portfolio - unlock them with a subscription.
โ†’