Hiring Partners
Segilola Resources Operating LimitedTaviatech TechnologiesFCMBMTN NigeriaAdvans La Fayette Microfinance BankAboki AfricaFirst Bank of NigeriaOPay
← Fundamentals of Ethical Hacking Level Three · Lesson 4 of 15

Advanced Web Application Hacking

📖 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 Three · Ethical Hacking Level Three

🌐 Module Three · Introduction to Ethical Hacking Level Three

Advanced Web Application Hacking – mastering the hidden dangers of the web.

📖 Module Introduction

Welcome to Module Three! In this module, we will learn about advanced web application hacking. You already know about SQL injection and XSS from Level Two. Now we will go much deeper.

Think of a website like a house. In Level Two, you learned how to check if the doors and windows are locked. Now, in Level Three, you will learn how to check the walls, the foundation, and even the plumbing – things that most people don't even think about.

We will explore SSRF (Server-Side Request Forgery), XXE (XML External Entity attacks), insecure deserialisation, business logic flaws, and API security. By the end of this module, you will be able to find vulnerabilities that most hackers miss.

🎯 Learning Objectives

By the end of this module, you will be able to:

  • Explain what SSRF is and how to exploit it.
  • Understand XXE attacks and how they work.
  • Learn about insecure deserialisation.
  • Understand business logic flaws.
  • Learn about API security and common vulnerabilities.
  • Understand JWT attacks.
  • Apply these ideas to Nigerian schools, businesses, and homes.

📖 Warm‑up Story · The Invisible Invitation

Once upon a time, in a school in Lagos, there was a secret club. To join the club, you needed an invitation from a member. But one clever student named Tunde found a way to get in without an invitation.

Tunde noticed that the club's website had a form where you could enter your name. He typed something special into the form – not his name, but a command that told the server to give him access. The server did exactly what he said, and Tunde got into the club.

That is exactly what SSRF (Server-Side Request Forgery) is – tricking a server into doing something it shouldn't. In this module, we will learn how these attacks work and how to stop them.

📚 Main Lessons

Lesson 1 · What is SSRF (Server-Side Request Forgery)?

Definition: SSRF is an attack where a hacker tricks a server into making requests to other servers or internal systems.

Why it is important: SSRF can allow hackers to access internal systems that are not normally visible from the internet.

Simple explanation: It's like tricking a security guard into opening a door for you by pretending to be someone you're not.

Real‑life example: A hacker might use SSRF to access a company's internal database.

School example: A student might use SSRF to access the teacher's private files on the school server.

Home example: A family member might use SSRF to access the router's settings from outside the house.

Nigerian example: A Nigerian hacker might use SSRF to access a bank's internal systems.

Mini summary: SSRF tricks a server into making requests it shouldn't.

Lesson 2 · How SSRF Works

A hacker finds a website feature that takes a URL as input. The hacker changes the URL to point to an internal system. The server makes the request and returns the response to the hacker.

Lesson 3 · Types of SSRF

  • Basic SSRF: The hacker gets the response directly.
  • Blind SSRF: The hacker doesn't get the response but can still cause changes.

Lesson 4 · What is XXE (XML External Entity)?

Definition: XXE is an attack that exploits how XML parsers process external entities. Hackers can use it to read files or make requests.

Why it is important: XXE can allow hackers to read sensitive files on the server.

Simple explanation: It's like putting a secret code in a form that makes the server give you its secrets.

Real‑life example: A hacker might use XXE to read a password file on a server.

School example: A student might use XXE to read the teacher's notes.

Home example: A family member might use XXE to read private documents on a home server.

Nigerian example: A Nigerian company might be vulnerable to XXE, allowing hackers to read customer data.

Mini summary: XXE exploits XML parsers to read files.

Lesson 5 · How XXE Works

A hacker uploads an XML file with a malicious external entity. The XML parser processes the entity and returns sensitive information.

Lesson 6 · What is Insecure Deserialisation?

Definition: Insecure deserialisation is when a program takes data from an untrusted source and turns it back into an object, without checking if it's safe.

Why it is important: Hackers can use it to run malicious code on the server.

Simple explanation: It's like opening a package without checking who sent it – it could be a bomb.

Real‑life example: A hacker might send a malicious serialised object to a server to gain control.

School example: A student might send a malicious file to the school server to access the network.

Home example: A hacker might send a malicious file to a family's computer to install malware.

Nigerian example: A Nigerian company might be vulnerable to insecure deserialisation.

