🔮
P4n1cBook
  • 🏴‍☠️Welcome!
    • 🔮P4n1cBook
    • 📚Bookmarks
    • 🚨Licence and Disclaimer
  • Fundamentals
    • Starter Kit
      • Linux
      • PowerShell
      • Git
      • 💾Regex
      • Network Analysis
        • curl
        • tcpdump
        • Nmap
        • 🦈Wireshark
      • Metasploit
    • 🌐Network Protocols
      • ICMP
      • SSH
      • Telnet
      • DNS
      • FTP
      • HTTP/HTTPS
      • SMB
      • SNMP
      • SMTP
      • NFS
      • IPP
      • WinRM
      • LLMNR
      • JDWP
    • Code
      • Python Essentials
      • C & C++
    • Web APIs
      • GraphQL
    • Shells/TTYs
    • Dorks
    • Cryptography
    • Reverse Engineering
      • GDB
      • Binaries
  • Web Exploitation
    • Web Enumeration
      • User Endpoints
      • Web Fuzzing
        • ffuf
        • feroxbuster
        • Gobuster
        • GoWitness
      • Web Servers
        • Apache
        • Nginx
        • Werkzeug
      • Databases
        • MySQL
        • NoSQL
          • MongoDB
          • Redis
      • Web Services/Frameworks
        • Wordpress
        • Laravel
        • Express
        • Magento
        • AIOHTTP
        • HashiCorp Vault
        • Tiny File Manager
        • Joomla
        • CMS Made Simple
        • 🌵Cacti
        • Tomcat
        • Zabbix
        • OpenNetAdmin
        • ImageMagick
    • Vulnerabilities
      • Arbitrary File Read
      • Session Hijacking
      • SSRF
      • Eval Injection
      • Template Manipulation
      • Path Traversal
      • Prototype Pollution
      • XXE
      • Deserialization
      • Log Poisoning
      • Arbitrary Command Execution
      • SQLi
        • SQLmap
      • SSI
      • SSTI
      • LFI
      • XSS
    • Java-based web application
      • Struts
      • .WAR
      • pd4ml.jar
  • Cloud Exploitation
    • Kubernetes
    • AWS
  • Post Exploitation
    • File Transfer
      • Exfiltration
    • Credential Dumping
      • Thunderbird
    • Lateral Movement
    • Persistence
    • Linux Privilege Escalation
      • Static Binaries
      • Enumeration
      • Hijacks
      • Command Injection
      • Jailbreaks
      • Binary Exploitation - Linux
      • Kernel Exploits
      • Buffer Overflow - Linux
      • Docker
      • Abusing Wildcards
  • Wireless Exploitation
    • NFC
Powered by GitBook
On this page
Edit on GitHub
  1. Web Exploitation
  2. Web Enumeration
  3. Web Services/Frameworks

Laravel

Open-source PHP-based web framework for building web applications

  • The MVC design pattern separates the application’s logic (Model) from the user interface (View), and defines clear responsibilities for handling user input (Controller).

  • Uses Eloquent ORM for interacting with the database, providing an elegant and secure ActiveRecord implementation (automatically escapes parameters in queries).

Authorization/Authentication
  • Offers Passport full OAuth2 server implementation.

  • Sanctum: A simple way to authenticate SPAs (Single Page Applications) and mobile applications using simple token-based authentication.

  • Uses bcrypt by default for hashing passwords.

Session Management
  • Automatically generates a CSRF token for every active user session.

  • The session ID is typically stored in the user's browser under a cookie like laravel_session.

  • The cookies should have HttpOnly enabled. Check it at config/session.php:

'secure' => env('SESSION_SECURE_COOKIE', null),
'http_only' => true,
  • Modify session data and investigate the requests to know the type of driver being used by the application.

Session Drivers

File: Default Driver.

  • Ensure that the session files aren't in a location that is not publicly accessible. (storage/framework/sessions).


Database: Normally use it when persistence across multiple servers is needed

  • Check the session table access control and database's connections.


Redis: Normally use when the application needs high-performance.

  • Ensure that is properly configured


Cookie: Session data is stored directly in a cookie in the client-side

  • Check the cookie is not storing sensitive data.

  • When the session expires. Check that the session data and the client’s cookie have been removed or invalidated.

Encryption
  • Support AES-256-CBC encryption.

  • Uses an API for encrypting and decrypting data with automatic key management.

Enumeration

Tools: Laravel Security and Laravel Auditing.

  • Check if .env, storage/ are publicly accessible.

    • In the .env file; Check APP_DEBUG=false.

  • Ensure that Debugbar is not enabled.

  • Check if the application validate the URL during redirects.

  • Check all form's CSRF tokens.

  • Check that model's properties properly handle mass assignment. ($fillable or $guarded on Eloquent models).

  • IDOR: Check validation on user input for model binding in routes:

Route::get('user/{id}', ...)
WhiteBox
Show available routes
php artisan route:list
Regenerate application keys
php artisan key:generate
Rrefresh config caches
php artisan config:cache
Status of database migrations
php artisan migrate:status
Roll back migrations
php artisan migrate:rollback
Seeding the database
php artisan db:seed
PreviousWordpressNextExpress

Last updated 2 months ago