Would be helpful if you give further information:
- Bwapp Version
- What tutorial
- What sqlmap version
So sqlmap gives you a hint:
You have not declared cookie(s), while server wants to set its own
This is the note that you haven't delivered any cookies using sqlmap.
This means you are not logged in and you will be redirected to the login page
Redirect 302 to
http://localhost:80/bwapp/login.php
So you can give sqlmap your login session using
sqlmap -hh | grep cookie
--cookie=COOKIE HTTP Cookie header value (e.g. "PHPSESSID=a8d127e..")
...
--load-cookies=L.. File containing cookies in Netscape/wget format
So a workaround (I have no bwapp in front of me) could be:
- Log into bwapp in the Browser
- Go into Developer Tools (Ctrl-Shift-I then: Chromium -> Application -> Cookies or Firefox (web-)storage)
- Remember the cookies from here
- Give it to sqlmap with
--cookie "name1=value1;name2=value2"
e.g.
sqlmap -u "http://localhost/bwapp/sqli_1.php?title=1*" --cookie="security=low; PHPSESSID=oikbs8qcic2omf5gnd09kihsm7"