1- # Offensive Security Intro – Lab Notes
1+ ---
2+ type : resource-note
3+ status : done
4+ created : 2026-03-11
5+ updated : 2026-03-11
6+ tags : [security-writeup, tryhackme, offensive-security, web]
7+ source : TryHackMe - Offensive Security Intro
8+ platform : tryhackme
9+ room : Offensive Security Intro
10+ slug : offensive-security-intro
11+ path : TryHackMe/00-foundations/intro-cybersecurity/offensive-security-intro.md
12+ topic : 00-foundations
13+ domain : [foundations, web]
14+ skills : [recon, web-enum, reporting]
15+ artifacts : [concept-notes, lab-notes]
16+ sanitized : true
17+ ---
18+
19+ # Offensive Security Intro
220
3- - ** Type:** Guided web exploitation lab
4- - ** Focus:** Offensive Security / Web Hacking Basics / Directory Brute Force
21+ - ** Type:** Guided web exploitation lab
22+ - ** Focus:** Offensive Security / Web Hacking Basics / Directory Brute Force
523- ** Lab context:** TryHackMe “FakeBank” training room (simulated target)
624
725---
826
9- ## 1. What is Offensive Security?
27+ ## Summary
1028
1129Offensive security is about ** thinking and acting like an attacker** in a controlled, legal setting.
1230
1331Typical activities include:
1432
15- - Breaking into computer systems and web applications.
16- - Exploiting software bugs and misconfigurations.
33+ - Breaking into computer systems and web applications.
34+ - Exploiting software bugs and misconfigurations.
1735- Finding hidden functionality and logic flaws that lead to unauthorised access.
1836
1937The goal is ** not** chaos. The goal is:
@@ -22,19 +40,21 @@ The goal is **not** chaos. The goal is:
2240
2341This mindset is used in:
2442
25- - Penetration testing
26- - Red teaming
27- - Adversary emulation
43+ - Penetration testing
44+ - Red teaming
45+ - Adversary emulation
2846- Security research / bug bounty
2947
3048---
3149
32- ## 2. FakeBank Scenario – Your First Legal “Hack”
50+ ## Key Concepts
3351
34- In this lab, the target is a ** fake online banking application** called ` FakeBank ` .
52+ ### 2. FakeBank Scenario – Your First Legal “Hack”
53+
54+ In this lab, the target is a ** fake online banking application** called ` FakeBank ` .
3555You are given:
3656
37- - A normal user account in the system.
57+ - A normal user account in the system.
3858- A fully isolated virtual machine where attacking the site is allowed.
3959
4060Objective of the exercise:
@@ -47,114 +67,120 @@ This is a classic “broken access control / hidden feature” scenario in web s
4767
4868---
4969
50- ## 3. Discovering Hidden Functionality with ` dirb `
70+ ### 3. Discovering Hidden Functionality with ` dirb `
5171
52- ### 3.1 Idea
72+ #### 3.1 Idea
5373
5474Many web applications expose sensitive features on ** “secret” URLs** :
5575
56- - ` /admin ` , ` /manage ` , ` /backup ` , ` /test ` , etc.
76+ - ` /admin ` , ` /manage ` , ` /backup ` , ` /test ` , etc.
5777- Developers assume “nobody will guess this path”, which is obviously wrong.
5878
5979A common offensive technique is ** directory brute forcing** :
6080
61- - Take a wordlist of common names (e.g. ` admin ` , ` login ` , ` bank-deposit ` ).
62- - For each word, send an HTTP request and check if the path exists.
81+ - Take a wordlist of common names (e.g. ` admin ` , ` login ` , ` bank-deposit ` ).
82+ - For each word, send an HTTP request and check if the path exists.
6383- Tools: ` dirb ` , ` dirbuster ` , ` ffuf ` , ` gobuster ` , …
6484
65- ### 3.2 Running ` dirb ` Against FakeBank
85+ #### 3.2 Running ` dirb ` Against FakeBank
6686
6787Basic usage in the lab:
6888
6989``` bash
7090dirb http://fakebank.thm
7191```
92+
7293Key observations:
7394
74- - ` dirb ` uses a wordlist such as ` common.txt ` to generate candidate paths.
95+ - ` dirb ` uses a wordlist such as ` common.txt ` to generate candidate paths.
7596
76- - Lines starting with ` + ` in the output indicate paths that actually exist.
97+ - Lines starting with ` + ` in the output indicate paths that actually exist.
7798
7899In this room, ` dirb ` discovers two interesting URLs, including:
79100
80- - ` http://fakebank.thm/images ` – static resources
101+ - ` http://fakebank.thm/images ` – static resources
81102
82- - ` http://fakebank.thm/bank-deposit ` – ** hidden deposit page** (sensitive function)
103+ - ` http://fakebank.thm/bank-deposit ` – ** hidden deposit page** (sensitive function)
83104
84105The second one is the real target.
85106
86107---
87108
88- ## 4. Abusing the Hidden Deposit Page
109+ ### 4. Abusing the Hidden Deposit Page
89110
90111Once the hidden page ` /bank-deposit ` is found:
91112
92- 1 . Open ` http://fakebank.thm/bank-deposit ` in the browser.
113+ 1 . Open ` http://fakebank.thm/bank-deposit ` in the browser.
93114
94- 2 . The page allows adding funds to any bank account number.
115+ 2 . The page allows adding funds to any bank account number.
95116
96- 3 . You know your own account ID from the previous task (e.g. ` 8881 ` ).
117+ 3 . You know your own account ID from the previous task (e.g. ` 8881 ` ).
97118
98- 4 . Enter your account number and deposit amount (e.g. ` 2000 ` ).
119+ 4 . Enter your account number and deposit amount (e.g. ` 2000 ` ).
99120
100121This is a textbook example of ** missing access control** :
101122
102- - The application exposes a powerful operation (add funds).
123+ - The application exposes a powerful operation (add funds).
103124
104- - It does not verify whether the user is authorised to perform it.
125+ - It does not verify whether the user is authorised to perform it.
105126
106- - There is no server-side check like “only staff accounts may access this page”.
127+ - There is no server-side check like “only staff accounts may access this page”.
107128
108129After submitting the form, your account balance becomes positive and the site shows a success popup (plus a small “flag” for the room).
109130
110131---
111132
112- ## 5. Key Takeaways from This Lab
133+ ### 5. Key Takeaways from This Lab
113134
114135** 1. Security-by-obscurity fails.**
115136
116- - Hiding a function behind a secret URL is not real security.
137+ - Hiding a function behind a secret URL is not real security.
117138
118- - Directory brute-force tools will eventually find it.
139+ - Directory brute-force tools will eventually find it.
119140
120141** 2. Every sensitive action needs proper access control.**
121142
122- - Operations that move money, change passwords, or modify data must be restricted and checked on the server side.
143+ - Operations that move money, change passwords, or modify data must be restricted and checked on the server side.
123144
124- - The client (browser) must never be trusted to enforce rules.
145+ - The client (browser) must never be trusted to enforce rules.
125146
126147** 3. Wordlists encode common developer habits.**
127148
128- - Many people name pages with predictable words: ` admin ` , ` backup ` , ` test ` , ` deposit ` , etc.
149+ - Many people name pages with predictable words: ` admin ` , ` backup ` , ` test ` , ` deposit ` , etc.
129150
130- - Wordlists like ` common.txt ` are basically “crowdsourced intuition” of what humans tend to choose.
151+ - Wordlists like ` common.txt ` are basically “crowdsourced intuition” of what humans tend to choose.
131152
132153** 4. Offensive labs are safe sandboxes.**
133154
134- - You are allowed to break things inside the provided VM.
155+ - You are allowed to break things inside the provided VM.
135156
136- - The same techniques are illegal against real systems without explicit permission.
157+ - The same techniques are illegal against real systems without explicit permission.
137158
138159---
139160
140- ## 6. Checklist: Basic Web Discovery Attack Flow
161+ ### 6. Checklist: Basic Web Discovery Attack Flow
141162
142163Minimal mental model you can reuse for future labs:
164+
143165- Identify target URL or domain.
144166- Run a directory brute-force scan (e.g. ` dirb ` , ` ffuf ` ) with a reasonable wordlist.
145167- Review discovered paths:
168+
146169 - Static content? (` /images ` , ` /css ` ) → usually low impact.
147170 - Dynamic or sensitive actions? (` /admin ` , ` /deposit ` , ` /backup ` ) → investigate further.
171+
148172- Open promising paths in the browser and test:
173+
149174 - What functionality do they expose?
150175 - Is authentication required?
151176 - Is authorisation enforced correctly?
177+
152178- Check if you can perform actions you should not be allowed to do (e.g. add money, view other users’ data).
153179- Document the issue clearly: ** impact, steps to reproduce, and suggested fix** .
154180
155181---
156182
157- ## 7. Glossary (EN–ZH)
183+ ### 7. Glossary (EN–ZH)
158184
159185Offensive security – 进攻性安全
160186
@@ -179,5 +205,3 @@ Hidden/secret URL – 隐藏 URL / 秘密路径
179205Virtual machine (VM) – 虚拟机
180206
181207Flag – (CTF/实验室中的)标志字符串,用于确认完成任务
182-
183-
0 commit comments