Test report

Heading page

Cheesebook

15/12/2021

Testers:

The XSS rat - info@thexssrat.com

BE0508.999.580

0476876632

Summary

We were able to identify several high severity vulnerabilities, some of which can easily lead to account takeover. Security seems to be lacking in a few key areas and it's recommended to go through each item and see if remidiation is required.

Attack narrative

In this assignment, we are testing in accordance to the OWASP top 10 web vulnerabilities. We are looking for each item on the list and following the OWASP web testing guide:

https://owasp.org/www-project-web-security-testing-guide/v41/4-Web_Application_Security_Testing/07-Input_Validation_Testing/11.1-Testing_for_Local_File_Inclusion

Findings

BAC on viewusers.php

There seems to be a BAC since everyone can open up viewUsers.php and see the contents of the user list.

Steps to reproduce

Expected result

Actual result

BAC on new.php

There seems to be a BAC since everyone can open up viewUsers.php and see the contents of the user list.

Steps to reproduce

Expected result

Actual result

Score

10/10 PII is leaked

IDOR on the editing of posts

By directly going to the page to edit a post and entering any identifier, we can edit posts that do not belong to us.

Steps to reproduce

Expected result

We get an error message

Actual result

We can see the edit page and actually edit a post

Score

7/10

IDOR on the deletion of posts

By directly going to the page to edit a post and entering any identifier, we can edit posts that do not belong to us.

Steps to reproduce

Expected result

We get an error message

Actual result

We can delete a post that is not ours

Score

8/10 This can be very annoying to users driving them away

No HTTPOnly flag defined on session cookie

This always needs to be defined if possible, see the next issue.

Missing CSP header

This always needs to be defined if possible, see the next issue.

Reflected XSS on search page leads to account takeover

When searching for a XSS attack vector, no posts will be found but a reflected XSS will be triggered due to the reflection of the search parameter.

Steps to reproduce

Expected result

We get a message no results have been found but no reflection is done.

Actual result

An XSS attack vector will trigger. You can steal the cookies due to not having the HTTPOnly flag enabled. This can lead to full account takeover. This is made even worse because there is no CSP header which makes it very easy to smuggle out data.

Score

10/10 account takeover of anyone

No CORS headers defined

These should always be defined when possible

Self XSS chained into full XSS with CSRF

In the user panel, if you make a post with a XSS attack vector title, it will pop up but since this is only in your own account panel, this is self XSS.

We can however upgrade this because there is no CSRF token on the creation of a post. This means we can make anyone create a post with a XSS attack vector via CSRF and when they visit their account panel, we can again steal their session cookies.

CSRF PoC with XSS provided.

Steps to reproduce

Creation of PoC

XSS Vector is encoded with https://www.urlencoder.org/

XSS PoC is generated with https://security.love/CSRF-PoC-Genorator/

Settings:

Expected result

The HTML is filtered properly and the user sees their post. It's not possible to insert a post via CSRF due to a token being present that is needed to be verified. This token is not there.

Actual result

An XSS attack vector will trigger. You can steal the cookies due to not having the HTTPOnly flag enabled. This can lead to full account takeover. This is made even worse because there is no CSP header which makes it very easy to smuggle out data.

Score

10/10 Account takeover

There is no rate limiting on the login/register pages. Same goes for anything.

This allows attackers to easily perform attacks such as credentials stuffing in which they will attempt to log in with a list of usernames and passwords they gained from hacking other applications. Attackers can also spam by sending a lot of requests to create new posts. In combination with new.php not being secure and the attacker not even having to log in, this issue is severe.

Score

8/10

Conclusion

The application contains a lot of weaknesses of high severity still and being able to chain them can get use some very impactful results. This application is not production ready.

Recommendations

Cleanup/retention steps

We deleted all posts that were used in the pentest and not required for the report.

GO/NOGO

No go based on previous advice