Dia de desafio CTF ๐คช๐คช
Serรก q vou ficar estagnada nesse desafio ๐คฃ๐คฃ
Jรก achei coisa q n tem nd haver com o desafio e nd da resposta ๐คฃ๐คฃ๐คฃ๐ผ
Scaling Database: When and How to Shard
Database sharding refers to splitting data across multiple database servers and is commonly used for scaling. However, sharding introduces major operational and infrastructure complexity that should be ๐ฎ๐๐ผ๐ถ๐ฑ๐ฒ๐ฑ ๐๐ป๐น๐ฒ๐๐ ๐ฎ๐ฏ๐๐ผ๐น๐๐๐ฒ๐น๐ ๐ป๐ฒ๐ฐ๐ฒ๐๐๐ฎ๐ฟ๐.
๐๐น๐๐ฒ๐ฟ๐ป๐ฎ๐๐ถ๐๐ฒ ๐ฆ๐ฐ๐ฎ๐น๐ถ๐ป๐ด ๐๐ฝ๐ฝ๐ฟ๐ผ๐ฎ๐ฐ๐ต๐ฒ๐
Vertical Scaling: Use more powerful single database servers with more CPUs, memory, storage and I/O bandwidth. Much simpler to manage than sharding.
SQL Optimization: Tune SQL queries and database schema to maximize performance on a single server using proper indexes, efficient SQL, etc.
Caching: Use in-memory caches like Redis to reduce database load by serving common queries from the cache instead of hitting the database every time.
Read Replicas + Load Balancer: Add horizontal read scaleability without full complexity of sharding. Directs reads across replicas.
These optimization approaches should be exhausted before considering sharding.
๐ฆ๐ต๐ฎ๐ฟ๐ฑ๐ถ๐ป๐ด ๐ ๐ฒ๐๐ต๐ผ๐ฑ๐
There are two high-level approaches:
Vertical Sharding: Split database into columnar tables or sections vs rows. For example, having one table for names and another table for emails.
Horizontal Sharding: Split database into row partitions distributed evenly across multiple servers. Methods include range based, directory based, and hash based sharding.
๐ช๐ต๐ฒ๐ป ๐๐ต๐ฎ๐ฟ๐ฑ๐ถ๐ป๐ด, ๐๐๐ฒ ๐๐ต๐ฒ ๐๐ถ๐บ๐ฝ๐น๐ฒ๐๐ ๐ฎ๐ฝ๐ฝ๐ฟ๐ผ๐ฎ๐ฐ๐ต that meets requirements to minimize complexity. Seek to avoid sharding until necessary despite the scaling benefits. The infrastructure and operational overheads often outweigh gains.
โ
Subscribe to our weekly newsletter to get a Free System Design PDF (158 pages): https://t.co/kNfv0DVDdf
Top 6 Load Balancing Algorithms.
๐น Static Algorithms
1. Round robin
The client requests are sent to different service instances in sequential order. The services are usually required to be stateless.
2. Sticky round-robin
This is an improvement of the round-robin algorithm. If Aliceโs first request goes to service A, the following requests go to service A as well.
3. Weighted round-robin
The admin can specify the weight for each service. The ones with a higher weight handle more requests than others.
4. Hash
This algorithm applies a hash function on the incoming requestsโ IP or URL. The requests are routed to relevant instances based on the hash function result.
๐น Dynamic Algorithms
5. Least connections
A new request is sent to the service instance with the least concurrent connections.
6. Least response time
A new request is sent to the service instance with the fastest response time.
--
Subscribe to our weekly newsletter to get a Free System Design PDF (158 pages): https://t.co/FIzCeaWsZV
Reverse engineering and vulnerability analysis of DJI drones' firmware.
A two-parts blog series by @nozominetworks
Firmware Analysis: https://t.co/iS1ZZJGpFC
Vulnerability Analysis: https://t.co/AWxOI1FzTd
Particularly interesting is the chain of weak Wi-Fi password cracking (CVE-2023-6951) followed by the unauthenticated video exfiltration (CVE-2023-6949)
#dji #drone
This week we will cover:
โ SQL execution order
โ Edge computing vs cloud computing
โ DNS lookup
โ Serverless architecture best practices & pitfalls
Donโt want to miss out? Subscribe to our free newsletter for a weekly deep dive & content roundup: https://t.co/o8ShggS5mk
TETRA (Terrestrial Trunked Radio): security analysis and vulnerabilities
Great research work by Carlo Meijer, Wouter Bokslag and Jos Wetzels
Paper: https://t.co/vx9onVy2FR
Slides: https://t.co/ua14ZIWwKk
Repo: https://t.co/cDg89pkvNG
#tetra#wireless#infosec
Internals of compilers, linkers, JITs and assemblers with focus on software security hardening)
Low-Level Software Security for Compiler Developers:
https://t.co/7tIZD6zFwP
#infosec#compilers#cybersecurity
HTTPS is used everywhere.
But most engineers canโt explain how it simply works.
Letโs change that.
HTTP is a protocol to exchange data, most popularly used between a web browser and a website. ๐ก
HTTPS is the secure version of that protocol. ๐ก
Why is it secure?
Encryption. ๐ถโ๐ซ๏ธ
The data is encrypted so that only the web browser and the website can read it locally.
Without this, man-in-the-middle (MITM) attacks could intercept your traffic and read sensitive data like passwords, credit card details, etc. ๐ฑ
The protocol used to encrypt the data is TLS (Transport Layer Security).
HTTPS = HTTP + TLS. Simple as that.
HTTPS uses asymmetric cryptography to encrypt the data. You have:
๐ a private key - the websiteโs SSL certificateโs secret key that isnโt shared with anyone.
๐ a public key - the certificateโs public key, shared with everyone who wants to interact with the website.
๐ก Asymmetric cryptography simply means information thatโs encrypted by the public key can only be decrypted by the private key. And vice versa.
In contrast, symmetric cryptography is when only one key is used, and data can be encrypted/decrypted with that same key.
HTTPS actually uses both types! ๐
Asymmetric cryptography is used to verify the server and securely generate a session key thatโll be used for symmetric cryptography.
The session key, as it implies, only lives within the session and is used by both the client & server to encrypt/decrypt data.
Most interestingly, this key is deterministically generated by both the client and server independently - it never crosses the wire. ๐ช
So. What are the steps?
1. Client (browser) connects to a server (web page)
2. Server sends its SSL certificate (includes the public key).
3. Client & Server do a TLS handshake & generate a session key to encrypt/decrypt future HTTP data.
4. Business as usual.
The details are in the TLS handshake, and thatโs frankly the most interesting part of how HTTPS works.
The TLS handshake serves three purposes:
๐ง 1. authenticate the identity of the server
โจ 2. generate session keys for encryption during this single session
๐ค 3. decide which version of TLS and what cipher suites youโll use
Step by step (RSA Algorithm):
1. Client Hello Request: The client initiates the handshake with a message including what TLS version and ciphers it supports, including a string of random bytes (client random)
2. Server Hello Response: The server chooses a cipher suite and generates its own random string bytes (server random). It responds with the suite, its SSL certificate, and the server random.
3. Client Verification: The client verifies the certificate via the trusted certificate authority that issued it. The SSL certificate has a digital signature thatโs signed by the CAโs private key so the client uses the CAโs public key to decrypt it.
After this step, the Client has verified that the certificate is the legitimate one verified via the CA - not one fabricated on the fly.
Note it still doesnโt know for sure whether the server actually owns that certificate (i.e has the private key)
Side note: who says what Certificate Authority can be trusted?
Your browserโs provider!
Apple, Microsoft, Google, Mozilla and etc. all maintain their own lists of CAs.
Your browser and operating system ship with this list of trusted CAs.
Itโs all based on โtrustโ, so you better trust them!
Anyway, continuing...
4. Client Key Exchange: The client creates a random string of bytes called the โpremaster secretโ. It encrypts it with the public key of the server it got from the SSL certificate and sends it over.
5. Session Key Generation: The server decrypts the premaster secret using the SSL certificateโs private key. Both the client and server, independently, generate session keys using the client random, server random, and the premaster secret.
Since theyโre using the same data and deterministic algorithm, they should arrive at the same results. If they donโt - the subsequent encryption/decryption wonโt result in the HTTP protocol.
๐ก This step indirectly verifies to the client that the server has possession of the SSL certificate it presented (it didnโt just pretend to have it)
6. Done! The session key is now used to symmetrically encrypt/decrypt HTTP data.