1

I am trying to debug remotly an ELF from my windows 10 (the ELF runs on my ubuntu 32 bit vm) (the ELF is from pwnable.kr - unlink). Because the exploit is via gets() I try to pass input through the "debugger options" in IDA:

The process options

(I also tried doing it without the "parameters").

anyway this is the the exception I get when I get to "gets" function.

The exception on IDA

I tried to understand from the internet how people usually use remote debugging with IDA and use the process' stdin.

BTW: this is how it runs:

shahar@ubuntu:~/Desktop$ ./linux_server unlink
IDA Linux 32-bit remote debug server(ST) v1.15. Hex-Rays (c) 2004-2012
Listening on port #23946...
=========================================================
[1] Accepting connection from 192.168.188.1...
here is stack address leak: 0xbfdfdc04
here is heap address leak: 0x9085410
now that you have leaks, get shell!

Thanks a lot for your help! :-)

EDIT:

This is where the error is raised:

enter image description here

2
  • Set a breakpoint at the main function, then step forward line by line with F8. You may find the code where that error was shown.
    – Biswapriyo
    Jul 12, 2018 at 19:11
  • @Biswapriyo Hi! thanks for your answer but I probably did not explain myself well: I started debug it and when I got to the "gets" function I had this error. Jul 13, 2018 at 14:30

1 Answer 1

2

What I usually do is to supply the STDIN data from a file. So, in the command line you used to run the Linux debugging server I would just add the redirection of the file with the inputs for the get, like this:

$ ./linux_server unlink < your_file

For some reason, I never got to work the redirection in parameters with remote debuggers.

2
  • It worked! thanks a lot! summery: my mistake was redirecting on IDA (on debbuger options -> parameters) and not on the shell where I ran the linux_server. Jul 13, 2018 at 15:15
  • @ShaharZelig If joxeankoret answer solved your problem mark his answer as accepted answer.
    – user22363
    Jul 13, 2018 at 20:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.