☠️
smadi0x86 Playground
  • 💀Welcome to smadi0x86 Playground
    • 🍷Resources
    • 🚬Projects
    • 🎓Certifications
    • 📌Pinned
    • ❓Questions
    • 📞Contact
  • 🏞️Cloud Native
    • Docker
      • Quick Reference
      • Introduction
      • Containers
      • Images
      • Storage & Volumes
      • Security
      • Cheatsheet
    • Git
    • Serverless Framework
    • YAML
  • 🔨Software Engineering
    • System Design
    • Environment Variables
    • JSON Web Tokens
  • 👾Architecture
    • C Language
      • Introduction
      • GCC Compilation
      • Libraries & Linking
      • I/O
      • Files
      • Pointers
      • Dynamic Memory Allocation
      • Data Types
      • Strings Manipulation
      • Bit Manipulation
      • Pre-processors
      • Macros
      • Type Qualifiers
    • C/C++ Build Systems
      • Fundamentals for Linking
      • Symbolic Linking
      • Cross-Platform Compilation
      • CMake for Building and Linking
      • Shared Libraries
      • Dynamic Linking and Dependency Management
    • Operating Systems
      • OS & Architecture
      • Processes
      • CPU Scheduling
      • Memory Management
  • 🛩️Cyber Warfare
    • Flight Physics
    • Communication
      • PWM & PPM
      • MAVLink
  • 🏴‍☠️Offensive Security
    • Active Directory
      • Introduction
    • Web Attacks
      • Server Side
        • OS Command Injection
        • Information Disclosure
        • Directory Traversal
        • Business Logic
        • Authentication
        • File Upload
        • SSRF
      • Client Side
        • CSRF
        • XSS
    • Recon
      • Active
        • Host discovery
        • Nmap
        • Mass Scan
      • Passive
        • Metadata
      • Web Applications
        • Discovery
        • Subdomains & Directories
        • SSL Certs
        • CMS
        • WAF Detection
      • Firewall Evasion
  • Binary Exploitation
    • Stack Smashing
      • x86
      • x86_64
    • pwntools
      • Processes and Communication
      • Logging and Context
      • Cyclic
      • Packing
      • ELF
      • ROP
  • 😈Advanced Persistent Threat
    • C2
      • Sliver
    • Malware
      • Windows Internals
        • PEB
      • Academy
        • Basics
      • Sektor7
        • Essentials
  • 💌Certifications
    • AWS Certified Cloud Practitioner (CLF-C01)
      • Cloud Foundations
      • Domain 1: Cloud Concepts
      • Domain 2: Security and Compliance
      • Domain 3: Technology
      • Domain 4: Billing and Pricing
    • AWS Certified Solutions Architect - Associate (SAA-C03)
      • Foundation
    • Certified Kubernetes Administrator (CKA)
      • Core Concepts
      • Scheduling
      • Logging & Monitoring
      • Application Lifecycle Management
      • Cluster Maintenance
      • Security
      • Storage
      • Networking
      • Design Kubernetes Cluster
      • Kubernetes The Kubeadm Way
      • Troubleshooting
      • JSONPATH
      • Lightning Lab
      • Mock Exams
      • Killer Shell
    • Certified Kubernetes Security (CKS)
      • Foundation
      • Cluster Setup
      • Cluster Hardening
      • Supply Chain Security
      • Runtime Security
      • System Hardening
      • Killer Shell
    • (KGAC-101) Kong Gateway Foundations
      • Introduction to APIs and API Management
      • Introduction to Kong Gateway
      • Getting Started with Kong Enterprise
      • Getting Started with Kong Konnect
      • Introduction to Kong Plugins
  • 📜Blog Posts
    • Modern Solutions For Preventing Ransomware Attacks
Powered by GitBook
On this page
  • Excessive trust in client-side controls (without server-side validation)
  • Failing to handle unconventional input
  • Find bugs
  • Example of integer overflow
  1. Offensive Security
  2. Web Attacks
  3. Server Side

Business Logic

Extracting out unintended behavior through business design flaws.

Business logic vulnerabilities are flaws in the design and implementation of an application that allow an attacker to extract unintended behavior.

This potentially enables attackers to manipulate legitimate functionality to achieve a malicious goal.

Excessive trust in client-side controls (without server-side validation)

Change and test all parameters of HTTP requests.

Failing to handle unconventional input

Find bugs

1) Are there any limits that are imposed on the data? 2) What happens when you reach those limits? 3) Is any transformation or normalization being performed on your input?

Example:

Consider a funds transfer between two bank accounts.

This functionality will almost certainly check whether the sender has sufficient funds before completing the transfer:

$transferAmount = $_POST['amount'];
$currentBalance = $user->getBalance();

if ($transferAmount <= $currentBalance) {
    // Complete the transfer
} else {
    // Block the transfer: insufficient funds
} 

Solve:

Sent -$1000 to the victim's account, this might result in them receiving $1000 from the victim instead.

Example of integer overflow

  1. Send a very big integer for number of your order for example: productId=10&redir=PRODUCT&quantity=999999999999.

  2. As a result, the value has looped back around to the minimum possible value ($ -2,147,483,648).

  3. Try to change minimum price to cheap value ($20).

  4. Buy your expensive order.

Example:

  1. Attacker has a mail server, its domain is: attacker.com.

  2. Target site, is a '/admin' path for users that has a foo.com email like: bar@foo.com.

  3. Max length of email address is 255 character.

Attacker can create an email like: aaaaa...aaaaa@foo.com[255-char-len].attacker.com.

  1. Server of target site send confirm email to aaa...aaa@foo.com.attacker.com but it save this email for Attack: aaaaa...aaaaa@foo.com.

  2. Then Attacker can access to /admin path in his dashboard.

Note

  • Trusted users won't always remain trustworthy.

  • Users won't always supply mandatory input.

  • Users won't always follow the intended sequence.

  • Providing an encryption method (For example check and find formula of each cookie and try to create admin cookie).

PreviousDirectory TraversalNextAuthentication

Last updated 7 months ago

🏴‍☠️
Page cover image