Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
GLUFS — Automated format string vulnerability exploitation tool for discovering stack, PIE, and canary leaks with flag search capability via %s or %p specifiers. | Kitploit
Tools/GitHubGitHub/diego-altf4/glufs
Vulnerability AnalysisExploitationFuzzingBinary Exploitation
GitHubdiego-altf4/glufs

GLUFS

Automated format string vulnerability exploitation tool for discovering stack, PIE, and canary leaks with flag search capability via %s or %p specifiers.

View Repository
27434 years agoReviewed by Kitploit

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share


Getting Leaks Using Format String.

root@kitploit:~
                    .d8888b.       888       888     888   8888888888   .d8888b.  
                    d88P  Y88b     888       888     888   888         d88P  Y88b 
                    888    888     888       888     888   888         Y88b.      
                    888            888       888     888   8888888      "Y888b.   
                    888  88888     888       888     888   888             "Y88b. 
                    888    888     888       888     888   888               "888 
                    Y88b  d88P     888       Y88b. .d88P   888         Y88b  d88P 
                    "Y8888P88      88888888   "Y88888P"    888          "Y8888P"                                                    

                                           By: DiegoAltF4

Introduction

GLUFS allows you to automate the tedious process of finding leaks using format string vulnerabilities. It will allow you to find stack leaks, pie leaks and canary leaks, in each case indicating the payload that provides the leak. In addition, it includes a mode that allows you to search for a "flag" string in the leaks. For this mode, the %s or %p specifier can be used.

Parameters

ParameterInformation
-bSelect this option to indicate the binary to be exploited.
-maxSelect this option to indicate the maximum value to be tested. Range: (min, max). By default, max = 40
-minSelect this option to indicate the minimum value to be tested. Range: (min, max). By default, min = 1
-ipSelect this option to specify the ip of the remote server.
-portSelect this option to specify the port of the remote server.
-flagSelect this option to indicate the start of the flag to search for.
-archSelect this option to set the arch (32 or 64).
--sSelect this option to use %s instead of %p.
--canarySelect this option to find the position where a canary leak is located.
--leaksSelect this option to print all the leaks found.
--pieSelect this option to find the position where a pie leak is located.
--stackSelect this option to find the position where a stack leak is located.
--vSelect this option to set the verbose mode.

Examples of use

1️⃣ First example ~ TryHackMe room pwn101

For this example, we are going to use GLUFS to get a pie and canary leak.

The binary we are going to take as an example is the one corresponding to challenge 7 of TryHackMe room pwn101 TryHackMe room pwn101.

We will use the -b option to indicate the binary, the -min option to indicate the initial value of the iteration and -max to indicate the final value of the iteration. In addition, we want to get information about the canaries and about pie.

root@kitploit:~
./glufs.py -b ./pwn107.pwn107 -min 5 -max 15 --pie --canary

image

Demo:

asciicast

2️⃣ Second example ~ 247CTF Confused environment read

For this example, we will use GLUFS to obtain the flag.

The challenge we are going to solve is Confused environment read from the 247CTF platform.

For this example we are not going to use binary. We only have an ip and port. Therefore, we are going to use the -ip option to indicate the address, -port to indicate the port, -flag to specify the start of the flag to look for. In addition, as we do not have binary, we have to indicate the architecture, in this case, x86-64 (-arch 64). We will also indicate the start of the iteration with -min and the end of the iteration with -max. In addition, we are going to use the -s option to use %s instead of %p.

root@kitploit:~
./glufs.py -ip 3bcbadabd1a7e914.247ctf.com -port 50387 -flag 247CTF -arch 64 -min 1 -max 200 --s

image

Demo:

asciicast

3️⃣ Third example ~ PicoCTF flag leak

For this example, we will use GLUFS to obtain the flag.

The challenge we are going to solve is flag leak from the PicoCTF platform.

For this example, we will use the -ip option to indicate the server address, -port to indicate the server port, -b to indicate the binary, -flag to indicate the start of the flag, and finally, we specify the start and end of the iteration with -min and -max. If you do not specify the --s option, the %p format will be used by default.

root@kitploit:~
./glufs.py -ip saturn.picoctf.net  -port 50563 -b ./vuln  -flag picoCTF -min 20 -max 200

image

Demo:

asciicast

Installation:

root@kitploit:~
git clone https://github.com/Diego-AltF4/GLUFS.git
cd GLUFS/
pip3 install -r requirements.txt
chmod +x ./glufs.py 

Configuration:

It is very important that you modify the code to be able to adapt it to your binary/challenge. For this, there are two delimited sections of the code in which you have to make changes in order to obtain the leak of the format string as well as to configure when the payload should be sent.

Examples: For the picoCTF challenge explained above, the following configuration is used:

root@kitploit:~
#######################################################################
#      This is the part that you must modify to fit your binary.      #
#######################################################################
p.sendlineafter(b'>>', payload)
p.recvuntil(b'-')
leak = p.recv().strip(b'\n')
#print(leak) ## For debugging errors
#######################################################################	
Download Tool