35
loading...
This website collects cookies to deliver better user experience
XSS
attack takes place.Reflected XSS Attack
, the attacker uses the target URL with a malicious script. The script executes and modifies the browser’s document object model (DOM).<body onload=alert(1)>
– Fires when the element loads.<style>@keyframes x{}</style><xss style="animation-name:x" onwebkitanimationstart="alert(1)"></xss>
– Fires when a CSS animation starts.HttpOnly
flag to true – When you set the HttPOnly
flag to true
for cookies, it cannot be accessed by the client-side JavaScript. It’s standard security practice to safeguard this flag from XSS-type attacks.Phishing
. In a phishing attack, the attacker poses as a legitimate party to send the victim e-mails or text messages containing links to phishing websites. The victim assumes the message is trustworthy and opens the link in their browser. Once the link is open the attacker can steal the victim’s personal data, credentials and bank information, then use it to perform activities like theft and blackmail.Phishing
attack takes place.security
field say No encryption
? That’s a big reason to ignore the e-mail.https
? If not, don’t click.Clickjacking
, an attacker tricks a victim to click on a page element that is not visible to them. The victim may be tricked into downloading a piece of malware, carrying out unwanted transactions and many other dangerous activities.Clickjacking
attack takes place.clickjacking
attempts take place using an iFrame
and we can protect our apps using the X-Frame-Options
response header. X-Frame-Options indicate whether the browser should allow a page to be rendered within the <iframe>
tag. There are three possible values for the X-Frame-Options
header:Cross-Site Request[Forgery](<http://forgery.is>)
, or CSRF, is a particularly innovative and challenging form of attack whereby the attacker tricks the victim into performing unwanted actions on the web application that they are currently authenticated into.SameSite
cookie helps the browser decide whether to send cookies with the cross-site requests. The possible values are strict
, lax
and none
.Path (or Directory) Traversal Attack
. This form of attack allows the attacker to read any files from the server that is running the application, opening up myriad possibilities to discover passwords, banking details, secret information and various other data.Path (or Directory) Traversal
attack and allows the attacker to browse to the /etc/passwd
file. On a unix-based operating system, a special file contains the details of registered users, so the attacker can steal important data from the server.Path(or Directory) Traversal
attack takes place.base directory
. We should use this path to the file-system API to canonicalize
the path and verify that this path starts with the expected base directory. Here is a code snippet that will do this for us.
File file = new File(BASE_DIRECTORY, input);
if (file.getCanonicalPath().startsWith(BASE_DIRECTORY)) {
// do something…
}
35