CAPEC-87 - Forceful Browsing

An attacker employs forceful browsing to access portions of a website that are otherwise unreachable through direct URL entry.

Usually, a front controller or similar design pattern is employed to protect access to portions of a web application.

Forceful browsing enables an attacker to access information, perform privileged operations and otherwise reach sections of the web application that have been improperly protected.

Severity

Likelihood

Confidentiality

Integrity

Availability

  • Attack Methods 1
  • Brute Force
  • Sec Principles 2
  • Complete Mediation
  • Reluctance To Trust
  • Scopes 2
  • Read files or directories
  • Confidentiality
  • Bypass protection mechanism
  • Authorization
  • Access_Control
  • Confidentiality

Low level: Forcibly browseable pages can be discovered by using a number of automated tools. Doing the same manually is tedious but by no means difficult

The forcibly browseable pages or accessible resources must be discoverable and improperly protected.

A directory listing is helpful but not a requirement. No special resources are required.

Following all the links recursively reveals resources that are available

Having a directory listing also points to the available pages and resources in the application that may be forcibly browseable.

Treat the Entire Inherited Process Context as Unvalidated Input

Use Authentication Mechanisms, Where Appropriate, Correctly

Step 1 - Spider

Using an automated tool, an attacker follows all public links on a web site. He records all the links he finds..

Tecnique ID: 1 - Environment(s) env-Web

Use a spidering tool to follow and record all links

Tecnique ID: 2 - Environment(s) env-Web

Use a proxy tool to record all links visited during a manual traversal of the web application.

Security Control ID: 1

Type: Detective

Monitor velocity of page fetching in web logs. Humans who view a page and select a link from it will click far slower and far less regularly than tools. Tools make requests very quickly and the requests are typically spaced apart regularly (e.g. 0.8 seconds between them).

Security Control ID: 2

Type: Detective

Create links on some pages that are visually hidden from web browsers. Using iframes, images, or other HTML techniques, the links can be hidden from web browsing humans, but visible to spiders and programs. A request for the page, then, becomes a good predictor of an automated tool probing the application.

Security Control ID: 3

Type: Preventative

Actively monitor the application and either deny or redirect requests from origins that appear to be automated.


Outcome ID: 1

Type: Success

A list of links is created by the attacker.



Step 1 - Attempt well-known or guessable resource locations

Using an automated tool, an attacker requests a variety of well-known URLs that correspond to administrative, debugging, or other useful internal actions. He records all the positive responses from the server..

Tecnique ID: 1 - Environment(s) env-Web

Use a spidering tool to follow and record attempts on well-known URLs

Tecnique ID: 2 - Environment(s) env-Web

Use a proxy tool to record all links visited during a manual traversal of attempts on well-known URLs.

Indicator ID: 1 - Environment(s) env-Web

Type: Positive

Common resource identifiers are used (e.g., /admin/, admin.jsp, admin.aspx, etc.)

Indicator ID: 2 - Environment(s) env-Web

Type: Positive

Well-known middleware or application platforms are used (e.g., Cold Fusion, WebSphere, WebLogic, JBoss, etc.)


Security Control ID: 1

Type: Detective

Monitor errors (e.g., 404 not found) from web servers, application servers, and other HTTP infrastructure (e.g., load balancers). Alert on an unusual number of consecutive failures or total failures from a single host. Potentially alert on many failures from many different hosts, but in a relatively short time window.

Security Control ID: 2

Type: Detective

Create "honeypot" web pages or scripts that do not actually have any use in the application, and name them common names (e.g., admin.jsp, admin.do, admin.aspx, etc.). Alert when one of these resources is requested.

Security Control ID: 3

Type: Preventative

Actively monitor the application and either deny or redirect requests from origins that appear to be generating an unusual amount of failures.

Security Control ID: 4

Type: Corrective

Obtain a list of sensitive areas that should not be directly accessible (e.g., JSPs or other templates that should only be accessible via front controllers). Apply an external mechanism (rule in the load balancer, rule in the reverse proxy, etc.) to intercept and redirect requests for those resources. Ideally use patterns, not specific page names (e.g., /jsp/* instead of a list of individual JSPs). Regularly update the list that is used in operation.

Security Control ID: 5

Type: Detective

Identify defaults for platform-specific sensitive resources. If the application does not use those defaults, alert on all requests for them (e.g., http://server:8080/admin/)


Outcome ID: 1

Type: Success

The attacker discovers one or more unprotected resources.



Step 1 - Use unauthorized resources

By visiting the unprotected resource, the attacker makes use of unauthorized functionality..

Tecnique ID: 1 - Environment(s) env-All

Access unprotected functions and execute them.

Security Control ID: 1

Type: Detective

Malformed log entries are a common side-effect of this kind of attack. E.g., "User xyz deleted by on 10/16/07." The "by on" indicates that no authorized user was recorded. (A good entry would say "user xyz deleted by admin on 10/16/07"). Monitoring of log file entries for correct and consistent output format can indicate this kind of attack succeeding.


Step 2 - View unauthorized data

The attacker discovers and views unprotected sensitive data..

Tecnique ID: 1 - Environment(s) env-Web

Direct request of protected pages that directly access database back-ends. (e.g., list.jsp, accounts.jsp, status.jsp, etc.)

Indicator ID: 1 - Environment(s) env-Web

Type: Positive

Dynamic pages (JSP, ASP, PHP, etc.) exist that divulge sensitive data without first checking authorization.



Authenticate request to every resource. In addition, every page or resource must ensure that the request it is handling has been made in an authorized context.

Forceful browsing can also be made difficult to a large extent by not hard-coding names of application pages or resources. This way, the attacker cannot figure out, from the application alone, the resources available from the present context.