Day 4

This room is a simple introfuction to the Linux tool CeWL. CeWL (pronounced "cool") is a custom word list generator tool that spiders websites to create word lists based on the site's content

Learning Objectives

  • What is CeWL?

  • What are the capabilities of CeWL?

  • How can we leverage CeWL to generate a custom wordlist from a website?

  • How can we customise the tool's output for specific tasks?

The room is a very straightforward introduction to the tool with all the commands given.

CeWL is a wordlist generator that is unique compared to other tools available. While many tools rely on pre-defined lists or common dictionary attacks, CeWL creates custom wordlists based on web page content.

We start with making a basic wordlist from the website and output it into a file

┌──(kali㉿kali)-[~/THM/AOC2023]
└─$ cewl http://10.10.126.196 -w output.txt
CeWL 6.1 (Max Length) Robin Wood (robin@digi.ninja) (https://digi.ninja/)

The contents of the file is a world list as follows.

└─$ cat output.txt  
Start
End
and
the
AntarctiCrafts
our
Stylesheet
.
.
.
Visit
office
Send
Message
Login
Submit

CeWL provides a lot of options that allow you to tailor the wordlist to your needs:

  1. Specify spidering depth: The -d option allows you to set how deep CeWL should spider. For example, to spider two links deep: cewl http://machine_ip -d 2 -w output1.txt

  2. Set minimum and maximum word length: Use the -m and -x options respectively. For instance, to get words between 5 and 10 characters: cewl http://machine_ip -m 5 -x 10 -w output2.txt

  3. Handle authentication: If the target site is behind a login, you can use the -a flag for form-based authentication.

  4. Custom extensions: The --with-numbers option will append numbers to words, and using --extension allows you to append custom extensions to each word, making it useful for directory or file brute-forcing.

  5. Follow external links: By default, CeWL doesn't spider external sites, but using the --offsite option allows you to do so.

For this room we need to gain access to the portal located at http://machine_ip/login.php

We first create a username and password list based on the website.

Username List:

Password List:

No we can attempt to brute force the login page with Wfuzz.

Wfuzz is a tool designed for brute-forcing web applications. It can be used to find resources not linked directories, servlets, scripts, etc, brute-force GET and POST parameters for checking different kinds of injections (SQL, XSS, LDAP), brute-force forms parameters (user/password) and fuzzing.

We now have our username and password. We can proceed to login to the portal.

We can see this is a mailbox and the flag can be found here.


Last updated

Was this helpful?