Advanced Web Application Hacking – mastering the hidden dangers of the web.
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.
By the end of this module, you will be able to:
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.
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.
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.
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.
A hacker uploads an XML file with a malicious external entity. The XML parser processes the entity and returns sensitive information.
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.
A hacker creates a malicious serialised object and sends it to a server. The server deserialises it and runs the malicious code.
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.
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.
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.
OAuth is used to allow login with Google or Facebook. Hackers can exploit misconfigurations to steal tokens.
GraphQL is a new way to build APIs. Hackers can exploit it through injections and excessive requests.
Ethical hackers find and report these vulnerabilities before bad hackers can exploit them.
| Word | Simple meaning |
|---|---|
| SSRF | Tricking a server into making requests. |
| XXE | Exploiting XML parsers to read files. |
| Insecure deserialisation | Turning unsafe data into objects. |
| Business logic flaw | A weakness in website rules. |
| API | A way for websites to talk to each other. |
| JWT | A token used for authentication. |
| OAuth | A way to login with Google or Facebook. |
| GraphQL | A newer way to build APIs. |
| Serialisation | Turning an object into data. |
| Deserialisation | Turning data back into an object. |
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.
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.
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
| SSRF | XXE |
|---|---|
| Tricks server into making requests | Exploits XML parsers |
| Can access internal systems | Can read files |
| Uses URLs | Uses XML |
| Level Two | Level Three |
|---|---|
| SQL injection | SSRF, XXE |
| XSS | Insecure deserialisation |
| CSRF | Business logic flaws |
| Basic web testing | API security |
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.
| Term | Match with |
|---|---|
| 1. SSRF | A. Exploits XML parsers |
| 2. XXE | B. Tricking a server into making requests |
| 3. Insecure deserialisation | C. Weakness in website rules |
| 4. Business logic flaw | D. Turning unsafe data into objects |
| 5. API | E. Way for websites to talk |
Answers: 1-B, 2-A, 3-D, 4-C, 5-E
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?
In groups of 4, create a poster that explains SSRF, XXE, and insecure deserialisation. Include examples and how to protect against them.
Write a short essay on why web application security is important for Nigerian businesses.
Project: Create a security checklist for a web application. Include items for SSRF, XXE, deserialisation, and API security.
Research a real-world SSRF or XXE attack. Write a short report on what happened and how it could have been prevented.
Research how to protect against insecure deserialisation in Java or Python. Write a one-page explanation.
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. 🔥