Learn Coding & Cybersecurity

A simple guide: from your first line of code, to protecting yourself from hackers, to the laws you need to know before you try anything.

πŸŽ“ Private tutoring for a reasonable fee πŸ“© Contact us on Telegram

πŸ’» Coding

Coding means writing instructions that a computer understands and carries out. It's the foundation of everything in tech: apps, games, websites, and even cybersecurity tools.

A plan to get started

  1. Pick one language β€” we suggest Python: it's easy to read and widely used in cybersecurity, AI and automation.
  2. Learn the basics: variables, conditions (if), loops (for and while), functions, and lists.
  3. Practice every day, even for 30 minutes: you learn to code by doing, not just by watching.
  4. Build small projects: a calculator, a number-guessing game, or a password generator.
  5. Learn Git and GitHub: to save and share your projects and build a portfolio.
  6. Choose a specialty: web development, game development, data analysis, or cybersecurity.

Your first program: a password strength checker

This Python program combines coding and security β€” it checks whether a password is strong:

password = input("Enter a password: ")

long_enough = len(password) >= 12
has_digit = any(ch.isdigit() for ch in password)
has_symbol = any(not ch.isalnum() for ch in password)

if long_enough and has_digit and has_symbol:
    print("Strong password βœ…")
else:
    print("Weak ❌ Use 12+ characters with numbers and symbols")

You can try it for free without installing anything in Google Colab.

Practice: type the code yourself

Type the code shown into the box next to it, character by character, then press "Check". Typing it yourself teaches you how commands are written faster than copying.

Exercise 1: your first printThe print command shows any text on the screen.
print("Hello, World!")
Output:
Hello, World!
Exercise 2: variablesA variable is a box that stores a value so you can use it later.
name = "Sara"
age = 20
print(name, age)
Output:
Sara 20
Exercise 3: conditionsif runs a command when the condition is true, and else runs another one. Watch the spaces at the start of lines (press Tab).
score = 85
if score >= 50:
    print("You win!")
else:
    print("Game over")
Output:
You win!
Exercise 4: loopsfor repeats a command several times β€” here, 3 login attempts.
for attempt in range(3):
    print("Login attempt", attempt + 1)
Output:
Login attempt 1
Login attempt 2
Login attempt 3

Resources

πŸ›‘οΈ Cybersecurity

Cybersecurity is protecting devices, networks and data from hacking, theft and sabotage.

The three core principles

πŸ”’ Confidentiality

Only authorized people can see the information.

βœ… Integrity

Information isn't changed without permission.

⚑ Availability

Services and information stay accessible when you need them.

The most common attacks

Phishing
Fake messages or websites pretending to be a bank, a company or a game, to steal your details.
Malware
Harmful software that often comes with unknown files, game "hacks" or pirated software, and steals your accounts or spies on you.
Ransomware
Encrypts your files and demands money to give them back.
Social engineering
Tricking the person rather than the system β€” like a call from "customer support" asking for your verification code.
Password theft
Trying passwords leaked from other sites on your accounts, because many people reuse the same password.

Protect yourself in 6 steps

How does an attacker think?

To protect a system, you need to understand how someone trying to break into it thinks. Most attacks go through similar stages known as the "Cyber Kill Chain", and stopping the attacker at any stage makes the whole attack fail.

  1. Reconnaissance: gathers information about the victim from the internet and social media, and looks for exposed devices and services.πŸ›‘οΈ Defense: share less about yourself and your work, and close services you don't need.
  2. Weaponization: prepares the attack tool, such as a convincing phishing message or a booby-trapped file.πŸ›‘οΈ Defense: regular updates defeat many ready-made tools.
  3. Delivery: sends the tool by email, message, link, or a game "hack".πŸ›‘οΈ Defense: don't open unknown attachments or links, and turn on email filtering.
  4. Exploitation: exploits a software flaw or a human mistake to run the malicious code.πŸ›‘οΈ Defense: update your software and use an account with limited privileges.
  5. Installation: plants a program that stays on the device even after a restart.πŸ›‘οΈ Defense: security software, and watching for any new program you didn't install.
  6. Command & control: the infected device connects to the attacker's server to receive orders.πŸ›‘οΈ Defense: monitor the network β€” this is where network analysis comes in (below).
  7. Actions on objectives: stealing data, encrypting it for ransom, or spying.πŸ›‘οΈ Defense: backups, encrypting important data, and watching for data leaving the network.

Rules of the attacker mindset:

To go deeper: the MITRE ATT&CK framework documents real attacker techniques in detail and is used by defenders worldwide.

We explain these stages so you can detect and stop attacks. Applying them to any system without its owner's permission is a crime.

Network analysis: see what's happening on your network

Everything you send over the internet is split into small packets, and each packet has a sender address, a receiver address and a port number that identifies the type of service. Network analysis means reading these packets to understand what's happening and spot anything unusual β€” one of the most important skills for a security analyst.

πŸ–₯️ IP address

A device's address on the network, like 192.168.1.5 at home.

πŸšͺ Port

The "door" number a service uses: 443 for encrypted websites (HTTPS), 53 for DNS, and 22 for SSH.

πŸ“¦ TCP and UDP