Mini summary: Insecure deserialisation allows hackers to run code.

Lesson 7 · How Insecure Deserialisation Works

A hacker creates a malicious serialised object and sends it to a server. The server deserialises it and runs the malicious code.

Lesson 8 · What are Business Logic Flaws?

Definition: Business logic flaws are weaknesses in how a website's rules are implemented. Hackers can exploit them to do things they shouldn't.

Why it is important: Business logic flaws can allow hackers to cheat, steal, or break things.

Simple explanation: It's like finding a loophole in a game's rules that lets you win unfairly.

Real‑life example: A hacker might exploit a business logic flaw to get free products from an online store.

School example: A student might exploit a flaw to change their grades.

Home example: A family member might exploit a flaw to get free access to a service.

Nigerian example: A Nigerian e‑commerce site might have a business logic flaw.

Mini summary: Business logic flaws are weaknesses in website rules.

Lesson 9 · API Security

Definition: APIs are how websites talk to each other. API security is about protecting these communications.

Why it is important: If an API is not secure, hackers can access sensitive data.

Simple explanation: It's like protecting the telephone line between two buildings.

Lesson 10 · Common API Vulnerabilities

  • Broken object-level authorisation: Users can access data they shouldn't.
  • Broken authentication: Weak login security.
  • Excessive data exposure: APIs give out too much information.

Lesson 11 · JWT Attacks

Definition: JWT (JSON Web Tokens) are used for authentication. Hackers can attack them by stealing or modifying them.

Simple explanation: It's like stealing someone's ID card.

Lesson 12 · OAuth Vulnerabilities

OAuth is used to allow login with Google or Facebook. Hackers can exploit misconfigurations to steal tokens.

Lesson 13 · GraphQL Security

GraphQL is a new way to build APIs. Hackers can exploit it through injections and excessive requests.

Lesson 14 · Protecting Against Advanced Web Attacks

  • Validate all input.
  • Use parameterised queries.
  • Disable dangerous XML features.
  • Use secure deserialisation.
  • Test business logic thoroughly.

Lesson 15 · The Role of Ethical Hackers in Web Security

Ethical hackers find and report these vulnerabilities before bad hackers can exploit them.

📖 Key Vocabulary (Simple Definitions)

WordSimple meaning
SSRFTricking a server into making requests.
XXEExploiting XML parsers to read files.
Insecure deserialisationTurning unsafe data into objects.
Business logic flawA weakness in website rules.
APIA way for websites to talk to each other.
JWTA token used for authentication.
OAuthA way to login with Google or Facebook.
GraphQLA newer way to build APIs.
SerialisationTurning an object into data.
DeserialisationTurning data back into an object.

🧠 Important Concepts

  • Input validation: Always check what users send you.
  • Least privilege: Give users only the access they need.
  • Defence in depth: Use many layers of security.
  • Zero trust: Never trust user input.

🔢 Step‑by‑Step: How an SSRF Attack Works

  1. Hacker finds a feature that takes a URL input.
  2. Hacker changes the URL to point to an internal system.
  3. The server makes the request.
  4. The server returns the internal response to the hacker.
  5. Hacker gets access to internal information.

🌍 Real‑life Examples

1. Cloud Services: Hackers use SSRF to access metadata services on AWS and Azure.

2. Payment Systems: Hackers exploit business logic flaws to steal money.

🇳🇬 Nigerian Examples

  • A Nigerian fintech company uses input validation to prevent SSRF.
  • A Nigerian university tests for XXE vulnerabilities in their student portal.
  • A Nigerian e‑commerce site fixes business logic flaws.

🎈 Fun Examples for Kids

  • Imagine a game where you can type commands. SSRF is like typing a command that makes the game give you extra lives.
  • XXE is like putting a secret code in a form that makes the computer tell you its secrets.

🏡 Everyday Examples

  • If you use a QR code that takes you to a suspicious website, that could be a security risk.
  • If an app asks for too many permissions, that could be a security issue.

👩‍🏫 Teacher Notes

Use the invisible invitation story to introduce SSRF. Emphasise that these are advanced attacks that require deep understanding. Encourage students to think about how they can protect web applications.

👪 Parent Tips

  • Teach your child to be careful about what they click on.
  • Explain why websites need security.
  • Show them how to check if a website is secure.

✨ Interesting Facts

💡 SSRF was first discovered in 2010.
💡 Many cloud services are vulnerable to SSRF attacks.

