Skip to main content

Posts

Same-Origin Policy (SOP) and CORS(Interview Edition)

Same-Origin Policy (SOP) and CORS Web Security Interview Prep HTTP 1. Same-Origin Policy (SOP) Definition: SOP is a security rule built into browsers. It stops a web page loaded from one origin from reading data from a different origin. What is an origin? The combination of protocol + domain + port . Compared to https://myapp.com : URL Same origin? Why https://myapp.com/about Yes Only the path differs http://myapp.com No Different protocol https://api.myapp.com No Different subdomain https://myapp.com:8080 No Different port Why does it exist? Imagine you are logged into mybank.com , and in another tab you open evil.com . Without SOP, JavaScript on evil.com could call mybank.com/account . Your browser would attach your bank cookies automatically, and the evil script could read your balance. SOP blocks the script from reading that response. Key interview points SOP is enforced by the browser , not the server. It restricts reading responses . The request may still ...

Metasploit

CYBERSECURITY INTERVIEW NOTES Metasploit – Explaining EternalBlue in an Interview A practical interview guide covering Metasploit, EternalBlue, the assessment workflow, impact, remediation, and a one-minute answer. What you should understand: What is Metasploit? What is EternalBlue? How do you explain the vulnerability assessment and exploitation process using Metasploit? 1. What is Metasploit? Metasploit is an open-source penetration-testing framework used to identify, validate, and demonstrate security vulnerabilities in systems. It provides different modules: Auxiliary: Used for scanning, enumeration and information gathering. Exploit: Contains code that targets specific vulnerabilities. Payload: Defines the action performed after successful exploitation. Post: Used for post-exploitation activities. Encoder: Helps transform payloads into different formats. 2. What is EternalBl...

SSL Pinning

Android VAPT Notes — Cleartext Traffic & SSL/TLS Pinning Android VAPT Interview Notes Cleartext Traffic, HTTP/HTTPS, SSL/TLS Validation, Certificate Pinning & Public-Key Pinning Cleartext traffic Android configuration TLS validation Pinning concepts How pinning works VAPT testing Interview answers 1. What happens when cleartext traffic is enabled? When an Android app allows cleartext traffic, it is permitted to communicate using unencrypted protocols such as HTTP. The traffic is not protected by TLS encryption. Simple explanation: cleartextTrafficPermitted="true" allows cleartext HTTP communication. It does not encrypt traffic. Real-life example Imagine a banking app sending a login request over HTTP while the user is connected to public airport Wi-Fi: The user enters their username and password. The app sends the request over HTTP. An attacker positioned on the same network may intercept the traff...

SQL Injection (SQLi) – Complete Pentesting & Interview Guide

SQL Injection (SQLi) – Complete Pentesting & Interview Guide SQL Injection (SQLi) Complete pentesting and interview preparation guide — concepts, major types, identification, impact, remediation, testing workflow, and practice questions. Contents 1. What is SQL Injection? 2. SQLi classification 3. In-band SQLi 4. Blind SQLi 5. Out-of-band SQLi 6. Second-order SQLi 7. Stacked queries 8. Other variations 9. Pentester workflow 10. Tools 11. Prevention 12. Interview questions 13. Knowledge check 1. What is SQL Injection? SQL Injection (SQLi) is a vulnerability that occurs when an application incorporates untrusted user input into an SQL query without safely separating data from SQL code. An attacker may manipulate the query's intended logic. Depending on the database permissions and application design, this can lead to authentication bypass, unauthorized data access, data modification, or deletion. Example: vulnerable query SELECT * FROM users WHERE...

SQL Injection (SQLi) – All Types Explained with Examples

                                                12. Important SQL Injection Interview Questions These are the questions I recommend preparing after understanding the concepts above. No. Interview question 1 What is SQL Injection? 2 What is the root cause of SQL Injection? 3 Explain all major types of SQL Injection. 4 What is the difference between error-based and UNION-based SQLi? 5 What is the difference between Boolean-based and time-based SQLi? 6 What is out-of-band SQL Injection? 7 What is second-order SQL Injection? 8 What is the difference between first-order and second-order SQLi? 9 What are stacked queries? 10 What is the difference between UNION and UNION ALL? 11 What is the difference between SQL Injection and NoSQL Injection? 12 How do you test SQLi in REST APIs? 13 How do you test SQLi in login functionality? 14 Can SQL Injection happen through HTTP headers...

Web-cache-poisoning

Web Cache Poisoning Explained Web Security Web Cache Poisoning: How One Request Can Attack Thousands A caching layer is supposed to make a site faster. Handled carelessly, it can turn a single malicious request into an attack delivered to every visitor. Application Security · ~8 min read What is web cache poisoning? Web cache poisoning is an attack where an attacker gets a harmful HTTP response stored in a cache , so that the cache then serves that poisoned response to all the normal users of the site. The key idea: it is not a standalone attack by itself . Think of it as a delivery mechanism . On its own, a reflected bug might only affect the one person who triggers it. But once it is baked into the cache, it gets handed out to everyone who loads the page — turning a low-impact bug into a mass attack with zero interaction from the victims. First, how does a cache actually work? A cache sits between the user and the back-end server. When a res...