-
Notifications
You must be signed in to change notification settings - Fork 478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[QUESTION] hole-in-bin
subject
#2853
Comments
Hello @Betzalel75 |
Hello @EldritchGriffin, Analysis and Exploitation Report of a Use-After-Free Vulnerability1. IntroductionThis report presents the analysis process and exploitation attempts of a Use-After-Free vulnerability found in the binary 2. Initial Analysis./bin A B C D
dynamite failed?
./bin A B C
dynamite failed?
./bin A B
Segmentation fault
./bin A
Segmentation fault
./bin
Segmentation fault If the number of arguments is less than three, a segmentation fault occurs. 2.1 Binary DisassemblyAfter disassembling the binary, I identified key elements to solve the challenge. The main function at address
I also identified an interesting function named This binary is vulnerable to a "use-after-free" attack or "heap exploitation" due to the following reasons:
To further analyze, I searched for the objdump -d ./bin | grep -A 20 "<winner>:" Output:
2.2 Main Function AnalysisExamining the objdump -d ./bin | grep -A 50 "804889e:" Findings:
2.3 Important String Analysisstrings ./bin | grep -i "that wasn"
strings ./bin | grep -i "failed" Results:
2.4 Debugging with GDBTo further analyze the vulnerability, I used GDB to inspect the crash: gdb -q --ex="set pagination off" --ex="run $(python -c 'print "A"*40') $(python -c 'print "B"*40') $(python -c 'print "C"*40')" --ex="x/16xw \$esp" --ex="bt" --ex="info registers" --ex=quit ./bin Output:
Registers analysis:
The crash happens inside 3. Understanding the VulnerabilityA use-after-free vulnerability occurs when:
4. Exploitation Attempts4.1 First Attempt: Direct Address Injection./bin $(python -c 'print "\x64\x88\x04\x08"') $(python -c 'print "\x64\x88\x04\x08"') $(python -c 'print "\x64\x88\x04\x08"') 4.2 Exploitation with Padding and Address Repetition./bin $(python -c 'print "A"*16') $(python -c 'print "\x64\x88\x04\x08"*4') $(python -c 'print "C"*16') 5. ConclusionDespite multiple exploitation attempts using different techniques, none successfully redirected execution to the |
hello @Betzalel75. thanks ! |
hole-in-bin
Hi team,
I'm having an issue with the ex06 binary. I've tried several approaches to exploit the vulnerability, but every time I perform a memory overflow, I get a segfault on .
Additionally, based on the analysis I conducted on the disassembled code, the program checks the number of arguments passed as parameters. However, the program crashes on the next if it is executed with fewer than 3 arguments. Specifically:
Could you please verify whether this binary file is actually exploitable?
The text was updated successfully, but these errors were encountered: