📝
Home
Pentesting
  • 📝Home
  • ⚒️PENTESTING
    • Foundational
      • Gaining Access
      • Session Hijacking
      • Buffer Overflows
        • Finding the Offset
        • Spiking
        • Fuzzing
      • Attack Basics
        • Brute Force Attacks
        • Credential Stuffing and Password Spraying
        • Netcat Shell Stabilization
        • Reverse Shells vs Bind Shells
        • Staged vs Non-Staged Payloads
      • Footprinting
    • Reconnaissance
      • Discovering Email Addresses
      • Hunting Subdomains
    • Scanning and Enumeration
      • Banner Grabbing
      • Enumerating HTTP and HTTPS
      • Enumerating SMB
      • Enumerating SSH
      • NetBIOS Enumeration
      • SNMP Enumeration
      • Sniffing
    • Privilege Escalation
      • 🐧Linux Privilege Escalation
      • 🪟Windows Privilege Escalation
        • Initial Enumeration
    • Defense Evasion
      • Hiding Files and Covering Tracks
      • Network Evasion
    • Attacking Services
      • Attacking Kerberos
      • Attacking VPNs
      • Denial of Service
      • Exploiting FTP
      • Exploiting NFS
      • Exploiting SMTP
      • Exploiting Telnet
    • Attacking Active Directory
      • Initial Attack Vectors
        • Gaining Shell Access
        • LLMNR Poisoning
        • SMB Relay
        • Passback Attacks
        • IPv6 Attacks
      • Post-Compromise Enumeration
        • Bloodhound
        • ldapdomaindump
        • PowerView
        • PlumHound
      • Post-Compromise Attacks
        • GPP Attacks
        • Print Nightmare
        • Token Impersonation using Incognito
        • URL File Attack
        • Pass Attacks
        • Kerberoasting
        • LNK File Attacks
        • Mimikatz
      • Post-Domain Compromise Attacks
        • Dumping the NTDS.dit
        • Golden Ticket Attacks
      • Post Exploitation
    • Toolkit
      • Burp Suite
        • Intruder
      • Hping
        • Crafting TCP and UDP Packets
      • Metasploit
        • Meterpreter
        • Shell Handler
        • Gather Information
        • Gaining Root
    • Web Application Hacking
      • Attack Methodology
      • Attacking Web Applications
      • Authentication Bypass
      • Cross-Site Scripting
      • Cross-Site Request Forgery
      • File Inclusion
      • Server-Side Request Forgery
      • Injection
        • Command Injection
        • LDAP Injection
        • SQL Injection
  • 👽MALWARE ANALYSIS
    • Malware Analysis Primer
    • Malware Types
      • Rootkits
      • Viruses
      • WannaCry
    • Analyzing Malicious Windows Programs
    • Static Analysis
      • Basic Static Techniques
      • Advanced Static Analysis
    • Reverse Engineering
      • Crash Course in x86 Disassembly
      • Recognizing Code in Assembly Language
    • Dynamic Analysis
    • Detecting Malware
      • Evasion Techniques
      • Detecting Mimikatz
      • Hunting Malware
      • Hunting Metasploit
      • Hunting Persistence
  • 🏹THREAT HUNTING
    • Foundational
      • ATT&CK Framework
      • CIA Triad
    • APTs
  • 🐍PROGRAMMING & SCRIPTING
    • Foundational
      • Computer Memory
    • C Programming
    • Assembly Language
      • Assembly File Structure
      • Debugging with gdb
    • Bash
    • Python
      • Foundational
        • Booleans and Operators
        • Comprehensions
        • Conditionals
        • Dictionaries
        • Exceptions and Error Handling
        • Functions
        • Lambdas
        • Lists
        • Loops
        • Modules
        • Numbers
        • Reading and Writing Files
        • Sets
        • Sockets
        • String Formatting
        • Tuples
        • User Input
        • Variables
      • Extending Python
        • Virtual Environments
        • Sys Module
        • Requests
        • pwntools
    • Regular Expressions
    • SQL
  • 🕵️DIGITAL FORENSICS
    • Anti-Forensic Techniques
    • 🪟Windows Security Internals
      • Windows Security Internals
        • Kernel
          • Security Reference Monitor (SRM)
          • Object Manager
            • System Calls
            • NTSTATUS Codes
            • Object Handles
            • Query and Set Information System Calls
          • The I/O Manager & The Process and Thread Manager
          • The Memory Manager
          • The Configuration Manager
  • 💼GRC (CISSP Notes)
    • Security Assessment and Testing
    • Security Governance Principles
    • Security Policies Standards and Procedures
    • Preventing and Responding to Incidents
    • Organizational Roles and Responsibilities
    • Organizational Processes
  • 📦Networking
    • Foundational
      • DHCP
      • DNS Basics
      • HTTP Protocol
      • IPSec
      • IPv6 Fundamentals
    • Wireless Technologies
      • 802.11
      • Bluetooth
      • Wireless Authentication
      • Wireless Encryption
