Notes - MCS
Analysis and Exploration of Vulnerabilities
Notes - MCS
Analysis and Exploration of Vulnerabilities
  • Analysis and Exploration of Vulnerabilities
  • Vulnerabilities
    • Vulnerabilities
      • CIA Triad
      • Vulnerability Sources
    • Vulnerability Tracking
    • Vulnerability Disclosure
  • Vulnerability Assessment of Networked Systems
    • Vulnerability Research
    • Vulnerability Assessment
    • Penetration Test
      • Scope
    • Types of Assessments
    • Vulnerability Management Life Cycle
  • Enumeration and Information Leakage
    • Network access
    • Information leakage
    • Errors
    • Web Sources and Support Files
    • Cookies
    • Ports
    • Banners
    • OS Fingerprinting
  • Injection
    • CWE-74
    • How it works
    • Common Pitfalls
    • CWE-89 SQL Injection
    • Using SQL
    • Things to consider
    • The NULL plate
    • SQLi types
    • SQL Injection - Avoiding
    • CWE-78 OS Command Injection
    • Command Override
    • Argument Exploitation
    • GTFOBins and LOLBAS
    • Environmental Variables
    • Parameter Expansion
    • Code Injection - CWE-94
    • Avoiding OS Injection
  • Broken Authentication
    • OWASP A2
    • HTTP Basics
    • HTTP Communication
    • Authentication
    • Authentication Flow State
    • Referer Header
    • SESSION ID
    • Cookies (RFC 6265)
    • JWT - JSON Web Tokens
  • XSS Cross Site Scripting
    • Prevalence and Detectability
    • Reflected XSS
    • Stored XSS
    • DOM XSS
    • Cross Site Request Forgery
    • Avoiding XSS
    • Same Origin Policy
  • Concurrency
    • Concurrency
    • CWE-361 - 7PK - Time and State
    • Basic Time Related CWEs
      • CWE-362 – Race Condition
    • Serializability
    • Database ACID characteristic
    • State Related CWEs
    • Basic Side Effects Related CWEs (Covert Channel)
    • Covert Timing Channel
    • Meltdown Type
  • Buffers
    • Buffer Overflow
    • Popularity decline
    • Potentially Vulnerable Software
    • Dominant prevalence
    • Vulnerabilities in languages (mostly C/C++)
    • Why? Memory Structure 101
    • CWE-120 Classic Overflow
      • Practical Examples
    • Stack Based Vulnerabilities
    • Stack Smashing
    • Countermeasures
    • ROP
Powered by GitBook
On this page
  • Sessions
  • Keeping Mechanisms
  • Use of the URL
  • Use of a POST request
  • GET vs POST
  1. Broken Authentication

Authentication Flow State

Sessions

HTTP is stateless and provides no way of keeping state.

  • Besides WebSockets in HTML5.

Most applications over HTTP need a state for good purposes.

  • User preferences.

  • Navigation history.

  • Authentication state.

Some use it for less noble purposes, usually compromising privacy.

  • Track users across multiple sites for advertising purposes.

  • Profile user behavior.

Keeping Mechanisms

  • Referer header.

  • SESSION_ID, or SID, or other custom headers.

  • Cookie.

  • JSON Web Token

Use of the URL

GET /internal/private.html?pass=secret&sid=234234 HTTP/1.1
Host: www.company.com

Input encoded as part of the URL as Request Arguments.

GET request is expected to have side effects.

  • Arguments control language, authentication, and authorization.

Should be avoided at all costs to transport state

Arguments are visible in the browser.

  • A use problem if your browser is visible: public presentation, remote lecture, over-the-shoulder eavesdropping.

Arguments may be logged by the web server.

  • Enable compromise if logs are accessed by an attacker.

SEO is broken: different users will have different URLs for the same resource.

The cache may be impacted: unique URLs limit the use of caches.

Use of a POST request

POST /doLogin HTTP/1.1
Host: company.com
Pragma: no-cache
Cache-Control: no-cache
User-Agent: Mozilla/5.0 (Windows 10)
Referer: http://company.com/login
Content-Length: 34

username=john&password=supersecret

GET vs POST

GET is used to REQUEST information.

  • Can be resent by browsers.

  • May be logged, cached, bookmarked, or kept in the browser history.

  • Should not change server-side state (no side effects).

    • Frequently it will change state, or create logs.

POST is used to UPDATE information.

  • Will not be cached, bookmarked, or kept in browser history.

  • May not be logged §Is not visible to users.

  • Is expected to change the server-side state (has side effects).

Last updated 1 year ago