TCP makes sure all data arrives; UDP is faster without that check, like streaming and games.

πŸ“– DNS

The internet's phone book: it turns a website name into an IP address.

Commands you can run on your computer now (in the command prompt or terminal):

ping google.com
Does the site respond, and how long does it take?
tracert google.com (on Linux and Mac: traceroute)
The path your data takes through devices to reach it.
nslookup google.com
What is this site's IP address?
netstat -an
All the connections open on your computer right now β€” the first command used to hunt for a suspicious connection.

Wireshark: a free program that captures network packets and shows them for analysis. After capturing, type a "filter" to show only what matters:

dns
The website names the device looked up.
http
Unencrypted connections, whose content can be read.
tcp.port == 443
Encrypted connections to websites (HTTPS).
ip.addr == 192.168.1.5
Everything involving one specific device.
tcp.flags.syn == 1 && tcp.flags.ack == 0
The start of new connections; lots of them from one address may mean a port scan.

Practice on ready-made files without capturing anything, from the Wireshark sample captures library.

⚠️ Signs worth your attention:

Only analyze your own network. Capturing or intercepting someone else's network data without permission is a crime β€” in Saudi Arabia, under Article 3 of the Anti-Cyber Crime Law.

Challenge yourself: analyze the connections

Challenge 1: These connections left a computer on a home network. Which one looks suspicious?

Challenge 2: In a server log, the address 203.0.113.9 tried to connect to ports 21, 22, 23, 25, 80, 443 and 3389 within two seconds. What's happening?

How to start a career in cybersecurity

  1. Networking basics: how the internet works (IP, DNS and HTTP).
  2. Linux and the command line: most security tools run on it.
  3. Coding: Python to write your own tools and automate your work.
  4. Security concepts: encryption, authentication, and common web vulnerabilities.
  5. Hands-on practice on legal platforms (below).
  6. A beginner certification such as CompTIA Security+.

Popular specialties include SOC analyst, penetration tester, incident response, cloud security, and governance & compliance.

Legal practice platforms

These platforms are built for practicing with their owners' permission. Trying anything on any other website, device or account without permission is a crime β€” even if your goal is "learning".

In Saudi Arabia, follow the National Cybersecurity Authority for its programs and guidance.

βš–οΈ Cyber law

The golden rule: don't access, scan or test any system, account or website you don't own without written permission from its owner. Wanting to "learn" doesn't make access authorized.

Saudi Arabia's Anti-Cyber Crime Law

Issued by Royal Decree No. M/17 in 1428H (2007), it defines cybercrimes and their penalties (official text from the Bureau of Experts at the Council of Ministers). Each article's penalty is prison, a fine, or both, up to these maximums:

Article 3

Up to 1 year in prison and/or a fine of up to SAR 500,000

Spying on or intercepting data sent over a network, unlawful access to threaten or blackmail someone, unlawful access to a website to change its design or damage it, invading privacy by misusing camera phones, and defaming others.

Article 4

Up to 3 years in prison and/or a fine of up to SAR 2 million

Taking money or bonds through fraud or a false name or identity, and accessing bank or credit data without legal justification.

Article 5

Up to 4 years in prison and/or a fine of up to SAR 3 million

Unlawful access to delete, leak, damage or alter private data, stopping or disrupting a network, and blocking access to a service.

Article 6

Up to 5 years in prison and/or a fine of up to SAR 3 million

Producing, sending or storing material that harms public order, religious values, public morals or privacy, creating websites for human trafficking or drugs, and publishing pornographic material.

Article 7

Up to 10 years in prison and/or a fine of up to SAR 5 million

Creating websites for terrorist organizations, and unlawful access to obtain data affecting the state's internal or external security or its national economy.

Personal Data Protection Law

Regulates how personal data is collected and used in Saudi Arabia, supervised by the Saudi Data & AI Authority (SDAIA). Its penalties include up to 2 years in prison and/or a fine of up to SAR 3 million for disclosing or publishing sensitive data to harm its owner or for personal gain, and fines of up to SAR 5 million for other violations.

Other Arab countries

Most Arab countries have similar laws that criminalize hacking, blackmail and online fraud, including:

At the international level: the International Criminal Court

In December 2025, the Office of the Prosecutor of the International Criminal Court (ICC) issued its Policy on Cyber-Enabled Crimes under the Rome Statute. Its core message: the Rome Statute is "technology-neutral", so genocide, crimes against humanity, war crimes, aggression, and offences against the Court's administration of justice can all be committed or facilitated by cyber means β€” and their perpetrators will be pursued just like those who use conventional weapons. The Court only deals with the most serious international crimes.

The ICC does not handle ordinary cybercrimes such as unauthorized access or online fraud. Those remain crimes under national laws (like the ones above) and international treaties such as the Budapest Convention on Cybercrime and the UN Convention against Cybercrime. But the same act can be both a national crime and an international one if it meets the requirements of each.

Examples from the policy of acts that may amount to international crimes, if their other conditions are met:

Being blackmailed or hacked?

This page is for awareness only and is not legal advice. Laws can change, so always check the official text or ask a qualified lawyer. Official texts: Anti-Cyber Crime Law and Personal Data Protection Law. Last reviewed: September 2026.