-
Notifications
You must be signed in to change notification settings - Fork 0
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
Stage 3 - ROPi #46
Comments
Here's a good guide I think |
I think I have a decent idea how to follow the guides but my assembly-fu is lacking :( |
Oh yeah forgot to mention that this is probably a "Return-Oriented-Programming" exploit. |
Name seems to indicate it at least 😛 |
The pdf guide there is really useful. Me being tired is not helpful though. I've been reading though it and it makes sense. The application itself is really simple. Main function and four other functions: int __cdecl main(int argc, const char **argv, const char **envp)
{
ezy();
puts("addio!");
return 0;
}
ssize_t ezy()
{
char buf; // [sp+10h] [bp-28h]@1
puts("Benvenuti al convegno RetOri Pro!\nVuole lasciare un messaggio?");
fflush(stdout);
return read(0, &buf, 0x40u);
}
int __cdecl ret(int a1)
{
if ( a1 != -1159991569 )
{
puts("chiave sbagliata! :(");
exit(1);
}
fd = open("./flag.txt", 0);
puts("[+] aperto");
return fflush(stdout);
}
int __cdecl ori(int a1, int a2)
{
if ( a1 != -1412567041 && a2 != 2018915346 )
{
puts("chiave sbagliata! :((");
exit(1);
}
read(fd, &dati, 0x80u);
puts("[+] leggi");
return fflush(stdout);
}
int pro()
{
puts("[+] stampare");
printf("%s", &dati);
return fflush(stdout);
} Basically we need somehow to call Will read further up on the ROP attack tomorrow (or just this weekend, it's hard to concentrate after a whole day or work) |
Screw it, I want to solve this. Here are found ROP gadgets using this tool
|
Linked libs, like from the guide
Based on the screenshot from above.. this is probably dynamic and needs to be found out 'on the fly'? |
Okay, so, game plan using the rop gadgets:
|
Description
Ritorno orientata programmazione
nc ropi.vuln.icec.tf 6500
download fileSolution
Flag is: ``
The text was updated successfully, but these errors were encountered: