forked from Nets111/Infosec-Interview-Questions-1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWeb
64 lines (45 loc) · 2.14 KB
/
Web
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
1) What is CSRF?
Cross Site Request Forgery is a web application vulnerability in which the server does not check whether the request came from a
trusted client or not.
when an attacker gets a victim’s browser to make requests, ideally with their credentials included, without their knowing.
---------------------------------------------------------------------------
2) What is XSS?
XSS is when attackers get victim's browsers to execute some code (usually JavaScript) within their browser
Types: Stored, Reflected
Stored XSS is some code that an attacker was able to persist in a database and gets retrieved and presented to victims (e.g. forum)
Reflected XSS is usually in the form of a maliciously crafted URL which includes the malicious code. When the user clicks on the link,
the code runs in their browser
Countermeasures of XSS are input validation, implementing a CSP (Content security policy)
---------------------------------------------------------------------------
3) SQL Injection
SQL injection is a web security vulnerability that allows an attacker to interfere with the queries that an application makes to
its database.
Types of SQL Injection
Classic SQLi (Error-based, UNION-based)
Blind SQLi (Boolean-based, Time-based)
---------------------------------------------------------------------------
4) How to Prevent Brute Forcing?
Account Lockouts/timeouts
API rate limiting
IP restrictions
Fail2ban
---------------------------------------------------------------------------
5) Web Server Hardening
Update/Patch the web server software
Minimize the server functionality disable extra modules
Delete default data/scripts
Increase logging verboseness
Update Permissions/Ownership of files
---------------------------------------------------------------------------
6) How does HTTP handle state?
HTTP is stateless
State is stored in cookies
---------------------------------------------------------------------------
7) Response codes
1xx - Informational responses
2xx - Success
3xx - Redirection
4xx - Client side error
5xx - Server side error
---------------------------------------------------------------------------
to be continued ...