Skip to content

Commit 39540ae

Browse files
committed
yup thm
1 parent c5a14ab commit 39540ae

File tree

2 files changed

+96
-0
lines changed

2 files changed

+96
-0
lines changed

src/SUMMARY.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@
1111

1212
# Enumeration
1313
- [content-discovery-recon](./hacking/content-discovery-recon.md)
14+
15+
# TryHackMe
16+
- [putting-all-together](./tryhackme/Putting-all-together.md)

src/tryhackme/Putting-all-together.md

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
- Load Balancers
2+
- CDN(Content Delivery Network)
3+
- Databases
4+
- WAF(Web application Firewalls)
5+
- How a web server works.
6+
<hr>
7+
8+
#### Load Balancers
9+
Load balancers ensure websites can handle high traffic and provide failover if a server becomes unresponsive.
10+
When you request a website, the load balancer forwards the request to one of the multiple servers behind it, using algorithms like round-robin (sequential) or weighted (least busy).
11+
They also perform health checks on servers. If a server becomes unresponsive, the load balancer will stop sending traffic until it's functional again.
12+
13+
14+
![img](https://tryhackme-images.s3.amazonaws.com/user-uploads/5c549500924ec576f953d9fc/room-content/829e340231cd8aa9f5ed2fa5c464ea80.svg)
15+
16+
#### Content Delivery Network
17+
A CDN reduces traffic to busy websites by hosting static files (JavaScript, CSS, images, videos) across thousands of servers worldwide. When a user requests a file, the CDN sends it from the nearest server instead of a distant location.
18+
##### Databases
19+
Websites store user data by communicating with databases, ranging from simple text files to complex server clusters for speed and resilience. Common databases include MySQL, MSSQL, MongoDB, and PostgreSQL, each with unique features.
20+
21+
22+
![img](https://www.tatvasoft.com/blog/wp-content/uploads/2023/01/Types-of-NoSQL-Databases-2-min-768x389.jpg)
23+
24+
#### Web Application Firewalls
25+
A WAF sits between the user and the web server, protecting against hacking or denial of service attacks. It analyzes web requests for common attack techniques, checks if the request is from a real browser, and uses rate limiting to control excessive requests. Suspicious requests are dropped before reaching the web server.
26+
27+
![img](https://tryhackme-images.s3.amazonaws.com/user-uploads/5c549500924ec576f953d9fc/room-content/24cb6468b4e51e8d8bbe7872e96a22b3.svg)
28+
29+
### How a Web Server Works.
30+
- Virtual Hosts
31+
- Static vs Dynamic content
32+
- Scripting / Backend language
33+
34+
35+
###### Virtual Hosts on Web Servers
36+
37+
Web servers use **virtual hosts** to host multiple websites with different domain names. Here's how it works:
38+
39+
- The server checks the **hostname** in the HTTP headers.
40+
- It matches the hostname to a virtual host configuration.
41+
- If a match is found, the corresponding website is served.
42+
- If no match is found, the default website is shown.
43+
44+
###### Directory Mapping
45+
Each virtual host can have its root directory mapped to a specific location on the server, for example:
46+
47+
- `one.com``/var/www/website_one`
48+
- `two.com``/var/www/website_two`
49+
50+
###### Unlimited Hosting
51+
There’s no limit to the number of websites a web server can host using virtual hosts.
52+
53+
#### Static vs Dynamic Content
54+
##### Static Content
55+
- Content that never changes.
56+
- Examples: Images, JavaScript, CSS, and unchanging HTML files.
57+
- Served directly from the web server without modifications.
58+
##### Dynamic Content
59+
- Content that changes based on requests.
60+
- Examples: Blog homepages showing the latest entries or search results.
61+
- Generated by the **Backend** using programming and scripting languages
62+
##### Frontend vs Backend
63+
- **Backend**: Processes and generates dynamic content behind the scenes.
64+
- **Frontend**: Displays the resulting content (HTML, CSS, etc.) in the browser.
65+
66+
#### Backend Languages and Interactivity
67+
68+
##### Backend Capabilities
69+
- Make websites interactive by:
70+
- Interacting with databases.
71+
- Calling external services.
72+
- Processing user data.
73+
- Examples of backend languages: PHP, Python, Ruby, NodeJS, Perl, etc.
74+
75+
##### Example: PHP Script
76+
Requesting `http://example.com/index.php?name=adam` with the script:
77+
78+
```php
79+
<html><body>Hello <?php echo $_GET["name"]; ?></body></html>
80+
```
81+
output:
82+
```
83+
<html><body>Hello adam</body></html>
84+
```
85+
86+
87+
&nbsp;
88+
<p align="center">
89+
<img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/footers/gray0_ctp_on_line.svg?sanitize=true" />
90+
</p>
91+
<p align="center">
92+
Copyright &copy; 2024-present <a href="https://github.com/codedsprit" target="_blank">codedsprit.xyz</a>
93+
</p>

0 commit comments

Comments
 (0)