Skip to content
Access control Write-up Beginner

Web Application Exploits Directory Listing Vulnerability Privilege Escalation And Csrf

The write-up shows that a deliberately vulnerable test site exposes directory listings and an admin folder without authentication, and that its forms lack anti-CSRF tokens. An attacker could browse files and reach admin pages they should not see, and could potentially forge requests on a logged-in user's behalf.

Anbu Hack Ops Follow

Published on systemweakness.com

In this write-up, I will show you how web application directory listing vulnerabilities are exploited, web app privilege escalation, and how Cross-Site Request Forgery (CSRF) vulnerabilities are discovered.

Anbu Hack Ops, on systemweakness.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the web server has directory listing enabled and the application does not check whether a user is allowed to view the admin folder, and its forms do not include an anti-CSRF token.

Impact

An unauthenticated visitor could view directory contents and reach the admin folder, and the absence of CSRF tokens suggests requests could be forged, though the text does not demonstrate a working CSRF exploit.

What the attacker needed

Access to the deliberately vulnerable test site; a test account (username test, password test)

The fix

The application should disable directory listing, enforce authentication and authorisation checks on admin pages, and include anti-CSRF tokens in forms.

How it was found

  1. Browse to the test site's home page in Firefox.
  2. Open a URL that passes a file parameter pointing into the pictures folder.
  3. Open the CVS folder URL and observe the directory listing.
  4. Without logging in, request the admin folder URL and see that it is displayed.
  5. Sign up and log in with the test account.
  6. View the page source and search for a hidden CSRF token field.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

A directory listing means the web server shows a list of files in a folder instead of a normal page, so anyone can see what is there. Privilege escalation means a normal user can reach parts of a site meant only for administrators. CSRF is when a malicious site makes your browser send a request to another site where you are already logged in, without you meaning to.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by Anbu Hack Ops

View all

2 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.