New answers tagged

3

The goal here is to keep the token secret, even if an attacker exploits an XSS vulnerability - sort or like emulating the HTTP-only flag for cookies, in other words. I guess the closure would be a function that calls the API for you, using the token for authentication, and then return the result of the API call. In that way, you never have to touch the token....


-1

jaVasCript:/*-/*`/*\`/*'/*"/*%0D%0A%0d%0a*/(/**/--!><iframe src="javascript:oNbOdYlOaD=aLeRt(0)">--!>x3ciframe</iframe> try that


0

(A more concerning bit is that, as worded, the attacker can specify any file on the server to download... but this is not your question.) When a user downloads and opens an HTML file, that user is exposed to some of the same risks as when the user browses to any HTML file from a web server... the HTML can try to look like a login page for phishing the HTML ...


0

I Belive this could be used to distribute a sorta of clickjacking attack , and obviously you can force the victim to download some exe from the crafted HTML page. Furthermore you can use the a link with href stuff like file:/// to run the malicious exe . Sorry for typos in from phone


2

Parameterized queries solve this problem as it separates the parsing of the query from the handling of user supplied data.


2

For blacklist based filters, there are quite common fuzzer lists available. Here's an extract of seclists/Fuzzing/XSS/XSS-Bypass-Strings-BruteLogic.txt (Source https://github.com/danielmiessler/SecLists) alert`1` alert&lpar;1&rpar; alert&#x28;1&#x29 alert&#40;1&#41 (alert)(1) a=alert,a(1) [1].find(alert) top["al"+"ert&...


5

The alert function is actually a property of the global window object. As such, you can access it using bracket notation. If the string alert is blocked, you can break it up into multiple parts. Try this payload: window["al" + "ert"](1)


1

Does this mean that reflected xss can't be achieved here? The xss can not be achieved here because the context of outbound encoding(URL encoding) is correct which means URL encoding is applied to data reflecting in the URL and as owasp suggests, the outbound encoding is one of the solution for XSS vulnerability. CSP and xss auditors in browser also plays a ...


-1

Yes,there is payload for that where you don't have to use '/' while making injection.These payload are : <img src=x onerror=alert(123) > <svg onload=alert(123)> Now, you can insert document.cookie instead of 123 in alert method to get the user session.


0

I'm sorry to inform you that while you're using parameterized queries (which is great) your authentication checks are severely flawed. Sending the redirect header does not halt execution, so any code that occurs after he redirect will still execute. You can validate this yourself by using a web agent that cani gnore redirects such as curl.


1

I would call it a DOM-based (reflected aka non-persistent) XSS requiring user interaction. It's not self-XSS, because self-XSS is just a way to call a specific type of attack where the user actually injects the code themself, typically by copying and pasting the malicious code directly into their browser JS console. Self-XSS is actually a social engineering ...


1

Edit: Just saw that " is forbidden. Sorry. I still leave the answer as it might be useful for some people. Of course. There are numerous ways to do this. One example would be using " onload="alert(1) as the payload. This will result in <a href = "example.com/search/" onload="alert(1)" > Link </a> which is valid HTML.


3

This is not a platform to solve CTF excercises. Still I had a look and will give you a hint: When requesting check_code.php?callback=callback&code=PARAM you pass two arguments. Your result is callback("Invalid code: 'PARAM'"). Don't focus too much on the code parameter. It's a very easy CTF task


Top 50 recent answers are included