[Paper Review] Leveraging AI to optimize website structure discovery during Penetration Testing
This paper proposes an AI-enhanced dirbusting approach that uses semantic clustering of wordlists to optimize website structure discovery in penetration testing. By grouping words by semantic meaning and applying a next-word intelligent strategy, the method reduces the number of HTTP requests needed to find valid paths, achieving up to 50% performance improvement over traditional brute-force techniques across eight web applications.
Dirbusting is a technique used to brute force directories and file names on web servers while monitoring HTTP responses, in order to enumerate server contents. Such a technique uses lists of common words to discover the hidden structure of the target website. Dirbusting typically relies on response codes as discovery conditions to find new pages. It is widely used in web application penetration testing, an activity that allows companies to detect websites vulnerabilities. Dirbusting techniques are both time and resource consuming and innovative approaches have never been explored in this field. We hence propose an advanced technique to optimize the dirbusting process by leveraging Artificial Intelligence. More specifically, we use semantic clustering techniques in order to organize wordlist items in different groups according to their semantic meaning. The created clusters are used in an ad-hoc implemented next-word intelligent strategy. This paper demonstrates that the usage of clustering techniques outperforms the commonly used brute force methods. Performance is evaluated by testing eight different web applications. Results show a performance increase that is up to 50% for each of the conducted experiments.
Motivation & Objective
- To address the inefficiency of traditional dirbusting techniques that rely on random or heuristic wordlist usage in black-box penetration testing.
- To reduce the time and resource consumption of brute-forcing web directory structures by leveraging semantic understanding of wordlists.
- To demonstrate that AI-driven semantic clustering outperforms standard random or sequential wordlist approaches in discovering hidden web application paths.
- To provide a scalable, reusable framework for optimizing website structure discovery using NLP and embedding-based clustering.
Proposed method
- The method constructs a unified wordlist by extracting absolute paths from eight diverse web applications deployed in Docker containers.
- It applies pre-trained sentence embeddings (Universal Sentence Encoder) to vectorize words and compute semantic similarity between path components.
- A hierarchical clustering algorithm groups semantically related paths (e.g., 'admin', 'login', 'dashboard') into clusters to guide the search order.
- An intelligent next-word strategy prioritizes clusters based on semantic relevance, reducing redundant or low-probability requests.
- The approach compares performance against standard random brute-force dirbusting using response codes (non-404) as discovery criteria.
- Experiments are conducted across eight real-world web applications, with 30 repetitions per test to ensure statistical significance.
Experimental results
Research questions
- RQ1Can semantic clustering of wordlists improve the efficiency of dirbusting in web application penetration testing?
- RQ2How does the performance of a semantic clustering-based dirbusting strategy compare to traditional random or sequential brute-force methods in terms of request count to discover all valid paths?
- RQ3To what extent does the clustering approach reduce the number of HTTP requests required to discover hidden or private web application paths?
- RQ4Does the performance gain vary across different web application frameworks, and if so, why?
Key findings
- The semantic clustering approach achieved a performance improvement of up to 50% in discovering valid paths compared to the brute-force method across all eight tested web applications.
- The clustering-based method detected nearly all valid URLs with approximately half the number of requests required by the random brute-force approach.
- The performance gain was most pronounced in applications with less dominant or fragmented wordlist coverage, such as Bodgeit, Bricks, and DVWS.
- Joomla showed a lower improvement (around 2000 fewer requests) due to its high wordlist coverage (4672 out of 8367 words), reducing the relative benefit of semantic prioritization.
- The curve of valid requests discovered over time rose more steeply with the semantic clustering method, indicating faster convergence to full path discovery.
- The results demonstrate that semantic understanding of wordlists enables more intelligent and efficient exploration of web application structures during penetration testing.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.