❓ Did You Know?

🔹 Many Nigerian companies use API security to protect their data.
🔹 Insecure deserialisation is one of the OWASP Top 10 vulnerabilities.

🧾 Remember This

⚠️ Never trust user input.
🔒 Always validate and sanitise data.
📱 Use secure deserialisation.

❌ Common Mistakes

  • Not validating user input.
  • Allowing XML external entities.
  • Using insecure deserialisation.
  • Not testing business logic.

✅ Best Practices

  • Validate all input.
  • Disable external entities in XML.
  • Use secure deserialisation.
  • Test business logic thoroughly.
  • Use API security best practices.

📊 ASCII Illustrations & Flowcharts

SSRF Attack Flow

    Hacker sends URL ---->  Server makes request
                |                      |
                v                      v
            Internal system  <----  Response returned
    

XXE Attack Flow

    Hacker uploads XML ---->  XML parser processes
                |                      |
                v                      v
            External entity  <----  Sensitive data returned
    

Insecure Deserialisation

    Hacker sends object ---->  Server deserialises
                |                      |
                v                      v
            Malicious code  <----  Server compromised
    

📋 Comparison Table: SSRF vs XXE

SSRFXXE
Tricks server into making requestsExploits XML parsers
Can access internal systemsCan read files
Uses URLsUses XML

📋 Comparison Table: Level Two vs Level Three Web Hacking

Level TwoLevel Three
SQL injectionSSRF, XXE
XSSInsecure deserialisation
CSRFBusiness logic flaws
Basic web testingAPI security

📌 Lesson Summaries

  • Lesson 1: SSRF tricks a server into making requests.
  • Lesson 2: SSRF exploits URL inputs.
  • Lesson 3: Basic and blind SSRF are two types.
  • Lesson 4: XXE exploits XML parsers.
  • Lesson 5: XXE can read files.
  • Lesson 6: Insecure deserialisation runs code.
  • Lesson 7: Deserialisation attacks use malicious objects.
  • Lesson 8: Business logic flaws are rule weaknesses.
  • Lesson 9: APIs need security.
  • Lesson 10: Common API vulnerabilities exist.
  • Lesson 11: JWT attacks steal tokens.
  • Lesson 12: OAuth vulnerabilities can be exploited.
  • Lesson 13: GraphQL needs security.
  • Lesson 14: Validate input and use secure deserialisation.
  • Lesson 15: Ethical hackers find and report vulnerabilities.

📝 End‑of‑Module Summary

In Module Three, we learned about advanced web application hacking. We explored SSRF, XXE, insecure deserialisation, business logic flaws, and API security. These are the types of vulnerabilities that professional ethical hackers look for. Remember, web security is complex, but with the right knowledge, we can protect ourselves and our organisations.

❓ Frequently Asked Questions (10)

  1. Q: What is SSRF?
    A: Tricking a server into making requests.
  2. Q: What is XXE?
    A: Exploiting XML parsers to read files.
  3. Q: What is insecure deserialisation?
    A: Turning unsafe data into objects.
  4. Q: What is a business logic flaw?
    A: A weakness in website rules.
  5. Q: What is an API?
    A: A way for websites to talk to each other.
  6. Q: What is JWT?
    A: A token used for authentication.
  7. Q: What is OAuth?
    A: A way to login with Google or Facebook.
  8. Q: What is GraphQL?
    A: A newer way to build APIs.
  9. Q: How can I protect against SSRF?
    A: Validate all input.
  10. Q: How can I protect against XXE?
    A: Disable external entities.

📌 Review Questions (15)

  1. What is SSRF?
  2. How does SSRF work?
  3. What is XXE?
  4. How does XXE work?
  5. What is insecure deserialisation?
  6. What is a business logic flaw?
  7. What is an API?
  8. What is JWT?
  9. What is OAuth?
  10. What is GraphQL?
  11. How can you protect against SSRF?
  12. How can you protect against XXE?
  13. How can you protect against insecure deserialisation?
  14. What are common API vulnerabilities?
  15. Why are Nigerian businesses at risk from these attacks?

✍️ Fill‑in‑the‑Blank

  1. ________ tricks a server into making requests.
  2. ________ exploits XML parsers.
  3. ________ turns unsafe data into objects.
  4. ________ is a weakness in website rules.
  5. ________ is a way for websites to talk to each other.