Powered by GitBook
On this page
  • Web Application
  • Injection Attacks
  1. PENTESTING
  2. Web Application Hacking

Attacking Web Applications

Web Application

  • Fill an important gap between the website front end and the database doing the work

  • Often hacked because of inherent weaknesses built into the program

    • overlooked known vulnerabilities

    • unpatched security flaws

    • default passwords

  • Identifying entry points

    • Examine cookies and headers

    • Examine POST data

    • Examine encoding or encryption measures

    • URL (input parameters)

  • Tools to identify entry points

    • WebScarab

    • HTTPrint

    • Burp Suite

Injection Attacks

  • Injecting malicious commands

  • Objective - pass exploit code to the server through poorly designed input validation in the application

  • Methods

    • File Injection - attacker injects a pointer in the web form input to an exploit hosted on a remote site.

    • Command Injection - attacker injects commands into the form fields instead of the expected test entry

    • Shell Injection - attacker tries to gain shell access using Java or other functions

LDAP Injection

Simple Object Access Protocol (SOAP) Injection

  • Designed to exchange structured information in web services in computer network and uses XML to format information

  • Lets you inject malicious query strings that let you bypass authentication and access databases behind the scenes

  • Messages are usually one way

Buffer Overflow

  • Attempt to write more data into an application's buffer area in order to overwrite adjacent memory, execute code, or crash a system (application)

  • Basically input more data than the buffer is allocated to hold

  • Can result in

    • crashing the application or machine

    • altering the application's data pointers

  • Canary words

    • can be used to prevent buffer overflow attacks

    • they are known values placed between the buffer and control data

    • If a buffer overflow happens, the canary word will be changed first, triggering a stop to the system

  • Other countermeasures are

    • Address Space Layout Randomization (ASLR)

    • Data Execution Prevention (DEP)

XSS

  • Attacker takes advantage of scripting and have it do something other than the intended response

  • Things you can do

    • E-mail XSS attack

    • Persistent XSS or Type-I XSS

    • Upload malicious code to users connected to the server

    • Send pop-up messages to users

    • Steal virtually anything

      • PHP Session IDs - attacker can masquerade as the user plugged into the session

  • Mitigation

    • Setting the HttpOnly flag in cookies prevents cookies from being accessible by a client-side script

Cross-Site Request Forgery

Session Fixation

  • Similar to CSRF

  • Attacker logs in to a legitimate site and pulls a session ID

  • Attacker then sends an e-mail with a link containing the fixed session ID

  • The user clicks it and logs in to the same legitimate site, the attacker can now log in and run using the user's credentials

Cookies

  • Cookies are a small text-based file that is stored on your system for use by the web server the next time you log in

  • Contain information such as

    • Authentication details

    • Site preferences

    • Shopping cart contents

    • Session details

    • Passwords (sometimes)

  • They are sent in the header of an HTTP response from a web server and may or may not have an expiration date

  • Can be manipulated to use as spyware (used to track computer activity), change pricing options or even authenticate to a server

  • Sometimes run them through a Unicode (Base64) decoder

HTTP Attack

  • Often called HTTP response splitting

  • Attack adds header response data to an input field so that the server splits the response in a couple directions

  • Attacker controls the content of the second header, which can be used for any number of things

    • redirecting the user to a malicious site the attacker runs

  • Designed to allow other attacks (through the second header content) to work

PreviousAttack MethodologyNextAuthentication Bypass

Last updated 1 year ago

Compatible with and SMTP

attack

⚒️
HTTP Protocol
DoS
SQL Injection