XSS via HTML5 Events All over again

Back in 2018 I wrote a post about finding and exploiting XSS using the new(ish) event handlers in HTML 5. Those techniques paid out recently and I thought I’d write up the situation.

Using the lists provided in the earlier post I discovered the application allowed an “SVG” tag. Within that tag it allowed the “onmouseenter” event handler which is a useful one. This was not a classic XSS pop pop where the payload executes without user interaction. But it would pop pop with a relatively likely movement of the mouse over the image.

The target disallowed certain characters and appeared to have a blacklist approach for items such as “alert” etc. The solution to my problem that day was to base64 encode the payload, use “atob” to decode it, and then “eval” to execute it as listed below.

Raw Payload

alert(document.domain);

Base64 Encoded

YWxlcnQoZG9jdW1lbnQuZG9tYWluKTs=

Final Payload

<svg viewBox='0 0 100 100' onmouseenter=eval(atob('YWxlcnQoZG9jdW1lbnQuZG9tYWluKTs='))></svg> 

Nothing Earth shattering in this but until you put stuff out there you never know who that will save time for when they are googling for “XSS SVG tag” or something like that. Welcome weary traveller. I know there is lots of SVG related XSS shenanigans to be had but if you wanted a file to upload you would be elsewhere!

Hope that helps.

Captain’s Log: April 2021

Here is how I did in the new condensed table format.

TargetSummary
11k steps a dayI hurt my ankle in March. I am out of this game for the foreseeable.
150 active minutes per weekWeek 1 – No. But I now have an exercise bike which I am starting a new journey on.
Week 2 – No.
Week 3 – No. Kids returned to school so I was walking rather than exercise.
Week 4 – No. Back on my bike now that school routine is established again.
1 technical blog a monthI sneaked out a wee post on enumerating RDP settings using PowerShell and release rdp-enum.
Support my partner to exerciseThey stopped asking for this and I now am just taking the kids on wild adventures in and around the house for Saturday mornings. Counting down the days until I get vaccinated and feel willing to goto visitor attractions again like the Transport Museum.
Record five songsI have recorded a mountain of partial songs. I just go sit in the garden and batter something out. Nothing quite fit for release this month.
OSWEI have not prioritised it this month.
Panic AttacksA clear month really. A few dicey moments but not full blown panic.

Other bits

  • Audiobooks 1 – carrying on with Stealing Light: Shoal, Book 1 by Gary Gibson. A good bit of Sci-Fi. With the school commute removed, and me no longer grinding out 11k steps a day otherwise I have barely touched the audiobooks. I should rethink my life!
  • Television 1 – Star Trek Discovery Season 3. Bravo to the makers they have really turned it around. While I didn’t hate STD season 1 and 2 I would say I was not in love with it. We didn’t get enough about the crew and the almost singular focus on one character was not working for me. It is Star Trek. I want some aliens. I want some exploration of humanity through the prism of different cultures. Maybe I like Season 3 because I have given up on that dream to some extent? Season 3 has been a breath of fresh air and we actively WANTED to watch the next episode. It was well done.
  • Television 2 – Titans. Oh wow… A DC property that isn’t just needlessly moody. With characters I know little or nothing about going into it. This show has been keeping me going on my exercise bike adventures. Like when I had a treadmill, I get a lot of TV shows watched while I exercise. I ran every minute of Sons of Anarchy, 24, and various other programmes in the past.
  • Game 1 – maquette. A PS Plus title of the month. It is gorgeous on so many levels. The sound track is sumptuous and the mechanics of the puzzles is so damn cute that your inner 5 year old will make you laugh. You honestly will.
  • Game 2 – Final Fantasy VII (remastered). I never played this before. I will start with that. Another PS Plus title which I would otherwise have not chosen to play. The story seems like it is going places. The kids are watching as I play along because of all the whizzy lights and swords and such. It is not a true open world because of the age of the title. You are very much on rails for the duration but it is going down well with me. Update: I finished this over the early May bank holiday before I got the post out. It was worth the time but suffered from massive cut scenes at times.

That is the log for April.