✔️ True or False

  1. SSRF can access internal systems. (True)
  2. XXE can read files on a server. (True)
  3. Insecure deserialisation is safe. (False)
  4. Business logic flaws are not dangerous. (False)
  5. APIs don't need security. (False)

🔘 Multiple Choice Questions

  1. What is SSRF?
    A) Tricking a server into making requests B) A type of malware C) A firewall D) A browser
    Answer: A
  2. What is XXE?
    A) Exploiting XML parsers B) A type of malware C) A firewall D) A browser
    Answer: A
  3. What is insecure deserialisation?
    A) Turning unsafe data into objects B) A type of malware C) A firewall D) A browser
    Answer: A
  4. What is a business logic flaw?
    A) A weakness in website rules B) A type of malware C) A firewall D) A browser
    Answer: A
  5. What is an API?
    A) A way for websites to talk B) A type of malware C) A firewall D) A browser
    Answer: A
  6. What is JWT?
    A) A token for authentication B) A type of malware C) A firewall D) A browser
    Answer: A
  7. What is OAuth?
    A) A login method B) A type of malware C) A firewall D) A browser
    Answer: A
  8. What is GraphQL?
    A) A newer way to build APIs B) A type of malware C) A firewall D) A browser
    Answer: A
  9. How can you protect against SSRF?
    A) Validate all input B) Use weak passwords C) Ignore security D) Disable security
    Answer: A
  10. How can you protect against XXE?
    A) Disable external entities B) Use weak passwords C) Ignore security D) Disable security
    Answer: A
  11. How can you protect against insecure deserialisation?
    A) Use secure deserialisation B) Use weak passwords C) Ignore security D) Disable security
    Answer: A
  12. What is the OWASP Top 10?
    A) A list of web vulnerabilities B) A type of malware C) A firewall D) A browser
    Answer: A
  13. What is a common API vulnerability?
    A) Broken object-level authorisation B) Strong passwords C) Good security D) Encryption
    Answer: A
  14. What should you do if you find a vulnerability?
    A) Report it B) Exploit it C) Ignore it D) Share it
    Answer: A
  15. Why do Nigerian companies need web security?
    A) To protect their data B) To make their websites faster C) To save money D) None
    Answer: A

🔗 Matching Exercise

TermMatch with
1. SSRFA. Exploits XML parsers
2. XXEB. Tricking a server into making requests
3. Insecure deserialisationC. Weakness in website rules
4. Business logic flawD. Turning unsafe data into objects
5. APIE. Way for websites to talk

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

✏️ Short Answer Questions

  1. Explain the difference between SSRF and XXE.
  2. What is insecure deserialisation and why is it dangerous?
  3. How can you protect a web application from these attacks?

🎭 Scenario‑based Exercise

Scenario: You are an ethical hacker hired by a bank in Lagos. The bank's website has a feature that takes a URL input. You suspect it might be vulnerable to SSRF. What would you do?

👥 Group Activity

In groups of 4, create a poster that explains SSRF, XXE, and insecure deserialisation. Include examples and how to protect against them.

🧑‍💻 Individual Activity

Write a short essay on why web application security is important for Nigerian businesses.

💬 Classroom Discussion Questions

  • Why do you think advanced web vulnerabilities are so common?
  • How can we educate developers about these risks?
  • What would you do if you discovered a vulnerability in a website you use?

🛠️ Mini Project

Project: Create a security checklist for a web application. Include items for SSRF, XXE, deserialisation, and API security.

🔧 Practical Assignment

Research a real-world SSRF or XXE attack. Write a short report on what happened and how it could have been prevented.

⚡ Challenge Exercise

Research how to protect against insecure deserialisation in Java or Python. Write a one-page explanation.

✅ Quiz Answers (Selected)

  • Fill‑in‑the‑blank: 1) SSRF, 2) XXE, 3) Insecure deserialisation, 4) Business logic flaw, 5) API.
  • True/False: 1T, 2T, 3F, 4F, 5F.

🔑 Key Takeaways

  • SSRF tricks servers into making requests.
  • XXE exploits XML parsers to read files.
  • Insecure deserialisation can run malicious code.
  • Business logic flaws are weaknesses in website rules.
  • APIs need strong security.
  • Always validate input and use secure deserialisation.

🚀 Preparation for Module Four

In Module Four, we will learn about SQL injection and evasion techniques. We will explore advanced SQL injection, blind SQLi, and how to evade detection. Make sure you understand the web security concepts from this module.


🔥 You have completed Module Three of Level Three! Keep up the great work. 🔥

🏆 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.
→