Understanding Odds Ratio and Risk Ratio

šŸ“Š Understanding Odds Ratio and Risk Ratio šŸŽÆ What is Risk Ratio? Risk Ratio is a measure that represents the ratio of risks (incidence rates) between two groups. Let’s explain using hypothetical data: COVID-19 Positive COVID-19 Negative Total Incidence Rate Not Wearing Mask 90 10 100 Pa = 90% Wearing Mask 40 160 200 Pb = 20% šŸ’” Calculating Risk Ratio Risk Ratio is calculated using the following formula: ...

September 1, 2024 Ā· 2 min Ā· 341 words Ā· 0xuki

Hugo Cheat Sheet

Hugo is a fast static site generator written in Go. Here are its key features: ⚔ Ultra-fast build speed šŸ“¦ Simple installation and configuration šŸŽØ Rich themes and customization options šŸ“ Content management with Markdown šŸ”„ Hot reload for improved development efficiency 🌐 Multi-language support šŸ› ļø Rich shortcodes and template functionality Hugo can be used for various purposes such as blogs, portfolios, and documentation sites. šŸš€ Installing Hugo While homebrew is the standard installation method, we’ll use the tar ball for better security considerations. ...

August 20, 2024 Ā· 2 min Ā· 310 words Ā· 0xuki

Complete Guide to Machine Learning Model Evaluation Methods

Core Data Concepts in Model Evaluation šŸ“Š Training Set: Dataset used to train machine learning models (parameter optimization) Validation Set: Dataset used for hyperparameter tuning and model selection during development Test Set: Dataset reserved exclusively for assessing generalization performance → Used for final model evaluation after development completion Evaluation Methodologies Holdout Method Randomly splits the dataset into two mutually exclusive subsets: Typical split: 80% training / 20% testing (ratio varies by use case) Strengths: Computationally efficient, simple implementation Limitations: High variance in performance estimates with small datasets k-Fold Cross-Validation Systematic evaluation protocol: Partition dataset into k equal-sized folds Iteratively use each fold as validation set while training on remaining k-1 folds Aggregate results (mean ± standard deviation) across all folds Key Advantages: Reduces variance in performance estimates Maximizes data utilization (critical for small datasets) Common Variants: Stratified k-fold (preserves class distribution) Leave-One-Out Cross-Validation (LOOCV) Extreme case of k-fold where k = n (number of samples) Use Case: Small-scale datasets with <100 samples Tradeoff: Computationally prohibitive for large n (requires n model fits)

August 1, 2024 Ā· 1 min Ā· 172 words Ā· 0xuki

HTTP Request Smuggling (HRS)

Understanding HTTP Request Smuggling: A Deep Dive into Web Security In the dynamic world of web security, new threats and vulnerabilities continuously emerge, challenging the robustness of our digital infrastructures. Among these, HTTP request smuggling stands out as a complex yet intriguing exploit that targets the very foundations of how the web operates. This blog post aims to unravel the complexities of HTTP request smuggling, exploring its mechanisms, potential impacts, and effective countermeasures to safeguard against this sophisticated cyber threat. ...

April 20, 2024 Ā· 3 min Ā· 597 words Ā· 0xuki

Cross-Origin Resource Sharing (CORS)

Understanding Cross-Origin Resource Sharing (CORS): A Beginner’s Guide In the world of web development, security is paramount. One crucial aspect of securing web applications is understanding how to manage Cross-Origin Resource Sharing, commonly known as CORS. This concept can be a bit daunting for beginners, so in this blog post, we’ll break down CORS in a way that’s easy to understand and implement. What is CORS? CORS is a security feature implemented by web browsers to prevent malicious websites from accessing resources from another domain without permission. Essentially, it allows web servers to define who can access their resources and how. It’s a policy used to relax the same-origin policy, which is a security measure that restricts how a document or script from one origin can interact with resources from another origin. ...

April 13, 2024 Ā· 3 min Ā· 597 words Ā· 0xuki

CSRF Cross Site Request Forgery

Cross-Site Request Forgery (CSRF) What is CSRF? Cross-Site Request Forgery (CSRF) is a type of attack that forces a logged-in user to perform unwanted actions on a web application. The attacker tricks the user into submitting a malicious request to the web application, which the application then executes as if it were coming from the legitimate user. How does CSRF work? There are two main ways that CSRF attacks can be carried out: ...

April 1, 2024 Ā· 2 min Ā· 362 words Ā· 0xuki

CSRF Tokens

CSRF Tokens: A Comprehensive Guide for Security Professionals Introduction Cross-Site Request Forgery (CSRF) is a malicious attack that tricks a user’s browser into performing unintended actions on a trusted website where the user is logged in. This can lead to unauthorized data access, financial losses, and other serious consequences. How CSRF Attacks Work: Victim logs in: The victim logs into a trusted website (e.g., a bank) and their browser stores a session cookie. Attacker creates a malicious link or form: The attacker creates a link or form on a different website (e.g., a website they control or a compromised ad). Victim visits the attacker’s site: The victim is tricked into visiting the attacker’s website or clicking on the malicious link. Victim’s browser sends the cookie: When the victim interacts with the attacker’s website (e.g., clicking a link or submitting a form), their browser unknowingly sends the session cookie for the trusted website along with the request. Attacker leverages the cookie: The attacker’s website receives the victim’s session cookie and includes it in a request to the trusted website. Since the website sees a valid cookie, it assumes the request is coming from the legitimate user and performs the action embedded in the attacker’s request. What is a CSRF Token? ...

March 21, 2024 Ā· 3 min Ā· 475 words Ā· 0xuki

Understanding Entropy and Information Theory in Machine Learning

Introduction šŸ“š This article explores the fundamental concepts of information theory, which form the mathematical foundation for many machine learning algorithms. Understanding these concepts is crucial for grasping how models process and learn from data. Information Quantity When an event A occurs with probability P(A), the information quantity I(A) measures how much information we gain from observing this event: $ I(A) = -\log P(A)$ Key insight: Rare events carry more information than common ones. This makes intuitive sense - learning that a rare event occurred tells us more than learning about a common event. ...

March 20, 2024 Ā· 2 min Ā· 321 words Ā· 0xuki

Understanding Idle Scan: Mechanism and Characteristics

Idle Scan is an advanced TCP port scanning technique. In this method, an attacker uses a ā€œzombieā€ computer (a machine in an idle state) to perform port scanning on target systems. šŸŽÆ Basic Concepts Idle Scan is based on three important facts: TCP Port State Verification Open port → Responds with SYN/ACK packet Closed port → Responds with RST packet Unsolicited Packet Response Unsolicited SYN/ACK → Responds with RST Unsolicited RST → Ignored IP ID Characteristics ...

March 20, 2024 Ā· 1 min Ā· 205 words Ā· 0xuki

JavaScript's Promise, Async, Await in 3 minutes

JavaScript’s Promise, Async, and Await: Mastering Asynchronous Programming JavaScript reigns supreme in web development, but handling asynchronous operations can introduce complexity. This is where Promise, Async, and Await come to the rescue. These powerful tools simplify and streamline asynchronous programming in JavaScript. Promise: A Placeholder for the Future A Promise represents the eventual outcome of an asynchronous operation. It exists in three states: Pending: The operation is still underway. Resolved: The operation completed successfully, and a result is available. Rejected: The operation encountered an error. Promises offer several advantages: ...

March 19, 2024 Ā· 2 min Ā· 345 words Ā· 0xuki