Tools & Scripts

Ugen – Username Generator

What’s this?

Ugen is the latest script I have added to my GitHub repository. It is nothing spectacular and is just a simple python script to transform a list of “firstname, lastnames” into potential username formats.

I made this script while working on a HTB Windows machine. The box had a webpage showing a list of employees (firstnames and lastnames) and I had no way of quickly and efficiently checking the username format they had chosen.

Names should be entered into a text file in the following format:


Then simply run the tool like this:

python -i userInput.txt -o userOutput.txt -n

The “-n” switch is optional and will append the numbers 1-5 to the end of each username possibility. For example, jbloggs1, jbloggs2 etc.

Typically, you can follow this up and use kerbrute to enumerate the usernames in this list to identify which username format is correct.

kerbrute userenum --dc -d domain.local ugen_list.txt

I have purposely blurred out the usernames and domain names as I hope to have some Windows challenges coming out soon and do not want to reveal any details about what is valid etc.

Anyway, hope someone finds this useful.