🍩
HackBook.io
  • Pentesting Pocket Book for hackers and developers.
  • Reconnaissance
    • Internal Recon Basics
    • OSINT
      • Infrastructure
      • Recon-ng
      • Users
      • Google Dorks
    • Active Scanning
      • NMAP
        • NSE
          • reconnoitre
        • NMap Evasion
      • NC Scan
      • Finger Printing
    • Web Server OSINT
      • WhatWeb
      • Subdomains
      • Directory & File Enumeration
        • Enumeration
          • GoCutty
          • gobuster
          • Dirb
          • nikto
        • Fuzzing
        • Crawling
  • Web Application Hacking
    • Web 101
      • Clients
      • Servers
      • Encodings
    • Web Hacking Techniques
      • SOP
      • Open Redirect
      • File & Resource Attacks
        • Directory Traversal
          • Dir Traversal Fuzzer
        • LFI
        • RFI
        • Unrestricted File Uploads
      • XSS
        • DOM
        • Stored
        • Reflected
        • Blind
        • Self XSS
      • XXE
        • XXE Payloads
      • XPath
      • SSRF
      • CSRF
      • SQLi
        • SQL Basics
        • Securing SQL
        • Hacking SQL
          • sqlmap
          • In-Band
          • Error Based
          • Blind
      • Authorization
      • Session Hijacking
      • Command Injection
      • Insecure Deserialization
      • File Uploads
        • File Upload Mitigations
      • HPP
      • Click Jacking
        • Adobe SWF Investigator
      • HTTP Response Splitting
      • Flash 101
        • Flash Hacking
      • HTML5
        • WebSockets
        • CORS
          • iframe
          • Headers
    • Web Hacking Procedures
      • Captcha
      • Username Generation
      • Username Enumeration
      • Inhouse WebApps
      • SSL Cert Generation
      • CMS
        • WordPress
        • Joomla
      • Popular Exploits
        • Bludit CMS
        • ShellShock
        • WebDav
  • Weaponization
    • Buffer Overflows (BOF)
      • DSBOFG
        • Scripts
  • Initial Access
    • 😈Services
      • Finger
      • SNMP
      • LDAP
      • SMTP
      • NFS
      • RPC
        • RPCBind
      • RDP
      • SQL
        • NoSQL
      • POP3
      • Samba
      • SMB
      • SSH
      • Telnet
      • NetBios
      • VOIP/SIP
      • DNS
        • DNS Lookups
        • Zone Transfer
        • SubDomain Enums
        • dnsdumpster
    • 😈Shells
      • Powercat
      • Odd Shells
      • Troubleshoot
      • TTY/PTTY
  • Persistence
    • File Transfers
      • Py->Exe->Txt
      • Cross compile example
    • Backdoors
  • Privilege Escalation
    • Universal Escalation
    • Windows Escalation
      • Automated
      • Popular Exploits
        • ActiveXObject to Wscript RCE
        • Macros
        • Object Linking
    • Linux Escalation
      • Automated
    • Passwords
      • John
      • Medusa
      • Cewl
      • ncrack
      • Crunch
      • Hydra
      • MITM
      • Responder
        • SAM
          • pwdump and fgdump
          • Pass-the-hash
      • Crack the hash
      • NTLM
  • Network Discovery
    • Network Traffic
      • tcpdump
    • Internal Discovery
  • Collection and Staging
    • Collection
      • File types
  • Hacking Objectives
    • Non Kinetic War (Quick Guide)
  • Procedures
    • Bash Guide
    • Active Directory
    • Crypto 101
    • Forensics
  • Glossary
  • Hacking Frameworks
    • Metasploit
      • msfvenom
    • Dsnif
  • ThreatModeling
    • Threat Modeling Overview
  • Certifications
    • VMDR
      • Qualys Asset Management
      • Qualys Vulnerability Management
      • Qualys Threat Prioritization
      • Qualys Response (Patch Deployment)
    • OSCP Cheat Sheet
  • RF - Radio Frequency
    • Ham Technician
Powered by GitBook
On this page
  • Page layering:
  • Mitigations:
  • Mitigation circumvention:
  • Common Clickjack Activities:

Was this helpful?

  1. Web Application Hacking
  2. Web Hacking Techniques

Click Jacking

aka: UI Redressing

This is a hacking method where the hacker is getting the user to click on a resource that is not the resource that the user is intending to click. This can be a swapped resource but is typically a hidden clickable layer. The button can either be clear and steals the click of the user or it can be opaque and innocuous like a video play button, but the click falls through it and clicks the iframed item hiding behind it. Use the opacity and z-axis html settings to position and hide one of the layers.

The target page must be able to be iframed for the malicious cover page method.

Test the target domain, if it is visible in the page then click jacking is possible. Checking the HTTP traffic can help debug as X-Frame-Options can stop iframe inclusions.

<html>
    <head>
        <title>clickjacking.site</title>
    </head>
    <style type="text/css">
        #myframe{
            width: 100%;
            height: 600px;
            border: none;
            position: absolute;
            top: 0px;
            bottom: 0px;
            left: 0px;
            right: 0px;
        }
    </style>
    <body>
        <frame id="myframe" src="TargetPage.site" scrolling="no"></frame>
    <body>
</html>

Page layering:

Use opacity and z-index to layer the html. Example sets may look like:

Layer1) zindex:1; opacity:0.2; and Layer2) z-index: -1; In a real attack the opacity would be at 0.

The inverse is also possible depending on the click jack relationship we want to abuse.

Mitigations:

There are many methods that have been used over the years. The list below is an approxomet order of which to use for threat mitigation. Combining several will always be the best solution.

  • HTTP X-Frame-Options= <Deny or Same Origin>

  • Browser Frame-Breaker

  • Content security policy

  • Embedded JavaScript iframe escape in page

Mitigation circumvention:

If the Embedded JavaScript iframe killer is the method used this can be defeated by the hacker site.

<script>
    if(top != window){
        top.location = window.location
    }
</script>

By watching for the DOM event onbeforeunload to be triggered by top.location we can control this to break the call.

Common Clickjack Activities:

Likejacking: Facebook like button clickjacking

Cursorjacking: Modifying the mouse cursor position off axis from its visual position to get unintended clicks.

PreviousHPPNextAdobe SWF Investigator

Last updated 3 years ago

Was this helpful?

Page cover image