Basic Flashcards
what is cross site scripting attack
a form of attack where a malicious script is injected to a website, such that when the website reloads it executes the script and thereby hacker gets access to the data
what are the types of XSS
stored XSS and reflected XSS
what is stored XSS
happens in case where the user puts input to a form that is being saved to database, the attackers injects scripts as input and thus when the form is reload, the script executes, thus giving back the attacker control over the site
what is reflected XSS
this is a harder to execute type of attack where user is guided to click on a link that executes the script in turn and thus steal user information
how to prevent XSS
validate user input and use blacklisted tags & javascript snippets that can not be part of user request
what is cross site request forgery
cross site request forgery is a way to execute unintended action after the user has logged into a website
how does CSRF works
to get exposed to CSRF following conditions need to be met 1) the site uses cookie based user identification technique 2) the request does not require any unpredictable parameter
how are CSRF exececuted
either forcing or alluring user to click on a link that sends a GET request to server or by redirecting to a different UI that submits malicious parameters via POST request
how CSRF can be prevented
through the use of token and using Samesite cookie configuration (that ensures session cookie can be sent back from the same domain)
what is DoS
Denial of Service is a way of flooding a server with requests at such a volume that the server is no more able to serve valid requests
what are types of DoS
flood and crash types
what is flood type
when the attacker issues ping (ICMP) or SYN commands (in which case the server forever tries to establish a connection, and thus the port stays engaged) to flood the server
what is crash type
the attacker injects a bug to the server - happens in rare occasions
what is DDoS
performing DoS from multiple locations simultaneously
how DoS can be stopped
1) IP whitelisting 2) Black hope routing 3) Rate limiting