owasp
This document is about sanitizing web applications in general.
Owasp stands for open web application safety project : see owasp. Well known for it's top 10 vulnerability list, which is excellently documented here : owasp10.
kali linux
Kali linux is a complete linux distribution dedicated to hacking, so a good start for testing sites. kali.
nikto
The main tool in kali seems to be nikto, which tests websites for vulnerabilities such as missing headers etc. You can call nikto like this :
| nikto | |
|---|---|
It will report a number of issues if you just installed apache out of the box. This site will help in fixing such issues. solvenikto Also look at : geekflare .
top 10
some of the most common vulnerabilities explained
CSRF
Cross-site Request forgery is mentioned in 2017 as 'retired but not forgotten' since many of the frameworks nowadays have csrf defences built in.
This is abusing cookies and logins from some site you are logged into by a malicious site you are also visiting.
Simple example :
- You are logged into your bank site, and opened a session so you don't have to type your password every request.
- Let's say you can transfer money with a call like : visit
&amount=10000 - Now you open a second page to visit, presuming they guess everything correctly, the just post on their page : https://mybank/transfer?to=
&amount=10000. - Your browser will just do it, you are logged in, you could have done this yourself on another page.
To prevent this the bank site will use csrf tokens, just to make sure the request came from the original login page:
- When you request the webpage from mybank it returns a big random token to pass when making the transfer.
- your transfer call will now be : visit
- hackers.ru now needs to guess the token as well, making it infinitely harder